Sophie

Sophie

distrib > Mandriva > 2010.1 > i586 > by-pkgid > 4f5f2dc0f55b453456458df885792b0b > files > 191

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::object_pointer&lt; T, P &gt; Class Template 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="a00093.html">object_pointer</a>
  </div>
</div>
<div class="contents">
<h1>ucommon::object_pointer&lt; T, P &gt; Class Template Reference</h1><!-- doxytag: class="ucommon::object_pointer" --><!-- doxytag: inherits="P" -->
<p>Typed smart pointer class.  
<a href="#_details">More...</a></p>

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

<p>Inherits P.</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">T *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00093.html#ad25e5a097ccc9fc8eb8cd0edbef50024">get</a> (void) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get pointer to object.  <a href="#ad25e5a097ccc9fc8eb8cd0edbef50024"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00093.html#a5f7bf14cfeff35325c7b55fb4adff058">object_pointer</a> (T *object)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a pointer with a reference to a heap object.  <a href="#a5f7bf14cfeff35325c7b55fb4adff058"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5409700f329c2e22efc228460ee5dad1"></a><!-- doxytag: member="ucommon::object_pointer::object_pointer" ref="a5409700f329c2e22efc228460ee5dad1" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00093.html#a5409700f329c2e22efc228460ee5dad1">object_pointer</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a pointer with no reference. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad83a8eadb1997e41d82d05949799e9d7"></a><!-- doxytag: member="ucommon::object_pointer::operator bool" ref="ad83a8eadb1997e41d82d05949799e9d7" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00093.html#ad83a8eadb1997e41d82d05949799e9d7">operator bool</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">See if pointer is set. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa5ce1a4468162611d9cb3b20fc615dde"></a><!-- doxytag: member="ucommon::object_pointer::operator!" ref="aa5ce1a4468162611d9cb3b20fc615dde" args="()" -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00093.html#aa5ce1a4468162611d9cb3b20fc615dde">operator!</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">See if pointer is not set. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">T &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00093.html#a55a2bcf620a30814e91ad8b02045b714">operator()</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reference object we are pointing to through function reference.  <a href="#a55a2bcf620a30814e91ad8b02045b714"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">T *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00093.html#ac130b8214ef2c8530e13e2f9f4faf157">operator*</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reference object we are pointing to through pointer indirection.  <a href="#ac130b8214ef2c8530e13e2f9f4faf157"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">T *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00093.html#a8e72a4525ad1f0d4f0bd7202d804b345">operator++</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Iterate our pointer if we reference an array on the heap.  <a href="#a8e72a4525ad1f0d4f0bd7202d804b345"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00093.html#ab5a6fdabc44a88544bc504a93def4182">operator--</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Iterate our pointer if we reference an array on the heap.  <a href="#ab5a6fdabc44a88544bc504a93def4182"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">T *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00093.html#a8c1a3af44627bb42ed11557f1144303b">operator-&gt;</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reference member of object we are pointing to.  <a href="#a8c1a3af44627bb42ed11557f1144303b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00093.html#aea5d618e545fffbecc03088c19317935">operator=</a> (T *typed)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Perform assignment operator to existing object.  <a href="#aea5d618e545fffbecc03088c19317935"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class T, class P = auto_object&gt;<br/>
 class ucommon::object_pointer&lt; T, P &gt;</h3>

