[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< T > 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> |
---|
[538] | 7 | <!-- Generated by Doxygen 1.5.8 --> |
---|
[472] | 8 | <script type="text/javascript"> |
---|
| 9 | <!-- |
---|
| 10 | function 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 | } |
---|
| 22 | function 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 | } |
---|
| 46 | window.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 Page</span></a></li> |
---|
| 53 | <li><a href="pages.html"><span>Related 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 List</span></a></li> |
---|
| 61 | <li><a href="classes.html"><span>Class Index</span></a></li> |
---|
| 62 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
| 63 | <li><a href="functions.html"><span>Class 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"> |
---|
[590] | 70 | <h1>bdm::shared_ptr< T > Class Template Reference</h1><!-- doxytag: class="bdm::shared_ptr" -->A naive implementation of roughly a subset of the std::tr1::shared_ptr spec. |
---|
[472] | 71 | <a href="#_details">More...</a> |
---|
| 72 | <p> |
---|
[538] | 73 | <code>#include <<a class="el" href="shared__ptr_8h-source.html">shared_ptr.h</a>></code> |
---|
[472] | 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> |
---|
[590] | 80 | <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#66a4d41031e37618f1a9bb3c81814c11">shared_ptr</a> ()</td></tr> |
---|
[472] | 81 | |
---|
[590] | 82 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#66a4d41031e37618f1a9bb3c81814c11"></a><br></td></tr> |
---|
[472] | 83 | <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#c8b7f0a813173581530c80d7ac4fc7c2">shared_ptr</a> (T *p)</td></tr> |
---|
| 84 | |
---|
| 85 | <tr><td class="memItemLeft" nowrap align="right" valign="top"> </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>< T > &other)</td></tr> |
---|
| 86 | |
---|
[590] | 87 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <a href="#357702d12bfd608a08b46e4a194aa4b5"></a><br></td></tr> |
---|
[472] | 88 | <tr><td class="memTemplParams" nowrap colspan="2">template<typename U > </td></tr> |
---|
| 89 | <tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </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>< U > &other)</td></tr> |
---|
| 90 | |
---|
[590] | 91 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Generalized copy. <a href="#affa5b17385493f4102c52cf75d3b509"></a><br></td></tr> |
---|
| 92 | <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#79374842e417d2f64e449e374be4cfc1">~shared_ptr</a> ()</td></tr> |
---|
| 93 | |
---|
[538] | 94 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="55263b1c8efbd3f8fddf703e2c457f6c"></a><!-- doxytag: member="bdm::shared_ptr::operator=" ref="55263b1c8efbd3f8fddf703e2c457f6c" args="(const shared_ptr< T > &other)" --> |
---|
[590] | 95 | <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>< T > & </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#55263b1c8efbd3f8fddf703e2c457f6c">operator=</a> (const <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>< T > &other)</td></tr> |
---|
[472] | 96 | |
---|
[590] | 97 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Assignment operator. <br></td></tr> |
---|
[472] | 98 | <tr><td class="memItemLeft" nowrap align="right" valign="top">T * </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#37ebcfb6750dd7b5630f1d2354c07a96">get</a> ()</td></tr> |
---|
| 99 | |
---|
| 100 | <tr><td class="memItemLeft" nowrap align="right" valign="top">T * </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#bcaae812868eacbad050beda465d2327">operator-></a> ()</td></tr> |
---|
| 101 | |
---|
| 102 | <tr><td class="memItemLeft" nowrap align="right" valign="top">T & </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#de38de837267becf5eed2839fea42c45">operator*</a> ()</td></tr> |
---|
| 103 | |
---|
| 104 | <tr><td class="memItemLeft" nowrap align="right" valign="top">const T * </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#fff45e4841b2921cd42ce0691f8c1196">get</a> () const </td></tr> |
---|
| 105 | |
---|
| 106 | <tr><td class="memItemLeft" nowrap align="right" valign="top">const T * </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#d89ec7ceb318241d833c7d278444396d">operator-></a> () const </td></tr> |
---|
| 107 | |
---|
| 108 | <tr><td class="memItemLeft" nowrap align="right" valign="top">const T & </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#de000a72fe73804aa26962432f264800">operator*</a> () const </td></tr> |
---|
| 109 | |
---|
| 110 | <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 " --> |
---|
[590] | 111 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#338dbc6aa9fd95175abdc2df3ae2c284">unique</a> () const </td></tr> |
---|
[472] | 112 | |
---|
[590] | 113 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns <a class="el" href="classbdm_1_1shared__ptr.html#8e52b8887a4408c52b5263a5717343f2">use_count()</a> == 1. <br></td></tr> |
---|
| 114 | <tr><td class="memItemLeft" nowrap align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#8e52b8887a4408c52b5263a5717343f2">use_count</a> () const </td></tr> |
---|
[472] | 115 | |
---|
[590] | 116 | <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#6cac71bb600f9f7c6fbed9335fd22d37">operator bool</a> () const </td></tr> |
---|
[472] | 117 | |
---|
[590] | 118 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Boolean cast. <a href="#6cac71bb600f9f7c6fbed9335fd22d37"></a><br></td></tr> |
---|
| 119 | <tr><td class="memTemplParams" nowrap colspan="2">template<typename U > </td></tr> |
---|
| 120 | <tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#b3cd369b00369ab92456aa0645e8d560">operator shared_ptr< const U ></a> () const </td></tr> |
---|
| 121 | |
---|
| 122 | <tr><td class="mdescLeft"> </td><td class="mdescRight">const cast <a href="#b3cd369b00369ab92456aa0645e8d560"></a><br></td></tr> |
---|
[472] | 123 | <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 &other)" --> |
---|
[590] | 124 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1shared__ptr.html#fca7fd588f8de50e7590357305b00984">swap</a> (<a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a> &other)</td></tr> |
---|
[472] | 125 | |
---|
[590] | 126 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Efficient swap for <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>. <br></td></tr> |
---|
[472] | 127 | <tr><td colspan="2"><br><h2>Friends</h2></td></tr> |
---|
| 128 | <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="" --> |
---|
| 129 | class </td><td class="memItemRight" valign="bottom"><b>shared_ptr</b></td></tr> |
---|
| 130 | |
---|
| 131 | </table> |
---|
| 132 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
| 133 | <h3>template<typename T><br> |
---|
| 134 | class bdm::shared_ptr< T ></h3> |
---|
| 135 | |
---|
[590] | 136 | A naive implementation of roughly a subset of the std::tr1::shared_ptr spec. |
---|
[538] | 137 | <p> |
---|
| 138 | Really just roughly - it ignores memory exceptions, for example; also note I didn't read the spec.<p> |
---|
[590] | 139 | The standard template would naturally be preferable, <b>if</b> it was included in the standard libraries of all supported compilers - but as of 2009, that's still a problem... <hr><h2>Constructor & Destructor Documentation</h2> |
---|
| 140 | <a class="anchor" name="66a4d41031e37618f1a9bb3c81814c11"></a><!-- doxytag: member="bdm::shared_ptr::shared_ptr" ref="66a4d41031e37618f1a9bb3c81814c11" args="()" --> |
---|
| 141 | <div class="memitem"> |
---|
| 142 | <div class="memproto"> |
---|
| 143 | <div class="memtemplate"> |
---|
| 144 | template<typename T> </div> |
---|
| 145 | <table class="memname"> |
---|
| 146 | <tr> |
---|
| 147 | <td class="memname"><a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>< T >::<a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a> </td> |
---|
| 148 | <td>(</td> |
---|
| 149 | <td class="paramname"> </td> |
---|
| 150 | <td> ) </td> |
---|
| 151 | <td><code> [inline]</code></td> |
---|
| 152 | </tr> |
---|
| 153 | </table> |
---|
| 154 | </div> |
---|
| 155 | <div class="memdoc"> |
---|
| 156 | |
---|
| 157 | <p> |
---|
| 158 | Default constructor. |
---|
| 159 | <p> |
---|
| 160 | 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.">shared_ptr</a> - one that doesn't point anywhere. |
---|
| 161 | </div> |
---|
| 162 | </div><p> |
---|
[472] | 163 | <a class="anchor" name="c8b7f0a813173581530c80d7ac4fc7c2"></a><!-- doxytag: member="bdm::shared_ptr::shared_ptr" ref="c8b7f0a813173581530c80d7ac4fc7c2" args="(T *p)" --> |
---|
| 164 | <div class="memitem"> |
---|
| 165 | <div class="memproto"> |
---|
| 166 | <div class="memtemplate"> |
---|
| 167 | template<typename T> </div> |
---|
| 168 | <table class="memname"> |
---|
| 169 | <tr> |
---|
| 170 | <td class="memname"><a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>< T >::<a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a> </td> |
---|
| 171 | <td>(</td> |
---|
| 172 | <td class="paramtype">T * </td> |
---|
| 173 | <td class="paramname"> <em>p</em> </td> |
---|
| 174 | <td> ) </td> |
---|
| 175 | <td><code> [inline]</code></td> |
---|
| 176 | </tr> |
---|
| 177 | </table> |
---|
| 178 | </div> |
---|
| 179 | <div class="memdoc"> |
---|
| 180 | |
---|
| 181 | <p> |
---|
[590] | 182 | 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.">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.">shared_ptr</a>). When p isn't null, it must have been alllocated by new! |
---|
[472] | 183 | </div> |
---|
| 184 | </div><p> |
---|
| 185 | <a class="anchor" name="357702d12bfd608a08b46e4a194aa4b5"></a><!-- doxytag: member="bdm::shared_ptr::shared_ptr" ref="357702d12bfd608a08b46e4a194aa4b5" args="(const shared_ptr< T > &other)" --> |
---|
| 186 | <div class="memitem"> |
---|
| 187 | <div class="memproto"> |
---|
| 188 | <div class="memtemplate"> |
---|
| 189 | template<typename T> </div> |
---|
| 190 | <table class="memname"> |
---|
| 191 | <tr> |
---|
| 192 | <td class="memname"><a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>< T >::<a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a> </td> |
---|
| 193 | <td>(</td> |
---|
| 194 | <td class="paramtype">const <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>< T > & </td> |
---|
| 195 | <td class="paramname"> <em>other</em> </td> |
---|
| 196 | <td> ) </td> |
---|
| 197 | <td><code> [inline]</code></td> |
---|
| 198 | </tr> |
---|
| 199 | </table> |
---|
| 200 | </div> |
---|
| 201 | <div class="memdoc"> |
---|
| 202 | |
---|
| 203 | <p> |
---|
[590] | 204 | Copy constructor. |
---|
| 205 | <p> |
---|
| 206 | If 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.">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.">shared_ptr</a> that shares ownership with other. |
---|
[472] | 207 | </div> |
---|
| 208 | </div><p> |
---|
| 209 | <a class="anchor" name="affa5b17385493f4102c52cf75d3b509"></a><!-- doxytag: member="bdm::shared_ptr::shared_ptr" ref="affa5b17385493f4102c52cf75d3b509" args="(const shared_ptr< U > &other)" --> |
---|
| 210 | <div class="memitem"> |
---|
| 211 | <div class="memproto"> |
---|
| 212 | <div class="memtemplate"> |
---|
| 213 | template<typename T> </div> |
---|
| 214 | <div class="memtemplate"> |
---|
| 215 | template<typename U > </div> |
---|
| 216 | <table class="memname"> |
---|
| 217 | <tr> |
---|
| 218 | <td class="memname"><a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>< T >::<a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a> </td> |
---|
| 219 | <td>(</td> |
---|
| 220 | <td class="paramtype">const <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>< U > & </td> |
---|
| 221 | <td class="paramname"> <em>other</em> </td> |
---|
| 222 | <td> ) </td> |
---|
| 223 | <td><code> [inline]</code></td> |
---|
| 224 | </tr> |
---|
| 225 | </table> |
---|
| 226 | </div> |
---|
| 227 | <div class="memdoc"> |
---|
| 228 | |
---|
| 229 | <p> |
---|
[590] | 230 | Generalized copy. |
---|
| 231 | <p> |
---|
| 232 | Allows initialization of shared pointer of a base type from raw pointer to a derived type.<p> |
---|
| 233 | If 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.">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.">shared_ptr</a> that shares ownership with other. |
---|
[472] | 234 | </div> |
---|
| 235 | </div><p> |
---|
[590] | 236 | <a class="anchor" name="79374842e417d2f64e449e374be4cfc1"></a><!-- doxytag: member="bdm::shared_ptr::~shared_ptr" ref="79374842e417d2f64e449e374be4cfc1" args="()" --> |
---|
| 237 | <div class="memitem"> |
---|
| 238 | <div class="memproto"> |
---|
| 239 | <div class="memtemplate"> |
---|
| 240 | template<typename T> </div> |
---|
| 241 | <table class="memname"> |
---|
| 242 | <tr> |
---|
| 243 | <td class="memname"><a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>< T >::~<a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a> </td> |
---|
| 244 | <td>(</td> |
---|
| 245 | <td class="paramname"> </td> |
---|
| 246 | <td> ) </td> |
---|
| 247 | <td><code> [inline]</code></td> |
---|
| 248 | </tr> |
---|
| 249 | </table> |
---|
| 250 | </div> |
---|
| 251 | <div class="memdoc"> |
---|
| 252 | |
---|
| 253 | <p> |
---|
| 254 | Destructor. |
---|
| 255 | </div> |
---|
| 256 | </div><p> |
---|
[472] | 257 | <hr><h2>Member Function Documentation</h2> |
---|
| 258 | <a class="anchor" name="fff45e4841b2921cd42ce0691f8c1196"></a><!-- doxytag: member="bdm::shared_ptr::get" ref="fff45e4841b2921cd42ce0691f8c1196" args="() const " --> |
---|
| 259 | <div class="memitem"> |
---|
| 260 | <div class="memproto"> |
---|
| 261 | <div class="memtemplate"> |
---|
| 262 | template<typename T> </div> |
---|
| 263 | <table class="memname"> |
---|
| 264 | <tr> |
---|
| 265 | <td class="memname">const T* <a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>< T >::get </td> |
---|
| 266 | <td>(</td> |
---|
| 267 | <td class="paramname"> </td> |
---|
| 268 | <td> ) </td> |
---|
| 269 | <td> const<code> [inline]</code></td> |
---|
| 270 | </tr> |
---|
| 271 | </table> |
---|
| 272 | </div> |
---|
| 273 | <div class="memdoc"> |
---|
| 274 | |
---|
| 275 | <p> |
---|
[590] | 276 | Returns the stored pointer (which remains owned by this instance). For empty instances, this method returns NULL. |
---|
[472] | 277 | </div> |
---|
| 278 | </div><p> |
---|
| 279 | <a class="anchor" name="37ebcfb6750dd7b5630f1d2354c07a96"></a><!-- doxytag: member="bdm::shared_ptr::get" ref="37ebcfb6750dd7b5630f1d2354c07a96" args="()" --> |
---|
| 280 | <div class="memitem"> |
---|
| 281 | <div class="memproto"> |
---|
| 282 | <div class="memtemplate"> |
---|
| 283 | template<typename T> </div> |
---|
| 284 | <table class="memname"> |
---|
| 285 | <tr> |
---|
| 286 | <td class="memname">T* <a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>< T >::get </td> |
---|
| 287 | <td>(</td> |
---|
| 288 | <td class="paramname"> </td> |
---|
| 289 | <td> ) </td> |
---|
| 290 | <td><code> [inline]</code></td> |
---|
| 291 | </tr> |
---|
| 292 | </table> |
---|
| 293 | </div> |
---|
| 294 | <div class="memdoc"> |
---|
| 295 | |
---|
| 296 | <p> |
---|
[590] | 297 | Returns the stored pointer (which remains owned by this instance). For empty instances, this method returns NULL. |
---|
| 298 | <p>Referenced by <a class="el" href="bdmbase_8cpp-source.html#l00345">bdm::mepdf::from_setting()</a>, <a class="el" href="bdmbase_8h-source.html#l00719">bdm::mepdf::mepdf()</a>, and <a class="el" href="kalman_8h-source.html#l00120">bdm::Kalman< fsqmat >::posterior()</a>.</p> |
---|
[538] | 299 | |
---|
[472] | 300 | </div> |
---|
| 301 | </div><p> |
---|
[590] | 302 | <a class="anchor" name="6cac71bb600f9f7c6fbed9335fd22d37"></a><!-- doxytag: member="bdm::shared_ptr::operator bool" ref="6cac71bb600f9f7c6fbed9335fd22d37" args="() const " --> |
---|
| 303 | <div class="memitem"> |
---|
| 304 | <div class="memproto"> |
---|
| 305 | <div class="memtemplate"> |
---|
| 306 | template<typename T> </div> |
---|
| 307 | <table class="memname"> |
---|
| 308 | <tr> |
---|
| 309 | <td class="memname"><a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>< T >::operator bool </td> |
---|
| 310 | <td>(</td> |
---|
| 311 | <td class="paramname"> </td> |
---|
| 312 | <td> ) </td> |
---|
| 313 | <td> const<code> [inline]</code></td> |
---|
| 314 | </tr> |
---|
| 315 | </table> |
---|
| 316 | </div> |
---|
| 317 | <div class="memdoc"> |
---|
| 318 | |
---|
| 319 | <p> |
---|
| 320 | Boolean cast. |
---|
| 321 | <p> |
---|
| 322 | This operator returns true if and only if the instance isn't empty. |
---|
| 323 | </div> |
---|
| 324 | </div><p> |
---|
| 325 | <a class="anchor" name="b3cd369b00369ab92456aa0645e8d560"></a><!-- doxytag: member="bdm::shared_ptr::operator shared_ptr< const U >" ref="b3cd369b00369ab92456aa0645e8d560" args="() const " --> |
---|
| 326 | <div class="memitem"> |
---|
| 327 | <div class="memproto"> |
---|
| 328 | <div class="memtemplate"> |
---|
| 329 | template<typename T> </div> |
---|
| 330 | <div class="memtemplate"> |
---|
| 331 | template<typename U > </div> |
---|
| 332 | <table class="memname"> |
---|
| 333 | <tr> |
---|
| 334 | <td class="memname"><a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>< T >::operator <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>< const U > </td> |
---|
| 335 | <td>(</td> |
---|
| 336 | <td class="paramname"> </td> |
---|
| 337 | <td> ) </td> |
---|
| 338 | <td> const<code> [inline]</code></td> |
---|
| 339 | </tr> |
---|
| 340 | </table> |
---|
| 341 | </div> |
---|
| 342 | <div class="memdoc"> |
---|
| 343 | |
---|
| 344 | <p> |
---|
| 345 | const cast |
---|
| 346 | <p> |
---|
| 347 | Shared pointer to T can be converted to shared pointer to const T, just like T * can be converted to T const *. |
---|
| 348 | </div> |
---|
| 349 | </div><p> |
---|
[472] | 350 | <a class="anchor" name="de000a72fe73804aa26962432f264800"></a><!-- doxytag: member="bdm::shared_ptr::operator*" ref="de000a72fe73804aa26962432f264800" args="() const " --> |
---|
| 351 | <div class="memitem"> |
---|
| 352 | <div class="memproto"> |
---|
| 353 | <div class="memtemplate"> |
---|
| 354 | template<typename T> </div> |
---|
| 355 | <table class="memname"> |
---|
| 356 | <tr> |
---|
| 357 | <td class="memname">const T& <a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>< T >::operator* </td> |
---|
| 358 | <td>(</td> |
---|
| 359 | <td class="paramname"> </td> |
---|
| 360 | <td> ) </td> |
---|
| 361 | <td> const<code> [inline]</code></td> |
---|
| 362 | </tr> |
---|
| 363 | </table> |
---|
| 364 | </div> |
---|
| 365 | <div class="memdoc"> |
---|
| 366 | |
---|
| 367 | <p> |
---|
| 368 | Returns a reference to the object pointed to by the stored pointer. This method may only be called when the stored pointer isn't NULL. |
---|
| 369 | </div> |
---|
| 370 | </div><p> |
---|
| 371 | <a class="anchor" name="de38de837267becf5eed2839fea42c45"></a><!-- doxytag: member="bdm::shared_ptr::operator*" ref="de38de837267becf5eed2839fea42c45" args="()" --> |
---|
| 372 | <div class="memitem"> |
---|
| 373 | <div class="memproto"> |
---|
| 374 | <div class="memtemplate"> |
---|
| 375 | template<typename T> </div> |
---|
| 376 | <table class="memname"> |
---|
| 377 | <tr> |
---|
| 378 | <td class="memname">T& <a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>< T >::operator* </td> |
---|
| 379 | <td>(</td> |
---|
| 380 | <td class="paramname"> </td> |
---|
| 381 | <td> ) </td> |
---|
| 382 | <td><code> [inline]</code></td> |
---|
| 383 | </tr> |
---|
| 384 | </table> |
---|
| 385 | </div> |
---|
| 386 | <div class="memdoc"> |
---|
| 387 | |
---|
| 388 | <p> |
---|
| 389 | Returns a reference to the object pointed to by the stored pointer. This method may only be called when the stored pointer isn't NULL. |
---|
| 390 | </div> |
---|
| 391 | </div><p> |
---|
| 392 | <a class="anchor" name="d89ec7ceb318241d833c7d278444396d"></a><!-- doxytag: member="bdm::shared_ptr::operator->" ref="d89ec7ceb318241d833c7d278444396d" args="() const " --> |
---|
| 393 | <div class="memitem"> |
---|
| 394 | <div class="memproto"> |
---|
| 395 | <div class="memtemplate"> |
---|
| 396 | template<typename T> </div> |
---|
| 397 | <table class="memname"> |
---|
| 398 | <tr> |
---|
| 399 | <td class="memname">const T* <a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>< T >::operator-> </td> |
---|
| 400 | <td>(</td> |
---|
| 401 | <td class="paramname"> </td> |
---|
| 402 | <td> ) </td> |
---|
| 403 | <td> const<code> [inline]</code></td> |
---|
| 404 | </tr> |
---|
| 405 | </table> |
---|
| 406 | </div> |
---|
| 407 | <div class="memdoc"> |
---|
| 408 | |
---|
| 409 | <p> |
---|
| 410 | Returns the stored pointer (which remains owned by this instance). This method may only be called when the stored pointer isn't NULL. |
---|
| 411 | </div> |
---|
| 412 | </div><p> |
---|
| 413 | <a class="anchor" name="bcaae812868eacbad050beda465d2327"></a><!-- doxytag: member="bdm::shared_ptr::operator->" ref="bcaae812868eacbad050beda465d2327" args="()" --> |
---|
| 414 | <div class="memitem"> |
---|
| 415 | <div class="memproto"> |
---|
| 416 | <div class="memtemplate"> |
---|
| 417 | template<typename T> </div> |
---|
| 418 | <table class="memname"> |
---|
| 419 | <tr> |
---|
| 420 | <td class="memname">T* <a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>< T >::operator-> </td> |
---|
| 421 | <td>(</td> |
---|
| 422 | <td class="paramname"> </td> |
---|
| 423 | <td> ) </td> |
---|
| 424 | <td><code> [inline]</code></td> |
---|
| 425 | </tr> |
---|
| 426 | </table> |
---|
| 427 | </div> |
---|
| 428 | <div class="memdoc"> |
---|
| 429 | |
---|
| 430 | <p> |
---|
[590] | 431 | Dereferences the stored pointer (which remains owned by this instance). This method may only be called when the stored pointer isn't NULL. |
---|
[472] | 432 | </div> |
---|
| 433 | </div><p> |
---|
[590] | 434 | <a class="anchor" name="8e52b8887a4408c52b5263a5717343f2"></a><!-- doxytag: member="bdm::shared_ptr::use_count" ref="8e52b8887a4408c52b5263a5717343f2" args="() const " --> |
---|
| 435 | <div class="memitem"> |
---|
| 436 | <div class="memproto"> |
---|
| 437 | <div class="memtemplate"> |
---|
| 438 | template<typename T> </div> |
---|
| 439 | <table class="memname"> |
---|
| 440 | <tr> |
---|
| 441 | <td class="memname">long <a class="el" href="classbdm_1_1shared__ptr.html">bdm::shared_ptr</a>< T >::use_count </td> |
---|
| 442 | <td>(</td> |
---|
| 443 | <td class="paramname"> </td> |
---|
| 444 | <td> ) </td> |
---|
| 445 | <td> const<code> [inline]</code></td> |
---|
| 446 | </tr> |
---|
| 447 | </table> |
---|
| 448 | </div> |
---|
| 449 | <div class="memdoc"> |
---|
| 450 | |
---|
| 451 | <p> |
---|
| 452 | Returns the number 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> instances (including this instance) that share ownership with this instance. For empty instances, this method returns 0. |
---|
| 453 | </div> |
---|
| 454 | </div><p> |
---|
[472] | 455 | <hr>The documentation for this class was generated from the following file:<ul> |
---|
[538] | 456 | <li><a class="el" href="shared__ptr_8h-source.html">shared_ptr.h</a></ul> |
---|
[472] | 457 | </div> |
---|
[590] | 458 | <hr size="1"><address style="text-align: right;"><small>Generated on Sat Aug 29 20:49:46 2009 for mixpp by |
---|
[472] | 459 | <a href="http://www.doxygen.org/index.html"> |
---|
[538] | 460 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
[472] | 461 | </body> |
---|
| 462 | </html> |
---|