2 dstream.hh -- declare Dstream
4 source file of the Flower Library
6 (c) 1997--1999 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.
37 bool local_silence_b_;
38 bool default_silence_b_;
39 String current_classname_str_;
40 void output (String s);
41 Dictionary<bool> *silent_dict_p_;
45 bool silent_b (String) const;
48 if rcfile == 0, then do not read any rc file.
50 Dstream (ostream *r, char const * rcfile);
52 Dstream &identify_as (String s);
55 Output a Scalar via the Dstream. This is the only output
56 interface. It explicitely delegates all implicit conversion
59 Dstream &operator << (Scalar);
61 Output memory locations.
63 Dstream &operator << (void const *);
64 Dstream &operator << (char const *);