Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 3ebaf504d69f581a8834e53e04e712a5 > files > 128

gearbox-devel-9.11-6.fc14.i686.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>GearBox Project</title>

<link rel="icon" href="gbx_icon_cardbox_sky.png" type="image/png">
<link rel="shortcut icon" href="gbx_icon_cardbox_sky.png" type="image/png">

<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<!-- Google Analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3583782-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<!-- Returning you to your regular programming -->
</head><body>

<!-- Header -->

<table border="0" cellspacing="0" cellpadding="0">

<tr><!-- create row -->

<!-- spacer cell -->
<!-- #CC CC CC -->
<td rowspan="1" colspan="1" bgcolor="#EEEEEE">&nbsp;&nbsp;&nbsp;&nbsp;</td>

<!-- menu cell -->
<td width="170" rowspan="1" colspan="1" align="left" valign="top" bgcolor="#EEEEEE">


<p>&nbsp;</p>
<p align="center"><a href="index.html"><img src="gbx_logo_cardbox_sky_150x150.png"></a></p><br>

<strong>INTRODUCTION</strong><br>
<strong><a href="gbx_doc_overview.html" style="text-decoration:none">Overview</a></strong><br>
<strong><a href="gbx_doc_getting.html" style="text-decoration:none">Download and Install</a></strong><br>
<!-- <strong><a href="gbx_doc_quickstart.html" style="text-decoration:none">Quick Start</a></strong><br> -->
<strong><a href="gbx_doc_documentation.html" style="text-decoration:none">Documentation</a></strong><br>
<strong><a href="gbx_doc_publications.html" style="text-decoration:none">Publications</a></strong><br>
<br>

<strong>REPOSITORY</strong><br>
<strong><a href="group__gbx__libs.html" style="text-decoration:none">Libraries</a></strong><br>
<!-- <strong><a href="group__gbx__utils.html" style="text-decoration:none">Utilities</a></strong><br> -->
<br>

<strong>DEVELOPER</strong><br>

<!--<strong><a href="gbx_doc_tutorials.html" style="text-decoration:none">Tutorials</a></strong><br>
<strong><a href="group__gbx__examples.html" style="text-decoration:none">Examples</a></strong><br>-->
<strong><a href="gbx_doc_devguide.html" style="text-decoration:none">Dev Guide</a></strong><br>
<!-- 
<strong><a href="gbx_doc_faq.html" style="text-decoration:none">FAQ</a></strong><br>
-->
<strong><a href="http://cdash.acfr.usyd.edu.au/index.php?project=Gearbox" style="text-decoration:none">Dashboard</a></strong><br>
<!--<strong><a href="http://wiki2.cas.edu.au/orca">Wiki</a></strong><br>
login/pass: orca/orca<br>-->
<br>

<strong>PEOPLE</strong><br>
<strong><a href="gbx_doc_contributors.html" style="text-decoration:none">Contributors</a></strong><br>
<strong><a href="gbx_doc_users.html" style="text-decoration:none">Users</a></strong><br>
<br>

<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=216468&amp;type=2" width="125" height="37" border="0" alt="SourceForge.net Logo" /></a><br>
<strong><a href="http://sourceforge.net/projects/gearbox">Project</a></strong><br>
<strong><a href="http://sourceforge.net/project/showfiles.php?group_id=216468">Download</a></strong><br>
<!--<strong><a href="http://sourceforge.net/tracker/?group_id=216468">Bugs/Feedback</a></strong><br>-->
<strong><a href="http://sourceforge.net/mail/?group_id=216468">Mailing lists</a></strong></p>
<p>&nbsp;</p>

</td><!-- /menu cell -->

<!-- one grey spacer cells -->
<td rowspan="1" colspan="1" bgcolor="#EEEEEE">&nbsp;&nbsp;&nbsp;&nbsp;</td>

<!-- one white spacer cells -->
<td rowspan="1" colspan="1">&nbsp;&nbsp;&nbsp;&nbsp;</td>

<!-- main content cell -->
<td rowspan="1" colspan="1" align="left" valign="top">


<!-- 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="pages.html"><span>Related&nbsp;Pages</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="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="namespacegbxiceutilacfr.html">gbxiceutilacfr</a>::<a class="el" href="classgbxiceutilacfr_1_1Buffer.html">Buffer</a>
  </div>
</div>
<div class="contents">
<h1>gbxiceutilacfr::Buffer&lt; Type &gt; Class Template Reference</h1><!-- doxytag: class="gbxiceutilacfr::Buffer" -->
<p>A thread-safe data pipe with buffer semantics.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="buffer_8h_source.html">buffer.h</a>&gt;</code></p>

