Sophie

Sophie

distrib > Mandriva > 2007.0 > i586 > by-pkgid > ad1ba1135a9c9eeffc2e538163e00373 > files > 142

libCommonC++2_1.4-devel-1.4.1-1mdv2007.0.i586.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>GNU CommonC++: ost::FixedBuffer 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.4.6 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li id="current"><a href="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li><a href="examples.html"><span>Examples</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="nav">
<a class="el" href="namespaceost.html">ost</a>::<a class="el" href="classost_1_1_fixed_buffer.html">FixedBuffer</a></div>
<h1>ost::FixedBuffer Class Reference</h1><!-- doxytag: class="ost::FixedBuffer" --><!-- doxytag: inherits="ost::Buffer" -->A buffer class that holds a known capacity of fixed sized objects defined during creation.producer/consumer buffer for fixed size objects.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="buffer_8h-source.html">buffer.h</a>&gt;</code>
<p>
<p>Inheritance diagram for ost::FixedBuffer:
<p><center><img src="classost_1_1_fixed_buffer.png" usemap="#ost::FixedBuffer_map" border="0" alt=""></center>
<map name="ost::FixedBuffer_map">
<area href="classost_1_1_buffer.html" alt="ost::Buffer" shape="rect" coords="0,56,100,80">
<area href="classost_1_1_conditional.html" alt="ost::Conditional" shape="rect" coords="0,0,100,24">
</map>
<a href="classost_1_1_fixed_buffer-members.html">List of all members.</a><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">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_fixed_buffer.html#154d01f4960fabb6d0310a33290e3e96">FixedBuffer</a> (size_t capacity, size_t objsize)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a buffer of known capacity for objects of a specified size.  <a href="#154d01f4960fabb6d0310a33290e3e96"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_fixed_buffer.html#bee76b72fa800332666f57e6f62fc551">FixedBuffer</a> (const <a class="el" href="classost_1_1_fixed_buffer.html">FixedBuffer</a> &amp;fb)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a copy of an existing fixed size buffer and duplicate it's contents.  <a href="#bee76b72fa800332666f57e6f62fc551"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_fixed_buffer.html#70f1e3b40a36ed683d9d2d08e5e8d14f">~FixedBuffer</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroy the fixed buffer and free the memory used to store objects.  <a href="#70f1e3b40a36ed683d9d2d08e5e8d14f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classost_1_1_fixed_buffer.html">FixedBuffer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_fixed_buffer.html#5cba81d3c87bb5defc162bea91fba442">operator=</a> (const <a class="el" href="classost_1_1_fixed_buffer.html">FixedBuffer</a> &amp;fb)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_fixed_buffer.html#0a374a1a50ae78ce64db9e4ab25991d2">isValid</a> (void)</td></tr>

<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_fixed_buffer.html#e0a0b8dcb25e97313de5b998e1f22bfd">onPeek</a> (void *buf)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the first object in the buffer.  <a href="#e0a0b8dcb25e97313de5b998e1f22bfd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_fixed_buffer.html#8364661c1b2d2114d87be12479b04a47">onWait</a> (void *buf)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Wait for and return a fixed object in the buffer.  <a href="#8364661c1b2d2114d87be12479b04a47"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_fixed_buffer.html#5d39b3282dd4a18d79456f7f16962b35">onPost</a> (void *buf)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Post an object of the appropriate size into the buffer.  <a href="#5d39b3282dd4a18d79456f7f16962b35"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A buffer class that holds a known capacity of fixed sized objects defined during creation.producer/consumer buffer for fixed size objects. 
<p>
<dl compact><dt><b>Author:</b></dt><dd>David Sugar &lt;<a href="mailto:dyfet@ostel.com">dyfet@ostel.com</a>&gt; </dd></dl>

