2 dstream.hh -- declare Dstream
4 source file of the Flower Library
6 (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
18 a class for providing debug output of nested structures,
19 with indents according to \{\} ()[].
21 One can turn on and off specific messages using the Assoc silent.
22 This can be done automatically:
24 #define DEBUG dstream_.identify_as (__PRETTY_FUNCTION__)
26 DEBUG << "a message\n";
28 Init for the class names which should be silent can be given in a rc file.
31 make a baseclass for indentable streams.
39 bool local_silence_b_;
40 bool default_silence_b_;
41 String current_classname_str_;
42 void output (String s);
43 Dictionary<bool> *silent_dict_p_;
46 void clear_silence ();
47 bool silent_b (String) const;
50 if rcfile == 0, then do not read any rc file.
52 Dstream (ostream *r, char const * rcfile);
54 Dstream &identify_as (String s);
57 Dstream &operator << (String);
58 Dstream &operator << (Real);
59 Dstream &operator << (int);
60 Dstream &operator << (Rational);
61 Dstream &operator << (char);
63 Output memory locations.
65 Dstream &operator << (void const *);
66 Dstream &operator << (char const *);