<p><a href="classgbxiceutilacfr_1_1Buffer-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">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgbxiceutilacfr_1_1Buffer.html#ade9e7fbb73d6ab9efb8c46a04f06cc2c">Buffer</a> (int depth, <a class="el" href="namespacegbxiceutilacfr.html#adb63e22074734759c387bf1494c39d58">BufferType</a> type)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgbxiceutilacfr_1_1Buffer.html#a133032d938830fd330c50af2694598e4">configure</a> (int depth, <a class="el" href="namespacegbxiceutilacfr.html#adb63e22074734759c387bf1494c39d58">BufferType</a> type=BufferTypeCircular)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a68291e42a265c83d13d6715b370977ca"></a><!-- doxytag: member="gbxiceutilacfr::Buffer::depth" ref="a68291e42a265c83d13d6715b370977ca" args="() const " -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgbxiceutilacfr_1_1Buffer.html#a68291e42a265c83d13d6715b370977ca">depth</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns buffer depth. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9117f861cdeffa21bbe36e89a59ec3d5"></a><!-- doxytag: member="gbxiceutilacfr::Buffer::type" ref="a9117f861cdeffa21bbe36e89a59ec3d5" args="() const " -->
<a class="el" href="namespacegbxiceutilacfr.html#adb63e22074734759c387bf1494c39d58">BufferType</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgbxiceutilacfr_1_1Buffer.html#a9117f861cdeffa21bbe36e89a59ec3d5">type</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns buffer type. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa5187e7b11dfb84069136084a83c44c1"></a><!-- doxytag: member="gbxiceutilacfr::Buffer::isEmpty" ref="aa5187e7b11dfb84069136084a83c44c1" args="() const " -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgbxiceutilacfr_1_1Buffer.html#aa5187e7b11dfb84069136084a83c44c1">isEmpty</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns FALSE if there's something in the buffer. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad2865a87110cd362f4f4b4c96cab7ac7"></a><!-- doxytag: member="gbxiceutilacfr::Buffer::size" ref="ad2865a87110cd362f4f4b4c96cab7ac7" args="() const " -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgbxiceutilacfr_1_1Buffer.html#ad2865a87110cd362f4f4b4c96cab7ac7">size</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of items in the buffer. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a055045454d8463d3716cd96fd30d085e"></a><!-- doxytag: member="gbxiceutilacfr::Buffer::purge" ref="a055045454d8463d3716cd96fd30d085e" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgbxiceutilacfr_1_1Buffer.html#a055045454d8463d3716cd96fd30d085e">purge</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes all entries, makes the buffer empty. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgbxiceutilacfr_1_1Buffer.html#ab73d1777d7a9593ece7c5935d4c1ffd2">push</a> (const Type &amp;obj)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgbxiceutilacfr_1_1Buffer.html#a8ae4213513399b95d9c7e68bdab1e57a">pop</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgbxiceutilacfr_1_1Buffer.html#a2eb7b95fc8453ebf3801bbdf273a143c">get</a> (Type &amp;obj) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgbxiceutilacfr_1_1Buffer.html#af69ea1ebcdb20bfcc1edac00e2537218">get</a> (Type &amp;obj, unsigned int n) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgbxiceutilacfr_1_1Buffer.html#aed2eef76f95e9a56b3bab8e3bf80d55c">getAndPop</a> (Type &amp;obj)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgbxiceutilacfr_1_1Buffer.html#af43d6c662de7dc14ab721a5d68a9e8fc">getWithTimeout</a> (Type &amp;obj, int timeoutMs=-1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgbxiceutilacfr_1_1Buffer.html#aa5c3d0b397d9c38add897b73e21ec1d6">getAndPopWithTimeout</a> (Type &amp;obj, int timeoutMs=-1)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class Type&gt;<br/>
 class gbxiceutilacfr::Buffer&lt; Type &gt;</h3>

<p>A thread-safe data pipe with buffer semantics. </p>
<p>For a type-safe buffer, template over the specific object Type you want to put in it. You can use this container for storing smart pointers (e.g. IceUtil smart pointers). In this case the container will only store the pointers and will not perform a deep copy.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>This implementation uses IceUtil threading classes. See example in sec. 28.9.2 of the Ice manual. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classgbxiceutilacfr_1_1Notify.html" title="A data pipe with callback semantics.">Notify</a>, Proxy </dd></dl>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ade9e7fbb73d6ab9efb8c46a04f06cc2c"></a><!-- doxytag: member="gbxiceutilacfr::Buffer::Buffer" ref="ade9e7fbb73d6ab9efb8c46a04f06cc2c" args="(int depth, BufferType type)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Type &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classgbxiceutilacfr_1_1Buffer.html">gbxiceutilacfr::Buffer</a>&lt; Type &gt;::<a class="el" href="classgbxiceutilacfr_1_1Buffer.html">Buffer</a> </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>depth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacegbxiceutilacfr.html#adb63e22074734759c387bf1494c39d58">BufferType</a>&nbsp;</td>
          <td class="paramname"> <em>type</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p><a class="el" href="classgbxiceutilacfr_1_1Buffer.html" title="A thread-safe data pipe with buffer semantics.">Buffer</a> depth, i.e. the maximum number of objects this buffer can hold:</p>
