Show
Ignore:
Timestamp:
10/12/09 13:49:39 (15 years ago)
Author:
mido
Message:

\doc directory cleaned a bit

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/doc/html/shared__ptr_8h_source.html

    r641 r651  
    1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    2 <html xmlns="http://www.w3.org/1999/xhtml"> 
    3 <head> 
    4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 
     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"> 
    53<title>mixpp: shared_ptr.h Source File</title> 
    6 <link href="tabs.css" rel="stylesheet" type="text/css"/> 
    7 <link href="doxygen.css" rel="stylesheet" type="text/css"/> 
    8 </head> 
    9 <body> 
    10 <!-- Generated by Doxygen 1.6.1 --> 
     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 --> 
    118<script type="text/javascript"> 
    129<!-- 
     
    7370<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;stdexcept&gt;</span> 
    7471<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;string&gt;</span> 
    75 <a name="l00020"></a>00020 <span class="preprocessor">#include &quot;<a class="code" href="bdmerror_8h.html" title="BDM&amp;#39;s exception-throwing macros.">bdmerror.h</a>&quot;</span> 
     72<a name="l00020"></a>00020 <span class="preprocessor">#include "<a class="code" href="bdmerror_8h.html" title="BDM&amp;#39;s exception-throwing macros.">bdmerror.h</a>"</span> 
    7673<a name="l00021"></a>00021  
    7774<a name="l00022"></a>00022 <span class="keyword">namespace </span>bdm { 
     
    8683<a name="l00040"></a>00040  
    8784<a name="l00041"></a>00041 <span class="keyword">public</span>: 
    88 <a name="l00047"></a><a class="code" href="classbdm_1_1shared__ptr.html#a66a4d41031e37618f1a9bb3c81814c11">00047</a>         <a class="code" href="classbdm_1_1shared__ptr.html#a66a4d41031e37618f1a9bb3c81814c11" title="Default constructor.">shared_ptr</a>() : 
     85<a name="l00047"></a><a class="code" href="classbdm_1_1shared__ptr.html#66a4d41031e37618f1a9bb3c81814c11">00047</a>         <a class="code" href="classbdm_1_1shared__ptr.html#66a4d41031e37618f1a9bb3c81814c11" title="Default constructor.">shared_ptr</a>() : 
    8986<a name="l00048"></a>00048                         payload ( 0 ), 
    9087<a name="l00049"></a>00049                         refCnt ( 0 ) { 
    9188<a name="l00050"></a>00050         } 
    9289<a name="l00051"></a>00051  
    93 <a name="l00058"></a><a class="code" href="classbdm_1_1shared__ptr.html#ac8b7f0a813173581530c80d7ac4fc7c2">00058</a>         <a class="code" href="classbdm_1_1shared__ptr.html#a66a4d41031e37618f1a9bb3c81814c11" title="Default constructor.">shared_ptr</a> ( T *p ) : 
     90<a name="l00058"></a><a class="code" href="classbdm_1_1shared__ptr.html#c8b7f0a813173581530c80d7ac4fc7c2">00058</a>         <a class="code" href="classbdm_1_1shared__ptr.html#66a4d41031e37618f1a9bb3c81814c11" title="Default constructor.">shared_ptr</a> ( T *p ) : 
    9491<a name="l00059"></a>00059                         payload ( p ), 
    9592<a name="l00060"></a>00060                         refCnt ( p ? new unsigned ( 1 ) : 0 ) { 
    9693<a name="l00061"></a>00061         } 
    9794<a name="l00062"></a>00062  
    98 <a name="l00069"></a><a class="code" href="classbdm_1_1shared__ptr.html#a357702d12bfd608a08b46e4a194aa4b5">00069</a>         <a class="code" href="classbdm_1_1shared__ptr.html#a66a4d41031e37618f1a9bb3c81814c11" title="Default constructor.">shared_ptr</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1::shared_ptr spec.">shared_ptr&lt;T&gt;</a> &amp;other ) : 
     95<a name="l00069"></a><a class="code" href="classbdm_1_1shared__ptr.html#357702d12bfd608a08b46e4a194aa4b5">00069</a>         <a class="code" href="classbdm_1_1shared__ptr.html#66a4d41031e37618f1a9bb3c81814c11" title="Default constructor.">shared_ptr</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1shared__ptr.html">shared_ptr&lt;T&gt;</a> &amp;other ) : 
    9996<a name="l00070"></a>00070                         payload ( other.payload ), 
    10097<a name="l00071"></a>00071                         refCnt ( other.refCnt ) { 
     
    103100<a name="l00074"></a>00074  
    104101<a name="l00084"></a>00084         <span class="keyword">template</span>&lt;<span class="keyword">typename</span> U&gt; 
    105 <a name="l00085"></a><a class="code" href="classbdm_1_1shared__ptr.html#aaffa5b17385493f4102c52cf75d3b509">00085</a>         <a class="code" href="classbdm_1_1shared__ptr.html#a66a4d41031e37618f1a9bb3c81814c11" title="Default constructor.">shared_ptr</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1::shared_ptr spec.">shared_ptr&lt;U&gt;</a> &amp;other ) : 
     102<a name="l00085"></a><a class="code" href="classbdm_1_1shared__ptr.html#affa5b17385493f4102c52cf75d3b509">00085</a>         <a class="code" href="classbdm_1_1shared__ptr.html#66a4d41031e37618f1a9bb3c81814c11" title="Default constructor.">shared_ptr</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1::shared_ptr spec.">shared_ptr&lt;U&gt;</a> &amp;other ) : 
    106103<a name="l00086"></a>00086                         payload ( other.payload ), 
    107104<a name="l00087"></a>00087                         refCnt ( other.refCnt ) { 
     
    109106<a name="l00089"></a>00089         } 
    110107<a name="l00090"></a>00090  
    111 <a name="l00094"></a><a class="code" href="classbdm_1_1shared__ptr.html#a79374842e417d2f64e449e374be4cfc1">00094</a>         <a class="code" href="classbdm_1_1shared__ptr.html#a79374842e417d2f64e449e374be4cfc1">~shared_ptr</a>() { 
     108<a name="l00094"></a><a class="code" href="classbdm_1_1shared__ptr.html#79374842e417d2f64e449e374be4cfc1">00094</a>         <a class="code" href="classbdm_1_1shared__ptr.html#79374842e417d2f64e449e374be4cfc1">~shared_ptr</a>() { 
    112109<a name="l00095"></a>00095                 del_ref(); 
    113110<a name="l00096"></a>00096         } 
    114111<a name="l00097"></a>00097  
    115 <a name="l00101"></a><a class="code" href="classbdm_1_1shared__ptr.html#a55263b1c8efbd3f8fddf703e2c457f6c">00101</a>         <a class="code" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1::shared_ptr spec.">shared_ptr&lt;T&gt;</a> &amp;<a class="code" href="classbdm_1_1shared__ptr.html#a55263b1c8efbd3f8fddf703e2c457f6c" title="Assignment operator.">operator= </a>( <span class="keyword">const</span> <a class="code" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1::shared_ptr spec.">shared_ptr&lt;T&gt;</a> &amp;other ) { 
     112<a name="l00101"></a><a class="code" href="classbdm_1_1shared__ptr.html#55263b1c8efbd3f8fddf703e2c457f6c">00101</a>         <a class="code" href="classbdm_1_1shared__ptr.html">shared_ptr&lt;T&gt;</a> &amp;<a class="code" href="classbdm_1_1shared__ptr.html#55263b1c8efbd3f8fddf703e2c457f6c" title="Assignment operator.">operator= </a>( <span class="keyword">const</span> <a class="code" href="classbdm_1_1shared__ptr.html">shared_ptr&lt;T&gt;</a> &amp;other ) { 
    116113<a name="l00102"></a>00102                 other.add_ref(); 
    117114<a name="l00103"></a>00103                 del_ref(); 
     
    123120<a name="l00109"></a>00109         } 
    124121<a name="l00110"></a>00110  
    125 <a name="l00115"></a><a class="code" href="classbdm_1_1shared__ptr.html#a37ebcfb6750dd7b5630f1d2354c07a96">00115</a>         T *<span class="keyword">get</span>() { 
     122<a name="l00115"></a><a class="code" href="classbdm_1_1shared__ptr.html#37ebcfb6750dd7b5630f1d2354c07a96">00115</a>         T *<span class="keyword">get</span>() { 
    126123<a name="l00116"></a>00116                 <span class="keywordflow">return</span> payload; 
    127124<a name="l00117"></a>00117         } 
    128125<a name="l00118"></a>00118  
    129 <a name="l00124"></a><a class="code" href="classbdm_1_1shared__ptr.html#abcaae812868eacbad050beda465d2327">00124</a>         T *<a class="code" href="classbdm_1_1shared__ptr.html#abcaae812868eacbad050beda465d2327">operator-&gt;</a>() { 
    130 <a name="l00125"></a>00125                 <span class="keywordflow">if</span> ( !payload) {abort();};<span class="comment">// &quot;dereferencing NULL&quot; );</span> 
     126<a name="l00124"></a><a class="code" href="classbdm_1_1shared__ptr.html#bcaae812868eacbad050beda465d2327">00124</a>         T *<a class="code" href="classbdm_1_1shared__ptr.html#bcaae812868eacbad050beda465d2327">operator-&gt;</a>() { 
     127<a name="l00125"></a>00125                 <span class="keywordflow">if</span> ( !payload) {abort();};<span class="comment">// "dereferencing NULL" );</span> 
    131128<a name="l00126"></a>00126                 <span class="keywordflow">return</span> payload; 
    132129<a name="l00127"></a>00127         } 
    133130<a name="l00128"></a>00128  
    134 <a name="l00132"></a><a class="code" href="classbdm_1_1shared__ptr.html#ade38de837267becf5eed2839fea42c45">00132</a>         T &amp;<a class="code" href="classbdm_1_1shared__ptr.html#ade38de837267becf5eed2839fea42c45">operator*</a>() { 
    135 <a name="l00133"></a>00133                 <a class="code" href="bdmerror_8h.html#a89a0f906b242b79c5d3d342291b2cab4" title="Throw std::runtime_exception if t is not true and NDEBUG is not defined.">bdm_assert_debug</a> ( payload, <span class="stringliteral">&quot;dereferencing NULL&quot;</span> ); 
     131<a name="l00132"></a><a class="code" href="classbdm_1_1shared__ptr.html#de38de837267becf5eed2839fea42c45">00132</a>         T &amp;<a class="code" href="classbdm_1_1shared__ptr.html#de38de837267becf5eed2839fea42c45">operator*</a>() { 
     132<a name="l00133"></a>00133                 <a class="code" href="bdmerror_8h.html#89a0f906b242b79c5d3d342291b2cab4" title="Throw std::runtime_exception if t is not true and NDEBUG is not defined.">bdm_assert_debug</a> ( payload, <span class="stringliteral">"dereferencing NULL"</span> ); 
    136133<a name="l00134"></a>00134                 <span class="keywordflow">return</span> *payload; 
    137134<a name="l00135"></a>00135         } 
    138135<a name="l00136"></a>00136  
    139 <a name="l00141"></a><a class="code" href="classbdm_1_1shared__ptr.html#afff45e4841b2921cd42ce0691f8c1196">00141</a>         <span class="keyword">const</span> T* <span class="keyword">get</span>() <span class="keyword">const</span> { 
     136<a name="l00141"></a><a class="code" href="classbdm_1_1shared__ptr.html#fff45e4841b2921cd42ce0691f8c1196">00141</a>         <span class="keyword">const</span> T* <span class="keyword">get</span>() <span class="keyword">const</span> { 
    140137<a name="l00142"></a>00142                 <span class="keywordflow">return</span> payload; 
    141138<a name="l00143"></a>00143         } 
    142139<a name="l00144"></a>00144  
    143 <a name="l00148"></a><a class="code" href="classbdm_1_1shared__ptr.html#ad89ec7ceb318241d833c7d278444396d">00148</a>         <span class="keyword">const</span> T *<a class="code" href="classbdm_1_1shared__ptr.html#ad89ec7ceb318241d833c7d278444396d">operator-&gt;</a>()<span class="keyword"> const </span>{ 
    144 <a name="l00149"></a>00149                 <a class="code" href="bdmerror_8h.html#a89a0f906b242b79c5d3d342291b2cab4" title="Throw std::runtime_exception if t is not true and NDEBUG is not defined.">bdm_assert_debug</a> ( payload, <span class="stringliteral">&quot;dereferencing NULL&quot;</span> ); 
     140<a name="l00148"></a><a class="code" href="classbdm_1_1shared__ptr.html#d89ec7ceb318241d833c7d278444396d">00148</a>         <span class="keyword">const</span> T *<a class="code" href="classbdm_1_1shared__ptr.html#d89ec7ceb318241d833c7d278444396d">operator-&gt;</a>()<span class="keyword"> const </span>{ 
     141<a name="l00149"></a>00149                 <a class="code" href="bdmerror_8h.html#89a0f906b242b79c5d3d342291b2cab4" title="Throw std::runtime_exception if t is not true and NDEBUG is not defined.">bdm_assert_debug</a> ( payload, <span class="stringliteral">"dereferencing NULL"</span> ); 
    145142<a name="l00150"></a>00150                 <span class="keywordflow">return</span> payload; 
    146143<a name="l00151"></a>00151         } 
    147144<a name="l00152"></a>00152  
    148 <a name="l00156"></a><a class="code" href="classbdm_1_1shared__ptr.html#ade000a72fe73804aa26962432f264800">00156</a>         <span class="keyword">const</span> T &amp;<a class="code" href="classbdm_1_1shared__ptr.html#ade000a72fe73804aa26962432f264800">operator*</a>()<span class="keyword"> const </span>{ 
    149 <a name="l00157"></a>00157                 <a class="code" href="bdmerror_8h.html#a89a0f906b242b79c5d3d342291b2cab4" title="Throw std::runtime_exception if t is not true and NDEBUG is not defined.">bdm_assert_debug</a> ( payload, <span class="stringliteral">&quot;dereferencing NULL&quot;</span> ); 
     145<a name="l00156"></a><a class="code" href="classbdm_1_1shared__ptr.html#de000a72fe73804aa26962432f264800">00156</a>         <span class="keyword">const</span> T &amp;<a class="code" href="classbdm_1_1shared__ptr.html#de000a72fe73804aa26962432f264800">operator*</a>()<span class="keyword"> const </span>{ 
     146<a name="l00157"></a>00157                 <a class="code" href="bdmerror_8h.html#89a0f906b242b79c5d3d342291b2cab4" title="Throw std::runtime_exception if t is not true and NDEBUG is not defined.">bdm_assert_debug</a> ( payload, <span class="stringliteral">"dereferencing NULL"</span> ); 
    150147<a name="l00158"></a>00158                 <span class="keywordflow">return</span> *payload; 
    151148<a name="l00159"></a>00159         } 
    152149<a name="l00160"></a>00160  
    153 <a name="l00162"></a><a class="code" href="classbdm_1_1shared__ptr.html#a338dbc6aa9fd95175abdc2df3ae2c284">00162</a>         <span class="keywordtype">bool</span> <a class="code" href="classbdm_1_1shared__ptr.html#a338dbc6aa9fd95175abdc2df3ae2c284" title="Returns use_count() == 1.">unique</a>()<span class="keyword"> const </span>{ 
     150<a name="l00162"></a><a class="code" href="classbdm_1_1shared__ptr.html#338dbc6aa9fd95175abdc2df3ae2c284">00162</a>         <span class="keywordtype">bool</span> <a class="code" href="classbdm_1_1shared__ptr.html#338dbc6aa9fd95175abdc2df3ae2c284" title="Returns use_count() == 1.">unique</a>()<span class="keyword"> const </span>{ 
    154151<a name="l00163"></a>00163                 <span class="keywordflow">return</span> refCnt &amp;&amp; ( *refCnt == 1 ); 
    155152<a name="l00164"></a>00164         } 
    156153<a name="l00165"></a>00165  
    157 <a name="l00171"></a><a class="code" href="classbdm_1_1shared__ptr.html#a8e52b8887a4408c52b5263a5717343f2">00171</a>         <span class="keywordtype">long</span> <a class="code" href="classbdm_1_1shared__ptr.html#a8e52b8887a4408c52b5263a5717343f2">use_count</a>()<span class="keyword"> const </span>{ 
     154<a name="l00171"></a><a class="code" href="classbdm_1_1shared__ptr.html#8e52b8887a4408c52b5263a5717343f2">00171</a>         <span class="keywordtype">long</span> <a class="code" href="classbdm_1_1shared__ptr.html#8e52b8887a4408c52b5263a5717343f2">use_count</a>()<span class="keyword"> const </span>{ 
    158155<a name="l00172"></a>00172                 <span class="keywordflow">return</span> refCnt ? *refCnt : 0; 
    159156<a name="l00173"></a>00173         } 
    160157<a name="l00174"></a>00174  
    161 <a name="l00180"></a><a class="code" href="classbdm_1_1shared__ptr.html#a6cac71bb600f9f7c6fbed9335fd22d37">00180</a>         <a class="code" href="classbdm_1_1shared__ptr.html#a6cac71bb600f9f7c6fbed9335fd22d37" title="Boolean cast.">operator bool</a>()<span class="keyword"> const </span>{ 
     158<a name="l00180"></a><a class="code" href="classbdm_1_1shared__ptr.html#6cac71bb600f9f7c6fbed9335fd22d37">00180</a>         <a class="code" href="classbdm_1_1shared__ptr.html#6cac71bb600f9f7c6fbed9335fd22d37" title="Boolean cast.">operator bool</a>()<span class="keyword"> const </span>{ 
    162159<a name="l00181"></a>00181                 <span class="keywordflow">return</span> !!payload; 
    163160<a name="l00182"></a>00182         } 
    164161<a name="l00183"></a>00183  
    165162<a name="l00190"></a>00190         <span class="keyword">template</span>&lt;<span class="keyword">typename</span> U&gt; 
    166 <a name="l00191"></a><a class="code" href="classbdm_1_1shared__ptr.html#ab3cd369b00369ab92456aa0645e8d560">00191</a>         <a class="code" href="classbdm_1_1shared__ptr.html#ab3cd369b00369ab92456aa0645e8d560" title="const cast">operator shared_ptr&lt;const U&gt;</a>()<span class="keyword"> const </span>{ 
     163<a name="l00191"></a><a class="code" href="classbdm_1_1shared__ptr.html#b3cd369b00369ab92456aa0645e8d560">00191</a>         <a class="code" href="classbdm_1_1shared__ptr.html#b3cd369b00369ab92456aa0645e8d560" title="const cast">operator shared_ptr&lt;const U&gt;</a>()<span class="keyword"> const </span>{ 
    167164<a name="l00192"></a>00192                 <a class="code" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1::shared_ptr spec.">shared_ptr&lt;const U&gt;</a> cptr;                
    168165<a name="l00193"></a>00193                 cptr.refCnt = refCnt; 
     
    172169<a name="l00197"></a>00197         } 
    173170<a name="l00198"></a>00198  
    174 <a name="l00202"></a><a class="code" href="classbdm_1_1shared__ptr.html#afca7fd588f8de50e7590357305b00984">00202</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1shared__ptr.html#afca7fd588f8de50e7590357305b00984" title="Efficient swap for shared_ptr.">swap</a> ( <a class="code" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1::shared_ptr spec.">shared_ptr</a> &amp;other ) { 
    175 <a name="l00203"></a>00203                 <a class="code" href="classbdm_1_1shared__ptr.html#afca7fd588f8de50e7590357305b00984" title="Efficient swap for shared_ptr.">std::swap</a> ( payload, other.payload ); 
    176 <a name="l00204"></a>00204                 <a class="code" href="classbdm_1_1shared__ptr.html#afca7fd588f8de50e7590357305b00984" title="Efficient swap for shared_ptr.">std::swap</a> ( refCnt, other.refCnt ); 
     171<a name="l00202"></a><a class="code" href="classbdm_1_1shared__ptr.html#fca7fd588f8de50e7590357305b00984">00202</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1shared__ptr.html#fca7fd588f8de50e7590357305b00984" title="Efficient swap for shared_ptr.">swap</a> ( <a class="code" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1::shared_ptr spec.">shared_ptr</a> &amp;other ) { 
     172<a name="l00203"></a>00203                 <a class="code" href="classbdm_1_1shared__ptr.html#fca7fd588f8de50e7590357305b00984" title="Efficient swap for shared_ptr.">std::swap</a> ( payload, other.payload ); 
     173<a name="l00204"></a>00204                 <a class="code" href="classbdm_1_1shared__ptr.html#fca7fd588f8de50e7590357305b00984" title="Efficient swap for shared_ptr.">std::swap</a> ( refCnt, other.refCnt ); 
    177174<a name="l00205"></a>00205         } 
    178175<a name="l00206"></a>00206  
     
    182179<a name="l00210"></a>00210                         <span class="keywordflow">if</span> ( *refCnt == UINT_MAX ) { 
    183180<a name="l00211"></a>00211                                 <span class="keywordflow">throw</span> std::overflow_error ( 
    184 <a name="l00212"></a>00212                                     std::string ( <span class="stringliteral">&quot;Shared pointer has too many references.&quot;</span> ) ); 
     181<a name="l00212"></a>00212                                     std::string ( <span class="stringliteral">"Shared pointer has too many references."</span> ) ); 
    185182<a name="l00213"></a>00213                         } 
    186183<a name="l00214"></a>00214  
     
    218215<a name="l00256"></a>00256 { 
    219216<a name="l00257"></a>00257 <span class="keyword">public</span>: 
    220 <a name="l00263"></a><a class="code" href="classbdm_1_1object__ptr.html#a9f1016ff2bbfa497d1cc0a4497c1fba4">00263</a>         <a class="code" href="classbdm_1_1object__ptr.html#a9f1016ff2bbfa497d1cc0a4497c1fba4" title="Default constructor.">object_ptr</a>() : <a class="code" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1::shared_ptr spec.">shared_ptr</a>&lt;T&gt; ( new T() ) { } 
     217<a name="l00263"></a><a class="code" href="classbdm_1_1object__ptr.html#9f1016ff2bbfa497d1cc0a4497c1fba4">00263</a>         <a class="code" href="classbdm_1_1object__ptr.html#9f1016ff2bbfa497d1cc0a4497c1fba4" title="Default constructor.">object_ptr</a>() : <a class="code" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1::shared_ptr spec.">shared_ptr</a>&lt;T&gt; ( new T() ) { } 
    221218<a name="l00264"></a>00264  
    222 <a name="l00270"></a><a class="code" href="classbdm_1_1object__ptr.html#adcb20017177c98274c16087b2c0067dc">00270</a>         <a class="code" href="classbdm_1_1object__ptr.html#adcb20017177c98274c16087b2c0067dc" title="Upcast from shared_ptr&amp;lt;T&amp;gt; to object_ptr&amp;lt;T&amp;gt;.">object_ptr</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1::shared_ptr spec.">shared_ptr&lt;T&gt;</a> &amp;b ) : <a class="code" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1::shared_ptr spec.">shared_ptr</a>&lt;T&gt; ( b ) { 
    223 <a name="l00271"></a>00271                 <a class="code" href="bdmerror_8h.html#a89a0f906b242b79c5d3d342291b2cab4" title="Throw std::runtime_exception if t is not true and NDEBUG is not defined.">bdm_assert_debug</a> ( this-&gt;<span class="keyword">get</span>(), <span class="stringliteral">&quot;object_ptr cannot be empty&quot;</span> ); 
     219<a name="l00270"></a><a class="code" href="classbdm_1_1object__ptr.html#dcb20017177c98274c16087b2c0067dc">00270</a>         <a class="code" href="classbdm_1_1object__ptr.html#dcb20017177c98274c16087b2c0067dc" title="Upcast from shared_ptr&amp;lt;T&amp;gt; to object_ptr&amp;lt;T&amp;gt;.">object_ptr</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1shared__ptr.html">shared_ptr&lt;T&gt;</a> &amp;b ) : <a class="code" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1::shared_ptr spec.">shared_ptr</a>&lt;T&gt; ( b ) { 
     220<a name="l00271"></a>00271                 <a class="code" href="bdmerror_8h.html#89a0f906b242b79c5d3d342291b2cab4" title="Throw std::runtime_exception if t is not true and NDEBUG is not defined.">bdm_assert_debug</a> ( this-&gt;<span class="keyword">get</span>(), <span class="stringliteral">"object_ptr cannot be empty"</span> ); 
    224221<a name="l00272"></a>00272         } 
    225222<a name="l00273"></a>00273  
    226 <a name="l00278"></a><a class="code" href="classbdm_1_1object__ptr.html#aa9eb00600d8640711eadeed98c7892e9">00278</a>         <a class="code" href="classbdm_1_1object__ptr.html#aa9eb00600d8640711eadeed98c7892e9">object_ptr</a> ( T *p ) : <a class="code" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1::shared_ptr spec.">shared_ptr</a>&lt;T&gt; ( p ) { 
    227 <a name="l00279"></a>00279                 <a class="code" href="bdmerror_8h.html#a89a0f906b242b79c5d3d342291b2cab4" title="Throw std::runtime_exception if t is not true and NDEBUG is not defined.">bdm_assert_debug</a> ( p, <span class="stringliteral">&quot;object_ptr cannot be empty&quot;</span> ); 
     223<a name="l00278"></a><a class="code" href="classbdm_1_1object__ptr.html#a9eb00600d8640711eadeed98c7892e9">00278</a>         <a class="code" href="classbdm_1_1object__ptr.html#a9eb00600d8640711eadeed98c7892e9">object_ptr</a> ( T *p ) : <a class="code" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1::shared_ptr spec.">shared_ptr</a>&lt;T&gt; ( p ) { 
     224<a name="l00279"></a>00279                 <a class="code" href="bdmerror_8h.html#89a0f906b242b79c5d3d342291b2cab4" title="Throw std::runtime_exception if t is not true and NDEBUG is not defined.">bdm_assert_debug</a> ( p, <span class="stringliteral">"object_ptr cannot be empty"</span> ); 
    228225<a name="l00280"></a>00280         } 
    229226<a name="l00281"></a>00281  
    230 <a name="l00285"></a><a class="code" href="classbdm_1_1object__ptr.html#a9c80da05b7b3dfc59333ca9bf6f62970">00285</a>         <a class="code" href="classbdm_1_1object__ptr.html" title="A wrapper of shared_ptr which is never empty.">object_ptr&lt;T&gt;</a> &amp;<a class="code" href="classbdm_1_1object__ptr.html#a9c80da05b7b3dfc59333ca9bf6f62970" title="Assignment operator.">operator= </a>( <span class="keyword">const</span> <a class="code" href="classbdm_1_1object__ptr.html" title="A wrapper of shared_ptr which is never empty.">object_ptr&lt;T&gt;</a> &amp;other ) { 
    231 <a name="l00286"></a>00286                 <a class="code" href="classbdm_1_1object__ptr.html#a9c80da05b7b3dfc59333ca9bf6f62970" title="Assignment operator.">shared_ptr&lt;T&gt;::operator= </a>( other ); 
     227<a name="l00285"></a><a class="code" href="classbdm_1_1object__ptr.html#9c80da05b7b3dfc59333ca9bf6f62970">00285</a>         <a class="code" href="classbdm_1_1object__ptr.html" title="A wrapper of shared_ptr which is never empty.">object_ptr&lt;T&gt;</a> &amp;<a class="code" href="classbdm_1_1object__ptr.html#9c80da05b7b3dfc59333ca9bf6f62970" title="Assignment operator.">operator= </a>( <span class="keyword">const</span> <a class="code" href="classbdm_1_1object__ptr.html" title="A wrapper of shared_ptr which is never empty.">object_ptr&lt;T&gt;</a> &amp;other ) { 
     228<a name="l00286"></a>00286                 <a class="code" href="classbdm_1_1object__ptr.html#9c80da05b7b3dfc59333ca9bf6f62970" title="Assignment operator.">shared_ptr&lt;T&gt;::operator= </a>( other ); 
    232229<a name="l00287"></a>00287                 <span class="keywordflow">return</span> *<span class="keyword">this</span>; 
    233230<a name="l00288"></a>00288         } 
     
    242239<a name="l00297"></a>00297 <span class="preprocessor">#endif</span> 
    243240</pre></div></div> 
    244 <hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 27 00:49:04 2009 for mixpp by&nbsp; 
     241<hr size="1"><address style="text-align: right;"><small>Generated on Wed Oct 7 17:34:43 2009 for mixpp by&nbsp; 
    245242<a href="http://www.doxygen.org/index.html"> 
    246 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> 
     243<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> 
    247244</body> 
    248245</html>