Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 3ebaf504d69f581a8834e53e04e712a5 > files > 626

gearbox-devel-9.11-6.fc14.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>GearBox Project</title>

<link rel="icon" href="gbx_icon_cardbox_sky.png" type="image/png">
<link rel="shortcut icon" href="gbx_icon_cardbox_sky.png" type="image/png">

<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<!-- Google Analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3583782-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<!-- Returning you to your regular programming -->
</head><body>

<!-- Header -->

<table border="0" cellspacing="0" cellpadding="0">

<tr><!-- create row -->

<!-- spacer cell -->
<!-- #CC CC CC -->
<td rowspan="1" colspan="1" bgcolor="#EEEEEE">&nbsp;&nbsp;&nbsp;&nbsp;</td>

<!-- menu cell -->
<td width="170" rowspan="1" colspan="1" align="left" valign="top" bgcolor="#EEEEEE">


<p>&nbsp;</p>
<p align="center"><a href="index.html"><img src="gbx_logo_cardbox_sky_150x150.png"></a></p><br>

<strong>INTRODUCTION</strong><br>
<strong><a href="gbx_doc_overview.html" style="text-decoration:none">Overview</a></strong><br>
<strong><a href="gbx_doc_getting.html" style="text-decoration:none">Download and Install</a></strong><br>
<!-- <strong><a href="gbx_doc_quickstart.html" style="text-decoration:none">Quick Start</a></strong><br> -->
<strong><a href="gbx_doc_documentation.html" style="text-decoration:none">Documentation</a></strong><br>
<strong><a href="gbx_doc_publications.html" style="text-decoration:none">Publications</a></strong><br>
<br>

<strong>REPOSITORY</strong><br>
<strong><a href="group__gbx__libs.html" style="text-decoration:none">Libraries</a></strong><br>
<!-- <strong><a href="group__gbx__utils.html" style="text-decoration:none">Utilities</a></strong><br> -->
<br>

<strong>DEVELOPER</strong><br>

<!--<strong><a href="gbx_doc_tutorials.html" style="text-decoration:none">Tutorials</a></strong><br>
<strong><a href="group__gbx__examples.html" style="text-decoration:none">Examples</a></strong><br>-->
<strong><a href="gbx_doc_devguide.html" style="text-decoration:none">Dev Guide</a></strong><br>
<!-- 
<strong><a href="gbx_doc_faq.html" style="text-decoration:none">FAQ</a></strong><br>
-->
<strong><a href="http://cdash.acfr.usyd.edu.au/index.php?project=Gearbox" style="text-decoration:none">Dashboard</a></strong><br>
<!--<strong><a href="http://wiki2.cas.edu.au/orca">Wiki</a></strong><br>
login/pass: orca/orca<br>-->
<br>

<strong>PEOPLE</strong><br>
<strong><a href="gbx_doc_contributors.html" style="text-decoration:none">Contributors</a></strong><br>
<strong><a href="gbx_doc_users.html" style="text-decoration:none">Users</a></strong><br>
<br>

<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=216468&amp;type=2" width="125" height="37" border="0" alt="SourceForge.net Logo" /></a><br>
<strong><a href="http://sourceforge.net/projects/gearbox">Project</a></strong><br>
<strong><a href="http://sourceforge.net/project/showfiles.php?group_id=216468">Download</a></strong><br>
<!--<strong><a href="http://sourceforge.net/tracker/?group_id=216468">Bugs/Feedback</a></strong><br>-->
<strong><a href="http://sourceforge.net/mail/?group_id=216468">Mailing lists</a></strong></p>
<p>&nbsp;</p>

</td><!-- /menu cell -->

<!-- one grey spacer cells -->
<td rowspan="1" colspan="1" bgcolor="#EEEEEE">&nbsp;&nbsp;&nbsp;&nbsp;</td>

<!-- one white spacer cells -->
<td rowspan="1" colspan="1">&nbsp;&nbsp;&nbsp;&nbsp;</td>

<!-- main content cell -->
<td rowspan="1" colspan="1" align="left" valign="top">


