Sophie

Sophie

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

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_1Store.html">Store</a>
  </div>
</div>
<div class="contents">
<h1>gbxiceutilacfr::Store&lt; Type &gt; Class Template Reference</h1><!-- doxytag: class="gbxiceutilacfr::Store" -->
<p>Thread-safe storage for a single data objects.  
<a href="#_details">More...</a></p>

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

<p><a href="classgbxiceutilacfr_1_1Store-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">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgbxiceutilacfr_1_1Store.html#a2ad270588b78c2141254d024dfc52aa9">isEmpty</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9ad94fcb79126e6fea65a2f3f88ddca0"></a><!-- doxytag: member="gbxiceutilacfr::Store::isNewData" ref="a9ad94fcb79126e6fea65a2f3f88ddca0" args="() const " -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgbxiceutilacfr_1_1Store.html#a9ad94fcb79126e6fea65a2f3f88ddca0">isNewData</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns TRUE if the data in the <a class="el" href="classgbxiceutilacfr_1_1Store.html" title="Thread-safe storage for a single data objects.">Store</a> has not been accessed with <a class="el" href="classgbxiceutilacfr_1_1Store.html#ae0dad32492d44a01e70185cb1cbfa1cb">get()</a> yet. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac0bf7d34583d028405615475ed30c745"></a><!-- doxytag: member="gbxiceutilacfr::Store::set" ref="ac0bf7d34583d028405615475ed30c745" args="(const Type &amp;obj)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgbxiceutilacfr_1_1Store.html#ac0bf7d34583d028405615475ed30c745">set</a> (const Type &amp;obj)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the contents of the <a class="el" href="classgbxiceutilacfr_1_1Store.html" title="Thread-safe storage for a single data objects.">Store</a>. <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_1Store.html#ae0dad32492d44a01e70185cb1cbfa1cb">get</a> (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_1Store.html#a1d2bd86fbe17b1e2027b0afd6fac8558">peek</a> (Type &amp;obj) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgbxiceutilacfr_1_1Store.html#a6b0cd62a7217e2edadbc2ccde18f41d2">getNext</a> (Type &amp;obj, int timeoutMs=-1)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Waits until the next update and returns the new value. If the <a class="el" href="classgbxiceutilacfr_1_1Store.html" title="Thread-safe storage for a single data objects.">Store</a> is empty, <a class="el" href="classgbxiceutilacfr_1_1Store.html#a6b0cd62a7217e2edadbc2ccde18f41d2">getNext</a> blocks until the <a class="el" href="classgbxiceutilacfr_1_1Store.html" title="Thread-safe storage for a single data objects.">Store</a> is set and returns the new value. By default, there is no timeout (negative value). Returns 0 if successful.  <a href="#a6b0cd62a7217e2edadbc2ccde18f41d2"></a><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_1Store.html#a12aecb60ba03316e3709d15ca7c38622">purge</a> ()</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class Type&gt;<br/>
 class gbxiceutilacfr::Store&lt; Type &gt;</h3>

