about summary refs log tree commit diff stats
path: root/html/003trace.cc.html
diff options
context:
space:
mode:
Diffstat (limited to 'html/003trace.cc.html')
-rw-r--r--html/003trace.cc.html7
1 files changed, 5 insertions, 2 deletions
diff --git a/html/003trace.cc.html b/html/003trace.cc.html
index a94ed6b1..0143551b 100644
--- a/html/003trace.cc.html
+++ b/html/003trace.cc.html
@@ -136,14 +136,17 @@ struct trace_stream <span class="Delimiter">{</span>
   string curr_layer<span class="Delimiter">;</span>
   int curr_depth<span class="Delimiter">;</span>
   string dump_layer<span class="Delimiter">;</span>
+  string collect_layer<span class="Delimiter">;</span>  <span class="Comment">// if set, ignore all other layers</span>
+  ofstream null_stream<span class="Delimiter">;</span>  <span class="Comment">// never opens a file, so writes silently fail</span>
   trace_stream<span class="Delimiter">()</span> :curr_stream<span class="Delimiter">(</span><span class="Constant">NULL</span><span class="Delimiter">),</span> curr_depth<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{}</span>
   ~trace_stream<span class="Delimiter">()</span> <span class="Delimiter">{</span> if <span class="Delimiter">(</span>curr_stream<span class="Delimiter">)</span> delete curr_stream<span class="Delimiter">;</span> <span class="Delimiter">}</span>
 
-  ostringstream&amp; stream<span class="Delimiter">(</span>string layer<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  ostream&amp; stream<span class="Delimiter">(</span>string layer<span class="Delimiter">)</span> <span class="Delimiter">{</span>
     <span class="Identifier">return</span> stream<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">,</span> layer<span class="Delimiter">);</span>
   <span class="Delimiter">}</span>
 
-  ostringstream&amp; stream<span class="Delimiter">(</span>int depth<span class="Delimiter">,</span> string layer<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  ostream&amp; stream<span class="Delimiter">(</span>int depth<span class="Delimiter">,</span> string layer<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+    if <span class="Delimiter">(</span>!collect_layer<span class="Delimiter">.</span>empty<span class="Delimiter">()</span> &amp;&amp; layer != collect_layer<span class="Delimiter">)</span> <span class="Identifier">return</span> null_stream<span class="Delimiter">;</span>
     newline<span class="Delimiter">();</span>
     curr_stream = new ostringstream<span class="Delimiter">;</span>
     curr_layer = layer<span class="Delimiter">;</span>