Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 626e7b9df2c26f4a1ac4abc5819592a1 > files > 410

atlascpp-devel-0.6.2-1.fc15.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Atlas-C++: DebugBridge.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Atlas-C++</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">DebugBridge.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef DEBUG_BRIDGE_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define DEBUG_BRIDGE_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;Atlas/Bridge.h&gt;</span>
<a name="l00007"></a>00007 
<a name="l00008"></a>00008 <span class="keyword">class </span><a class="code" href="class_debug_bridge.html">DebugBridge</a> : <span class="keyword">public</span> Atlas::Bridge
<a name="l00009"></a>00009 {
<a name="l00010"></a>00010 <span class="keyword">public</span>:
<a name="l00011"></a>00011 
<a name="l00012"></a>00012     <a class="code" href="class_debug_bridge.html">DebugBridge</a>()
<a name="l00013"></a>00013     {
<a name="l00014"></a>00014         padding = <span class="stringliteral">&quot;&quot;</span>;
<a name="l00015"></a>00015     }
<a name="l00016"></a>00016 
<a name="l00017"></a>00017     <span class="keyword">virtual</span> ~<a class="code" href="class_debug_bridge.html">DebugBridge</a>() { }
<a name="l00018"></a>00018 
<a name="l00019"></a><a class="code" href="class_debug_bridge.html#a8d91d14db7bd255b3c580e83d0db7805">00019</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_debug_bridge.html#a8d91d14db7bd255b3c580e83d0db7805" title="Begin an Atlas stream.">streamBegin</a>() {
<a name="l00020"></a>00020         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;streamBegin&quot;</span> &lt;&lt; std::endl;
<a name="l00021"></a>00021         addPadding();
<a name="l00022"></a>00022     }
<a name="l00023"></a><a class="code" href="class_debug_bridge.html#afd2fd3032321997847ee1a09a27cdfbc">00023</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_debug_bridge.html#afd2fd3032321997847ee1a09a27cdfbc" title="Start a message in an Atlas stream.">streamMessage</a>() {
<a name="l00024"></a>00024         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;New Map&quot;</span> &lt;&lt; std::endl;
<a name="l00025"></a>00025         addPadding();
<a name="l00026"></a>00026     }
<a name="l00027"></a><a class="code" href="class_debug_bridge.html#a168e6b6b03bc26936d8d18d7d0ef29fb">00027</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_debug_bridge.html#a168e6b6b03bc26936d8d18d7d0ef29fb" title="Ends the Atlas stream.">streamEnd</a>() {
<a name="l00028"></a>00028         removePadding();
<a name="l00029"></a>00029         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;streamEnd&quot;</span> &lt;&lt; std::endl;
<a name="l00030"></a>00030     }
<a name="l00031"></a>00031     
<a name="l00032"></a><a class="code" href="class_debug_bridge.html#a1a5ef45e2a395a755d02e77272487873">00032</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_debug_bridge.html#a1a5ef45e2a395a755d02e77272487873" title="Starts a map object to the currently streamed map.">mapMapItem</a>(<span class="keyword">const</span> std::string&amp; name)
<a name="l00033"></a>00033     {
<a name="l00034"></a>00034         std::cout &lt;&lt; padding &lt;&lt; name &lt;&lt; <span class="stringliteral">&quot; -&gt; New Map&quot;</span> &lt;&lt; std::endl;
<a name="l00035"></a>00035         addPadding();
<a name="l00036"></a>00036     }
<a name="l00037"></a><a class="code" href="class_debug_bridge.html#ab5e89811179fbd4d529603b976002614">00037</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_debug_bridge.html#ab5e89811179fbd4d529603b976002614" title="Starts a list object to the currently streamed map.">mapListItem</a>(<span class="keyword">const</span> std::string&amp; name)
<a name="l00038"></a>00038     {
<a name="l00039"></a>00039         std::cout &lt;&lt; padding &lt;&lt; name &lt;&lt; <span class="stringliteral">&quot; -&gt; New List&quot;</span> &lt;&lt; std::endl;
<a name="l00040"></a>00040         addPadding();
<a name="l00041"></a>00041     }
<a name="l00042"></a><a class="code" href="class_debug_bridge.html#ae2db9e48c1dba0c15173cd355a7e7d77">00042</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_debug_bridge.html#ae2db9e48c1dba0c15173cd355a7e7d77" title="Adds an integer to the currently streames map.">mapIntItem</a>(<span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">long</span> i)
<a name="l00043"></a>00043     {
<a name="l00044"></a>00044         std::cout &lt;&lt; padding &lt;&lt; name &lt;&lt; <span class="stringliteral">&quot; -&gt; Int: &quot;</span> &lt;&lt; i &lt;&lt; std::endl;
<a name="l00045"></a>00045     }
<a name="l00046"></a><a class="code" href="class_debug_bridge.html#aac774c0908975a3e892480d3cff81cd1">00046</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_debug_bridge.html#aac774c0908975a3e892480d3cff81cd1" title="Adds a float to the currently streamed map.">mapFloatItem</a>(<span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">double</span> d)
<a name="l00047"></a>00047     {
<a name="l00048"></a>00048         std::cout &lt;&lt; padding &lt;&lt; name &lt;&lt; <span class="stringliteral">&quot; -&gt; Float: &quot;</span> &lt;&lt; d &lt;&lt; std::endl;
<a name="l00049"></a>00049     }
<a name="l00050"></a><a class="code" href="class_debug_bridge.html#a4d6ec024db388c5212124a0f1e419d76">00050</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_debug_bridge.html#a4d6ec024db388c5212124a0f1e419d76" title="Adds a string to the currently streamed map.">mapStringItem</a>(<span class="keyword">const</span> std::string&amp; name, <span class="keyword">const</span> std::string&amp; s)
<a name="l00051"></a>00051     {
<a name="l00052"></a>00052         std::cout &lt;&lt; padding &lt;&lt; name &lt;&lt; <span class="stringliteral">&quot; -&gt; String: &quot;</span> &lt;&lt; s &lt;&lt; std::endl;
<a name="l00053"></a>00053     }
<a name="l00054"></a><a class="code" href="class_debug_bridge.html#a5cca8deb7c1ee934ac083760b808c795">00054</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_debug_bridge.html#a5cca8deb7c1ee934ac083760b808c795" title="Ends the currently streamed map.">mapEnd</a>()
<a name="l00055"></a>00055     {
<a name="l00056"></a>00056         removePadding();
<a name="l00057"></a>00057         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;mapEnd&quot;</span> &lt;&lt; std::endl;
<a name="l00058"></a>00058     }
<a name="l00059"></a>00059     
<a name="l00060"></a><a class="code" href="class_debug_bridge.html#a8ccc1003a7720b73446413ca2074cff7">00060</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_debug_bridge.html#a8ccc1003a7720b73446413ca2074cff7" title="Starts a map object in the currently streamed list.">listMapItem</a>()
<a name="l00061"></a>00061     {
<a name="l00062"></a>00062         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;New Map&quot;</span> &lt;&lt; std::endl;
<a name="l00063"></a>00063         addPadding();
<a name="l00064"></a>00064     }
<a name="l00065"></a><a class="code" href="class_debug_bridge.html#a3ba975fd401cebea0a2af51330de5eb7">00065</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_debug_bridge.html#a3ba975fd401cebea0a2af51330de5eb7" title="Starts a list object in the currently streamed list.">listListItem</a>()
<a name="l00066"></a>00066     {
<a name="l00067"></a>00067         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;New List&quot;</span> &lt;&lt; std::endl;
<a name="l00068"></a>00068         addPadding();
<a name="l00069"></a>00069     }
<a name="l00070"></a><a class="code" href="class_debug_bridge.html#a6a98584ac2c114963591ee91dfdb6ea3">00070</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_debug_bridge.html#a6a98584ac2c114963591ee91dfdb6ea3" title="Adds an integer to the currently streames list.">listIntItem</a>(<span class="keywordtype">long</span> i)
<a name="l00071"></a>00071     {
<a name="l00072"></a>00072         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;Int: &quot;</span> &lt;&lt; i &lt;&lt; std::endl;
<a name="l00073"></a>00073     }
<a name="l00074"></a><a class="code" href="class_debug_bridge.html#ab7165e94265dd5d70510ce8747b9f3d6">00074</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_debug_bridge.html#ab7165e94265dd5d70510ce8747b9f3d6" title="Adds a float to the currently streamed list.">listFloatItem</a>(<span class="keywordtype">double</span> d)
<a name="l00075"></a>00075     {
<a name="l00076"></a>00076         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;Float: &quot;</span> &lt;&lt; d &lt;&lt; std::endl;
<a name="l00077"></a>00077     }
<a name="l00078"></a><a class="code" href="class_debug_bridge.html#a16cca35a6c88c68d61e4a40defa4cd9b">00078</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_debug_bridge.html#a16cca35a6c88c68d61e4a40defa4cd9b" title="Adds a string to the currently streamed list.">listStringItem</a>(<span class="keyword">const</span> std::string&amp; s)
<a name="l00079"></a>00079     {
<a name="l00080"></a>00080         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;String: &quot;</span> &lt;&lt; s &lt;&lt; std::endl;
<a name="l00081"></a>00081     }
<a name="l00082"></a><a class="code" href="class_debug_bridge.html#abf845bb303143f2454a138c502bdf59b">00082</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_debug_bridge.html#abf845bb303143f2454a138c502bdf59b" title="Ends the currently streamed list.">listEnd</a>()
<a name="l00083"></a>00083     {
<a name="l00084"></a>00084         removePadding();
<a name="l00085"></a>00085         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;listEnd&quot;</span> &lt;&lt; std::endl;
<a name="l00086"></a>00086     }
<a name="l00087"></a>00087 
<a name="l00088"></a>00088 <span class="keyword">protected</span>:
<a name="l00089"></a>00089     <span class="keyword">virtual</span> <span class="keywordtype">void</span> addPadding()
<a name="l00090"></a>00090     {
<a name="l00091"></a>00091         padding += <span class="stringliteral">&quot;  &quot;</span>;
<a name="l00092"></a>00092     }
<a name="l00093"></a>00093 
<a name="l00094"></a>00094     <span class="keyword">virtual</span> <span class="keywordtype">void</span> removePadding()
<a name="l00095"></a>00095     {
<a name="l00096"></a>00096         padding.erase(padding.end() - 2, padding.end());
<a name="l00097"></a>00097     }
<a name="l00098"></a>00098 
<a name="l00099"></a>00099     std::string padding;
<a name="l00100"></a>00100 };
<a name="l00101"></a>00101 
<a name="l00102"></a>00102 <span class="preprocessor">#endif // DEBUG_BRIDGE_H</span>
</pre></div></div>
</div>
<HR>
<P>Copyright 2000-2004 the respective authors.</P>
<P>This document can be licensed under the terms of the GNU Free Documentation
License or the GNU General Public License and may be freely distributed under
the terms given by one of these licenses.</P>