root/library/doc/html/classbdm_1_1shared__ptr.html @ 472

Revision 472, 17.9 kB (checked in by mido, 15 years ago)

obnovena dokumentace, vcetne pridani mnoha novych doc-souboru do svn

RevLine 
[472]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::shared_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.9 -->
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_1shared__ptr.html">shared_ptr</a>
67  </div>
68</div>
69<div class="contents">
70<h1>bdm::shared_ptr&lt; T &gt; Class Template Reference</h1><!-- doxytag: class="bdm::shared_ptr" -->A naive implementation of roughly a subset of the std::tr1:<a class="el" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1:shared_ptr spec (really...">shared_ptr</a> spec (really just roughly - it ignores memory exceptions, for example; also note I didn't read the spec). 
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_1shared__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"><a class="anchor" name="66a4d41031e37618f1a9bb3c81814c11"></a><!-- doxytag: member="bdm::shared_ptr::shared_ptr" ref="66a4d41031e37618f1a9bb3c81814c11" args="()" -->
81&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#66a4d41031e37618f1a9bb3c81814c11">shared_ptr</a> ()</td></tr>
82
83<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates an empty <a class="el" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1:shared_ptr spec (really...">shared_ptr</a> - one that doesn't point anywhere. <br></td></tr>
84<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#c8b7f0a813173581530c80d7ac4fc7c2">shared_ptr</a> (T *p)</td></tr>
85
86<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#357702d12bfd608a08b46e4a194aa4b5">shared_ptr</a> (const <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>&lt; T &gt; &amp;other)</td></tr>
87
88<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename U &gt; </td></tr>
89<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#affa5b17385493f4102c52cf75d3b509">shared_ptr</a> (const <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>&lt; U &gt; &amp;other)</td></tr>
90
91<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="880edb1d582225d0bc38c5f9dc630126"></a><!-- doxytag: member="bdm::shared_ptr::operator=" ref="880edb1d582225d0bc38c5f9dc630126" args="(const shared_ptr &amp;other)" -->
92<a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a> &amp;other)</td></tr>
93
94<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>
95
96<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>
97
98<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>
99
100<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>
101
102<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>
103
104<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>
105
106<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="338dbc6aa9fd95175abdc2df3ae2c284"></a><!-- doxytag: member="bdm::shared_ptr::unique" ref="338dbc6aa9fd95175abdc2df3ae2c284" args="() const " -->
107bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>unique</b> () const </td></tr>
108
109<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8e52b8887a4408c52b5263a5717343f2"></a><!-- doxytag: member="bdm::shared_ptr::use_count" ref="8e52b8887a4408c52b5263a5717343f2" args="() const " -->
110long&nbsp;</td><td class="memItemRight" valign="bottom"><b>use_count</b> () const </td></tr>
111
112<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6cac71bb600f9f7c6fbed9335fd22d37"></a><!-- doxytag: member="bdm::shared_ptr::operator bool" ref="6cac71bb600f9f7c6fbed9335fd22d37" args="() const " -->
113&nbsp;</td><td class="memItemRight" valign="bottom"><b>operator bool</b> () const </td></tr>
114
115<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fca7fd588f8de50e7590357305b00984"></a><!-- doxytag: member="bdm::shared_ptr::swap" ref="fca7fd588f8de50e7590357305b00984" args="(shared_ptr &amp;other)" -->
116void&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>
117
118<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
119<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9a4da829475f0cf1809fc6ef555ffe06"></a><!-- doxytag: member="bdm::shared_ptr::shared_ptr" ref="9a4da829475f0cf1809fc6ef555ffe06" args="" -->
120class&nbsp;</td><td class="memItemRight" valign="bottom"><b>shared_ptr</b></td></tr>
121
122</table>
123<hr><a name="_details"></a><h2>Detailed Description</h2>
124<h3>template&lt;typename T&gt;<br>
125 class bdm::shared_ptr&lt; T &gt;</h3>
126
127A naive implementation of roughly a subset of the std::tr1:<a class="el" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1:shared_ptr spec (really...">shared_ptr</a> spec (really just roughly - it ignores memory exceptions, for example; also note I didn't read the spec). <hr><h2>Constructor &amp; Destructor Documentation</h2>
128<a class="anchor" name="c8b7f0a813173581530c80d7ac4fc7c2"></a><!-- doxytag: member="bdm::shared_ptr::shared_ptr" ref="c8b7f0a813173581530c80d7ac4fc7c2" args="(T *p)" -->
129<div class="memitem">
130<div class="memproto">
131<div class="memtemplate">
132template&lt;typename T&gt; </div>
133      <table class="memname">
134        <tr>
135          <td class="memname"><a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>&lt; T &gt;::<a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>           </td>
136          <td>(</td>
137          <td class="paramtype">T *&nbsp;</td>
138          <td class="paramname"> <em>p</em>          </td>
139          <td>&nbsp;)&nbsp;</td>
140          <td><code> [inline]</code></td>
141        </tr>
142      </table>
143</div>
144<div class="memdoc">
145
146<p>
147Constructs a <a class="el" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1:shared_ptr spec (really...">shared_ptr</a> that owns the pointer p (unless p is null, in which case this constructor creates an empty <a class="el" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1:shared_ptr spec (really...">shared_ptr</a>).
148</div>
149</div><p>
150<a class="anchor" name="357702d12bfd608a08b46e4a194aa4b5"></a><!-- doxytag: member="bdm::shared_ptr::shared_ptr" ref="357702d12bfd608a08b46e4a194aa4b5" args="(const shared_ptr&lt; T &gt; &amp;other)" -->
151<div class="memitem">
152<div class="memproto">
153<div class="memtemplate">
154template&lt;typename T&gt; </div>
155      <table class="memname">
156        <tr>
157          <td class="memname"><a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>&lt; T &gt;::<a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>           </td>
158          <td>(</td>
159          <td class="paramtype">const <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>&lt; T &gt; &amp;&nbsp;</td>
160          <td class="paramname"> <em>other</em>          </td>
161          <td>&nbsp;)&nbsp;</td>
162          <td><code> [inline]</code></td>
163        </tr>
164      </table>
165</div>
166<div class="memdoc">
167
168<p>
169If other is empty, constructs an empty <a class="el" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1:shared_ptr spec (really...">shared_ptr</a>; otherwise, constructs a <a class="el" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1:shared_ptr spec (really...">shared_ptr</a> that shares ownership with other.
170</div>
171</div><p>
172<a class="anchor" name="affa5b17385493f4102c52cf75d3b509"></a><!-- doxytag: member="bdm::shared_ptr::shared_ptr" ref="affa5b17385493f4102c52cf75d3b509" args="(const shared_ptr&lt; U &gt; &amp;other)" -->
173<div class="memitem">
174<div class="memproto">
175<div class="memtemplate">
176template&lt;typename T&gt; </div>
177<div class="memtemplate">
178template&lt;typename U &gt; </div>
179      <table class="memname">
180        <tr>
181          <td class="memname"><a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>&lt; T &gt;::<a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>           </td>
182          <td>(</td>
183          <td class="paramtype">const <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>&lt; U &gt; &amp;&nbsp;</td>
184          <td class="paramname"> <em>other</em>          </td>
185          <td>&nbsp;)&nbsp;</td>
186          <td><code> [inline]</code></td>
187        </tr>
188      </table>
189</div>
190<div class="memdoc">
191
192<p>
193If other is empty, constructs an empty <a class="el" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1:shared_ptr spec (really...">shared_ptr</a>; otherwise, constructs a <a class="el" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1:shared_ptr spec (really...">shared_ptr</a> that shares ownership with other.
194</div>
195</div><p>
196<hr><h2>Member Function Documentation</h2>
197<a class="anchor" name="fff45e4841b2921cd42ce0691f8c1196"></a><!-- doxytag: member="bdm::shared_ptr::get" ref="fff45e4841b2921cd42ce0691f8c1196" args="() const " -->
198<div class="memitem">
199<div class="memproto">
200<div class="memtemplate">
201template&lt;typename T&gt; </div>
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]</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::shared_ptr::get" ref="37ebcfb6750dd7b5630f1d2354c07a96" args="()" -->
219<div class="memitem">
220<div class="memproto">
221<div class="memtemplate">
222template&lt;typename T&gt; </div>
223      <table class="memname">
224        <tr>
225          <td class="memname">T* <a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>&lt; T &gt;::get           </td>
226          <td>(</td>
227          <td class="paramname">          </td>
228          <td>&nbsp;)&nbsp;</td>
229          <td><code> [inline]</code></td>
230        </tr>
231      </table>
232</div>
233<div class="memdoc">
234
235<p>
236Returns the stored pointer (which remains owned by this instance).
237</div>
238</div><p>
239<a class="anchor" name="de000a72fe73804aa26962432f264800"></a><!-- doxytag: member="bdm::shared_ptr::operator*" ref="de000a72fe73804aa26962432f264800" args="() const " -->
240<div class="memitem">
241<div class="memproto">
242<div class="memtemplate">
243template&lt;typename T&gt; </div>
244      <table class="memname">
245        <tr>
246          <td class="memname">const T&amp; <a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>&lt; T &gt;::operator*           </td>
247          <td>(</td>
248          <td class="paramname">          </td>
249          <td>&nbsp;)&nbsp;</td>
250          <td> const<code> [inline]</code></td>
251        </tr>
252      </table>
253</div>
254<div class="memdoc">
255
256<p>
257Returns a reference to the object pointed to by the stored pointer. This method may only be called when the stored pointer isn't NULL.
258</div>
259</div><p>
260<a class="anchor" name="de38de837267becf5eed2839fea42c45"></a><!-- doxytag: member="bdm::shared_ptr::operator*" ref="de38de837267becf5eed2839fea42c45" args="()" -->
261<div class="memitem">
262<div class="memproto">
263<div class="memtemplate">
264template&lt;typename T&gt; </div>
265      <table class="memname">
266        <tr>
267          <td class="memname">T&amp; <a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>&lt; T &gt;::operator*           </td>
268          <td>(</td>
269          <td class="paramname">          </td>
270          <td>&nbsp;)&nbsp;</td>
271          <td><code> [inline]</code></td>
272        </tr>
273      </table>
274</div>
275<div class="memdoc">
276
277<p>
278Returns a reference to the object pointed to by the stored pointer. This method may only be called when the stored pointer isn't NULL.
279</div>
280</div><p>
281<a class="anchor" name="d89ec7ceb318241d833c7d278444396d"></a><!-- doxytag: member="bdm::shared_ptr::operator&#45;&gt;" ref="d89ec7ceb318241d833c7d278444396d" args="() const " -->
282<div class="memitem">
283<div class="memproto">
284<div class="memtemplate">
285template&lt;typename T&gt; </div>
286      <table class="memname">
287        <tr>
288          <td class="memname">const T* <a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>&lt; T &gt;::operator-&gt;           </td>
289          <td>(</td>
290          <td class="paramname">          </td>
291          <td>&nbsp;)&nbsp;</td>
292          <td> const<code> [inline]</code></td>
293        </tr>
294      </table>
295</div>
296<div class="memdoc">
297
298<p>
299Returns the stored pointer (which remains owned by this instance). This method may only be called when the stored pointer isn't NULL.
300</div>
301</div><p>
302<a class="anchor" name="bcaae812868eacbad050beda465d2327"></a><!-- doxytag: member="bdm::shared_ptr::operator&#45;&gt;" ref="bcaae812868eacbad050beda465d2327" args="()" -->
303<div class="memitem">
304<div class="memproto">
305<div class="memtemplate">
306template&lt;typename T&gt; </div>
307      <table class="memname">
308        <tr>
309          <td class="memname">T* <a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>&lt; T &gt;::operator-&gt;           </td>
310          <td>(</td>
311          <td class="paramname">          </td>
312          <td>&nbsp;)&nbsp;</td>
313          <td><code> [inline]</code></td>
314        </tr>
315      </table>
316</div>
317<div class="memdoc">
318
319<p>
320Returns the stored pointer (which remains owned by this instance). This method may only be called when the stored pointer isn't NULL.
321</div>
322</div><p>
323<hr>The documentation for this class was generated from the following file:<ul>
324<li><a class="el" href="shared__ptr_8h_source.html">shared_ptr.h</a></ul>
325</div>
326<hr size="1"><address style="text-align: right;"><small>Generated on Wed Aug 5 00:07:00 2009 for mixpp by&nbsp;
327<a href="http://www.doxygen.org/index.html">
328<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
329</body>
330</html>
Note: See TracBrowser for help on using the browser.