2 dstream.hh -- declare Dstream
4 source file of the Flower Library
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
16 template<class K,class V>
20 a class for providing debug output of nested structures,
21 with indents according to \{\}()[].
23 One can turn on and off specific messages using the Assoc silent.
24 This can be done automatically:
26 #define DEBUG dstream_.identify_as(__PRETTY_FUNCTION__)
28 DEBUG << "a message\n";
30 Init for the class names which should be silent can be given in a rc file.
33 make a baseclass for indentable streams.
39 bool local_silence_b_;
40 String current_classname_str_;
41 void output(String s);
42 Assoc<String, bool> *silent_assoc_p_;
48 if rcfile == 0, then do not read any rc file.
51 Dstream(ostream *r, char const * rcfile);
53 Dstream &identify_as(String s);
55 Dstream &operator << (String s);
57 Output memory locations.
59 Dstream &operator << (void const *);
60 Dstream &operator << (char const *);