<ul>
<li>positive numbers to specify finite depth,</li>
<li>negative numbers for infinite depth, limited by memory size</li>
<li>zero is undefined </li>
</ul>

<p>References <a class="el" href="buffer_8h_source.html#l00205">gbxiceutilacfr::Buffer&lt; Type &gt;::purge()</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a133032d938830fd330c50af2694598e4"></a><!-- doxytag: member="gbxiceutilacfr::Buffer::configure" ref="a133032d938830fd330c50af2694598e4" args="(int depth, BufferType type=BufferTypeCircular)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Type &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classgbxiceutilacfr_1_1Buffer.html">gbxiceutilacfr::Buffer</a>&lt; Type &gt;::configure </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>depth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacegbxiceutilacfr.html#adb63e22074734759c387bf1494c39d58">BufferType</a>&nbsp;</td>
          <td class="paramname"> <em>type</em> = <code>BufferTypeCircular</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Typically is called before the buffer is used, or if, for some reason, the configuration information was not available at the time when the constructor was called. Careful: all data currently in the buffer is lost, because <a class="el" href="classgbxiceutilacfr_1_1Buffer.html#a055045454d8463d3716cd96fd30d085e">purge()</a> is calledfirst. NOTE: can do smarter by trancating queue only as much as needed. </p>

<p>References <a class="el" href="buffer_8h_source.html#l00205">gbxiceutilacfr::Buffer&lt; Type &gt;::purge()</a>.</p>