<p>Typed smart pointer class. </p>
<p>This is used to manage references to a specific typed object on the heap that is derived from the base Object class. This is most commonly used to manage references to reference counted heap objects so their heap usage can be auto-managed while there is active references to such objects. Pointers are usually created on the stack frame and used to reference an object during the life of a member function. They can be created in other objects that live on the heap and can be used to maintain active references so long as the object they are contained in remains in scope as well. </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="a00192_source.html#l00413">413</a> of file <a class="el" href="a00192_source.html">object.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a5f7bf14cfeff35325c7b55fb4adff058"></a><!-- doxytag: member="ucommon::object_pointer::object_pointer" ref="a5f7bf14cfeff35325c7b55fb4adff058" args="(T *object)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T , class P  = auto_object&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00093.html">ucommon::object_pointer</a>&lt; T, P &gt;::<a class="el" href="a00093.html">object_pointer</a> </td>
          <td>(</td>
          <td class="paramtype">T *&nbsp;</td>
          <td class="paramname"> <em>object</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a pointer with a reference to a heap 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>we are referencing. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="a00192_source.html#l00425">425</a> of file <a class="el" href="a00192_source.html">object.h</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ad25e5a097ccc9fc8eb8cd0edbef50024"></a><!-- doxytag: member="ucommon::object_pointer::get" ref="ad25e5a097ccc9fc8eb8cd0edbef50024" args="(void) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T , class P  = auto_object&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T* <a class="el" href="a00093.html">ucommon::object_pointer</a>&lt; T, P &gt;::get </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get pointer to object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>pointer or NULL if we are not referencing an object. </dd></dl>

<p>Definition at line <a class="el" href="a00192_source.html#l00452">452</a> of file <a class="el" href="a00192_source.html">object.h</a>.</p>

</div>
</div>
<a class="anchor" id="a55a2bcf620a30814e91ad8b02045b714"></a><!-- doxytag: member="ucommon::object_pointer::operator()" ref="a55a2bcf620a30814e91ad8b02045b714" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T , class P  = auto_object&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T&amp; <a class="el" href="a00093.html">ucommon::object_pointer</a>&lt; T, P &gt;::operator() </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reference object we are pointing to through function reference. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>object we are pointing to. </dd></dl>

<p>Definition at line <a class="el" href="a00192_source.html#l00438">438</a> of file <a class="el" href="a00192_source.html">object.h</a>.</p>

</div>
</div>
<a class="anchor" id="ac130b8214ef2c8530e13e2f9f4faf157"></a><!-- doxytag: member="ucommon::object_pointer::operator*" ref="ac130b8214ef2c8530e13e2f9f4faf157" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T , class P  = auto_object&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T* <a class="el" href="a00093.html">ucommon::object_pointer</a>&lt; T, P &gt;::operator* </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reference object we are pointing to through pointer indirection. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>pointer to object we are pointing to. </dd></dl>

<p>Definition at line <a class="el" href="a00192_source.html#l00431">431</a> of file <a class="el" href="a00192_source.html">object.h</a>.</p>

</div>
</div>
<a class="anchor" id="a8e72a4525ad1f0d4f0bd7202d804b345"></a><!-- doxytag: member="ucommon::object_pointer::operator++" ref="a8e72a4525ad1f0d4f0bd7202d804b345" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T , class P  = auto_object&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T* <a class="el" href="a00093.html">ucommon::object_pointer</a>&lt; T, P &gt;::operator++ </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Iterate our pointer if we reference an array on the heap. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>next object in array. </dd></dl>

<p>Definition at line <a class="el" href="a00192_source.html#l00459">459</a> of file <a class="el" href="a00192_source.html">object.h</a>.</p>

</div>
</div>
<a class="anchor" id="ab5a6fdabc44a88544bc504a93def4182"></a><!-- doxytag: member="ucommon::object_pointer::operator&#45;&#45;" ref="ab5a6fdabc44a88544bc504a93def4182" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T , class P  = auto_object&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="a00093.html">ucommon::object_pointer</a>&lt; T, P &gt;::operator-- </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Iterate our pointer if we reference an array on the heap. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>previous object in array. </dd></dl>

<p>Definition at line <a class="el" href="a00192_source.html#l00466">466</a> of file <a class="el" href="a00192_source.html">object.h</a>.</p>

</div>
</div>
<a class="anchor" id="a8c1a3af44627bb42ed11557f1144303b"></a><!-- doxytag: member="ucommon::object_pointer::operator&#45;&gt;" ref="a8c1a3af44627bb42ed11557f1144303b" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T , class P  = auto_object&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T* <a class="el" href="a00093.html">ucommon::object_pointer</a>&lt; T, P &gt;::operator-&gt; </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reference member of object we are pointing to. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>reference to member of pointed object. </dd></dl>

<p>Definition at line <a class="el" href="a00192_source.html#l00445">445</a> of file <a class="el" href="a00192_source.html">object.h</a>.</p>

</div>
</div>
<a class="anchor" id="aea5d618e545fffbecc03088c19317935"></a><!-- doxytag: member="ucommon::object_pointer::operator=" ref="aea5d618e545fffbecc03088c19317935" args="(T *typed)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T , class P  = auto_object&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="a00093.html">ucommon::object_pointer</a>&lt; T, P &gt;::operator= </td>
          <td>(</td>
          <td class="paramtype">T *&nbsp;</td>
          <td class="paramname"> <em>typed</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Perform assignment operator to existing 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>typed</em>&nbsp;</td><td>object to assign. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="a00192_source.html#l00473">473</a> of file <a class="el" href="a00192_source.html">object.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>ucommon/<a class="el" href="a00192_source.html">object.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Jul 14 16:39:47 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>