]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.57
authorfred <fred>
Sun, 24 Mar 2002 20:07:57 +0000 (20:07 +0000)
committerfred <fred>
Sun, 24 Mar 2002 20:07:57 +0000 (20:07 +0000)
flower/dstream.cc
flower/include/dstream.hh

index f22365bf551f520c8a26a114b187bc35f3df1f46..28f7a472aaf491ee7e0b38e00cf1b5a76ba7a6e9 100644 (file)
@@ -58,7 +58,7 @@ Dstream::identify_as (String name)
     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_)
@@ -138,6 +138,7 @@ Dstream::Dstream (ostream *r, char const * cfg_nm)
 {
   os_l_ = r;
   silent_assoc_p_ = new Assoc<String,bool>;
+  default_silence_b_ = false;
   indent_level_i_ = 0;
   if (!os_l_)
     return;
@@ -160,6 +161,8 @@ Dstream::Dstream (ostream *r, char const * cfg_nm)
     (*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"];
 }
 
 
index 752b78bca485d0717758345fb214fc25b46fc257..d9f896e43449d5ee19544fad0dafb49248bcb400 100644 (file)
@@ -34,31 +34,32 @@ struct Assoc;
   */
 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