idx = cl;
else
{
- (*silent_assoc_p_)[idx] = false;
+ (*silent_assoc_p_)[idx] = default_silence_b_;
}
local_silence_b_ = (*silent_assoc_p_)[idx];
if (current_classname_str_ != idx && !local_silence_b_)
{
os_l_ = r;
silent_assoc_p_ = new Assoc<String,bool>;
+ default_silence_b_ = false;
indent_level_i_ = 0;
if (!os_l_)
return;
(*silent_assoc_p_)[r[0]] = (bool)(int)(Scalar (r[1]));
}
+ if ((*silent_assoc_p_).elt_b ("Dstream_default_silence"))
+ default_silence_b_ = (*silent_assoc_p_)["Dstream_default_silence"];
}
*/
class Dstream
{
- ostream *os_l_;
- int indent_level_i_;
- bool local_silence_b_;
- String current_classname_str_;
- void output (String s);
- Assoc<String, bool> *silent_assoc_p_;
+ ostream *os_l_;
+ int indent_level_i_;
+ bool local_silence_b_;
+ bool default_silence_b_;
+ String current_classname_str_;
+ void output (String s);
+ Assoc<String, bool> *silent_assoc_p_;
public:
- void clear_silence();
- bool silent_b (String) const;
+ void clear_silence();
+ bool silent_b (String) const;
- /**
- if rcfile == 0, then do not read any rc file.
- */
- Dstream (ostream *r, char const * rcfile);
- virtual ~Dstream();
- Dstream &identify_as (String s);
+ /**
+ if rcfile == 0, then do not read any rc file.
+ */
+ Dstream (ostream *r, char const * rcfile);
+ virtual ~Dstream();
+ Dstream &identify_as (String s);
-/** Output a string via the Dstream. This is the only output
- interface. It delegates all conversion to String class. */
- Dstream &operator << (String s);
- /**
- Output memory locations.
- */
- Dstream &operator << (void const *);
- Dstream &operator << (char const *);
+ /** Output a string via the Dstream. This is the only output
+ interface. It delegates all conversion to String class. */
+ Dstream &operator << (String s);
+ /**
+ Output memory locations.
+ */
+ Dstream &operator << (void const *);
+ Dstream &operator << (char const *);
};
#endif