<!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::locked_pointer< T > 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 Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Data 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 Structures</span></a></li> <li><a href="classes.html"><span>Data Structure Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Data Fields</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="a00208.html">ucommon</a>::<a class="el" href="a00070.html">locked_pointer</a> </div> </div> <div class="contents"> <h1>ucommon::locked_pointer< T > Class Template Reference</h1><!-- doxytag: class="ucommon::locked_pointer" --><!-- doxytag: inherits="ucommon::LockedPointer" --> <p>Templated locked pointer for referencing locked objects of specific type. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="a00202_source.html">thread.h</a>></code></p> <div class="dynheader"> Inheritance diagram for ucommon::locked_pointer< T >:</div> <div class="dynsection"> <div class="center"><img src="a00415.png" border="0" usemap="#ucommon_1_1locked__pointer_3_01_t_01_4_inherit__map" alt="Inheritance graph"/></div> <map name="ucommon_1_1locked__pointer_3_01_t_01_4_inherit__map" id="ucommon_1_1locked__pointer_3_01_t_01_4_inherit__map"> <area shape="rect" id="node2" href="a00072.html" title="An object pointer that uses mutex to assure thread-safe singleton use." alt="" coords="35,5,277,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::locked_pointer< T >:</div> <div class="dynsection"> <div class="center"><img src="a00416.png" border="0" usemap="#ucommon_1_1locked__pointer_3_01_t_01_4_coll__map" alt="Collaboration graph"/></div> <map name="ucommon_1_1locked__pointer_3_01_t_01_4_coll__map" id="ucommon_1_1locked__pointer_3_01_t_01_4_coll__map"> <area shape="rect" id="node2" href="a00072.html" title="An object pointer that uses mutex to assure thread-safe singleton use." alt="" coords="35,96,277,123"/><area shape="rect" id="node4" href="a00095.html" title="A common base class for all managed objects." alt="" coords="31,5,281,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">T * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00070.html#af7b03d55138605c133804ab754d1c1db">dup</a> (void)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Create a duplicate reference counted instance of the current typed object. <a href="#af7b03d55138605c133804ab754d1c1db"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a59f2c2db3f64f460973cb40f5bf42a5f"></a><!-- doxytag: member="ucommon::locked_pointer::locked_pointer" ref="a59f2c2db3f64f460973cb40f5bf42a5f" args="()" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00070.html#a59f2c2db3f64f460973cb40f5bf42a5f">locked_pointer</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Create an instance of a typed locked pointer. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">T * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00070.html#adfd627a4d783b856e3dc4c4b423f581f">operator*</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Create a duplicate reference counted instance of the current typed object by pointer reference. <a href="#adfd627a4d783b856e3dc4c4b423f581f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00070.html#aee989b368c40113be2b0743ad68bd5d0">operator=</a> (T *object)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Replace existing object through assignment. <a href="#aee989b368c40113be2b0743ad68bd5d0"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00070.html#ac6cb3883ac4064eb4bb963baae6fbe2a">replace</a> (T *object)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Replace existing typed object with a new one for next request. <a href="#ac6cb3883ac4064eb4bb963baae6fbe2a"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <h3>template<class T><br/> class ucommon::locked_pointer< T ></h3> <p>Templated locked pointer for referencing locked objects of specific type. </p> <p>This is used as typed template for the <a class="el" href="a00072.html" title="An object pointer that uses mutex to assure thread-safe singleton use.">LockedPointer</a> object reference management class. This is used to supply a typed locked instances to the typed <a class="el" href="a00069.html" title="A templated smart pointer instance for lock protected objects.">locked_instance</a> template class. </p> <dl class="author"><dt><b>Author:</b></dt><dd>David Sugar <<a href="mailto:dyfet@gnutelephony.org">dyfet@gnutelephony.org</a>> </dd></dl> <p>Definition at line <a class="el" href="a00202_source.html#l01879">1879</a> of file <a class="el" href="a00202_source.html">thread.h</a>.</p> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="af7b03d55138605c133804ab754d1c1db"></a><!-- doxytag: member="ucommon::locked_pointer::dup" ref="af7b03d55138605c133804ab754d1c1db" args="(void)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class T> </div> <table class="memname"> <tr> <td class="memname">T* <a class="el" href="a00070.html">ucommon::locked_pointer</a>< T >::dup </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Create a duplicate reference counted instance of the current typed object. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>duplicate reference counted typed object. </dd></dl> <p>Reimplemented from <a class="el" href="a00072.html#a9117df5766060e7db0d0dadaa27c7bcd">ucommon::LockedPointer</a>.</p> <p>Definition at line <a class="el" href="a00202_source.html#l01892">1892</a> of file <a class="el" href="a00202_source.html">thread.h</a>.</p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> <div class="center"><img src="a00070_af7b03d55138605c133804ab754d1c1db_cgraph.png" border="0" usemap="#a00070_af7b03d55138605c133804ab754d1c1db_cgraph_map" alt=""></div> <map name="a00070_af7b03d55138605c133804ab754d1c1db_cgraph_map" id="a00070_af7b03d55138605c133804ab754d1c1db_cgraph"> <area shape="rect" id="node3" href="a00208.html#a8048c8716eafab6b193a59529650db5c" title="Convenience function to duplicate object pointer to heap." alt="" coords="359,5,500,32"/></map> </div> </p> </div> </div> <a class="anchor" id="adfd627a4d783b856e3dc4c4b423f581f"></a><!-- doxytag: member="ucommon::locked_pointer::operator*" ref="adfd627a4d783b856e3dc4c4b423f581f" args="()" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class T> </div> <table class="memname"> <tr> <td class="memname">T* <a class="el" href="a00070.html">ucommon::locked_pointer</a>< T >::operator* </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Create a duplicate reference counted instance of the current typed object by pointer reference. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>duplicate reference counted typed object. </dd></dl> <p>Definition at line <a class="el" href="a00202_source.html#l01914">1914</a> of file <a class="el" href="a00202_source.html">thread.h</a>.</p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> <div class="center"><img src="a00070_adfd627a4d783b856e3dc4c4b423f581f_cgraph.png" border="0" usemap="#a00070_adfd627a4d783b856e3dc4c4b423f581f_cgraph_map" alt=""></div> <map name="a00070_adfd627a4d783b856e3dc4c4b423f581f_cgraph_map" id="a00070_adfd627a4d783b856e3dc4c4b423f581f_cgraph"> <area shape="rect" id="node3" href="a00208.html#a8048c8716eafab6b193a59529650db5c" title="Convenience function to duplicate object pointer to heap." alt="" coords="417,5,559,32"/></map> </div> </p> </div> </div> <a class="anchor" id="aee989b368c40113be2b0743ad68bd5d0"></a><!-- doxytag: member="ucommon::locked_pointer::operator=" ref="aee989b368c40113be2b0743ad68bd5d0" args="(T *object)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class T> </div> <table class="memname"> <tr> <td class="memname">void <a class="el" href="a00070.html">ucommon::locked_pointer</a>< T >::operator= </td> <td>(</td> <td class="paramtype">T * </td> <td class="paramname"> <em>object</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Replace existing object through assignment. </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> </td><td>to assign. </td></tr> </table> </dd> </dl> <p>Definition at line <a class="el" href="a00202_source.html#l01906">1906</a> of file <a class="el" href="a00202_source.html">thread.h</a>.</p> </div> </div> <a class="anchor" id="ac6cb3883ac4064eb4bb963baae6fbe2a"></a><!-- doxytag: member="ucommon::locked_pointer::replace" ref="ac6cb3883ac4064eb4bb963baae6fbe2a" args="(T *object)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class T> </div> <table class="memname"> <tr> <td class="memname">void <a class="el" href="a00070.html">ucommon::locked_pointer</a>< T >::replace </td> <td>(</td> <td class="paramtype">T * </td> <td class="paramname"> <em>object</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Replace existing typed object with a new one for next request. </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> </td><td>to register with pointer. </td></tr> </table> </dd> </dl> <p>Definition at line <a class="el" href="a00202_source.html#l01899">1899</a> of file <a class="el" href="a00202_source.html">thread.h</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>ucommon/<a class="el" href="a00202_source.html">thread.h</a></li> </ul> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Jul 14 16:39:42 2011 for ucommon by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address> </body> </html>