Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-backports > by-pkgid > 4f5f2dc0f55b453456458df885792b0b > files > 381

ucommon-doc-5.0.4-1mdv2010.2.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ucommon: ucommon::stack Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&nbsp;Structure&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="a00208.html">ucommon</a>::<a class="el" href="a00145.html">stack</a>
  </div>
</div>
<div class="contents">
<h1>ucommon::stack Class Reference</h1><!-- doxytag: class="ucommon::stack" --><!-- doxytag: inherits="ucommon::Conditional" -->
<p>Manage a thread-safe stack of objects through reference pointers.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00181_source.html">containers.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for ucommon::stack:</div>
<div class="dynsection">
<div class="center"><img src="a00533.png" border="0" usemap="#ucommon_1_1stack_inherit__map" alt="Inheritance graph"/></div>
<map name="ucommon_1_1stack_inherit__map" id="ucommon_1_1stack_inherit__map">
<area shape="rect" id="node5" href="a00146.html" title="A templated typed class for thread&#45;safe stack of object pointers." alt="" coords="5,155,237,181"/><area shape="rect" id="node2" href="a00036.html" title="The conditional is a common base for other thread synchronizing classes." alt="" coords="11,5,232,32"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for ucommon::stack:</div>
<div class="dynsection">
<div class="center"><img src="a00534.png" border="0" usemap="#ucommon_1_1stack_coll__map" alt="Collaboration graph"/></div>
<map name="ucommon_1_1stack_coll__map" id="ucommon_1_1stack_coll__map">
<area shape="rect" id="node2" href="a00036.html" title="The conditional is a common base for other thread synchronizing classes." alt="" coords="5,168,227,195"/><area shape="rect" id="node4" href="a00067.html" title="Common base class for all objects that can be formed into a linked list." alt="" coords="251,168,483,195"/><area shape="rect" id="node6" href="a00095.html" title="A common base class for all managed objects." alt="" coords="241,83,492,109"/><area shape="rect" id="node9" href="a00081.html" title="A managed private heap for small allocations." alt="" coords="572,168,764,195"/><area shape="rect" id="node11" href="a00079.html" title="A memory protocol pager for private heap manager." alt="" coords="572,83,764,109"/><area shape="rect" id="node13" href="a00073.html" title="Common locking protocol." alt="" coords="537,5,799,32"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<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">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html#a4d6ffeb1225b0aa55bfd02ef58410623">getCount</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get number of object points currently in the stack.  <a href="#a4d6ffeb1225b0aa55bfd02ef58410623"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00095.html">ObjectProtocol</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html#ace7b1d47a03ad947eb592033ae94aa1a">pull</a> (<a class="el" href="a00194.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get and remove last object pushed on the stack.  <a href="#ace7b1d47a03ad947eb592033ae94aa1a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html#a1e87ca85d0b8df573f706bb74cd337ca">push</a> (<a class="el" href="a00095.html">ObjectProtocol</a> *object, <a class="el" href="a00194.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Push an object into the stack by it's pointer.  <a href="#a1e87ca85d0b8df573f706bb74cd337ca"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html#a647bf6f95a4f55b2100ea4af002d99b0">remove</a> (<a class="el" href="a00095.html">ObjectProtocol</a> *object)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove a specific object pointer for the queue.  <a href="#a647bf6f95a4f55b2100ea4af002d99b0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html#a9e506e8bea0dc9568196a57ca67e3bd6">stack</a> (<a class="el" href="a00081.html">mempager</a> *<a class="el" href="a00103.html">pager</a>=NULL, size_t number=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a stack that uses a memory pager for internally managed member objects for a specified maximum number of object pointers.  <a href="#a9e506e8bea0dc9568196a57ca67e3bd6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html#a8d22351cbd64e6a933206a41ae98e8df">~stack</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroy queue.  <a href="#a8d22351cbd64e6a933206a41ae98e8df"></a><br/></td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html#afd53bb5e4007d64e64900357b0039e16">count</a> (<a class="el" href="a00145.html">stack</a> &amp;<a class="el" href="a00145.html">stack</a>)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to get count of objects in the stack.  <a href="#afd53bb5e4007d64e64900357b0039e16"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="a00095.html">ObjectProtocol</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html#a2a08af19a7ab4547833201c08abad022">pull</a> (<a class="el" href="a00145.html">stack</a> &amp;<a class="el" href="a00145.html">stack</a>, <a class="el" href="a00194.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function pull last object from the stack.  <a href="#a2a08af19a7ab4547833201c08abad022"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html#abd729c09fef907e8a1ea2f15f7c792f9">push</a> (<a class="el" href="a00145.html">stack</a> &amp;<a class="el" href="a00145.html">stack</a>, <a class="el" href="a00095.html">ObjectProtocol</a> *object, <a class="el" href="a00194.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to push object into the stack.  <a href="#abd729c09fef907e8a1ea2f15f7c792f9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html#aa414c837092039e77fc90659e4c1d158">remove</a> (<a class="el" href="a00145.html">stack</a> &amp;<a class="el" href="a00145.html">stack</a>, <a class="el" href="a00095.html">ObjectProtocol</a> *object)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to remove an object from the stacl.  <a href="#aa414c837092039e77fc90659e4c1d158"></a><br/></td></tr>
<tr><td colspan="2"><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a00ba7669bfdbbc29853ab4d124b59dc6"></a><!-- doxytag: member="ucommon::stack::limit" ref="a00ba7669bfdbbc29853ab4d124b59dc6" args="" -->
size_t&nbsp;</td><td class="memItemRight" valign="bottom"><b>limit</b></td></tr>
<tr><td colspan="2"><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0352b76113cdfb8a6e0a3be7165742b8"></a><!-- doxytag: member="ucommon::stack::member" ref="a0352b76113cdfb8a6e0a3be7165742b8" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><b>member</b></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Manage a thread-safe stack of objects through reference pointers. </p>
<p>This Thread-safe access is managed through a conditional. This differs from the queue in lifo mode because delinking the last object is immediate, and because it has much less overhead. A pool of self-managed member objects are used to operate the stack. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>David Sugar &lt;<a href="mailto:dyfet@gnutelephony.org">dyfet@gnutelephony.org</a>&gt; </dd></dl>

<p>Definition at line <a class="el" href="a00181_source.html#l00334">334</a> of file <a class="el" href="a00181_source.html">containers.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a9e506e8bea0dc9568196a57ca67e3bd6"></a><!-- doxytag: member="ucommon::stack::stack" ref="a9e506e8bea0dc9568196a57ca67e3bd6" args="(mempager *pager=NULL, size_t number=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ucommon::stack::stack </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00081.html">mempager</a> *&nbsp;</td>
          <td class="paramname"> <em>pager</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>number</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a stack that uses a memory pager for internally managed member objects for a specified maximum number of object pointers. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pager</em>&nbsp;</td><td>to use for internal member object or NULL to use heap. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>number</em>&nbsp;</td><td>of pointers that can be in the stack or 0 if unlimited. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a8d22351cbd64e6a933206a41ae98e8df"></a><!-- doxytag: member="ucommon::stack::~stack" ref="a8d22351cbd64e6a933206a41ae98e8df" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ucommon::stack::~stack </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destroy queue. </p>
<p>If no pager is used, then frees heap. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="afd53bb5e4007d64e64900357b0039e16"></a><!-- doxytag: member="ucommon::stack::count" ref="afd53bb5e4007d64e64900357b0039e16" args="(stack &amp;stack)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static size_t ucommon::stack::count </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00145.html">stack</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>stack</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convenience function to get count of objects in the stack. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>stack</em>&nbsp;</td><td>to count. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of objects in the stack. </dd></dl>

<p>Definition at line <a class="el" href="a00181_source.html#l00434">434</a> of file <a class="el" href="a00181_source.html">containers.h</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="a00145_afd53bb5e4007d64e64900357b0039e16_cgraph.png" border="0" usemap="#a00145_afd53bb5e4007d64e64900357b0039e16_cgraph_map" alt=""></div>
<map name="a00145_afd53bb5e4007d64e64900357b0039e16_cgraph_map" id="a00145_afd53bb5e4007d64e64900357b0039e16_cgraph">
<area shape="rect" id="node3" href="a00145.html#a4d6ffeb1225b0aa55bfd02ef58410623" title="Get number of object points currently in the stack." alt="" coords="287,5,548,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a4d6ffeb1225b0aa55bfd02ef58410623"></a><!-- doxytag: member="ucommon::stack::getCount" ref="a4d6ffeb1225b0aa55bfd02ef58410623" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t ucommon::stack::getCount </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get number of object points currently in the stack. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of objects in stack. </dd></dl>

</div>
</div>
<a class="anchor" id="a2a08af19a7ab4547833201c08abad022"></a><!-- doxytag: member="ucommon::stack::pull" ref="a2a08af19a7ab4547833201c08abad022" args="(stack &amp;stack, timeout_t timeout=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="a00095.html">ObjectProtocol</a>* ucommon::stack::pull </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00145.html">stack</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>stack</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00194.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="paramname"> <em>timeout</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convenience function pull last object from the stack. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>stack</em>&nbsp;</td><td>to get from. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>timeout</em>&nbsp;</td><td>to wait if empty. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>last object or NULL if timed out empty. </dd></dl>

<p>Definition at line <a class="el" href="a00181_source.html#l00426">426</a> of file <a class="el" href="a00181_source.html">containers.h</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="a00145_a2a08af19a7ab4547833201c08abad022_cgraph.png" border="0" usemap="#a00145_a2a08af19a7ab4547833201c08abad022_cgraph_map" alt=""></div>
<map name="a00145_a2a08af19a7ab4547833201c08abad022_cgraph_map" id="a00145_a2a08af19a7ab4547833201c08abad022_cgraph">
<area shape="rect" id="node3" href="a00145.html#ace7b1d47a03ad947eb592033ae94aa1a" title="Get and remove last object pushed on the stack." alt="" coords="279,5,500,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ace7b1d47a03ad947eb592033ae94aa1a"></a><!-- doxytag: member="ucommon::stack::pull" ref="ace7b1d47a03ad947eb592033ae94aa1a" args="(timeout_t timeout=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00095.html">ObjectProtocol</a>* ucommon::stack::pull </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00194.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="paramname"> <em>timeout</em> = <code>0</code></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get and remove last object pushed on the stack. </p>
<p>This can wait for a specified timeout of the stack is empty. The object is still retained and must be released or deleted by the receiving function. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>timeout</em>&nbsp;</td><td>to wait if empty in milliseconds. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>object pulled from stack or NULL if empty and timed out. </dd></dl>

<p>Reimplemented in <a class="el" href="a00146.html#aafc34b34a746a1fd374826fc2e322a09">ucommon::stackof&lt; T &gt;</a>.</p>

</div>
</div>
<a class="anchor" id="abd729c09fef907e8a1ea2f15f7c792f9"></a><!-- doxytag: member="ucommon::stack::push" ref="abd729c09fef907e8a1ea2f15f7c792f9" args="(stack &amp;stack, ObjectProtocol *object, timeout_t timeout=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool ucommon::stack::push </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00145.html">stack</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>stack</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00095.html">ObjectProtocol</a> *&nbsp;</td>
          <td class="paramname"> <em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00194.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="paramname"> <em>timeout</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convenience function to push object into the stack. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>stack</em>&nbsp;</td><td>to push into. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>object</em>&nbsp;</td><td>to push. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>timeout</em>&nbsp;</td><td>to wait if full. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if pusheded, false if timed out while full. </dd></dl>

<p>Definition at line <a class="el" href="a00181_source.html#l00417">417</a> of file <a class="el" href="a00181_source.html">containers.h</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="a00145_abd729c09fef907e8a1ea2f15f7c792f9_cgraph.png" border="0" usemap="#a00145_abd729c09fef907e8a1ea2f15f7c792f9_cgraph_map" alt=""></div>
<map name="a00145_abd729c09fef907e8a1ea2f15f7c792f9_cgraph_map" id="a00145_abd729c09fef907e8a1ea2f15f7c792f9_cgraph">
<area shape="rect" id="node3" href="a00145.html#a1e87ca85d0b8df573f706bb74cd337ca" title="Push an object into the stack by it&#39;s pointer." alt="" coords="279,5,500,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a1e87ca85d0b8df573f706bb74cd337ca"></a><!-- doxytag: member="ucommon::stack::push" ref="a1e87ca85d0b8df573f706bb74cd337ca" args="(ObjectProtocol *object, timeout_t timeout=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ucommon::stack::push </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00095.html">ObjectProtocol</a> *&nbsp;</td>
          <td class="paramname"> <em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00194.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="paramname"> <em>timeout</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Push an object into the stack by it's pointer. </p>
<p>This can wait for a specified timeout if the stack is full, for example, for another thread to remove an object pointer. This also retains the object. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>object</em>&nbsp;</td><td>to push. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>timeout</em>&nbsp;</td><td>to wait if stack is full in milliseconds. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if object pushed, false if stack full and timeout expired. </dd></dl>

</div>
</div>
<a class="anchor" id="aa414c837092039e77fc90659e4c1d158"></a><!-- doxytag: member="ucommon::stack::remove" ref="aa414c837092039e77fc90659e4c1d158" args="(stack &amp;stack, ObjectProtocol *object)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool ucommon::stack::remove </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00145.html">stack</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>stack</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00095.html">ObjectProtocol</a> *&nbsp;</td>
          <td class="paramname"> <em>object</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convenience function to remove an object from the stacl. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>stack</em>&nbsp;</td><td>to remove object from. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>object</em>&nbsp;</td><td>to remove. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if removed, false if not found. </dd></dl>

<p>Definition at line <a class="el" href="a00181_source.html#l00407">407</a> of file <a class="el" href="a00181_source.html">containers.h</a>.</p>

</div>
</div>
<a class="anchor" id="a647bf6f95a4f55b2100ea4af002d99b0"></a><!-- doxytag: member="ucommon::stack::remove" ref="a647bf6f95a4f55b2100ea4af002d99b0" args="(ObjectProtocol *object)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ucommon::stack::remove </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00095.html">ObjectProtocol</a> *&nbsp;</td>
          <td class="paramname"> <em>object</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Remove a specific object pointer for the queue. </p>
<p>This can remove a member from any location in the queue, whether beginning, end, or somewhere in the middle. This also releases the object. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>object</em>&nbsp;</td><td>to remove. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if object was removed, false if not found. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>ucommon/<a class="el" href="a00181_source.html">containers.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Jul 14 16:40:05 2011 for ucommon by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>