aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03408.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/doxygen/nel/a03408.html')
-rw-r--r--docs/doxygen/nel/a03408.html716
1 files changed, 716 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03408.html b/docs/doxygen/nel/a03408.html
new file mode 100644
index 00000000..474e16be
--- /dev/null
+++ b/docs/doxygen/nel/a03408.html
@@ -0,0 +1,716 @@
+<!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>NeL: TemplateNLMISC::CSmartPtr&lt; T &gt; class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.6 -->
+<div class="qindex"> <form class="search" action="search.php" method="get">
+<a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a> | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
+<h1>NLMISC::CSmartPtr&lt; T &gt; Class Template Reference</h1><code>#include &lt;<a class="el" href="a06402.html">smart_ptr.h</a>&gt;</code>
+<p>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template&lt;class T&gt;<br>
+ class NLMISC::CSmartPtr&lt; T &gt;</h3>
+
+Standard SmartPtr class. T Must derive from <a class="el" href="a02209.html">CRefCount</a>. Once a normal ptr is assigned to a SmartPtr, the smartptr will own this pointer, and delete it when no other smartptr reference the object (with a reference couting scheme). The following code works, since the object himself must herit from <a class="el" href="a02209.html">CRefCount</a>, and so hold the refcount. <pre class="fragment"><div> CSmartPtr&lt;A&gt; a0, a1;
+ A *p0;
+ a0= <span class="keyword">new</span> A; <span class="comment">// Ok. RefCount==1.</span>
+ p0= a0; <span class="comment">// Ok, cast operator. object still owned by a0.</span>
+ a1= p0; <span class="comment">// Ok!! RefCount==2. Object owned by a0 and a1;</span>
+ <span class="comment">// At destruction, a1 unref(), then a0 unref() and delete the object.</span>
+</div></pre><p>
+The ref counter cannot be put directly in the smartptr since the preceding behavior must be supported and inheritance must be supported too. Here, if A is a base class of B, Pa and Pb are smartptr of a and b respectively, then <code>Pa=Pb</code>; is a valid operation. But, doing this, you may ensure that you have a virtual dtor(), since dtor() Pa may call ~A() (or you may ensure that Pa won't destruct A, which it sound much more as a normal pointer :) ).<p>
+Sample: <pre class="fragment"><div> <span class="keyword">class </span>A : <span class="keyword">public</span> CRefCount
+ {
+ <span class="keyword">public</span>:
+ A() {puts(<span class="stringliteral">"A()"</span>);}
+ <span class="keyword">virtual</span> ~A() {puts(<span class="stringliteral">"~A()"</span>);}
+ };
+
+
+ <span class="keyword">class </span>B : <span class="keyword">public</span> A
+ {
+ <span class="keyword">public</span>:
+ B() {puts(<span class="stringliteral">"B()"</span>);}
+ ~B() {puts(<span class="stringliteral">"~B()"</span>);}
+ };
+
+
+ <span class="keywordtype">void</span> testPtr()
+ {
+ CSmartPtr&lt;A&gt; a0,a1,a2;
+ CSmartPtr&lt;B&gt; b0;
+
+ a0= <span class="keyword">new</span> A;
+ a1= a0;
+ a1= <span class="keyword">new</span> A;
+ a2= a1;
+ a1=NULL;
+ b0= <span class="keyword">new</span> B;
+ a0=b0;
+
+ printf(<span class="stringliteral">"%d\n"</span>, (A*)NULL==a0);
+ printf(<span class="stringliteral">"%d\n"</span>, b0!=a0);
+ printf(<span class="stringliteral">"%d\n"</span>, (A*)NULL==a1);
+ printf(<span class="stringliteral">"%d\n"</span>, a2!=a0);
+ }
+ *
+</div></pre><p>
+SmartPtr are compatible with RefPtr. A ptr may be link to a <a class="el" href="a03321.html">CRefPtr</a> and a <a class="el" href="a03408.html">CSmartPtr</a>. As example, when the <a class="el" href="a03408.html">CSmartPtr</a> will destroy him, <a class="el" href="a03321.html">CRefPtr</a> will be informed... Sample: <pre class="fragment"><div> <span class="keywordtype">void</span> foo()
+ {
+ A *p;
+ CSmartPtr&lt;A&gt; sp;
+ CRefPtr&lt;A&gt; rp;
+
+ p= <span class="keyword">new</span> A;
+ sp= p; <span class="comment">// OK. p is now owned by sp and will be deleted by sp.</span>
+ rp= p; <span class="comment">// OK. rp handle p.</span>
+ sp= NULL; <span class="comment">// Destruction. p deleted. rp automatically informed.</span>
+ p= rp; <span class="comment">// result: p==NULL.</span>
+ }
+</div></pre><p>
+<b>PERFORMANCE</b> <b>WARNING!</b> <a class="el" href="a03408.html#NLMISC_1_1CSmartPtra10">operator=()</a> are about 10 times slower than normal pointers. For local use, prefer cast the smartptr to a normal Ptr. <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03321.html">CRefPtr</a> </dd></dl>
+<dl compact><dt><b>Author:</b></dt><dd>Lionel Berenguier <p>
+Nevrax France </dd></dl>
+<dl compact><dt><b>Date:</b></dt><dd>2000 </dd></dl>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06402.html#l00185">185</a> of file <a class="el" href="a06402.html">smart_ptr.h</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>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03408.html#NLMISC_1_1CSmartPtra0">CSmartPtr</a> (const <a class="el" href="a03408.html">CSmartPtr</a> &amp;copy)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor. <a href="#NLMISC_1_1CSmartPtra0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03408.html#NLMISC_1_1CSmartPtra1">CSmartPtr</a> (T *p)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attach a ptr to a SmartPtr. <a href="#NLMISC_1_1CSmartPtra1"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03408.html#NLMISC_1_1CSmartPtra2">CSmartPtr</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Init a NULL Ptr. <a href="#NLMISC_1_1CSmartPtra2"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03408.html#NLMISC_1_1CSmartPtra3">getNbRef</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03408.html#NLMISC_1_1CSmartPtra4">isNull</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">returns if there's no object pointed by this SmartPtr. <a href="#NLMISC_1_1CSmartPtra4"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>T &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03408.html#NLMISC_1_1CSmartPtra5">operator *</a> (void) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Indirection operator. Doesn't check NULL. <a href="#NLMISC_1_1CSmartPtra5"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03408.html#NLMISC_1_1CSmartPtra6">operator T *</a> (void) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast operator. <a href="#NLMISC_1_1CSmartPtra6"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>T *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03408.html#NLMISC_1_1CSmartPtra7">operator-&gt;</a> (void) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Selection operator. Doesn't check NULL. <a href="#NLMISC_1_1CSmartPtra7"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03408.html#NLMISC_1_1CSmartPtra8">operator&lt;</a> (const <a class="el" href="a03408.html">CSmartPtr</a> &amp;p) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">operator&lt;. Compare the pointers. <a href="#NLMISC_1_1CSmartPtra8"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03408.html">CSmartPtr</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03408.html#NLMISC_1_1CSmartPtra9">operator=</a> (const <a class="el" href="a03408.html">CSmartPtr</a> &amp;p)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">operator=. Giving a NULL pointer is a valid operation. <a href="#NLMISC_1_1CSmartPtra9"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03408.html">CSmartPtr</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03408.html#NLMISC_1_1CSmartPtra10">operator=</a> (T *p)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">operator=. Giving a NULL pointer is a valid operation. <a href="#NLMISC_1_1CSmartPtra10"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03408.html#NLMISC_1_1CSmartPtra11">toString</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03408.html#NLMISC_1_1CSmartPtra12">~CSmartPtr</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release the SmartPtr. <a href="#NLMISC_1_1CSmartPtra12"></a><br><br></td></tr>
+<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>T *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a></td></tr>
+
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CSmartPtra2" doxytag="NLMISC::CSmartPtr::CSmartPtr" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03408.html">NLMISC::CSmartPtr</a>&lt; T &gt;::<a class="el" href="a03408.html">CSmartPtr</a> </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Init a NULL Ptr.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06402.html#l00191">191</a> of file <a class="el" href="a06402.html">smart_ptr.h</a>.
+<p>
+<div class="fragment"><pre>00191 { <a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>=NULL; <a class="code" href="a04979.html#a0">SMART_TRACE</a>(<span class="stringliteral">"ctor()"</span>); }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CSmartPtra1" doxytag="NLMISC::CSmartPtr::CSmartPtr" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03408.html">NLMISC::CSmartPtr</a>&lt; T &gt;::<a class="el" href="a03408.html">CSmartPtr</a> </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">T *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>p</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Attach a ptr to a SmartPtr.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06402.html#l00193">193</a> of file <a class="el" href="a06402.html">smart_ptr.h</a>.
+<p>
+<div class="fragment"><pre>00193 { <a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>=p; <span class="keywordflow">if</span>(<a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>) <a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>-&gt;crefs++; <a class="code" href="a04979.html#a0">SMART_TRACE</a>(<span class="stringliteral">"ctor(T*)"</span>); }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CSmartPtra0" doxytag="NLMISC::CSmartPtr::CSmartPtr" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03408.html">NLMISC::CSmartPtr</a>&lt; T &gt;::<a class="el" href="a03408.html">CSmartPtr</a> </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03408.html">CSmartPtr</a>&lt; T &gt; &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>copy</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Copy constructor.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06402.html#l00195">195</a> of file <a class="el" href="a06402.html">smart_ptr.h</a>.
+<p>
+<div class="fragment"><pre>00195 { <a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>=copy.Ptr; <span class="keywordflow">if</span>(<a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>) <a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>-&gt;crefs++; <a class="code" href="a04979.html#a0">SMART_TRACE</a>(<span class="stringliteral">"ctor(Copy)"</span>); }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CSmartPtra12" doxytag="NLMISC::CSmartPtr::~CSmartPtr" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03408.html">NLMISC::CSmartPtr</a>&lt; T &gt;::~<a class="el" href="a03408.html">CSmartPtr</a> </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Release the SmartPtr.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06403.html#l00069">69</a> of file <a class="el" href="a06403.html">smart_ptr_inline.h</a>.
+<p>
+References <a class="el" href="a06402.html#l00096">SMART_TRACE</a>.
+<p>
+<div class="fragment"><pre>00070 {
+00071 <a class="code" href="a04979.html#a0">SMART_TRACE</a>(<span class="stringliteral">"dtor()"</span>);
+00072
+00073 <span class="keywordflow">if</span>(<a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>)
+00074 {
+00075 <span class="keywordflow">if</span> (--(<a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>-&gt;crefs) == 0)
+00076 <span class="keyword">delete</span> <a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>;
+00077 <a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>=NULL;
+00078 }
+00079 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CSmartPtra3" doxytag="NLMISC::CSmartPtr::getNbRef" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03408.html">NLMISC::CSmartPtr</a>&lt; T &gt;::getNbRef </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06402.html#l00216">216</a> of file <a class="el" href="a06402.html">smart_ptr.h</a>.
+<p>
+<div class="fragment"><pre>00216 { <span class="keywordflow">if</span>(<a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>) <span class="keywordflow">return</span> <a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>-&gt;crefs; <span class="keywordflow">else</span> <span class="keywordflow">return</span> 0; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CSmartPtra4" doxytag="NLMISC::CSmartPtr::isNull" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> bool <a class="el" href="a03408.html">NLMISC::CSmartPtr</a>&lt; T &gt;::isNull </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+returns if there's no object pointed by this SmartPtr.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06402.html#l00207">207</a> of file <a class="el" href="a06402.html">smart_ptr.h</a>.
+<p>
+<div class="fragment"><pre>00207 { <span class="keywordflow">return</span> <a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>==NULL; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CSmartPtra5" doxytag="NLMISC::CSmartPtr::operator *" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> T&amp; <a class="el" href="a03408.html">NLMISC::CSmartPtr</a>&lt; T &gt;::operator * </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">void&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Indirection operator. Doesn't check NULL.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06402.html#l00203">203</a> of file <a class="el" href="a06402.html">smart_ptr.h</a>.
+<p>
+<div class="fragment"><pre>00203 { <a class="code" href="a04979.html#a0">SMART_TRACE</a>(<span class="stringliteral">"ope*()"</span>); <span class="keywordflow">return</span> *<a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CSmartPtra6" doxytag="NLMISC::CSmartPtr::operator T *" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03408.html">NLMISC::CSmartPtr</a>&lt; T &gt;::operator T * </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">void&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Cast operator.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06402.html#l00201">201</a> of file <a class="el" href="a06402.html">smart_ptr.h</a>.
+<p>
+<div class="fragment"><pre>00201 { <a class="code" href="a04979.html#a0">SMART_TRACE</a>(<span class="stringliteral">"castT*()"</span>); <span class="keywordflow">return</span> <a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CSmartPtra7" doxytag="NLMISC::CSmartPtr::operator->" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> T* <a class="el" href="a03408.html">NLMISC::CSmartPtr</a>&lt; T &gt;::operator-&gt; </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">void&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Selection operator. Doesn't check NULL.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06402.html#l00205">205</a> of file <a class="el" href="a06402.html">smart_ptr.h</a>.
+<p>
+<div class="fragment"><pre>00205 { <a class="code" href="a04979.html#a0">SMART_TRACE</a>(<span class="stringliteral">"ope-&gt;()"</span>); <span class="keywordflow">return</span> <a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CSmartPtra8" doxytag="NLMISC::CSmartPtr::operator<" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> bool <a class="el" href="a03408.html">NLMISC::CSmartPtr</a>&lt; T &gt;::operator&lt; </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03408.html">CSmartPtr</a>&lt; T &gt; &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>p</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+operator&lt;. Compare the pointers.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06403.html#l00105">105</a> of file <a class="el" href="a06403.html">smart_ptr_inline.h</a>.
+<p>
+References <a class="el" href="a06402.html#l00187">NLMISC::CSmartPtr&lt; T &gt;::Ptr</a>, and <a class="el" href="a06403.html#l00039">SMART_INLINE</a>.
+<p>
+<div class="fragment"><pre>00106 {
+00107 <span class="keywordflow">return</span> <a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>&lt;p.Ptr;
+00108 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CSmartPtra9" doxytag="NLMISC::CSmartPtr::operator=" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03408.html">CSmartPtr</a>&lt; T &gt; &amp; <a class="el" href="a03408.html">NLMISC::CSmartPtr</a>&lt; T &gt;::operator= </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03408.html">CSmartPtr</a>&lt; T &gt; &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>p</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+operator=. Giving a NULL pointer is a valid operation.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06403.html#l00100">100</a> of file <a class="el" href="a06403.html">smart_ptr_inline.h</a>.
+<p>
+References <a class="el" href="a06403.html#l00081">NLMISC::CSmartPtr&lt; T &gt;::operator=()</a>, <a class="el" href="a06402.html#l00187">NLMISC::CSmartPtr&lt; T &gt;::Ptr</a>, and <a class="el" href="a06403.html#l00039">SMART_INLINE</a>.
+<p>
+<div class="fragment"><pre>00101 {
+00102 <span class="keywordflow">return</span> <a class="code" href="a03408.html#NLMISC_1_1CSmartPtra10">operator=</a>(p.Ptr);
+00103 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CSmartPtra10" doxytag="NLMISC::CSmartPtr::operator=" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03408.html">CSmartPtr</a>&lt; T &gt; &amp; <a class="el" href="a03408.html">NLMISC::CSmartPtr</a>&lt; T &gt;::operator= </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">T *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>p</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+operator=. Giving a NULL pointer is a valid operation.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06403.html#l00081">81</a> of file <a class="el" href="a06403.html">smart_ptr_inline.h</a>.
+<p>
+References <a class="el" href="a06403.html#l00039">SMART_INLINE</a>, and <a class="el" href="a06402.html#l00096">SMART_TRACE</a>.
+<p>
+Referenced by <a class="el" href="a06403.html#l00100">NLMISC::CSmartPtr&lt; T &gt;::operator=()</a>.
+<p>
+<div class="fragment"><pre>00082 {
+00083 <a class="code" href="a04979.html#a0">SMART_TRACE</a>(<span class="stringliteral">"ope=(T*)Start"</span>);
+00084
+00085 <span class="comment">// Implicit manage auto-assignation.</span>
+00086 <span class="keywordflow">if</span>(p)
+00087 p-&gt;crefs++;
+00088 <span class="keywordflow">if</span>(<a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>)
+00089 {
+00090 <span class="keywordflow">if</span> (--(<a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>-&gt;crefs) == 0)
+00091 <span class="keyword">delete</span> <a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>;
+00092 }
+00093 <a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a> = p;
+00094
+00095 <a class="code" href="a04979.html#a0">SMART_TRACE</a>(<span class="stringliteral">"ope=(T*)End"</span>);
+00096
+00097 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+00098 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CSmartPtra11" doxytag="NLMISC::CSmartPtr::toString" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> std::string <a class="el" href="a03408.html">NLMISC::CSmartPtr</a>&lt; T &gt;::toString </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06402.html#l00219">219</a> of file <a class="el" href="a06402.html">smart_ptr.h</a>.
+<p>
+Referenced by <a class="el" href="a06402.html#l00219">NLMISC::CSmartPtr&lt; CSkeletonShape &gt;::toString()</a>.
+<p>
+<div class="fragment"><pre>00219 { <span class="keywordflow">if</span>(<a class="code" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a>) <span class="keywordflow">return</span> <a class="code" href="a03408.html#NLMISC_1_1CSmartPtra11">toString</a>(*Ptr); <span class="keywordflow">else</span> <span class="keywordflow">return</span> <span class="stringliteral">"&lt;null&gt;"</span>; }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CSmartPtrr0" doxytag="NLMISC::CSmartPtr::Ptr" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> T* <a class="el" href="a03408.html">NLMISC::CSmartPtr</a>&lt; T &gt;::<a class="el" href="a03408.html#NLMISC_1_1CSmartPtrr0">Ptr</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06402.html#l00187">187</a> of file <a class="el" href="a06402.html">smart_ptr.h</a>.
+<p>
+Referenced by <a class="el" href="a06402.html#l00195">NLMISC::CSmartPtr&lt; CSkeletonShape &gt;::CSmartPtr()</a>, <a class="el" href="a06403.html#l00105">NLMISC::CSmartPtr&lt; T &gt;::operator&lt;()</a>, and <a class="el" href="a06403.html#l00100">NLMISC::CSmartPtr&lt; T &gt;::operator=()</a>. </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="a06402.html">smart_ptr.h</a><li><a class="el" href="a06403.html">smart_ptr_inline.h</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 13:33:32 2004 for NeL by
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
+</a>1.3.6 </small></address>
+</body>
+</html>