diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-07-18 15:22:49 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-07-18 15:22:49 -0700 |
commit | 762b099ef6c6ad5b6b61d29e473baa6df8d64ab9 (patch) | |
tree | 8075befbcc8ef2784616c4937793ebed9d21123d /html/003trace.cc.html | |
parent | 614ea44bc2708a687ba10b162a6dc70e48dfac59 (diff) | |
download | mu-762b099ef6c6ad5b6b61d29e473baa6df8d64ab9.tar.gz |
1818
Diffstat (limited to 'html/003trace.cc.html')
-rw-r--r-- | html/003trace.cc.html | 7 |
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& stream<span class="Delimiter">(</span>string layer<span class="Delimiter">)</span> <span class="Delimiter">{</span> + ostream& 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& stream<span class="Delimiter">(</span>int depth<span class="Delimiter">,</span> string layer<span class="Delimiter">)</span> <span class="Delimiter">{</span> + ostream& 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> && 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> |