]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/tex-stream.hh
release: 1.0.1
[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
26     /// delegate conversion to scalar class
27     Tex_stream &operator <<(Scalar);
28
29     /// close the file
30     ~Tex_stream();
31 private:
32     Tex_stream (Tex_stream const&);
33 };
34 #endif