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