]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/tex-stream.hh
e8011bb3ee7ade21bc723a8b3049b02140b5facc
[lilypond.git] / lily / include / tex-stream.hh
1 #ifndef TSTREAM__HH
2 #define TSTREAM__HH
3
4 #include <iostream.h>
5 #include "string.hh"
6
7
8 /** TeX output.
9   Use this class for writing to a TeX file.
10   It counts braces to prevent nesting errors, and
11   it will add a comment sign before each newline.
12   */
13 class Tex_stream {
14     void break_line();
15 public:
16     bool outputting_comment;
17     ostream *os;
18     int nest_level;
19     /// to check linelen in output. TeX has limits.
20     int line_len_i_;
21     
22     /// open a file for writing
23     Tex_stream (String filename);
24     void header();
25     /// delegate conversion to string class.
26     Tex_stream &operator<<(String);
27
28     /// close the file
29     ~Tex_stream();
30 private:
31     Tex_stream (Tex_stream const&);
32 };
33 #endif