<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="154d01f4960fabb6d0310a33290e3e96"></a><!-- doxytag: member="ost::FixedBuffer::FixedBuffer" ref="154d01f4960fabb6d0310a33290e3e96" args="(size_t capacity, size_t objsize)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">ost::FixedBuffer::FixedBuffer           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">size_t&nbsp;</td>
          <td class="mdname" nowrap> <em>capacity</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>size_t&nbsp;</td>
          <td class="mdname" nowrap> <em>objsize</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create a buffer of known capacity for objects of a specified size. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>capacity</em>&nbsp;</td><td>of the buffer. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>objsize</em>&nbsp;</td><td>for each object held in the buffer. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="bee76b72fa800332666f57e6f62fc551"></a><!-- doxytag: member="ost::FixedBuffer::FixedBuffer" ref="bee76b72fa800332666f57e6f62fc551" args="(const FixedBuffer &amp;fb)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">ost::FixedBuffer::FixedBuffer           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classost_1_1_fixed_buffer.html">FixedBuffer</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>fb</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create a copy of an existing fixed size buffer and duplicate it's contents. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fb</em>&nbsp;</td><td>existing <a class="el" href="classost_1_1_fixed_buffer.html">FixedBuffer</a> object. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="70f1e3b40a36ed683d9d2d08e5e8d14f"></a><!-- doxytag: member="ost::FixedBuffer::~FixedBuffer" ref="70f1e3b40a36ed683d9d2d08e5e8d14f" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual ost::FixedBuffer::~FixedBuffer           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Destroy the fixed buffer and free the memory used to store objects. 
<p>
    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="0a374a1a50ae78ce64db9e4ab25991d2"></a><!-- doxytag: member="ost::FixedBuffer::isValid" ref="0a374a1a50ae78ce64db9e4ab25991d2" args="(void)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">bool ost::FixedBuffer::isValid           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Reimplemented from <a class="el" href="classost_1_1_buffer.html#255237cf9eebf6010546e884933ff8ba">ost::Buffer</a>.    </td>
  </tr>
</table>
<a class="anchor" name="e0a0b8dcb25e97313de5b998e1f22bfd"></a><!-- doxytag: member="ost::FixedBuffer::onPeek" ref="e0a0b8dcb25e97313de5b998e1f22bfd" args="(void *buf)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">size_t ost::FixedBuffer::onPeek           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>buf</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [protected, virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the first object in the buffer. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>predefined size of this buffers objects. </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>pointer to copy contents of head of buffer to. </td></tr>
  </table>
</dl>

<p>
Implements <a class="el" href="classost_1_1_buffer.html#5879caf00bd75cd972d84b822cb77ef0">ost::Buffer</a>.    </td>
  </tr>
</table>
<a class="anchor" name="5d39b3282dd4a18d79456f7f16962b35"></a><!-- doxytag: member="ost::FixedBuffer::onPost" ref="5d39b3282dd4a18d79456f7f16962b35" args="(void *buf)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">size_t ost::FixedBuffer::onPost           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>buf</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [protected, virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Post an object of the appropriate size into the buffer. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>predefined size of this buffers objects. </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>pointer to data to copy into the buffer. </td></tr>
  </table>
</dl>

<p>
Implements <a class="el" href="classost_1_1_buffer.html#7ee3158e74f0e50e91f14bf370feb1fa">ost::Buffer</a>.    </td>
  </tr>
</table>
<a class="anchor" name="8364661c1b2d2114d87be12479b04a47"></a><!-- doxytag: member="ost::FixedBuffer::onWait" ref="8364661c1b2d2114d87be12479b04a47" args="(void *buf)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">size_t ost::FixedBuffer::onWait           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>buf</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [protected, virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Wait for and return a fixed object in the buffer. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>predefined size of this buffers objects. </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>pointer to hold object returned from the buffer. </td></tr>
  </table>
</dl>

<p>
Implements <a class="el" href="classost_1_1_buffer.html#9662e8def92667057121de0847dcabf0">ost::Buffer</a>.    </td>
  </tr>
</table>
<a class="anchor" name="5cba81d3c87bb5defc162bea91fba442"></a><!-- doxytag: member="ost::FixedBuffer::operator=" ref="5cba81d3c87bb5defc162bea91fba442" args="(const FixedBuffer &amp;fb)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_fixed_buffer.html">FixedBuffer</a>&amp; ost::FixedBuffer::operator=           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classost_1_1_fixed_buffer.html">FixedBuffer</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>fb</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="buffer_8h-source.html">buffer.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Mon Jun 19 10:50:56 2006 for GNU CommonC++ by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
</body>
</html>