lilypond-0.0.2
[lilypond.git] / dstream.hh
blob24673695f244242ea16014e483b7a6c13c175ec2
1 // debug_stream
3 #ifndef DSTREAM_HH
4 #define DSTREAM_HH
6 #include "string.hh"
7 #include "assoc.hh"
9 const char eol= '\n';
11 /// debug stream
12 class Dstream
14 ostream *os;
15 int indentlvl;
16 Assoc<String, bool> silent;
17 bool local_silence;
18 String classname;
19 /// indent of each level
20 const INDTAB = 3;
22 public:
23 Dstream(ostream &r, const char * = 0);
24 Dstream &identify_as(String s);
25 void switch_output(String s,bool);
26 Dstream &operator << (String s);
28 /**
29 a class for providing debug output of nested structures,
30 with indents according to \{\}()[].
32 Using identify_as() one can turn on and off specific messages. Init
33 for these can be given in a rc file
36 #endif