Sophie

Sophie

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

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">#include &lt;Atlas/Bridge.h&gt;</span>
<a name="l00002"></a>00002 
<a name="l00003"></a>00003 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00005"></a>00005 
<a name="l00006"></a><a class="code" href="class_debug_bridge.html">00006</a> <span class="keyword">class </span><a class="code" href="class_debug_bridge.html">DebugBridge</a> : <span class="keyword">public</span> Atlas::Bridge
<a name="l00007"></a>00007 {
<a name="l00008"></a>00008 <span class="keyword">public</span>:
<a name="l00009"></a>00009 
<a name="l00010"></a>00010     <a class="code" href="class_debug_bridge.html">DebugBridge</a>()
<a name="l00011"></a>00011     {
<a name="l00012"></a>00012         padding = <span class="stringliteral">&quot;&quot;</span>;
<a name="l00013"></a>00013     }
<a name="l00014"></a>00014 
<a name="l00015"></a>00015     <span class="keyword">virtual</span> ~<a class="code" href="class_debug_bridge.html">DebugBridge</a>() { }
<a name="l00016"></a>00016 
<a name="l00017"></a><a class="code" href="class_debug_bridge.html#a8d91d14db7bd255b3c580e83d0db7805">00017</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="l00018"></a>00018         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;streamBegin&quot;</span> &lt;&lt; std::endl;
<a name="l00019"></a>00019         addPadding();
<a name="l00020"></a>00020     }
<a name="l00021"></a><a class="code" href="class_debug_bridge.html#afd2fd3032321997847ee1a09a27cdfbc">00021</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="l00022"></a>00022         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;New Map&quot;</span> &lt;&lt; std::endl;
<a name="l00023"></a>00023         addPadding();
<a name="l00024"></a>00024     }
<a name="l00025"></a><a class="code" href="class_debug_bridge.html#a168e6b6b03bc26936d8d18d7d0ef29fb">00025</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="l00026"></a>00026         removePadding();
<a name="l00027"></a>00027         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;streamEnd&quot;</span> &lt;&lt; std::endl;
<a name="l00028"></a>00028     }
<a name="l00029"></a>00029     
<a name="l00030"></a><a class="code" href="class_debug_bridge.html#a1a5ef45e2a395a755d02e77272487873">00030</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="l00031"></a>00031     {
<a name="l00032"></a>00032         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="l00033"></a>00033         addPadding();
<a name="l00034"></a>00034     }
<a name="l00035"></a><a class="code" href="class_debug_bridge.html#ab5e89811179fbd4d529603b976002614">00035</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="l00036"></a>00036     {
<a name="l00037"></a>00037         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="l00038"></a>00038         addPadding();
<a name="l00039"></a>00039     }
<a name="l00040"></a><a class="code" href="class_debug_bridge.html#ae2db9e48c1dba0c15173cd355a7e7d77">00040</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="l00041"></a>00041     {
<a name="l00042"></a>00042         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="l00043"></a>00043     }
<a name="l00044"></a><a class="code" href="class_debug_bridge.html#aac774c0908975a3e892480d3cff81cd1">00044</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="l00045"></a>00045     {
<a name="l00046"></a>00046         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="l00047"></a>00047     }
<a name="l00048"></a><a class="code" href="class_debug_bridge.html#a4d6ec024db388c5212124a0f1e419d76">00048</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="l00049"></a>00049     {
<a name="l00050"></a>00050         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="l00051"></a>00051     }
<a name="l00052"></a><a class="code" href="class_debug_bridge.html#a5cca8deb7c1ee934ac083760b808c795">00052</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="l00053"></a>00053     {
<a name="l00054"></a>00054         removePadding();
<a name="l00055"></a>00055         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;mapEnd&quot;</span> &lt;&lt; std::endl;
<a name="l00056"></a>00056     }
<a name="l00057"></a>00057     
<a name="l00058"></a><a class="code" href="class_debug_bridge.html#a8ccc1003a7720b73446413ca2074cff7">00058</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="l00059"></a>00059     {
<a name="l00060"></a>00060         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;New Map&quot;</span> &lt;&lt; std::endl;
<a name="l00061"></a>00061         addPadding();
<a name="l00062"></a>00062     }
<a name="l00063"></a><a class="code" href="class_debug_bridge.html#a3ba975fd401cebea0a2af51330de5eb7">00063</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="l00064"></a>00064     {
<a name="l00065"></a>00065         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;New List&quot;</span> &lt;&lt; std::endl;
<a name="l00066"></a>00066         addPadding();
<a name="l00067"></a>00067     }
<a name="l00068"></a><a class="code" href="class_debug_bridge.html#a6a98584ac2c114963591ee91dfdb6ea3">00068</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="l00069"></a>00069     {
<a name="l00070"></a>00070         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;Int: &quot;</span> &lt;&lt; i &lt;&lt; std::endl;
<a name="l00071"></a>00071     }
<a name="l00072"></a><a class="code" href="class_debug_bridge.html#ab7165e94265dd5d70510ce8747b9f3d6">00072</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="l00073"></a>00073     {
<a name="l00074"></a>00074         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;Float: &quot;</span> &lt;&lt; d &lt;&lt; std::endl;
<a name="l00075"></a>00075     }
<a name="l00076"></a><a class="code" href="class_debug_bridge.html#a16cca35a6c88c68d61e4a40defa4cd9b">00076</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="l00077"></a>00077     {
<a name="l00078"></a>00078         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;String: &quot;</span> &lt;&lt; s &lt;&lt; std::endl;
<a name="l00079"></a>00079     }
<a name="l00080"></a><a class="code" href="class_debug_bridge.html#abf845bb303143f2454a138c502bdf59b">00080</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="l00081"></a>00081     {
<a name="l00082"></a>00082         removePadding();
<a name="l00083"></a>00083         std::cout &lt;&lt; padding &lt;&lt; <span class="stringliteral">&quot;listEnd&quot;</span> &lt;&lt; std::endl;
<a name="l00084"></a>00084     }
<a name="l00085"></a>00085 
<a name="l00086"></a>00086 <span class="keyword">protected</span>:
<a name="l00087"></a>00087     <span class="keyword">virtual</span> <span class="keywordtype">void</span> addPadding()
<a name="l00088"></a>00088     {
<a name="l00089"></a>00089         padding += <span class="stringliteral">&quot;  &quot;</span>;
<a name="l00090"></a>00090     }
<a name="l00091"></a>00091 
<a name="l00092"></a>00092     <span class="keyword">virtual</span> <span class="keywordtype">void</span> removePadding()
<a name="l00093"></a>00093     {
<a name="l00094"></a>00094         padding.erase(padding.end() - 2, padding.end());
<a name="l00095"></a>00095     }
<a name="l00096"></a>00096 
<a name="l00097"></a>00097     std::string padding;
<a name="l00098"></a>00098 };
</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>