Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > abb2634846290d27f545cecded067e1f > files > 722

barry-devel-docs-0.17.1-4.fc14.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Barry: Barry::MultiRecordParser Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<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="classes.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="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
      <li><a href="annotated.html"><span>Class&nbsp;List</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_1MultiRecordParser.html">MultiRecordParser</a>
  </div>
</div>
<div class="contents">
<h1>Barry::MultiRecordParser Class Reference</h1><!-- doxytag: class="Barry::MultiRecordParser" --><!-- doxytag: inherits="Barry::Parser" --><code>#include &lt;<a class="el" href="parser_8h-source.html">parser.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for Barry::MultiRecordParser:</div>
<div class="dynsection">
<p><center><img src="classBarry_1_1MultiRecordParser__inherit__graph.png" border="0" usemap="#Barry_1_1MultiRecordParser__inherit__map" alt="Inheritance graph"></center>
<map name="Barry_1_1MultiRecordParser__inherit__map">
<area shape="rect" href="classBarry_1_1AllRecordParser.html" title="Convenience parser that creates a MultiRecordParser with all known record parsers..." alt="" coords="12,155,167,181"><area shape="rect" href="classBarry_1_1Parser.html" title="Base class for the parser hierarchy." alt="" coords="40,5,139,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
<div class="dynheader">
Collaboration diagram for Barry::MultiRecordParser:</div>
<div class="dynsection">
<p><center><img src="classBarry_1_1MultiRecordParser__coll__graph.png" border="0" usemap="#Barry_1_1MultiRecordParser__coll__map" alt="Collaboration graph"></center>
<map name="Barry_1_1MultiRecordParser__coll__map">
<area shape="rect" href="classBarry_1_1Parser.html" title="Base class for the parser hierarchy." alt="" coords="40,5,139,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classBarry_1_1MultiRecordParser-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
Container parser class that accepts multiple <a class="el" href="classBarry_1_1Parser.html" title="Base class for the parser hierarchy.">Parser</a> objects (often RecordParser&lt;&gt; objects but they don't have to be) and automatically routes incoming records to the appropriate parser. 
<p>
Note that this container owns *all* <a class="el" href="classBarry_1_1Parser.html" title="Base class for the parser hierarchy.">Parser</a> objects, and will free them upon destruction.<p>
Incoming records that have no matching parser are passed to the default parser object, if one exists, otherwise they are dropped silently. The default parser object is also owned by the container, and will be freed on destruction.<p>
Do NOT derive your own personal parser classes from this, unless you are perfectly confident that you will catch future API changes on the devel tree without the compiler's help. 
<p>Definition at line <a class="el" href="parser_8h-source.html#l00397">397</a> of file <a class="el" href="parser_8h-source.html">parser.h</a>.</p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1MultiRecordParser.html#95e734d6aeb77538b97426cc15f70d78">Add</a> (const std::string &amp;dbname, <a class="el" href="classBarry_1_1Parser.html">Parser</a> *parser)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds given parser to list and takes ownership of it.  <a href="#95e734d6aeb77538b97426cc15f70d78"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1MultiRecordParser.html#0b617da186dc754ef4f57992e98fc0ec">Add</a> (<a class="el" href="classBarry_1_1RecordParserBase.html">RecordParserBase</a> *parser)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds given parser to list and takes ownership of it.  <a href="#0b617da186dc754ef4f57992e98fc0ec"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class RecordT&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classBarry_1_1MultiRecordParser.html#5d304e359e51ce5f2682ae12402b5426">Add</a> (<a class="el" href="classBarry_1_1AllRecordStore.html">AllRecordStore</a> &amp;store)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a RecordParser&lt;&gt; object using the given record type and <a class="el" href="classBarry_1_1AllRecordStore.html" title="Base class with overloaded functor behaviour for all available record classes.">AllRecordStore</a>.  <a href="#5d304e359e51ce5f2682ae12402b5426"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class RecordT, class StorageT&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classBarry_1_1MultiRecordParser.html#139b883183f84b3052dbc464a4396177">Add</a> (StorageT *store)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Two helper template functions that create the RecordParser&lt;&gt; automatically based on the function call.  <a href="#139b883183f84b3052dbc464a4396177"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1MultiRecordParser.html#0b11e1f21e4861bae9dc5c670b4fb053">Add</a> (const std::string &amp;dbname, std::ostream &amp;os)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a RecordParser&lt;&gt; object for the given database name, using DumpStore&lt;&gt; with the given stream for the output, and adds it to list.  <a href="#0b11e1f21e4861bae9dc5c670b4fb053"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1MultiRecordParser.html#9aed79cf7fa3be32bd34c01a29b81ead">Add</a> (const std::string &amp;dbname, <a class="el" href="classBarry_1_1AllRecordStore.html">AllRecordStore</a> &amp;store)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a RecordParser&lt;&gt; object for the given database name, using the given store object.  <a href="#9aed79cf7fa3be32bd34c01a29b81ead"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1MultiRecordParser.html#e749f5c58c6a9b9b86511f84f3a91ee8">ParseRecord</a> (const <a class="el" href="classBarry_1_1DBData.html">DBData</a> &amp;data, const <a class="el" href="classBarry_1_1IConverter.html">IConverter</a> *ic)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called to parse sub fields in the raw data packet.  <a href="#e749f5c58c6a9b9b86511f84f3a91ee8"></a><br></td></tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="95e734d6aeb77538b97426cc15f70d78"></a><!-- doxytag: member="Barry::MultiRecordParser::Add" ref="95e734d6aeb77538b97426cc15f70d78" args="(const std::string &amp;dbname, Parser *parser)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Barry::MultiRecordParser::Add           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>dbname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classBarry_1_1Parser.html">Parser</a> *&nbsp;</td>
          <td class="paramname"> <em>parser</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Adds given parser to list and takes ownership of it. 
<p>

<p>Definition at line <a class="el" href="parser_8cc-source.html#l00098">98</a> of file <a class="el" href="parser_8cc-source.html">parser.cc</a>.</p>

<p>Referenced by <a class="el" href="parser_8cc-source.html#l00117">Add()</a>.</p>

<p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
<p><center><img src="classBarry_1_1MultiRecordParser_95e734d6aeb77538b97426cc15f70d78_icgraph.png" border="0" usemap="#classBarry_1_1MultiRecordParser_95e734d6aeb77538b97426cc15f70d78_icgraph_map" alt=""></center>
<map name="classBarry_1_1MultiRecordParser_95e734d6aeb77538b97426cc15f70d78_icgraph_map">
<area shape="rect" href="classBarry_1_1MultiRecordParser.html#0b617da186dc754ef4f57992e98fc0ec" title="Adds given parser to list and takes ownership of it." alt="" coords="255,5,452,32"></map>
</div>

</div>
</div><p>
<a class="anchor" name="0b617da186dc754ef4f57992e98fc0ec"></a><!-- doxytag: member="Barry::MultiRecordParser::Add" ref="0b617da186dc754ef4f57992e98fc0ec" args="(RecordParserBase *parser)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Barry::MultiRecordParser::Add           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classBarry_1_1RecordParserBase.html">RecordParserBase</a> *&nbsp;</td>
          <td class="paramname"> <em>parser</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Adds given parser to list and takes ownership of it. 
<p>

<p>Definition at line <a class="el" href="parser_8cc-source.html#l00117">117</a> of file <a class="el" href="parser_8cc-source.html">parser.cc</a>.</p>

<p>References <a class="el" href="parser_8cc-source.html#l00098">Add()</a>, and Barry::RecordParserBase::GetDBName().</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classBarry_1_1MultiRecordParser_0b617da186dc754ef4f57992e98fc0ec_cgraph.png" border="0" usemap="#classBarry_1_1MultiRecordParser_0b617da186dc754ef4f57992e98fc0ec_cgraph_map" alt=""></center>
<map name="classBarry_1_1MultiRecordParser_0b617da186dc754ef4f57992e98fc0ec_cgraph_map">
<area shape="rect" href="classBarry_1_1MultiRecordParser.html#95e734d6aeb77538b97426cc15f70d78" title="Adds given parser to list and takes ownership of it." alt="" coords="280,5,477,32"><area shape="rect" href="classBarry_1_1RecordParserBase.html#fc05018239e6f17c6224abe3e07022a9" title="Barry::RecordParserBase::GetDBName" alt="" coords="253,56,504,83"></map>
</div>

</div>
</div><p>
<a class="anchor" name="5d304e359e51ce5f2682ae12402b5426"></a><!-- doxytag: member="Barry::MultiRecordParser::Add" ref="5d304e359e51ce5f2682ae12402b5426" args="(AllRecordStore &amp;store)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RecordT&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void Barry::MultiRecordParser::Add           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classBarry_1_1AllRecordStore.html">AllRecordStore</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>store</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates a RecordParser&lt;&gt; object using the given record type and <a class="el" href="classBarry_1_1AllRecordStore.html" title="Base class with overloaded functor behaviour for all available record classes.">AllRecordStore</a>. 
<p>
Does NOT take ownership of the store object, since it can be used multiple times for multiple records. 
<p>Definition at line <a class="el" href="parser_8h-source.html#l00426">426</a> of file <a class="el" href="parser_8h-source.html">parser.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="139b883183f84b3052dbc464a4396177"></a><!-- doxytag: member="Barry::MultiRecordParser::Add" ref="139b883183f84b3052dbc464a4396177" args="(StorageT *store)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RecordT, class StorageT&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void Barry::MultiRecordParser::Add           </td>
          <td>(</td>
          <td class="paramtype">StorageT *&nbsp;</td>
          <td class="paramname"> <em>store</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Two helper template functions that create the RecordParser&lt;&gt; automatically based on the function call. 
<p>
Both pointer and reference versions. 
<p>Definition at line <a class="el" href="parser_8h-source.html#l00436">436</a> of file <a class="el" href="parser_8h-source.html">parser.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="0b11e1f21e4861bae9dc5c670b4fb053"></a><!-- doxytag: member="Barry::MultiRecordParser::Add" ref="0b11e1f21e4861bae9dc5c670b4fb053" args="(const std::string &amp;dbname, std::ostream &amp;os)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Barry::MultiRecordParser::Add           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>dbname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::ostream &amp;&nbsp;</td>
          <td class="paramname"> <em>os</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates a RecordParser&lt;&gt; object for the given database name, using DumpStore&lt;&gt; with the given stream for the output, and adds it to list. 
<p>
Returns false if there is no known Record class for dbname. 
<p>Definition at line <a class="el" href="parser_8cc-source.html#l00124">124</a> of file <a class="el" href="parser_8cc-source.html">parser.cc</a>.</p>

<p>References <a class="el" href="parser_8cc-source.html#l00098">Add()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classBarry_1_1MultiRecordParser_0b11e1f21e4861bae9dc5c670b4fb053_cgraph.png" border="0" usemap="#classBarry_1_1MultiRecordParser_0b11e1f21e4861bae9dc5c670b4fb053_cgraph_map" alt=""></center>
<map name="classBarry_1_1MultiRecordParser_0b11e1f21e4861bae9dc5c670b4fb053_cgraph_map">
<area shape="rect" href="classBarry_1_1MultiRecordParser.html#95e734d6aeb77538b97426cc15f70d78" title="Adds given parser to list and takes ownership of it." alt="" coords="255,5,452,32"></map>
</div>

</div>
</div><p>
<a class="anchor" name="9aed79cf7fa3be32bd34c01a29b81ead"></a><!-- doxytag: member="Barry::MultiRecordParser::Add" ref="9aed79cf7fa3be32bd34c01a29b81ead" args="(const std::string &amp;dbname, AllRecordStore &amp;store)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Barry::MultiRecordParser::Add           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>dbname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classBarry_1_1AllRecordStore.html">AllRecordStore</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>store</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates a RecordParser&lt;&gt; object for the given database name, using the given store object. 
<p>
Returns false if there is no known Record class for dbname. 
<p>Definition at line <a class="el" href="parser_8cc-source.html#l00144">144</a> of file <a class="el" href="parser_8cc-source.html">parser.cc</a>.</p>

</div>
</div><p>
<a class="anchor" name="e749f5c58c6a9b9b86511f84f3a91ee8"></a><!-- doxytag: member="Barry::MultiRecordParser::ParseRecord" ref="e749f5c58c6a9b9b86511f84f3a91ee8" args="(const DBData &amp;data, const IConverter *ic)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Barry::MultiRecordParser::ParseRecord           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classBarry_1_1DBData.html">DBData</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>data</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> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Called to parse sub fields in the raw data packet. 
<p>

<p>Implements <a class="el" href="classBarry_1_1Parser.html#1d8325c74140cda51c5735c6f82b7511">Barry::Parser</a>.</p>

<p>Definition at line <a class="el" href="parser_8cc-source.html#l00161">161</a> of file <a class="el" href="parser_8cc-source.html">parser.cc</a>.</p>

<p>References <a class="el" href="data_8h-source.html#l00203">Barry::DBData::GetDBName()</a>, and <a class="el" href="classBarry_1_1Parser.html#1d8325c74140cda51c5735c6f82b7511">Barry::Parser::ParseRecord()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classBarry_1_1MultiRecordParser_e749f5c58c6a9b9b86511f84f3a91ee8_cgraph.png" border="0" usemap="#classBarry_1_1MultiRecordParser_e749f5c58c6a9b9b86511f84f3a91ee8_cgraph_map" alt=""></center>
<map name="classBarry_1_1MultiRecordParser_e749f5c58c6a9b9b86511f84f3a91ee8_cgraph_map">
<area shape="rect" href="classBarry_1_1DBData.html#37303ba0c4008a8afe0e5f09b823812e" title="Barry::DBData::GetDBName" alt="" coords="304,5,491,32"><area shape="rect" href="classBarry_1_1Parser.html#1d8325c74140cda51c5735c6f82b7511" title="Called to parse sub fields in the raw data packet." alt="" coords="307,56,488,83"></map>
</div>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="parser_8h-source.html">parser.h</a><li><a class="el" href="parser_8cc-source.html">parser.cc</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Mar 1 17:51:02 2011 for Barry by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>