]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/paper-stream.hh
dc5b08541efa2b8d384fbedb7d40defe128c2f9e
[lilypond.git] / lily / include / paper-stream.hh
1 #ifndef PAPER_STREAM_HH
2 #define PAPER_STREAM_HH
3
4 #include <iostream.h>
5 #include "string.hh"
6
7 /** Paper output
8   Baseclass for writing to a PostScript or TeX file.
9   It counts braces to prevent nesting errors, and
10   it will add a comment sign before each newline.
11  */
12
13 class Paper_stream
14 {
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     Paper_stream (String filename);
24     virtual void header () = 0;
25
26     /// delegate conversion to scalar class
27     virtual Paper_stream &operator <<(Scalar);
28
29     /// close the file
30     virtual ~Paper_stream();
31
32 private:
33     Paper_stream (Paper_stream const&);
34     void break_line();
35 };
36
37 #endif // PAPER_STREAM_HH