Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 2aa62c5bbb658df1fece777472a7bcf2 > files > 750

barry-devel-docs-0.17-0.3.20100730git.fc14.noarch.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>Barry: Barry::Parser Class Reference</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.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="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><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="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceBarry.html">Barry</a>::<a class="el" href="classBarry_1_1Parser.html">Parser</a>
  </div>
</div>
<div class="contents">
<h1>Barry::Parser Class Reference</h1><!-- doxytag: class="Barry::Parser" -->
<p>Base class for the parser hierarchy.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="parser_8h_source.html">parser.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Barry::Parser:</div>
<div class="dynsection">
<div class="center"><img src="classBarry_1_1Parser__inherit__graph.png" border="0" usemap="#Barry_1_1Parser_inherit__map" alt="Inheritance graph"/></div>
<map name="Barry_1_1Parser_inherit__map" id="Barry_1_1Parser_inherit__map">
<area shape="rect" id="node3" href="classBarry_1_1NullParser.html" title="If in debug mode, this class can be used as a null parser." alt="" coords="239,5,361,35"/><area shape="rect" id="node5" href="classBarry_1_1RecordParser.html" title="Template class for easy creation of specific parser objects." alt="" coords="156,58,444,89"/><area shape="rect" id="node7" href="classChecksumParser.html" title="ChecksumParser" alt="" coords="237,111,363,142"/><area shape="rect" id="node9" href="classDataDumpParser.html" title="DataDumpParser" alt="" coords="237,165,363,195"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classBarry_1_1Parser-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1Parser.html#a15acb3544613d43d8f928cd63a19022b">Clear</a> ()=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reset and prepare for a new raw data packet.  <a href="#a15acb3544613d43d8f928cd63a19022b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1Parser.html#a95bfc4014e3e8ded94625f43d1d29800">SetIds</a> (uint8_t RecType, uint32_t UniqueId)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stores the IDs.  <a href="#a95bfc4014e3e8ded94625f43d1d29800"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1Parser.html#a2087d07fb5d8d57c934c4e60278f41d8">ParseHeader</a> (const <a class="el" href="classBarry_1_1Data.html">Data</a> &amp;data, size_t &amp;offset)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called to parse the header portion of the raw data packet.  <a href="#a2087d07fb5d8d57c934c4e60278f41d8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1Parser.html#a645718d87aaad3ee2c36664de05046d2">ParseFields</a> (const <a class="el" href="classBarry_1_1Data.html">Data</a> &amp;data, size_t &amp;offset, const <a class="el" href="classBarry_1_1IConverter.html">IConverter</a> *ic)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called to parse sub fields in the raw data packet.  <a href="#a645718d87aaad3ee2c36664de05046d2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1Parser.html#abf8ab1598be74268ee486af938c527d4">Store</a> ()=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called at the very end of record parsing, and used to store the final packet somewhere, either in memory, disk, etc.  <a href="#abf8ab1598be74268ee486af938c527d4"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Base class for the parser hierarchy. </p>
<p>This class provides the interface that the <a class="el" href="classBarry_1_1Controller.html" title="The main interface class.">Controller</a> class uses to pass raw data it reads from the device. The <a class="el" href="classBarry_1_1Controller.html" title="The main interface class.">Controller</a>, along with the <a class="el" href="classBarry_1_1Packet.html">Packet</a> class, calls each of the virtual functions below in the same order.</p>
<p>This class is kept as a pure abstract class, in order to make sure that the compiler will catch any API changes, for code derived from it. </p>

<p>Definition at line <a class="el" href="parser_8h_source.html#l00052">52</a> of file <a class="el" href="parser_8h_source.html">parser.h</a>.</p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a15acb3544613d43d8f928cd63a19022b"></a><!-- doxytag: member="Barry::Parser::Clear" ref="a15acb3544613d43d8f928cd63a19022b" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Barry::Parser::Clear </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reset and prepare for a new raw data packet. </p>

