root/library/doc/html/classbdm_1_1object__ptr.html @ 541

Revision 538, 15.8 kB (checked in by smidl, 15 years ago)

Documentation regenerated

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3<title>mixpp: bdm::object_ptr&lt; T &gt; Class Template Reference</title>
4<link href="tabs.css" rel="stylesheet" type="text/css">
5<link href="doxygen.css" rel="stylesheet" type="text/css">
6</head><body>
7<!-- Generated by Doxygen 1.5.8 -->
8<script type="text/javascript">
9<!--
10function changeDisplayState (e){
11  var num=this.id.replace(/[^[0-9]/g,'');
12  var button=this.firstChild;
13  var sectionDiv=document.getElementById('dynsection'+num);
14  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
15    sectionDiv.style.display='block';
16    button.src='open.gif';
17  }else{
18    sectionDiv.style.display='none';
19    button.src='closed.gif';
20  }
21}
22function initDynSections(){
23  var divs=document.getElementsByTagName('div');
24  var sectionCounter=1;
25  for(var i=0;i<divs.length-1;i++){
26    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
27      var header=divs[i];
28      var section=divs[i+1];
29      var button=header.firstChild;
30      if (button!='IMG'){
31        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
32        button=document.createElement('img');
33        divs[i].insertBefore(button,divs[i].firstChild);
34      }
35      header.style.cursor='pointer';
36      header.onclick=changeDisplayState;
37      header.id='dynheader'+sectionCounter;
38      button.src='closed.gif';
39      section.id='dynsection'+sectionCounter;
40      section.style.display='none';
41      section.style.marginLeft='14px';
42      sectionCounter++;
43    }
44  }
45}
46window.onload = initDynSections;
47-->
48</script>
49<div class="navigation" id="top">
50  <div class="tabs">
51    <ul>
52      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
53      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
54      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
55      <li><a href="files.html"><span>Files</span></a></li>
56    </ul>
57  </div>
58  <div class="tabs">
59    <ul>
60      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
61      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
62      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
63      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
64    </ul>
65  </div>
66  <div class="navpath"><b>bdm</b>::<a class="el" href="classbdm_1_1object__ptr.html">object_ptr</a>
67  </div>
68</div>
69<div class="contents">
70<h1>bdm::object_ptr&lt; T &gt; Class Template Reference</h1><!-- doxytag: class="bdm::object_ptr" --><!-- doxytag: inherits="shared_ptr&lt; T &gt;" -->A wrapper of <a class="el" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1:shared_ptr spec.">shared_ptr</a> which is never empty. 
71<a href="#_details">More...</a>
72<p>
73<code>#include &lt;<a class="el" href="shared__ptr_8h-source.html">shared_ptr.h</a>&gt;</code>
74<p>
75
76<p>
77<a href="classbdm_1_1object__ptr-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
78<tr><td></td></tr>
79<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
80<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1object__ptr.html#9f1016ff2bbfa497d1cc0a4497c1fba4">object_ptr</a> ()</td></tr>
81
82<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor.  <a href="#9f1016ff2bbfa497d1cc0a4497c1fba4"></a><br></td></tr>
83<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1object__ptr.html#dcb20017177c98274c16087b2c0067dc">object_ptr</a> (const <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>&lt; T &gt; &amp;b)</td></tr>
84
85<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Upcast from <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr&lt;T&gt;</a> to object_ptr&lt;T&gt;<a href="#dcb20017177c98274c16087b2c0067dc"></a><br></td></tr>
86<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1object__ptr.html#a9eb00600d8640711eadeed98c7892e9">object_ptr</a> (T *p)</td></tr>
87
88<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9c80da05b7b3dfc59333ca9bf6f62970"></a><!-- doxytag: member="bdm::object_ptr::operator=" ref="9c80da05b7b3dfc59333ca9bf6f62970" args="(const object_ptr&lt; T &gt; &amp;other)" -->
89<a class="el" href="classbdm_1_1object__ptr.html">object_ptr</a>&lt; T &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="classbdm_1_1object__ptr.html">object_ptr</a>&lt; T &gt; &amp;other)</td></tr>
90
91<tr><td class="memItemLeft" nowrap align="right" valign="top">T *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#37ebcfb6750dd7b5630f1d2354c07a96">get</a> ()</td></tr>
92
93<tr><td class="memItemLeft" nowrap align="right" valign="top">const T *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#fff45e4841b2921cd42ce0691f8c1196">get</a> () const</td></tr>
94
95<tr><td class="memItemLeft" nowrap align="right" valign="top">T *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#bcaae812868eacbad050beda465d2327">operator-&gt;</a> ()</td></tr>
96
97<tr><td class="memItemLeft" nowrap align="right" valign="top">const T *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#d89ec7ceb318241d833c7d278444396d">operator-&gt;</a> () const</td></tr>
98
99<tr><td class="memItemLeft" nowrap align="right" valign="top">T &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#de38de837267becf5eed2839fea42c45">operator*</a> ()</td></tr>
100
101<tr><td class="memItemLeft" nowrap align="right" valign="top">const T &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#de000a72fe73804aa26962432f264800">operator*</a> () const</td></tr>
102
103<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="338dbc6aa9fd95175abdc2df3ae2c284"></a><!-- doxytag: member="bdm::object_ptr::unique" ref="338dbc6aa9fd95175abdc2df3ae2c284" args="() const" -->
104bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>unique</b> () const</td></tr>
105
106<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8e52b8887a4408c52b5263a5717343f2"></a><!-- doxytag: member="bdm::object_ptr::use_count" ref="8e52b8887a4408c52b5263a5717343f2" args="() const" -->
107long&nbsp;</td><td class="memItemRight" valign="bottom"><b>use_count</b> () const</td></tr>
108
109<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6cac71bb600f9f7c6fbed9335fd22d37"></a><!-- doxytag: member="bdm::object_ptr::operator bool" ref="6cac71bb600f9f7c6fbed9335fd22d37" args="() const" -->
110&nbsp;</td><td class="memItemRight" valign="bottom"><b>operator bool</b> () const</td></tr>
111
112<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fca7fd588f8de50e7590357305b00984"></a><!-- doxytag: member="bdm::object_ptr::swap" ref="fca7fd588f8de50e7590357305b00984" args="(shared_ptr &amp;other)" -->
113void&nbsp;</td><td class="memItemRight" valign="bottom"><b>swap</b> (<a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a> &amp;other)</td></tr>
114
115</table>
116<hr><a name="_details"></a><h2>Detailed Description</h2>
117<h3>template&lt;typename T&gt;<br>
118 class bdm::object_ptr&lt; T &gt;</h3>
119
120A wrapper of <a class="el" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1:shared_ptr spec.">shared_ptr</a> which is never empty.
121<p>
122T must have a default constructor.<p>
123Note that shared_ptr's destructor isn't virtual - don't call delete on pointers to instances of this class. <hr><h2>Constructor &amp; Destructor Documentation</h2>
124<a class="anchor" name="9f1016ff2bbfa497d1cc0a4497c1fba4"></a><!-- doxytag: member="bdm::object_ptr::object_ptr" ref="9f1016ff2bbfa497d1cc0a4497c1fba4" args="()" -->
125<div class="memitem">
126<div class="memproto">
127<div class="memtemplate">
128template&lt;typename T&gt; </div>
129      <table class="memname">
130        <tr>
131          <td class="memname"><a class="el" href="classbdm_1_1object__ptr.html">bdm::object_ptr</a>&lt; T &gt;::<a class="el" href="classbdm_1_1object__ptr.html">object_ptr</a>           </td>
132          <td>(</td>
133          <td class="paramname">          </td>
134          <td>&nbsp;)&nbsp;</td>
135          <td><code> [inline]</code></td>
136        </tr>
137      </table>
138</div>
139<div class="memdoc">
140
141<p>
142Default constructor.
143<p>
144Calls T's default constructor.
145</div>
146</div><p>
147<a class="anchor" name="dcb20017177c98274c16087b2c0067dc"></a><!-- doxytag: member="bdm::object_ptr::object_ptr" ref="dcb20017177c98274c16087b2c0067dc" args="(const shared_ptr&lt; T &gt; &amp;b)" -->
148<div class="memitem">
149<div class="memproto">
150<div class="memtemplate">
151template&lt;typename T&gt; </div>
152      <table class="memname">
153        <tr>
154          <td class="memname"><a class="el" href="classbdm_1_1object__ptr.html">bdm::object_ptr</a>&lt; T &gt;::<a class="el" href="classbdm_1_1object__ptr.html">object_ptr</a>           </td>
155          <td>(</td>
156          <td class="paramtype">const <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>&lt; T &gt; &amp;&nbsp;</td>
157          <td class="paramname"> <em>b</em>          </td>
158          <td>&nbsp;)&nbsp;</td>
159          <td><code> [inline]</code></td>
160        </tr>
161      </table>
162</div>
163<div class="memdoc">
164
165<p>
166Upcast from <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr&lt;T&gt;</a> to object_ptr&lt;T&gt;.
167<p>
168<dl compact><dt><b>Parameters:</b></dt><dd>
169  <table border="0" cellspacing="2" cellpadding="0">
170    <tr><td valign="top"></td><td valign="top"><em>b</em>&nbsp;</td><td>The shared pointer, which must not be empty. </td></tr>
171  </table>
172</dl>
173
174</div>
175</div><p>
176<a class="anchor" name="a9eb00600d8640711eadeed98c7892e9"></a><!-- doxytag: member="bdm::object_ptr::object_ptr" ref="a9eb00600d8640711eadeed98c7892e9" args="(T *p)" -->
177<div class="memitem">
178<div class="memproto">
179<div class="memtemplate">
180template&lt;typename T&gt; </div>
181      <table class="memname">
182        <tr>
183          <td class="memname"><a class="el" href="classbdm_1_1object__ptr.html">bdm::object_ptr</a>&lt; T &gt;::<a class="el" href="classbdm_1_1object__ptr.html">object_ptr</a>           </td>
184          <td>(</td>
185          <td class="paramtype">T *&nbsp;</td>
186          <td class="paramname"> <em>p</em>          </td>
187          <td>&nbsp;)&nbsp;</td>
188          <td><code> [inline]</code></td>
189        </tr>
190      </table>
191</div>
192<div class="memdoc">
193
194<p>
195Constructs an <a class="el" href="classbdm_1_1object__ptr.html" title="A wrapper of shared_ptr which is never empty.">object_ptr</a> that owns the pointer p. p must have been alllocated by new!
196</div>
197</div><p>
198<hr><h2>Member Function Documentation</h2>
199<a class="anchor" name="fff45e4841b2921cd42ce0691f8c1196"></a><!-- doxytag: member="bdm::object_ptr::get" ref="fff45e4841b2921cd42ce0691f8c1196" args="() const" -->
200<div class="memitem">
201<div class="memproto">
202      <table class="memname">
203        <tr>
204          <td class="memname">const T * <a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>&lt; T  &gt;::get           </td>
205          <td>(</td>
206          <td class="paramname">          </td>
207          <td>&nbsp;)&nbsp;</td>
208          <td> const<code> [inline, inherited]</code></td>
209        </tr>
210      </table>
211</div>
212<div class="memdoc">
213
214<p>
215Returns the stored pointer (which remains owned by this instance).
216</div>
217</div><p>
218<a class="anchor" name="37ebcfb6750dd7b5630f1d2354c07a96"></a><!-- doxytag: member="bdm::object_ptr::get" ref="37ebcfb6750dd7b5630f1d2354c07a96" args="()" -->
219<div class="memitem">
220<div class="memproto">
221      <table class="memname">
222        <tr>
223          <td class="memname">T * <a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>&lt; T  &gt;::get           </td>
224          <td>(</td>
225          <td class="paramname">          </td>
226          <td>&nbsp;)&nbsp;</td>
227          <td><code> [inline, inherited]</code></td>
228        </tr>
229      </table>
230</div>
231<div class="memdoc">
232
233<p>
234Returns the stored pointer (which remains owned by this instance).
235</div>
236</div><p>
237<a class="anchor" name="de000a72fe73804aa26962432f264800"></a><!-- doxytag: member="bdm::object_ptr::operator*" ref="de000a72fe73804aa26962432f264800" args="() const" -->
238<div class="memitem">
239<div class="memproto">
240      <table class="memname">
241        <tr>
242          <td class="memname">const T &amp; <a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>&lt; T  &gt;::operator*           </td>
243          <td>(</td>
244          <td class="paramname">          </td>
245          <td>&nbsp;)&nbsp;</td>
246          <td> const<code> [inline, inherited]</code></td>
247        </tr>
248      </table>
249</div>
250<div class="memdoc">
251
252<p>
253Returns a reference to the object pointed to by the stored pointer. This method may only be called when the stored pointer isn't NULL.
254</div>
255</div><p>
256<a class="anchor" name="de38de837267becf5eed2839fea42c45"></a><!-- doxytag: member="bdm::object_ptr::operator*" ref="de38de837267becf5eed2839fea42c45" args="()" -->
257<div class="memitem">
258<div class="memproto">
259      <table class="memname">
260        <tr>
261          <td class="memname">T &amp; <a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>&lt; T  &gt;::operator*           </td>
262          <td>(</td>
263          <td class="paramname">          </td>
264          <td>&nbsp;)&nbsp;</td>
265          <td><code> [inline, inherited]</code></td>
266        </tr>
267      </table>
268</div>
269<div class="memdoc">
270
271<p>
272Returns a reference to the object pointed to by the stored pointer. This method may only be called when the stored pointer isn't NULL.
273</div>
274</div><p>
275<a class="anchor" name="d89ec7ceb318241d833c7d278444396d"></a><!-- doxytag: member="bdm::object_ptr::operator&#45;&gt;" ref="d89ec7ceb318241d833c7d278444396d" args="() const" -->
276<div class="memitem">
277<div class="memproto">
278      <table class="memname">
279        <tr>
280          <td class="memname">const T * <a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>&lt; T  &gt;::operator-&gt;           </td>
281          <td>(</td>
282          <td class="paramname">          </td>
283          <td>&nbsp;)&nbsp;</td>
284          <td> const<code> [inline, inherited]</code></td>
285        </tr>
286      </table>
287</div>
288<div class="memdoc">
289
290<p>
291Returns the stored pointer (which remains owned by this instance). This method may only be called when the stored pointer isn't NULL.
292</div>
293</div><p>
294<a class="anchor" name="bcaae812868eacbad050beda465d2327"></a><!-- doxytag: member="bdm::object_ptr::operator&#45;&gt;" ref="bcaae812868eacbad050beda465d2327" args="()" -->
295<div class="memitem">
296<div class="memproto">
297      <table class="memname">
298        <tr>
299          <td class="memname">T * <a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>&lt; T  &gt;::operator-&gt;           </td>
300          <td>(</td>
301          <td class="paramname">          </td>
302          <td>&nbsp;)&nbsp;</td>
303          <td><code> [inline, inherited]</code></td>
304        </tr>
305      </table>
306</div>
307<div class="memdoc">
308
309<p>
310Returns the stored pointer (which remains owned by this instance). This method may only be called when the stored pointer isn't NULL.
311</div>
312</div><p>
313<hr>The documentation for this class was generated from the following file:<ul>
314<li><a class="el" href="shared__ptr_8h-source.html">shared_ptr.h</a></ul>
315</div>
316<hr size="1"><address style="text-align: right;"><small>Generated on Sun Aug 16 17:58:19 2009 for mixpp by&nbsp;
317<a href="http://www.doxygen.org/index.html">
318<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
319</body>
320</html>
Note: See TracBrowser for help on using the browser.