Sophie

Sophie

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

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::Builder 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_1Builder.html">Builder</a>
  </div>
</div>
<div class="contents">
<h1>Barry::Builder Class Reference</h1><!-- doxytag: class="Barry::Builder" --><code>#include &lt;<a class="el" href="builder_8h-source.html">builder.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for Barry::Builder:</div>
<div class="dynsection">
<p><center><img src="classBarry_1_1Builder__inherit__graph.png" border="0" usemap="#Barry_1_1Builder__inherit__map" alt="Inheritance graph"></center>
<map name="Barry_1_1Builder__inherit__map">
<area shape="rect" href="classBarry_1_1BoostBuilder.html" title="This Builder class reads a boost serialization stream, and converts them into DBData..." alt="" coords="225,5,359,32"><area shape="rect" href="classBarry_1_1DBDataBuilder.html" title="Wrapper class around a DBData object, to make it easy to pass a DBData object into..." alt="" coords="220,56,364,83"><area shape="rect" href="classBarry_1_1DeviceBuilder.html" title="Takes a list of database dbId&#39;s and behaves like a Builder, trying to avoid copies..." alt="" coords="223,107,361,133"><area shape="rect" href="classBarry_1_1RecordBuilder.html" title="Template class for easy creation of specific protocol packet builder objects." alt="" coords="155,208,429,235"><area shape="rect" href="classBarry_1_1Restore.html" title="Barry Backup Restore builder class." alt="" coords="240,259,344,285"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classBarry_1_1Builder-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
Base class for the builder functor hierarchy. 
<p>
This defines the API used by the <a class="el" href="classBarry_1_1Controller.html" title="The main interface class.">Controller</a> and Packet classes for building a raw device record to write to the device. 
<p>Definition at line <a class="el" href="builder_8h-source.html#l00059">59</a> of file <a class="el" href="builder_8h-source.html">builder.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">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1Builder.html#4a3d38061d957eb6dd0539b18d40e6ad">BuildRecord</a> (<a class="el" href="classBarry_1_1DBData.html">DBData</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 build the record field data.  <a href="#4a3d38061d957eb6dd0539b18d40e6ad"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1Builder.html#005a0269c1f96947d7a75c1cc09a4609">FetchRecord</a> (<a class="el" href="classBarry_1_1DBData.html">DBData</a> &amp;data, const <a class="el" href="classBarry_1_1IConverter.html">IConverter</a> *ic)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Same as BuildRecord, but does not care about any offsets.  <a href="#005a0269c1f96947d7a75c1cc09a4609"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1Builder.html#0ecfa5788ddee814a2071c82c5734691">EndOfFile</a> () const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sometimes a builder can have multiple databases stored in it, so when Build/Fetch returns false, check if there is more data with this function.  <a href="#0ecfa5788ddee814a2071c82c5734691"></a><br></td></tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="4a3d38061d957eb6dd0539b18d40e6ad"></a><!-- doxytag: member="Barry::Builder::BuildRecord" ref="4a3d38061d957eb6dd0539b18d40e6ad" args="(DBData &amp;data, size_t &amp;offset, const IConverter *ic)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool Barry::Builder::BuildRecord           </td>
          <td>(</td>
          <td class="paramtype"><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">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 build the record field data. 
<p>
Store the raw data in data, using offset to know where to write. Be sure to update offset, and be sure to adjust the size of the data packet (possibly with Data::ReleaseBuffer()).<p>
Returns true if successful, and false if at the end of the series. Note that if <a class="el" href="classBarry_1_1Builder.html#0ecfa5788ddee814a2071c82c5734691" title="Sometimes a builder can have multiple databases stored in it, so when Build/Fetch...">EndOfFile()</a> is false after this function returns false, then there may be another series available, which the next call to <a class="el" href="classBarry_1_1Builder.html#4a3d38061d957eb6dd0539b18d40e6ad" title="Called to build the record field data.">BuildRecord()</a> will determine. 
<p>Implemented in <a class="el" href="classBarry_1_1DBDataBuilder.html#9d7d0b399407ca2ff345e9ef011828ff">Barry::DBDataBuilder</a>, <a class="el" href="classBarry_1_1RecordBuilder.html#cc484ee4a8e30cf634e86c282498e9a0">Barry::RecordBuilder&lt; RecordT, StorageT &gt;</a>, <a class="el" href="classBarry_1_1DeviceBuilder.html#292a7d4ee73590ce55c5d866739417ec">Barry::DeviceBuilder</a>, <a class="el" href="classBarry_1_1Restore.html#59f9e2d2e9dd3d7c40588416b27b5ee7">Barry::Restore</a>, and <a class="el" href="classBarry_1_1BoostBuilder.html#0473eb8b060317ad42792283154564fe">Barry::BoostBuilder</a>.</p>

<p>Referenced by <a class="el" href="packet_8cc-source.html#l00423">Barry::DBPacket::SetRecord()</a>, and <a class="el" href="packet_8cc-source.html#l00359">Barry::DBPacket::SetRecordByIndex()</a>.</p>

<p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
<p><center><img src="classBarry_1_1Builder_4a3d38061d957eb6dd0539b18d40e6ad_icgraph.png" border="0" usemap="#classBarry_1_1Builder_4a3d38061d957eb6dd0539b18d40e6ad_icgraph_map" alt=""></center>
<map name="classBarry_1_1Builder_4a3d38061d957eb6dd0539b18d40e6ad_icgraph_map">
<area shape="rect" href="classBarry_1_1DBPacket.html#26c4025403d129f658c1919190c0a0f0" title="Builds a command packet in the m_send buffer for the SET_RECORD command code." alt="" coords="257,5,444,32"><area shape="rect" href="classBarry_1_1DBPacket.html#7a41833dcc12c2823cd54991161e8d26" title="Builds a command packet in the m_send buffer for the SET_RECORD_BY_INDEX command..." alt="" coords="233,56,468,83"><area shape="rect" href="classBarry_1_1Mode_1_1Desktop.html#0fec0d31ff496974acfc15fdc75f074a" title="Adds a record to the specified database." alt="" coords="519,5,737,32"><area shape="rect" href="classBarry_1_1Mode_1_1Desktop.html#bf813b7fb04062515369209c8073dab0" title="Overwrites a specific record in the device as identified by the stateTableIndex." alt="" coords="520,56,736,83"></map>
</div>

</div>
</div><p>
<a class="anchor" name="005a0269c1f96947d7a75c1cc09a4609"></a><!-- doxytag: member="Barry::Builder::FetchRecord" ref="005a0269c1f96947d7a75c1cc09a4609" args="(DBData &amp;data, const IConverter *ic)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool Barry::Builder::FetchRecord           </td>
          <td>(</td>
          <td class="paramtype"><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> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Same as BuildRecord, but does not care about any offsets. 
<p>
The caller should call DBData::GetOffset() afterward to discover if there is an offset to the result.<p>
This is usually the fastest of the two functions, since extra copying may be required if a specific offset is given. When building records from Record classes, both functions are the same speed. But when building records from the device, the device decides the offset, so <a class="el" href="classBarry_1_1Builder.html#005a0269c1f96947d7a75c1cc09a4609" title="Same as BuildRecord, but does not care about any offsets.">FetchRecord()</a> is faster, since BuildRecord requires a copy to adjust to the right offset.<p>
The caller should use the function that results in the least amount of copying for the caller. If the caller doesn't care about where the resulting record is in data, use <a class="el" href="classBarry_1_1Builder.html#005a0269c1f96947d7a75c1cc09a4609" title="Same as BuildRecord, but does not care about any offsets.">FetchRecord()</a>. 
<p>Implemented in <a class="el" href="classBarry_1_1DBDataBuilder.html#44aa9f78cdb4112f478ed36dca37b5f0">Barry::DBDataBuilder</a>, <a class="el" href="classBarry_1_1RecordBuilder.html#12bf6698689b031986008924d8c66946">Barry::RecordBuilder&lt; RecordT, StorageT &gt;</a>, <a class="el" href="classBarry_1_1DeviceBuilder.html#3eb2238b584aadac8af2f511cd2ba245">Barry::DeviceBuilder</a>, <a class="el" href="classBarry_1_1Restore.html#fc3e4162a0ae1c19d338126d920abb57">Barry::Restore</a>, and <a class="el" href="classBarry_1_1BoostBuilder.html#414b487b41d7c84015ae2c7d32a200ad">Barry::BoostBuilder</a>.</p>

<p>Referenced by <a class="el" href="pipe_8cc-source.html#l00035">Barry::Pipe::PumpEntry()</a>.</p>

<p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
<p><center><img src="classBarry_1_1Builder_005a0269c1f96947d7a75c1cc09a4609_icgraph.png" border="0" usemap="#classBarry_1_1Builder_005a0269c1f96947d7a75c1cc09a4609_icgraph_map" alt=""></center>
<map name="classBarry_1_1Builder_005a0269c1f96947d7a75c1cc09a4609_icgraph_map">
<area shape="rect" href="classBarry_1_1Pipe.html#c37ea1a469fdc249eba6fb65e421cf34" title="Reads one item from the builder and feeds it into the parser and returns the builder..." alt="" coords="237,5,397,32"><area shape="rect" href="classBarry_1_1Pipe.html#6ac2aa700bf3aa575dec422b45d1b40f" title="Reads all items from builder, feeding them into the parser, until the builder&#39;s..." alt="" coords="445,5,611,32"><area shape="rect" href="classBarry_1_1Pipe.html#0978edd4b1a8a0dcab3b6dd49b5a71ba" title="Reads all series from the builder, feeding them into the parser, until the builder&#39;s..." alt="" coords="659,5,808,32"></map>
</div>

</div>
</div><p>
<a class="anchor" name="0ecfa5788ddee814a2071c82c5734691"></a><!-- doxytag: member="Barry::Builder::EndOfFile" ref="0ecfa5788ddee814a2071c82c5734691" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool Barry::Builder::EndOfFile           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sometimes a builder can have multiple databases stored in it, so when Build/Fetch returns false, check if there is more data with this function. 
<p>
This function is not used by database-oriented functions, but by pipe- oriented functions. 
<p>Implemented in <a class="el" href="classBarry_1_1DBDataBuilder.html#ca40d139b777c086699d58553a2e0646">Barry::DBDataBuilder</a>, <a class="el" href="classBarry_1_1RecordBuilder.html#a58d766db9692f978aa2a49736607dac">Barry::RecordBuilder&lt; RecordT, StorageT &gt;</a>, <a class="el" href="classBarry_1_1DeviceBuilder.html#7310e46f1fa8ee6e65f0717a656a4d5d">Barry::DeviceBuilder</a>, <a class="el" href="classBarry_1_1Restore.html#4d8f64fce3b905a756185e1a9ca0c09e">Barry::Restore</a>, and <a class="el" href="classBarry_1_1BoostBuilder.html#499467f5c4474fa91c90d0701e3bb0e0">Barry::BoostBuilder</a>.</p>

<p>Referenced by <a class="el" href="pipe_8cc-source.html#l00056">Barry::Pipe::PumpFile()</a>.</p>

<p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
<p><center><img src="classBarry_1_1Builder_0ecfa5788ddee814a2071c82c5734691_icgraph.png" border="0" usemap="#classBarry_1_1Builder_0ecfa5788ddee814a2071c82c5734691_icgraph_map" alt=""></center>
<map name="classBarry_1_1Builder_0ecfa5788ddee814a2071c82c5734691_icgraph_map">
<area shape="rect" href="classBarry_1_1Pipe.html#0978edd4b1a8a0dcab3b6dd49b5a71ba" title="Reads all series from the builder, feeding them into the parser, until the builder&#39;s..." alt="" coords="221,5,371,32"></map>
</div>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="builder_8h-source.html">builder.h</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Mar 1 17:50:56 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>