<p>Implemented in <a class="el" href="classBarry_1_1NullParser.html#a5ee19eb4766b1a03a1bdcd710c1ed3c6">Barry::NullParser</a>, <a class="el" href="classBarry_1_1RecordParser.html#ade7a031f4f771ebda4b0a7a20f0366ec">Barry::RecordParser&lt; RecordT, StorageT &gt;</a>, <a class="el" href="classDataDumpParser.html#a92423221eb03e02539a287b532fb086c">DataDumpParser</a>, <a class="el" href="classChecksumParser.html#ae557918eae2b18aad4d2b9d211f637aa">ChecksumParser</a>, and <a class="el" href="classDataDumpParser.html#a92423221eb03e02539a287b532fb086c">DataDumpParser</a>.</p>

<p>Referenced by <a class="el" href="packet_8cc_source.html#l00493">Barry::DBPacket::Parse()</a>.</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="classBarry_1_1Parser_a15acb3544613d43d8f928cd63a19022b_icgraph.png" border="0" usemap="#classBarry_1_1Parser_a15acb3544613d43d8f928cd63a19022b_icgraph_map" alt=""></div>
<map name="classBarry_1_1Parser_a15acb3544613d43d8f928cd63a19022b_icgraph_map" id="classBarry_1_1Parser_a15acb3544613d43d8f928cd63a19022b_icgraph">
<area shape="rect" id="node3" href="classBarry_1_1DBPacket.html#a43b96166db565fb8b37085d06d3a446c" title="Parses the data in the receive buffer, and attempts to be smart about it, using the..." alt="" coords="197,5,363,35"/><area shape="rect" id="node5" href="classBarry_1_1Mode_1_1Desktop.html#a6bb1c96d6082575b5fa684dee2af51a6" title="Retrieve a database from the handheld device, using the given parser to parse the..." alt="" coords="411,5,664,35"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a645718d87aaad3ee2c36664de05046d2"></a><!-- doxytag: member="Barry::Parser::ParseFields" ref="a645718d87aaad3ee2c36664de05046d2" args="(const Data &amp;data, size_t &amp;offset, const IConverter *ic)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Barry::Parser::ParseFields </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classBarry_1_1Data.html">Data</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t &amp;&nbsp;</td>
          <td class="paramname"> <em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classBarry_1_1IConverter.html">IConverter</a> *&nbsp;</td>
          <td class="paramname"> <em>ic</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Called to parse sub fields in the raw data packet. </p>
<p>The same data is passed as was passed in ParseHeader, only the offset will be updated if it was advanced during the header parsing. </p>

<p>Implemented in <a class="el" href="classBarry_1_1NullParser.html#a9e42a60774fb16b5a4b6762abbe628b2">Barry::NullParser</a>, <a class="el" href="classBarry_1_1RecordParser.html#aede0d6cc45821fddf0f18069e8a5b6ed">Barry::RecordParser&lt; RecordT, StorageT &gt;</a>, <a class="el" href="classDataDumpParser.html#a2edcf9312ebdfd1f4db805246679d0c1">DataDumpParser</a>, <a class="el" href="classChecksumParser.html#aa8381c46cf4d2f1eca7d13ca0218c98b">ChecksumParser</a>, and <a class="el" href="classDataDumpParser.html#a18a83b20914626eb239fb5e87df448ee">DataDumpParser</a>.</p>

