<!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: shared_instance< T > Class Template Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript"> $(document).ready(initResizable); </script> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.3 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">ucommon</div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.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 id="navrow2" class="tabs2"> <ul class="tablist"> <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="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Data Fields</span></a></li> </ul> </div> </div> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> initNavTree('a00124.html',''); </script> <div id="doc-content"> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> </div> <div class="headertitle"> <h1>shared_instance< T > Class Template Reference</h1> </div> </div> <div class="contents"> <!-- doxytag: class="shared_instance" --><!-- doxytag: inherits="shared_release" --> <p>A templated smart pointer instance for shared singleton typed objects. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="a00200_source.html">thread.h</a>></code></p> <div class="dynheader"> Inheritance diagram for shared_instance< T >:</div> <div class="dyncontent"> <div class="center"><img src="a00434.png" border="0" usemap="#shared__instance_3_01_t_01_4_inherit__map" alt="Inheritance graph"/></div> <map name="shared__instance_3_01_t_01_4_inherit__map" id="shared__instance_3_01_t_01_4_inherit__map"> <area shape="rect" id="node2" href="a00127.html" title="Auto-pointer support class for shared singleton objects." alt="" coords="35,5,197,32"/></map> <center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div> <div class="dynheader"> Collaboration diagram for shared_instance< T >:</div> <div class="dyncontent"> <div class="center"><img src="a00435.png" border="0" usemap="#shared__instance_3_01_t_01_4_coll__map" alt="Collaboration graph"/></div> <map name="shared__instance_3_01_t_01_4_coll__map" id="shared__instance_3_01_t_01_4_coll__map"> <area shape="rect" id="node2" href="a00127.html" title="Auto-pointer support class for shared singleton objects." alt="" coords="163,264,325,291"/><area shape="rect" id="node4" href="a00129.html" title="The shared pointer is used to manage a singleton instance of shared object." alt="" coords="168,173,320,200"/><area shape="rect" id="node6" href="a00035.html" title="The conditional rw seperates scheduling for optizming behavior or rw locks." alt="" coords="5,83,197,109"/><area shape="rect" id="node8" href="a00034.html" title="The conditional is a common base for other thread synchronizing classes." alt="" coords="36,5,167,32"/><area shape="rect" id="node10" href="a00128.html" title="Shared singleton object." alt="" coords="221,83,363,109"/></map> <center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aff534adda103782ea1095feda824b093"></a><!-- doxytag: member="shared_instance::get" ref="aff534adda103782ea1095feda824b093" args="(void) const " --> const T * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00124.html#aff534adda103782ea1095feda824b093">get</a> (void) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Access pointer to typed singleton object this instance locks and references. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4de738e9474f8527bae6896854ec89f0"></a><!-- doxytag: member="shared_instance::operator*" ref="a4de738e9474f8527bae6896854ec89f0" args="() const " --> const T & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00124.html#a4de738e9474f8527bae6896854ec89f0">operator*</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Access shared typed singleton object this instance locks and references. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaca54e388ac4b0643ac72a6700b43e6d"></a><!-- doxytag: member="shared_instance::operator->" ref="aaca54e388ac4b0643ac72a6700b43e6d" args="() const " --> const T * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00124.html#aaca54e388ac4b0643ac72a6700b43e6d">operator-></a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Access member of shared typed singleton object this instance locks and references. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a11e4c5c0c6a662e7044535eba735e191"></a><!-- doxytag: member="shared_instance::shared_instance" ref="a11e4c5c0c6a662e7044535eba735e191" args="()" -->  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00124.html#a11e4c5c0c6a662e7044535eba735e191">shared_instance</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct empty instance to reference shared typed singleton. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00124.html#a3c9292e98c3e41e60366c472493b1307">shared_instance</a> (<a class="el" href="a00126.html">shared_pointer</a>< T > &<a class="el" href="a00108.html">pointer</a>)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct shared access instance of shared typed singleton from matching <a class="el" href="a00126.html" title="Templated shared pointer for singleton shared objects of specific type.">shared_pointer</a>. <a href="#a3c9292e98c3e41e60366c472493b1307"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <div class="textblock"><h3>template<class T><br/> class shared_instance< T ></h3> <p>A templated smart pointer instance for shared singleton typed objects. </p> <p>This is used to access the shared lock instance of the singleton. </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="a00200_source.html#l01946">1946</a> of file <a class="el" href="a00200_source.html">thread.h</a>.</p> </div><hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a3c9292e98c3e41e60366c472493b1307"></a><!-- doxytag: member="shared_instance::shared_instance" ref="a3c9292e98c3e41e60366c472493b1307" args="(shared_pointer< T > &pointer)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class T > </div> <table class="memname"> <tr> <td class="memname"><a class="el" href="a00124.html">shared_instance</a>< T >::<a class="el" href="a00124.html">shared_instance</a> </td> <td>(</td> <td class="paramtype"><a class="el" href="a00126.html">shared_pointer</a>< T > & </td> <td class="paramname"><em>pointer</em></td><td>)</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Construct shared access instance of shared typed singleton from matching <a class="el" href="a00126.html" title="Templated shared pointer for singleton shared objects of specific type.">shared_pointer</a>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">pointer</td><td>to get instance from. </td></tr> </table> </dd> </dl> <p>Definition at line <a class="el" href="a00200_source.html#l01959">1959</a> of file <a class="el" href="a00200_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="a00200_source.html">thread.h</a></li> </ul> </div> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="a00124.html">shared_instance</a> </li> <li class="footer">Generated on Wed Apr 13 2011 22:39:48 for ucommon by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li> </ul> </div> </body> </html>