<!-- Generated by Doxygen 1.6.2-20100208 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;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>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_b8ba9ebcb71a95a44c4fd60b7d348fe1.html">src</a>&nbsp;&raquo;&nbsp;<a class="el" href="dir_a849190606a9751ee92c69243c2a17cc.html">gbxutilacfr</a>
  </div>
</div>
<div class="contents">
<h1>tracer.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics</span>
<a name="l00003"></a>00003 <span class="comment"> *               http://!gearbox.sf.net/</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (c) 2004-2008 Alex Brooks, Alexei Makarenko, Tobias Kaupp</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * This distribution is licensed to you under the terms described in</span>
<a name="l00007"></a>00007 <span class="comment"> * the LICENSE file included in this distribution.</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> */</span>
<a name="l00010"></a>00010 
<a name="l00011"></a>00011 <span class="preprocessor">#ifndef GBXUTILACFR_TRACER_H</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#define GBXUTILACFR_TRACER_H</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span>
<a name="l00014"></a>00014 <span class="preprocessor">#if defined (WIN32)</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">    #if defined (GBXUTILACFR_STATIC)</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">        #define GBXUTILACFR_EXPORT</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">    #elif defined (GBXUTILACFR_EXPORTS)</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">        #define GBXUTILACFR_EXPORT       __declspec (dllexport)</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">    #else</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">        #define GBXUTILACFR_EXPORT       __declspec (dllimport)</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">    #define GBXUTILACFR_EXPORT</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="keyword">namespace </span>gbxutilacfr {
<a name="l00029"></a>00029 
<a name="l00031"></a><a class="code" href="namespacegbxutilacfr.html#aef6c9166854bf190dfcff7b859cc3213">00031</a> <span class="keyword">enum</span> <a class="code" href="namespacegbxutilacfr.html#aef6c9166854bf190dfcff7b859cc3213" title="Types of traced information.">TraceType</a> {
<a name="l00033"></a><a class="code" href="namespacegbxutilacfr.html#aef6c9166854bf190dfcff7b859cc3213adfb5eb5147a8d8adfb7540afb81fc4b7">00033</a>     <a class="code" href="namespacegbxutilacfr.html#aef6c9166854bf190dfcff7b859cc3213adfb5eb5147a8d8adfb7540afb81fc4b7" title="Information.">InfoTrace</a>=0,
<a name="l00035"></a><a class="code" href="namespacegbxutilacfr.html#aef6c9166854bf190dfcff7b859cc3213a3d123e0ad8a1b9f3710a59e6038c03c5">00035</a>     <a class="code" href="namespacegbxutilacfr.html#aef6c9166854bf190dfcff7b859cc3213a3d123e0ad8a1b9f3710a59e6038c03c5" title="Warning.">WarningTrace</a>,
<a name="l00037"></a><a class="code" href="namespacegbxutilacfr.html#aef6c9166854bf190dfcff7b859cc3213aa8cf5d564aacfb9a27bf12d187491d7e">00037</a>     <a class="code" href="namespacegbxutilacfr.html#aef6c9166854bf190dfcff7b859cc3213aa8cf5d564aacfb9a27bf12d187491d7e" title="Error.">ErrorTrace</a>,
<a name="l00039"></a><a class="code" href="namespacegbxutilacfr.html#aef6c9166854bf190dfcff7b859cc3213a9b1c49edf4ac7021110ce77776aea9bf">00039</a>     <a class="code" href="namespacegbxutilacfr.html#aef6c9166854bf190dfcff7b859cc3213a9b1c49edf4ac7021110ce77776aea9bf" title="Debug statement.">DebugTrace</a>,
<a name="l00042"></a><a class="code" href="namespacegbxutilacfr.html#aef6c9166854bf190dfcff7b859cc3213a18e98dee2795a6fee9517ac2dc3fb25d">00042</a>     <a class="code" href="namespacegbxutilacfr.html#aef6c9166854bf190dfcff7b859cc3213a18e98dee2795a6fee9517ac2dc3fb25d">AnyTrace</a>,
<a name="l00044"></a><a class="code" href="namespacegbxutilacfr.html#aef6c9166854bf190dfcff7b859cc3213aedf165601a2266f950d9047728aa463d">00044</a>     <a class="code" href="namespacegbxutilacfr.html#aef6c9166854bf190dfcff7b859cc3213aedf165601a2266f950d9047728aa463d" title="Number of trace types.">NumberOfTraceTypes</a>,
<a name="l00045"></a>00045 };
<a name="l00046"></a>00046 
<a name="l00048"></a>00048 GBXUTILACFR_EXPORT std::string <a class="code" href="namespacegbxutilacfr.html#a72e2dc4662c21ddbbf1ba4f5faa8601c" title="Returns string equivalent of state enumerator.">toString</a>( <a class="code" href="namespacegbxutilacfr.html#aef6c9166854bf190dfcff7b859cc3213" title="Types of traced information.">TraceType</a> type );
<a name="l00049"></a>00049 
<a name="l00051"></a><a class="code" href="namespacegbxutilacfr.html#a226aaf0ff4c40d3ff70b064ab2d01bc3">00051</a> <span class="keyword">enum</span> <a class="code" href="namespacegbxutilacfr.html#a226aaf0ff4c40d3ff70b064ab2d01bc3" title="Types of destinations for traced information.">DestinationType</a> {
<a name="l00053"></a><a class="code" href="namespacegbxutilacfr.html#a226aaf0ff4c40d3ff70b064ab2d01bc3a8d591a4341d7dadebf5a374debe06949">00053</a>     <a class="code" href="namespacegbxutilacfr.html#a226aaf0ff4c40d3ff70b064ab2d01bc3a8d591a4341d7dadebf5a374debe06949" title="Write to stardard display.">ToDisplay</a>=0,
<a name="l00055"></a><a class="code" href="namespacegbxutilacfr.html#a226aaf0ff4c40d3ff70b064ab2d01bc3a4f7f70a50a64432255ec57ed17da4c40">00055</a>     <a class="code" href="namespacegbxutilacfr.html#a226aaf0ff4c40d3ff70b064ab2d01bc3a4f7f70a50a64432255ec57ed17da4c40" title="Send over the network, details are specific to Tracer implementation.">ToNetwork</a>,
<a name="l00057"></a><a class="code" href="namespacegbxutilacfr.html#a226aaf0ff4c40d3ff70b064ab2d01bc3a90b25fbc751aecd9e487e485c286cf27">00057</a>     <a class="code" href="namespacegbxutilacfr.html#a226aaf0ff4c40d3ff70b064ab2d01bc3a90b25fbc751aecd9e487e485c286cf27" title="Write to SysLog on Unix, EventLog on windows.">ToLog</a>,
<a name="l00059"></a><a class="code" href="namespacegbxutilacfr.html#a226aaf0ff4c40d3ff70b064ab2d01bc3a5121016fe51c7de8f5f33a621422977b">00059</a>     <a class="code" href="namespacegbxutilacfr.html#a226aaf0ff4c40d3ff70b064ab2d01bc3a5121016fe51c7de8f5f33a621422977b" title="Write to a file.">ToFile</a>,
<a name="l00062"></a><a class="code" href="namespacegbxutilacfr.html#a226aaf0ff4c40d3ff70b064ab2d01bc3a6ab3c2695cfa9406f5d9b50f38f605cb">00062</a>     <a class="code" href="namespacegbxutilacfr.html#a226aaf0ff4c40d3ff70b064ab2d01bc3a6ab3c2695cfa9406f5d9b50f38f605cb">ToAny</a>,
<a name="l00064"></a><a class="code" href="namespacegbxutilacfr.html#a226aaf0ff4c40d3ff70b064ab2d01bc3af41d7d364f90748fe57df3c28b5ef771">00064</a>     <a class="code" href="namespacegbxutilacfr.html#a226aaf0ff4c40d3ff70b064ab2d01bc3af41d7d364f90748fe57df3c28b5ef771" title="Number of destination types.">NumberOfDestinationTypes</a>
<a name="l00065"></a>00065 };
<a name="l00066"></a>00066 
<a name="l00111"></a><a class="code" href="classgbxutilacfr_1_1Tracer.html">00111</a> <span class="keyword">class </span>GBXUTILACFR_EXPORT <a class="code" href="classgbxutilacfr_1_1Tracer.html" title="Local and remote tracing.">Tracer</a>
<a name="l00112"></a>00112 {
<a name="l00113"></a>00113 <span class="keyword">public</span>:
<a name="l00114"></a>00114     <span class="keyword">virtual</span> ~<a class="code" href="classgbxutilacfr_1_1Tracer.html" title="Local and remote tracing.">Tracer</a>() {}; 
<a name="l00115"></a>00115 
<a name="l00116"></a>00116     <span class="keyword">struct </span>Config
<a name="l00117"></a>00117     {
<a name="l00119"></a>00119         <span class="keywordtype">int</span> verbosity[<a class="code" href="namespacegbxutilacfr.html#aef6c9166854bf190dfcff7b859cc3213aedf165601a2266f950d9047728aa463d" title="Number of trace types.">NumberOfTraceTypes</a>][<a class="code" href="namespacegbxutilacfr.html#a226aaf0ff4c40d3ff70b064ab2d01bc3af41d7d364f90748fe57df3c28b5ef771" title="Number of destination types.">NumberOfDestinationTypes</a>];
<a name="l00121"></a>00121         <span class="keywordtype">bool</span> addTimestamp;
<a name="l00122"></a>00122     };
<a name="l00123"></a>00123 
<a name="l00125"></a>00125     
<a name="l00128"></a>00128     <span class="keyword">virtual</span> <span class="keywordtype">void</span> print( <span class="keyword">const</span> std::string &amp;message ) = 0;
<a name="l00129"></a>00129 
<a name="l00133"></a><a class="code" href="classgbxutilacfr_1_1Tracer.html#a2d17e020161dc5eb5410e78fcfd4bc22">00133</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> info( <span class="keyword">const</span> std::string &amp;message, <span class="keywordtype">int</span> level=1, <span class="keywordtype">bool</span> localOnly=<span class="keyword">false</span> )
<a name="l00134"></a>00134         { <a class="code" href="classgbxutilacfr_1_1Tracer.html#a2d17e020161dc5eb5410e78fcfd4bc22">info</a>(<span class="stringliteral">&quot;&quot;</span>,message,level,localOnly); }
<a name="l00136"></a>00136     <span class="keyword">virtual</span> <span class="keywordtype">void</span> info( <span class="keyword">const</span> std::string &amp;subsystem, <span class="keyword">const</span> std::string &amp;message, <span class="keywordtype">int</span> level=1, <span class="keywordtype">bool</span> localOnly=<span class="keyword">false</span> ) = 0;
<a name="l00137"></a>00137     
<a name="l00141"></a><a class="code" href="classgbxutilacfr_1_1Tracer.html#a920d81a17dd857da20354d3551d5102a">00141</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> warning( <span class="keyword">const</span> std::string &amp;message, <span class="keywordtype">int</span> level=1, <span class="keywordtype">bool</span> localOnly=<span class="keyword">false</span> )
<a name="l00142"></a>00142         { <a class="code" href="classgbxutilacfr_1_1Tracer.html#a920d81a17dd857da20354d3551d5102a">warning</a>(<span class="stringliteral">&quot;&quot;</span>,message,level,localOnly); }
<a name="l00144"></a>00144     <span class="keyword">virtual</span> <span class="keywordtype">void</span> warning( <span class="keyword">const</span> std::string &amp;subsystem, <span class="keyword">const</span> std::string &amp;message, <span class="keywordtype">int</span> level=1, <span class="keywordtype">bool</span> localOnly=<span class="keyword">false</span> ) = 0;
<a name="l00145"></a>00145     
<a name="l00149"></a><a class="code" href="classgbxutilacfr_1_1Tracer.html#ad06bff92f4d61f3fff307a41c5ed16c4">00149</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> error( <span class="keyword">const</span> std::string &amp;message, <span class="keywordtype">int</span> level=1, <span class="keywordtype">bool</span> localOnly=<span class="keyword">false</span> )
<a name="l00150"></a>00150         { <a class="code" href="classgbxutilacfr_1_1Tracer.html#ad06bff92f4d61f3fff307a41c5ed16c4">error</a>(<span class="stringliteral">&quot;&quot;</span>,message,level,localOnly); }
<a name="l00152"></a>00152     <span class="keyword">virtual</span> <span class="keywordtype">void</span> error( <span class="keyword">const</span> std::string &amp;subsystem, <span class="keyword">const</span> std::string &amp;message, <span class="keywordtype">int</span> level=1, <span class="keywordtype">bool</span> localOnly=<span class="keyword">false</span> ) = 0;
<a name="l00153"></a>00153 
<a name="l00157"></a><a class="code" href="classgbxutilacfr_1_1Tracer.html#a2baa7ec01c469a052669e6158e97aa92">00157</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> debug( <span class="keyword">const</span> std::string &amp;message, <span class="keywordtype">int</span> level=1, <span class="keywordtype">bool</span> localOnly=<span class="keyword">false</span> )
<a name="l00158"></a>00158         { <a class="code" href="classgbxutilacfr_1_1Tracer.html#a2baa7ec01c469a052669e6158e97aa92">debug</a>(<span class="stringliteral">&quot;&quot;</span>,message,level,localOnly); }
<a name="l00160"></a>00160     <span class="keyword">virtual</span> <span class="keywordtype">void</span> debug( <span class="keyword">const</span> std::string &amp;subsystem, <span class="keyword">const</span> std::string &amp;message, <span class="keywordtype">int</span> level=1, <span class="keywordtype">bool</span> localOnly=<span class="keyword">false</span> ) = 0;
<a name="l00161"></a>00161 
<a name="l00167"></a>00167     <span class="keyword">virtual</span> <span class="keywordtype">int</span> verbosity( <a class="code" href="namespacegbxutilacfr.html#aef6c9166854bf190dfcff7b859cc3213" title="Types of traced information.">TraceType</a> traceType, <a class="code" href="namespacegbxutilacfr.html#a226aaf0ff4c40d3ff70b064ab2d01bc3" title="Types of destinations for traced information.">DestinationType</a> destType=<a class="code" href="namespacegbxutilacfr.html#a226aaf0ff4c40d3ff70b064ab2d01bc3a6ab3c2695cfa9406f5d9b50f38f605cb">ToAny</a> ) <span class="keyword">const</span> = 0;
<a name="l00168"></a>00168 
<a name="l00171"></a><a class="code" href="classgbxutilacfr_1_1Tracer.html#a2784b10931e081bcec8ed04a7e188fe0">00171</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classgbxutilacfr_1_1Tracer.html#a2784b10931e081bcec8ed04a7e188fe0">setSubsystemDebugLevel</a>( <span class="keyword">const</span> std::string &amp;subsystem, <span class="keywordtype">int</span> level=0 ) {};
<a name="l00172"></a>00172 
<a name="l00176"></a><a class="code" href="classgbxutilacfr_1_1Tracer.html#a8c389f7e2e6718bf2775bd42993d63f2">00176</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> subsystemDebug( <span class="keyword">const</span> std::string &amp;subsystem, <span class="keyword">const</span> std::string &amp;message, <span class="keywordtype">int</span> level=1 ) 
<a name="l00177"></a>00177     {
<a name="l00178"></a>00178         debug( message, level );
<a name="l00179"></a>00179     };
<a name="l00180"></a>00180 };
<a name="l00181"></a>00181 
<a name="l00182"></a>00182 } 
<a name="l00183"></a>00183 
<a name="l00184"></a>00184 <span class="preprocessor">#endif</span>
</pre></div></div>

            </td>
            <td colspan="1">&nbsp;</td>
         </tr>
        </table>
<!-- end of table -->

 <hr size="1"><address style="align: right;"><small>Generated for GearBox by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.5 </small></address>
</body>
</html>