<p>Thread-safe storage for a single data objects. </p>
<p>This container is similar to a circular <a class="el" href="classgbxiceutilacfr_1_1Buffer.html" title="A thread-safe data pipe with buffer semantics.">Buffer</a> of size one but with two differences:</p>
<ul>
<li>a copy of the data is always available, yet the user knows when new data has arrived by calling <a class="el" href="classgbxiceutilacfr_1_1Store.html#a9ad94fcb79126e6fea65a2f3f88ddca0" title="Returns TRUE if the data in the Store has not been accessed with get() yet.">isNewData()</a>.</li>
<li><a class="el" href="classgbxiceutilacfr_1_1Store.html#a6b0cd62a7217e2edadbc2ccde18f41d2" title="Waits until the next update and returns the new value. If the Store is empty, getNext...">getNext()</a> returns the new data arrives (not when the buffer is non-empty.</li>
</ul>
<p>You can use this container for storing smart pointers (e.g. IceUtil smart pointers). In this case the container will only store the pointer and will not perform a deep copy.</p>
<p>Write to it with <a class="el" href="classgbxiceutilacfr_1_1Store.html#ac0bf7d34583d028405615475ed30c745" title="Sets the contents of the Store.">set()</a>. Read its contents with <a class="el" href="classgbxiceutilacfr_1_1Store.html#ae0dad32492d44a01e70185cb1cbfa1cb">get()</a>. Trying to read from an empty <a class="el" href="classgbxiceutilacfr_1_1Store.html" title="Thread-safe storage for a single data objects.">Store</a> raises an <a class="el" href="classgbxutilacfr_1_1Exception.html" title="Base class for all GbxUtilAcfr exceptions.">gbxutilacfr::Exception</a>.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Replaces the deprecated Proxy class. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classgbxiceutilacfr_1_1Buffer.html" title="A thread-safe data pipe with buffer semantics.">Buffer</a>, <a class="el" href="classgbxiceutilacfr_1_1Notify.html" title="A data pipe with callback semantics.">Notify</a> </dd></dl>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ae0dad32492d44a01e70185cb1cbfa1cb"></a><!-- doxytag: member="gbxiceutilacfr::Store::get" ref="ae0dad32492d44a01e70185cb1cbfa1cb" 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_1Store.html">gbxiceutilacfr::Store</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><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the contents of the <a class="el" href="classgbxiceutilacfr_1_1Store.html" title="Thread-safe storage for a single data objects.">Store</a>. This operation makes the data in the <a class="el" href="classgbxiceutilacfr_1_1Store.html" title="Thread-safe storage for a single data objects.">Store</a> "not new", i.e. <a class="el" href="classgbxiceutilacfr_1_1Store.html#a9ad94fcb79126e6fea65a2f3f88ddca0">isNewData</a> returns FALSE. Calls to <a class="el" href="classgbxiceutilacfr_1_1Store.html#ae0dad32492d44a01e70185cb1cbfa1cb">get()</a> when the <a class="el" href="classgbxiceutilacfr_1_1Store.html" title="Thread-safe storage for a single data objects.">Store</a> is empty raises an <a class="el" href="classgbxutilacfr_1_1Exception.html" title="Base class for all GbxUtilAcfr exceptions.">gbxutilacfr::Exception</a> exception. </p>

</div>
</div>
<a class="anchor" id="a6b0cd62a7217e2edadbc2ccde18f41d2"></a><!-- doxytag: member="gbxiceutilacfr::Store::getNext" ref="a6b0cd62a7217e2edadbc2ccde18f41d2" 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_1Store.html">gbxiceutilacfr::Store</a>&lt; Type &gt;::getNext </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>Waits until the next update and returns the new value. If the <a class="el" href="classgbxiceutilacfr_1_1Store.html" title="Thread-safe storage for a single data objects.">Store</a> is empty, <a class="el" href="classgbxiceutilacfr_1_1Store.html#a6b0cd62a7217e2edadbc2ccde18f41d2">getNext</a> blocks until the <a class="el" href="classgbxiceutilacfr_1_1Store.html" title="Thread-safe storage for a single data objects.">Store</a> is set and returns the new value. By default, there is no timeout (negative value). Returns 0 if successful. </p>
<p>If timeout is set to a positive value (in milliseconds) and the wait times out, the function returns -1 and the object argument itself is not touched. In the rare event of spurious wakeup, the return value is 1. </p>

</div>
</div>
<a class="anchor" id="a2ad270588b78c2141254d024dfc52aa9"></a><!-- doxytag: member="gbxiceutilacfr::Store::isEmpty" ref="a2ad270588b78c2141254d024dfc52aa9" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Type &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classgbxiceutilacfr_1_1Store.html">gbxiceutilacfr::Store</a>&lt; Type &gt;::isEmpty </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns TRUE if there's something in the <a class="el" href="classgbxiceutilacfr_1_1Store.html" title="Thread-safe storage for a single data objects.">Store</a>. The <a class="el" href="classgbxiceutilacfr_1_1Store.html" title="Thread-safe storage for a single data objects.">Store</a> starts its life empty but after the object is set once, it will be non-empty again until <a class="el" href="classgbxiceutilacfr_1_1Store.html#a12aecb60ba03316e3709d15ca7c38622">purge()</a> is called. </p>

</div>
</div>
<a class="anchor" id="a1d2bd86fbe17b1e2027b0afd6fac8558"></a><!-- doxytag: member="gbxiceutilacfr::Store::peek" ref="a1d2bd86fbe17b1e2027b0afd6fac8558" 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_1Store.html">gbxiceutilacfr::Store</a>&lt; Type &gt;::peek </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>Returns the contents of the <a class="el" href="classgbxiceutilacfr_1_1Store.html" title="Thread-safe storage for a single data objects.">Store</a>. This operation does not modify anything, i.e. the contents of the store remain "new" (unlike <a class="el" href="classgbxiceutilacfr_1_1Store.html#ae0dad32492d44a01e70185cb1cbfa1cb">get()</a>). Calls to <a class="el" href="classgbxiceutilacfr_1_1Store.html#a1d2bd86fbe17b1e2027b0afd6fac8558">peek()</a> when the <a class="el" href="classgbxiceutilacfr_1_1Store.html" title="Thread-safe storage for a single data objects.">Store</a> is empty raises an <a class="el" href="classgbxutilacfr_1_1Exception.html" title="Base class for all GbxUtilAcfr exceptions.">gbxutilacfr::Exception</a> exception. </p>

</div>
</div>
<a class="anchor" id="a12aecb60ba03316e3709d15ca7c38622"></a><!-- doxytag: member="gbxiceutilacfr::Store::purge" ref="a12aecb60ba03316e3709d15ca7c38622" 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_1Store.html">gbxiceutilacfr::Store</a>&lt; Type &gt;::purge </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Makes the <a class="el" href="classgbxiceutilacfr_1_1Store.html" title="Thread-safe storage for a single data objects.">Store</a> empty. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classgbxiceutilacfr_1_1Store.html#a2ad270588b78c2141254d024dfc52aa9">isEmpty</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="store_8h_source.html">store.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>