<p>Referenced by <a class="el" href="packet_8cc_source.html#l00493">Barry::DBPacket::Parse()</a>.</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="classBarry_1_1Parser_a645718d87aaad3ee2c36664de05046d2_icgraph.png" border="0" usemap="#classBarry_1_1Parser_a645718d87aaad3ee2c36664de05046d2_icgraph_map" alt=""></div>
<map name="classBarry_1_1Parser_a645718d87aaad3ee2c36664de05046d2_icgraph_map" id="classBarry_1_1Parser_a645718d87aaad3ee2c36664de05046d2_icgraph">
<area shape="rect" id="node3" href="classBarry_1_1DBPacket.html#a43b96166db565fb8b37085d06d3a446c" title="Parses the data in the receive buffer, and attempts to be smart about it, using the..." alt="" coords="235,5,400,35"/><area shape="rect" id="node5" href="classBarry_1_1Mode_1_1Desktop.html#a6bb1c96d6082575b5fa684dee2af51a6" title="Retrieve a database from the handheld device, using the given parser to parse the..." alt="" coords="448,5,701,35"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a2087d07fb5d8d57c934c4e60278f41d8"></a><!-- doxytag: member="Barry::Parser::ParseHeader" ref="a2087d07fb5d8d57c934c4e60278f41d8" args="(const Data &amp;data, size_t &amp;offset)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Barry::Parser::ParseHeader </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classBarry_1_1Data.html">Data</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t &amp;&nbsp;</td>
          <td class="paramname"> <em>offset</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Called to parse the header portion of the raw data packet. </p>
<p>data contains the entire packet, and offset contains the location at which to start parsing. </p>

<p>Implemented in <a class="el" href="classBarry_1_1NullParser.html#a8cfd09252a2edb2c5b0510fb6668730a">Barry::NullParser</a>, <a class="el" href="classBarry_1_1RecordParser.html#acf87e45e72a2f9960c2b6b0dedf087bd">Barry::RecordParser&lt; RecordT, StorageT &gt;</a>, <a class="el" href="classDataDumpParser.html#a0ce60148b07a907b860909fe2ac6d5c3">DataDumpParser</a>, <a class="el" href="classChecksumParser.html#a3a2ac40a6d48218e17f43937a81668a7">ChecksumParser</a>, and <a class="el" href="classDataDumpParser.html#adf6af3e5a3fa2f01bf4179787fda03dc">DataDumpParser</a>.</p>

