2 dstream.hh -- declare Dstream
4 source file of the Flower Library
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
17 template<class K,class V>
21 a class for providing debug output of nested structures,
22 with indents according to \{\}()[].
24 One can turn on and off specific messages using the Assoc silent.
25 This can be done automatically:
27 #define DEBUG dstream_.identify_as (__PRETTY_FUNCTION__)
29 DEBUG << "a message\n";
31 Init for the class names which should be silent can be given in a rc file.
34 make a baseclass for indentable streams.
40 bool local_silence_b_;
41 bool default_silence_b_;
42 String current_classname_str_;
43 void output (String s);
44 Assoc<String, bool> *silent_assoc_p_;
48 bool silent_b (String) const;
51 if rcfile == 0, then do not read any rc file.
53 Dstream (ostream *r, char const * rcfile);
55 Dstream &identify_as (String s);
58 Output a Scalar via the Dstream. This is the only output
59 interface. It explicitely delegates all implicit conversion
62 Dstream &operator << (Scalar);
64 Output memory locations.
66 Dstream &operator << (void const *);
67 Dstream &operator << (char const *);