]> git.donarmstrong.com Git - lilypond.git/blob - midi2ly/include/lilypond-stream.hh
patch::: 1.5.18.moh1: [PATCH] 1.4 Lyric alignment
[lilypond.git] / midi2ly / include / lilypond-stream.hh
1 //
2 //  lilypond-stream.hh -- part of LilyPond
3 //
4 //  (c) 1997--2001 Jan Nieuwenhuizen <janneke@gnu.org>
5
6 // should i be named Lilypond_stream?
7
8 #ifndef LILYPOND_STREAM_HH
9 #define LILYPOND_STREAM_HH
10
11 #include "midi2ly-proto.hh"
12 #include "string.hh"
13 //#include "scalar.hh"
14
15 /// Lily output
16 class Lilypond_stream {
17 public:    
18     Lilypond_stream (String filename_str);
19     ~Lilypond_stream();
20
21     Lilypond_stream& operator << (char c);
22     Lilypond_stream& operator << (String s);
23     Lilypond_stream& operator << (Lilypond_item& lilypond_item_r);
24
25 private:
26     void handle_pending_indent();
27     void header();
28     void open();
29     void output (String str);
30     void output_wrapped (String str);
31
32     ostream* os_p_;
33     String filename_str_;
34     int indent_i_;
35     int column_i_;
36     int pending_indent_i_;
37     int wrap_column_i_;
38     bool comment_mode_b_;
39 };
40
41 #endif // LILYPOND_STREAM_HH
42