<!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>GNU CommonC++: ost::RefObject Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.6 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li id="current"><a href="classes.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul></div> <div class="tabs"> <ul> <li><a href="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul></div> <div class="nav"> <a class="el" href="namespaceost.html">ost</a>::<a class="el" href="classost_1_1_ref_object.html">RefObject</a></div> <h1>ost::RefObject Class Reference</h1><!-- doxytag: class="ost::RefObject" -->A reference countable object.Object managed by smart pointer reference count. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="object_8h-source.html">object.h</a>></code> <p> <a href="classost_1_1_ref_object-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_ref_object.html#43b6a22fa4ab33a53ce2da72877c9edb">getObject</a> (void)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The actual object being managed can be returned by this method as a void and then recast to the actual type. <a href="#43b6a22fa4ab33a53ce2da72877c9edb"></a><br></td></tr> <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_ref_object.html#7dabeed59ecca372353f66284be97dd8">RefObject</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The constructor simply initializes the count. <a href="#7dabeed59ecca372353f66284be97dd8"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_ref_object.html#7c174b0ec5861a42e13daf1801ed0277">~RefObject</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The destructor is called when the reference count returns to zero. <a href="#7c174b0ec5861a42e13daf1801ed0277"></a><br></td></tr> <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_ref_object.html#7887ae684391ece66186f3dfbc6a35a9">refCount</a></td></tr> <tr><td colspan="2"><br><h2>Friends</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_ref_object.html#0cdd998cac4e2907eb6a4e7d80ea69df">RefPointer</a></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> A reference countable object.Object managed by smart pointer reference count. <p> This is used in association with smart pointers (<a class="el" href="classost_1_1_ref_pointer.html">RefPointer</a>).<p> <dl compact><dt><b>Author:</b></dt><dd>David Sugar <<a href="mailto:dyfet@gnutelephony.org">dyfet@gnutelephony.org</a>> </dd></dl> <p> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="7dabeed59ecca372353f66284be97dd8"></a><!-- doxytag: member="ost::RefObject::RefObject" ref="7dabeed59ecca372353f66284be97dd8" args="()" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">ost::RefObject::RefObject </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline, protected]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> The constructor simply initializes the count. <p> </td> </tr> </table> <a class="anchor" name="7c174b0ec5861a42e13daf1801ed0277"></a><!-- doxytag: member="ost::RefObject::~RefObject" ref="7c174b0ec5861a42e13daf1801ed0277" args="()" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">virtual ost::RefObject::~RefObject </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [protected, virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> The destructor is called when the reference count returns to zero. <p> This is done through a virtual destructor. </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="43b6a22fa4ab33a53ce2da72877c9edb"></a><!-- doxytag: member="ost::RefObject::getObject" ref="43b6a22fa4ab33a53ce2da72877c9edb" args="(void)=0" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">virtual void* ost::RefObject::getObject </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [pure virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> The actual object being managed can be returned by this method as a void and then recast to the actual type. <p> This removes the need to dynamic cast from <a class="el" href="classost_1_1_ref_object.html">RefObject</a> and the dependence on rtti this implies.<p> <dl compact><dt><b>Returns:</b></dt><dd>underlying object being referenced. </dd></dl> </td> </tr> </table> <hr><h2>Friends And Related Function Documentation</h2> <a class="anchor" name="0cdd998cac4e2907eb6a4e7d80ea69df"></a><!-- doxytag: member="ost::RefObject::RefPointer" ref="0cdd998cac4e2907eb6a4e7d80ea69df" args="" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">friend class <a class="el" href="classost_1_1_ref_pointer.html">RefPointer</a><code> [friend]</code> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <hr><h2>Member Data Documentation</h2> <a class="anchor" name="7887ae684391ece66186f3dfbc6a35a9"></a><!-- doxytag: member="ost::RefObject::refCount" ref="7887ae684391ece66186f3dfbc6a35a9" args="" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">unsigned <a class="el" href="classost_1_1_ref_object.html#7887ae684391ece66186f3dfbc6a35a9">ost::RefObject::refCount</a><code> [protected]</code> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="object_8h-source.html">object.h</a></ul> <hr size="1"><address style="align: right;"><small>Generated on Mon Jun 19 10:50:56 2006 for GNU CommonC++ by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address> </body> </html>