<!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 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 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 List</span></a></li> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class 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 <<a class="el" href="buffer_8h-source.html">buffer.h</a>></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"> </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"> </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"> </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> &fb)</td></tr> <tr><td class="mdescLeft"> </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 </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"> </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> & </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> &fb)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </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 </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"> </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 </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"> </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 </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"> </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 <<a href="mailto:dyfet@ostel.com">dyfet@ostel.com</a>> </dd></dl> <p> <hr><h2>Constructor & 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">( </td> <td class="md" nowrap valign="top">size_t </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 </td> <td class="mdname" nowrap> <em>objsize</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </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> </td><td>of the buffer. </td></tr> <tr><td valign="top"></td><td valign="top"><em>objsize</em> </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 &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">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classost_1_1_fixed_buffer.html">FixedBuffer</a> & </td> <td class="mdname1" valign="top" nowrap> <em>fb</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </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> </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">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </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">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </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">( </td> <td class="md" nowrap valign="top">void * </td> <td class="mdname1" valign="top" nowrap> <em>buf</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [protected, virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </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> </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">( </td> <td class="md" nowrap valign="top">void * </td> <td class="mdname1" valign="top" nowrap> <em>buf</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [protected, virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </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> </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">( </td> <td class="md" nowrap valign="top">void * </td> <td class="mdname1" valign="top" nowrap> <em>buf</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [protected, virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </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> </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 &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>& ost::FixedBuffer::operator= </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classost_1_1_fixed_buffer.html">FixedBuffer</a> & </td> <td class="mdname1" valign="top" nowrap> <em>fb</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </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 <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>