</div>
</div>
<a class="anchor" id="af69ea1ebcdb20bfcc1edac00e2537218"></a><!-- doxytag: member="gbxiceutilacfr::Buffer::get" ref="af69ea1ebcdb20bfcc1edac00e2537218" args="(Type &amp;obj, unsigned int n) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Type&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classgbxiceutilacfr_1_1Buffer.html">gbxiceutilacfr::Buffer</a>&lt; Type &gt;::get </td>
          <td>(</td>
          <td class="paramtype">Type &amp;&nbsp;</td>
          <td class="paramname"> <em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>n</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Non-popping and non-blocking random-access read. Returns n-th element from the buffer. Indexing starts at 0. </p>

</div>
</div>
<a class="anchor" id="a2eb7b95fc8453ebf3801bbdf273a143c"></a><!-- doxytag: member="gbxiceutilacfr::Buffer::get" ref="a2eb7b95fc8453ebf3801bbdf273a143c" args="(Type &amp;obj) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Type&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classgbxiceutilacfr_1_1Buffer.html">gbxiceutilacfr::Buffer</a>&lt; Type &gt;::get </td>
          <td>(</td>
          <td class="paramtype">Type &amp;&nbsp;</td>
          <td class="paramname"> <em>obj</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Non-popping and non-blocking read from the front of the buffer.</p>
<p>Calls to <a class="el" href="classgbxiceutilacfr_1_1Buffer.html#a2eb7b95fc8453ebf3801bbdf273a143c">get()</a> on an empty buffer raises an <a class="el" href="classgbxutilacfr_1_1Exception.html" title="Base class for all GbxUtilAcfr exceptions.">gbxutilacfr::Exception</a> exception. You can catch these and call <a class="el" href="classgbxiceutilacfr_1_1Buffer.html#af43d6c662de7dc14ab721a5d68a9e8fc">getWithTimeout()</a> which will block until new data arrives. </p>

</div>
</div>
<a class="anchor" id="aed2eef76f95e9a56b3bab8e3bf80d55c"></a><!-- doxytag: member="gbxiceutilacfr::Buffer::getAndPop" ref="aed2eef76f95e9a56b3bab8e3bf80d55c" args="(Type &amp;obj)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Type&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classgbxiceutilacfr_1_1Buffer.html">gbxiceutilacfr::Buffer</a>&lt; Type &gt;::getAndPop </td>
          <td>(</td>
          <td class="paramtype">Type &amp;&nbsp;</td>
          <td class="paramname"> <em>obj</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classgbxiceutilacfr_1_1Buffer.html#a2eb7b95fc8453ebf3801bbdf273a143c">get()</a> but calls <a class="el" href="classgbxiceutilacfr_1_1Buffer.html#a8ae4213513399b95d9c7e68bdab1e57a">pop()</a> afterwards. </p>

</div>
</div>
<a class="anchor" id="aa5c3d0b397d9c38add897b73e21ec1d6"></a><!-- doxytag: member="gbxiceutilacfr::Buffer::getAndPopWithTimeout" ref="aa5c3d0b397d9c38add897b73e21ec1d6" args="(Type &amp;obj, int timeoutMs=&#45;1)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Type&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classgbxiceutilacfr_1_1Buffer.html">gbxiceutilacfr::Buffer</a>&lt; Type &gt;::getAndPopWithTimeout </td>
          <td>(</td>
          <td class="paramtype">Type &amp;&nbsp;</td>
          <td class="paramname"> <em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>timeoutMs</em> = <code>-1</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classgbxiceutilacfr_1_1Buffer.html#af43d6c662de7dc14ab721a5d68a9e8fc">getWithTimeout</a> but calls <a class="el" href="classgbxiceutilacfr_1_1Buffer.html#a8ae4213513399b95d9c7e68bdab1e57a">pop</a> afterwards. </p>

<p>References <a class="el" href="buffer_8h_source.html#l00281">gbxiceutilacfr::Buffer&lt; Type &gt;::getWithTimeout()</a>, and <a class="el" href="buffer_8h_source.html#l00226">gbxiceutilacfr::Buffer&lt; Type &gt;::pop()</a>.</p>

</div>
</div>
<a class="anchor" id="af43d6c662de7dc14ab721a5d68a9e8fc"></a><!-- doxytag: member="gbxiceutilacfr::Buffer::getWithTimeout" ref="af43d6c662de7dc14ab721a5d68a9e8fc" args="(Type &amp;obj, int timeoutMs=&#45;1)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Type&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classgbxiceutilacfr_1_1Buffer.html">gbxiceutilacfr::Buffer</a>&lt; Type &gt;::getWithTimeout </td>
          <td>(</td>
          <td class="paramtype">Type &amp;&nbsp;</td>
          <td class="paramname"> <em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>timeoutMs</em> = <code>-1</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>If there is an object in the buffer, sets the object and returns 0;</p>
<p>If the buffer is empty, <a class="el" href="classgbxiceutilacfr_1_1Buffer.html#af43d6c662de7dc14ab721a5d68a9e8fc">getWithTimeout()</a> blocks until a new object is pushed in and returns the new value. By default, there is an infinite timeout (negative value). Returns 0 if successful.</p>
<p>If timeout is set to a positive value and the wait times out, this function returns -1 and the object argument itself is not touched. In the rare event of spurious wakeup, the return value is 1. </p>

<p>Referenced by <a class="el" href="buffer_8h_source.html#l00323">gbxiceutilacfr::Buffer&lt; Type &gt;::getAndPopWithTimeout()</a>.</p>

</div>
</div>
<a class="anchor" id="a8ae4213513399b95d9c7e68bdab1e57a"></a><!-- doxytag: member="gbxiceutilacfr::Buffer::pop" ref="a8ae4213513399b95d9c7e68bdab1e57a" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Type &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classgbxiceutilacfr_1_1Buffer.html">gbxiceutilacfr::Buffer</a>&lt; Type &gt;::pop </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Pops the front element off and discards it (usually after calling <a class="el" href="classgbxiceutilacfr_1_1Buffer.html#a2eb7b95fc8453ebf3801bbdf273a143c">get()</a> ). If the buffer is empty this command is quietly ignored. </p>

<p>Referenced by <a class="el" href="buffer_8h_source.html#l00323">gbxiceutilacfr::Buffer&lt; Type &gt;::getAndPopWithTimeout()</a>.</p>

</div>
</div>
<a class="anchor" id="ab73d1777d7a9593ece7c5935d4c1ffd2"></a><!-- doxytag: member="gbxiceutilacfr::Buffer::push" ref="ab73d1777d7a9593ece7c5935d4c1ffd2" args="(const Type &amp;obj)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Type&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classgbxiceutilacfr_1_1Buffer.html">gbxiceutilacfr::Buffer</a>&lt; Type &gt;::push </td>
          <td>(</td>
          <td class="paramtype">const Type &amp;&nbsp;</td>
          <td class="paramname"> <em>obj</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Adds an object to the end of the buffer. If there is no room left in a finite-depth circular buffer, the front element of the buffer is quietly deleted and the new data is added to the end. If there is no room left in a finite-depth queue buffer the new data is quietly ignored. </p>

<p>References <a class="el" href="buffer_8h_source.html#l00028">gbxiceutilacfr::BufferTypeCircular</a>.</p>

</div>
</div>
<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></li>
</ul>
</div>

            </td>
            <td colspan="1">&nbsp;</td>
         </tr>
        </table>
<!-- end of table -->

 <hr size="1"><address style="align: right;"><small>Generated for GearBox by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.5 </small></address>
</body>
</html>