<p>Referenced by <a class="el" href="packet_8cc_source.html#l00493">Barry::DBPacket::Parse()</a>.</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="classBarry_1_1Parser_a2087d07fb5d8d57c934c4e60278f41d8_icgraph.png" border="0" usemap="#classBarry_1_1Parser_a2087d07fb5d8d57c934c4e60278f41d8_icgraph_map" alt=""></div>
<map name="classBarry_1_1Parser_a2087d07fb5d8d57c934c4e60278f41d8_icgraph_map" id="classBarry_1_1Parser_a2087d07fb5d8d57c934c4e60278f41d8_icgraph">
<area shape="rect" id="node3" href="classBarry_1_1DBPacket.html#a43b96166db565fb8b37085d06d3a446c" title="Parses the data in the receive buffer, and attempts to be smart about it, using the..." alt="" coords="243,5,408,35"/><area shape="rect" id="node5" href="classBarry_1_1Mode_1_1Desktop.html#a6bb1c96d6082575b5fa684dee2af51a6" title="Retrieve a database from the handheld device, using the given parser to parse the..." alt="" coords="456,5,709,35"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a95bfc4014e3e8ded94625f43d1d29800"></a><!-- doxytag: member="Barry::Parser::SetIds" ref="a95bfc4014e3e8ded94625f43d1d29800" args="(uint8_t RecType, uint32_t UniqueId)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Barry::Parser::SetIds </td>
          <td>(</td>
          <td class="paramtype">uint8_t&nbsp;</td>
          <td class="paramname"> <em>RecType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&nbsp;</td>
          <td class="paramname"> <em>UniqueId</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Stores the IDs. </p>

<p>Implemented in <a class="el" href="classBarry_1_1NullParser.html#a2edd4fc6c0a876d01a503c26e196ce42">Barry::NullParser</a>, <a class="el" href="classBarry_1_1RecordParser.html#ad61af6f1a0290ab7827ecb594438b593">Barry::RecordParser&lt; RecordT, StorageT &gt;</a>, <a class="el" href="classDataDumpParser.html#aee953f6c14eec2945c98d986544f4598">DataDumpParser</a>, <a class="el" href="classChecksumParser.html#ab3b20a2418a4cb1427cdf50524ad911a">ChecksumParser</a>, and <a class="el" href="classDataDumpParser.html#aee953f6c14eec2945c98d986544f4598">DataDumpParser</a>.</p>

<p>Referenced by <a class="el" href="packet_8cc_source.html#l00493">Barry::DBPacket::Parse()</a>.</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="classBarry_1_1Parser_a95bfc4014e3e8ded94625f43d1d29800_icgraph.png" border="0" usemap="#classBarry_1_1Parser_a95bfc4014e3e8ded94625f43d1d29800_icgraph_map" alt=""></div>
<map name="classBarry_1_1Parser_a95bfc4014e3e8ded94625f43d1d29800_icgraph_map" id="classBarry_1_1Parser_a95bfc4014e3e8ded94625f43d1d29800_icgraph">
<area shape="rect" id="node3" href="classBarry_1_1DBPacket.html#a43b96166db565fb8b37085d06d3a446c" title="Parses the data in the receive buffer, and attempts to be smart about it, using the..." alt="" coords="200,5,365,35"/><area shape="rect" id="node5" href="classBarry_1_1Mode_1_1Desktop.html#a6bb1c96d6082575b5fa684dee2af51a6" title="Retrieve a database from the handheld device, using the given parser to parse the..." alt="" coords="413,5,667,35"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="abf8ab1598be74268ee486af938c527d4"></a><!-- doxytag: member="Barry::Parser::Store" ref="abf8ab1598be74268ee486af938c527d4" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Barry::Parser::Store </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Called at the very end of record parsing, and used to store the final packet somewhere, either in memory, disk, etc. </p>

<p>Implemented in <a class="el" href="classBarry_1_1NullParser.html#a4f59f7c0b7688fddf8d7f91801983d9b">Barry::NullParser</a>, <a class="el" href="classBarry_1_1RecordParser.html#a95d327d972468d7360e961f14dc67c70">Barry::RecordParser&lt; RecordT, StorageT &gt;</a>, <a class="el" href="classDataDumpParser.html#a04b94fd020f1f8d99cd17afe1e9c20e5">DataDumpParser</a>, <a class="el" href="classChecksumParser.html#adac9dc038ae4436aeef29c04a9b5f9de">ChecksumParser</a>, and <a class="el" href="classDataDumpParser.html#a04b94fd020f1f8d99cd17afe1e9c20e5">DataDumpParser</a>.</p>

<p>Referenced by <a class="el" href="packet_8cc_source.html#l00493">Barry::DBPacket::Parse()</a>.</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="classBarry_1_1Parser_abf8ab1598be74268ee486af938c527d4_icgraph.png" border="0" usemap="#classBarry_1_1Parser_abf8ab1598be74268ee486af938c527d4_icgraph_map" alt=""></div>
<map name="classBarry_1_1Parser_abf8ab1598be74268ee486af938c527d4_icgraph_map" id="classBarry_1_1Parser_abf8ab1598be74268ee486af938c527d4_icgraph">
<area shape="rect" id="node3" href="classBarry_1_1DBPacket.html#a43b96166db565fb8b37085d06d3a446c" title="Parses the data in the receive buffer, and attempts to be smart about it, using the..." alt="" coords="195,5,360,35"/><area shape="rect" id="node5" href="classBarry_1_1Mode_1_1Desktop.html#a6bb1c96d6082575b5fa684dee2af51a6" title="Retrieve a database from the handheld device, using the given parser to parse the..." alt="" coords="408,5,661,35"/></map>
</div>
</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="parser_8h_source.html">parser.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2-20100208 </small></address>
</body>
</html>