<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.5.6">
  <compounddef id="sharedptr_8h" kind="file">
    <compoundname>sharedptr.h</compoundname>
    <includes local="no">iostream</includes>
    <includedby refid="AssociationBase_8h" local="no">AssociationBase.h</includedby>
    <incdepgraph>
      <node id="262">
        <label>sharedptr.h</label>
        <link refid="sharedptr.h"/>
        <childnode refid="263" relation="include">
        </childnode>
      </node>
      <node id="263">
        <label>iostream</label>
      </node>
    </incdepgraph>
    <invincdepgraph>
      <node id="265">
        <label>AssociationBase.h</label>
        <link refid="AssociationBase_8h"/>
        <childnode refid="266" relation="include">
        </childnode>
      </node>
      <node id="266">
        <label>Association.h</label>
        <link refid="Association_8h"/>
        <childnode refid="267" relation="include">
        </childnode>
      </node>
      <node id="268">
        <label>Dialog_Preferences.h</label>
        <link refid="Dialog__Preferences_8h"/>
        <childnode refid="269" relation="include">
        </childnode>
      </node>
      <node id="269">
        <label>bakery.h</label>
        <link refid="bakery_8h"/>
      </node>
      <node id="264">
        <label>sharedptr.h</label>
        <link refid="sharedptr.h"/>
        <childnode refid="265" relation="include">
        </childnode>
      </node>
      <node id="267">
        <label>Client.h</label>
        <link refid="Client_8h"/>
        <childnode refid="268" relation="include">
        </childnode>
      </node>
    </invincdepgraph>
    <innerclass refid="classBakery_1_1sharedptr" prot="public">Bakery::sharedptr</innerclass>
    <innernamespace refid="namespaceBakery">Bakery</innernamespace>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*</highlight></codeline>
<codeline lineno="2"><highlight class="comment"><sp/>*<sp/>Copyright<sp/>2004<sp/>Murray<sp/>Cumming</highlight></codeline>
<codeline lineno="3"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="4"><highlight class="comment"><sp/>*<sp/>This<sp/>library<sp/>is<sp/>free<sp/>software;<sp/>you<sp/>can<sp/>redistribute<sp/>it<sp/>and/or</highlight></codeline>
<codeline lineno="5"><highlight class="comment"><sp/>*<sp/>modify<sp/>it<sp/>under<sp/>the<sp/>terms<sp/>of<sp/>the<sp/>GNU<sp/>Library<sp/>General<sp/>Public</highlight></codeline>
<codeline lineno="6"><highlight class="comment"><sp/>*<sp/>License<sp/>as<sp/>published<sp/>by<sp/>the<sp/>Free<sp/>Software<sp/>Foundation;<sp/>either</highlight></codeline>
<codeline lineno="7"><highlight class="comment"><sp/>*<sp/>version<sp/>2<sp/>of<sp/>the<sp/>License,<sp/>or<sp/>(at<sp/>your<sp/>option)<sp/>any<sp/>later<sp/>version.</highlight></codeline>
<codeline lineno="8"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="9"><highlight class="comment"><sp/>*<sp/>This<sp/>library<sp/>is<sp/>distributed<sp/>in<sp/>the<sp/>hope<sp/>that<sp/>it<sp/>will<sp/>be<sp/>useful,</highlight></codeline>
<codeline lineno="10"><highlight class="comment"><sp/>*<sp/>but<sp/>WITHOUT<sp/>ANY<sp/>WARRANTY;<sp/>without<sp/>even<sp/>the<sp/>implied<sp/>warranty<sp/>of</highlight></codeline>
<codeline lineno="11"><highlight class="comment"><sp/>*<sp/>MERCHANTABILITY<sp/>or<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE.<sp/><sp/>See<sp/>the<sp/>GNU</highlight></codeline>
<codeline lineno="12"><highlight class="comment"><sp/>*<sp/>Library<sp/>General<sp/>Public<sp/>License<sp/>for<sp/>more<sp/>details.</highlight></codeline>
<codeline lineno="13"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="14"><highlight class="comment"><sp/>*<sp/>You<sp/>should<sp/>have<sp/>received<sp/>a<sp/>copy<sp/>of<sp/>the<sp/>GNU<sp/>Library<sp/>General<sp/>Public</highlight></codeline>
<codeline lineno="15"><highlight class="comment"><sp/>*<sp/>License<sp/>along<sp/>with<sp/>this<sp/>library;<sp/>if<sp/>not,<sp/>write<sp/>to<sp/>the<sp/>Free</highlight></codeline>
<codeline lineno="16"><highlight class="comment"><sp/>*<sp/>Software<sp/>Foundation,<sp/>Inc.,<sp/>675<sp/>Mass<sp/>Ave,<sp/>Cambridge,<sp/>MA<sp/>02139,<sp/>USA.</highlight></codeline>
<codeline lineno="17"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="18"><highlight class="normal"></highlight></codeline>
<codeline lineno="19"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>BAKERY_UTILITIES_SHAREDPTR_H</highlight></codeline>
<codeline lineno="20"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#define<sp/>BAKERY_UTILITIES_SHAREDPTR_H</highlight></codeline>
<codeline lineno="21"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="22"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;iostream&gt;</highlight><highlight class="normal"><sp/></highlight><highlight class="comment">//Just<sp/>for<sp/>debugging.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="23"><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">Bakery</highlight></codeline>
<codeline lineno="25"><highlight class="normal">{</highlight></codeline>
<codeline lineno="26"><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="keyword">template</highlight><highlight class="normal">&lt;<sp/></highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>T_obj<sp/>&gt;</highlight></codeline>
<codeline lineno="31" refid="classBakery_1_1sharedptr" refkind="compound"><highlight class="normal"></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr</ref></highlight></codeline>
<codeline lineno="32"><highlight class="normal">{</highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="34" refid="classBakery_1_1sharedptr_1646d2a5108f6b75ed67450dbcddaf810" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/><ref refid="classBakery_1_1sharedptr_1646d2a5108f6b75ed67450dbcddaf810" kindref="member">size_type</ref>;</highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="normal"><sp/><sp/><ref refid="classBakery_1_1sharedptr_151ce729978d0941d4edf45303edd5dc2" kindref="member" tooltip="Allocate a new instance.">sharedptr</ref>();</highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">explicit</highlight><highlight class="normal"><sp/><ref refid="classBakery_1_1sharedptr_151ce729978d0941d4edf45303edd5dc2" kindref="member" tooltip="Allocate a new instance.">sharedptr</ref>(T_obj*<sp/>pobj);</highlight></codeline>
<codeline lineno="41"><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/><ref refid="classBakery_1_1sharedptr_151ce729978d0941d4edf45303edd5dc2" kindref="member" tooltip="Allocate a new instance.">sharedptr</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr</ref>&amp;<sp/>src);</highlight></codeline>
<codeline lineno="44"><highlight class="normal"></highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr</ref>&amp;<sp/><ref refid="classBakery_1_1sharedptr_130beb1671a14c2a4f4131405500ccc1c" kindref="member" tooltip="Share ownership.">operator=</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr</ref>&amp;<sp/>src);</highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/><ref refid="classBakery_1_1sharedptr_166cd61f1d86c307eca633e908e53015a" kindref="member">~sharedptr</ref>();</highlight></codeline>
<codeline lineno="49"><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/>T_obj&amp;<sp/><ref refid="classBakery_1_1sharedptr_104d2645057df5aff35933d7c4a721f1a" kindref="member" tooltip="Dereferencing.">operator*</ref>();</highlight></codeline>
<codeline lineno="53"><highlight class="normal"></highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>T_obj&amp;<sp/><ref refid="classBakery_1_1sharedptr_104d2645057df5aff35933d7c4a721f1a" kindref="member" tooltip="Dereferencing.">operator*</ref>()<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="57"><highlight class="normal"></highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/>T_obj*<sp/><ref refid="classBakery_1_1sharedptr_18e9a6af6a2d80b472669edd1d6c806f5" kindref="member" tooltip="Dereferencing.">operator-&gt;</ref>()<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="66"><highlight class="normal"></highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="classBakery_1_1sharedptr_1c365d19098b216db86f7f38fcbe919ee" kindref="member" tooltip="Test whether the RefPtr&amp;lt;&amp;gt; points to any underlying instance.">operator bool</ref>()<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="76"><highlight class="normal"></highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/>T_obj*<sp/><ref refid="classBakery_1_1sharedptr_1d8b9dcc5403fbb5adb63d84fef66b66a" kindref="member" tooltip="Get the underlying instance:.">obj</ref>();</highlight></codeline>
<codeline lineno="79"><highlight class="normal"></highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>T_obj*<sp/><ref refid="classBakery_1_1sharedptr_1d8b9dcc5403fbb5adb63d84fef66b66a" kindref="member" tooltip="Get the underlying instance:.">obj</ref>()<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="82"><highlight class="normal"></highlight></codeline>
<codeline lineno="83"><highlight class="normal"></highlight></codeline>
<codeline lineno="84"><highlight class="normal"></highlight><highlight class="keyword">protected</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classBakery_1_1sharedptr_18713e07f838779557de89ea184dc9a3f" kindref="member">ref</ref>();</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classBakery_1_1sharedptr_12ef5266b86fb825c0dec0a90b1dc656a" kindref="member">unref</ref>();</highlight></codeline>
<codeline lineno="87"><highlight class="normal"></highlight></codeline>
<codeline lineno="88" refid="classBakery_1_1sharedptr_1e5bf7b5de95fdde3eb6904e192040fe8" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classBakery_1_1sharedptr_1646d2a5108f6b75ed67450dbcddaf810" kindref="member">size_type</ref>*<sp/><ref refid="classBakery_1_1sharedptr_1e5bf7b5de95fdde3eb6904e192040fe8" kindref="member">m_pRefCount</ref>;<sp/></highlight><highlight class="comment">//Shared<sp/>between<sp/>instances,<sp/>by<sp/>copying.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="89" refid="classBakery_1_1sharedptr_12690c10c5f2e9f06b1518852f02b43e9" refkind="member"><highlight class="normal"><sp/><sp/>T_obj*<sp/><ref refid="classBakery_1_1sharedptr_12690c10c5f2e9f06b1518852f02b43e9" kindref="member">m_pobj</ref>;<sp/></highlight><highlight class="comment">//The<sp/>underlying<sp/>instance.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="90"><highlight class="normal">};</highlight></codeline>
<codeline lineno="91"><highlight class="normal"></highlight></codeline>
<codeline lineno="92"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal">&lt;<sp/></highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>T_obj&gt;</highlight></codeline>
<codeline lineno="93" refid="classBakery_1_1sharedptr_151ce729978d0941d4edf45303edd5dc2" refkind="member"><highlight class="normal"><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr&lt;T_obj&gt;::sharedptr</ref>()</highlight></codeline>
<codeline lineno="94"><highlight class="normal">:<sp/>m_pRefCount(0),<sp/>m_pobj(0)</highlight></codeline>
<codeline lineno="95"><highlight class="normal">{</highlight></codeline>
<codeline lineno="96"><highlight class="normal"></highlight></codeline>
<codeline lineno="97"><highlight class="normal">}</highlight></codeline>
<codeline lineno="98"><highlight class="normal"></highlight></codeline>
<codeline lineno="99"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal">&lt;<sp/></highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>T_obj&gt;</highlight></codeline>
<codeline lineno="100" refid="classBakery_1_1sharedptr_1e1a50215974894144db8941353f34d0e" refkind="member"><highlight class="normal"><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr&lt;T_obj&gt;::sharedptr</ref>(T_obj*<sp/>pobj)</highlight></codeline>
<codeline lineno="101"><highlight class="normal">:<sp/>m_pRefCount(0),<sp/>m_pobj(pobj)</highlight></codeline>
<codeline lineno="102"><highlight class="normal">{</highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Start<sp/>refcounting:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classBakery_1_1sharedptr_18713e07f838779557de89ea184dc9a3f" kindref="member">ref</ref>();</highlight></codeline>
<codeline lineno="105"><highlight class="normal">}</highlight></codeline>
<codeline lineno="106"><highlight class="normal"></highlight></codeline>
<codeline lineno="107"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal">&lt;<sp/></highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>T_obj&gt;</highlight></codeline>
<codeline lineno="108" refid="classBakery_1_1sharedptr_1d7286e52454d63a602351439210df05c" refkind="member"><highlight class="normal"><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr&lt;T_obj&gt;::sharedptr</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr&lt;T_obj&gt;</ref>&amp;<sp/>src)</highlight></codeline>
<codeline lineno="109"><highlight class="normal">:<sp/><ref refid="classBakery_1_1sharedptr_1e5bf7b5de95fdde3eb6904e192040fe8" kindref="member">m_pRefCount</ref>(src.<ref refid="classBakery_1_1sharedptr_1e5bf7b5de95fdde3eb6904e192040fe8" kindref="member">m_pRefCount</ref>),<sp/><ref refid="classBakery_1_1sharedptr_12690c10c5f2e9f06b1518852f02b43e9" kindref="member">m_pobj</ref>(src.<ref refid="classBakery_1_1sharedptr_12690c10c5f2e9f06b1518852f02b43e9" kindref="member">m_pobj</ref>)</highlight></codeline>
<codeline lineno="110"><highlight class="normal">{</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classBakery_1_1sharedptr_18713e07f838779557de89ea184dc9a3f" kindref="member">ref</ref>();</highlight></codeline>
<codeline lineno="112"><highlight class="normal">}</highlight></codeline>
<codeline lineno="113"><highlight class="normal"></highlight></codeline>
<codeline lineno="114"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal">&lt;<sp/></highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>T_obj&gt;</highlight></codeline>
<codeline lineno="115" refid="classBakery_1_1sharedptr_130beb1671a14c2a4f4131405500ccc1c" refkind="member"><highlight class="normal"><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr&lt;T_obj&gt;</ref>&amp;<sp/><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr&lt;T_obj&gt;::operator=</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr&lt;T_obj&gt;</ref>&amp;<sp/>src)</highlight></codeline>
<codeline lineno="116"><highlight class="normal">{</highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//std::cout<sp/>&lt;&lt;<sp/>&quot;sharedptr&amp;<sp/>operator=(const<sp/>sharedptr&amp;<sp/>src)&quot;<sp/>&lt;&lt;<sp/>std::endl;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(&amp;src<sp/>!=<sp/></highlight><highlight class="keyword">this</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/>{</highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Unref<sp/>any<sp/>existing<sp/>stuff.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//operator=<sp/>can<sp/>never<sp/>run<sp/>before<sp/>a<sp/>constructor,<sp/>so<sp/>these<sp/>values<sp/>will<sp/>be<sp/>initialized<sp/>already.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<ref refid="classBakery_1_1sharedptr_12690c10c5f2e9f06b1518852f02b43e9" kindref="member">m_pobj</ref>)<sp/></highlight><highlight class="comment">//The<sp/>if()<sp/>might<sp/>not<sp/>be<sp/>required.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classBakery_1_1sharedptr_12ef5266b86fb825c0dec0a90b1dc656a" kindref="member">unref</ref>();<sp/></highlight><highlight class="comment">//Could<sp/>cause<sp/>a<sp/>deallocation.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="126"><highlight class="normal"></highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Copy:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classBakery_1_1sharedptr_12690c10c5f2e9f06b1518852f02b43e9" kindref="member">m_pobj</ref><sp/>=<sp/>src.<ref refid="classBakery_1_1sharedptr_12690c10c5f2e9f06b1518852f02b43e9" kindref="member">m_pobj</ref>;</highlight></codeline>
<codeline lineno="129"><highlight class="normal"></highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classBakery_1_1sharedptr_1e5bf7b5de95fdde3eb6904e192040fe8" kindref="member">m_pRefCount</ref><sp/>=<sp/>src.<ref refid="classBakery_1_1sharedptr_1e5bf7b5de95fdde3eb6904e192040fe8" kindref="member">m_pRefCount</ref>;</highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classBakery_1_1sharedptr_18713e07f838779557de89ea184dc9a3f" kindref="member">ref</ref>();</highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="133"><highlight class="normal"></highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>*</highlight><highlight class="keyword">this</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="135"><highlight class="normal">}</highlight></codeline>
<codeline lineno="136"><highlight class="normal"></highlight></codeline>
<codeline lineno="137"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal">&lt;<sp/></highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>T_obj&gt;</highlight></codeline>
<codeline lineno="138" refid="classBakery_1_1sharedptr_166cd61f1d86c307eca633e908e53015a" refkind="member"><highlight class="normal"><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr&lt;T_obj&gt;::~sharedptr</ref>()</highlight></codeline>
<codeline lineno="139"><highlight class="normal">{</highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><ref refid="classBakery_1_1sharedptr_12ef5266b86fb825c0dec0a90b1dc656a" kindref="member">unref</ref>();</highlight></codeline>
<codeline lineno="141"><highlight class="normal">}</highlight></codeline>
<codeline lineno="142"><highlight class="normal"></highlight></codeline>
<codeline lineno="143"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="144"><highlight class="comment">template&lt;<sp/>typename<sp/>T_obj&gt;</highlight></codeline>
<codeline lineno="145"><highlight class="comment">void<sp/>sharedptr&lt;T_obj&gt;::clear_without_deallocating()</highlight></codeline>
<codeline lineno="146"><highlight class="comment">{</highlight></codeline>
<codeline lineno="147"><highlight class="comment"><sp/><sp/>m_pobj<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="148"><highlight class="comment">}</highlight></codeline>
<codeline lineno="149"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="150"><highlight class="normal"></highlight></codeline>
<codeline lineno="151"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal">&lt;<sp/></highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>T_obj&gt;</highlight></codeline>
<codeline lineno="152"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="153" refid="classBakery_1_1sharedptr_1d8b9dcc5403fbb5adb63d84fef66b66a" refkind="member"><highlight class="normal">T_obj*<sp/><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr&lt;T_obj&gt;::obj</ref>()</highlight></codeline>
<codeline lineno="154"><highlight class="normal">{</highlight></codeline>
<codeline lineno="155"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classBakery_1_1sharedptr_12690c10c5f2e9f06b1518852f02b43e9" kindref="member">m_pobj</ref>;</highlight></codeline>
<codeline lineno="156"><highlight class="normal">}</highlight></codeline>
<codeline lineno="157"><highlight class="normal"></highlight></codeline>
<codeline lineno="158"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal">&lt;<sp/></highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>T_obj&gt;</highlight></codeline>
<codeline lineno="159"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="160" refid="classBakery_1_1sharedptr_18616b27defef4d444fe193e0d8f12abe" refkind="member"><highlight class="normal"></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>T_obj*<sp/><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr&lt;T_obj&gt;::obj</ref>()</highlight><highlight class="keyword"><sp/>const</highlight></codeline>
<codeline lineno="161"><highlight class="keyword"></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classBakery_1_1sharedptr_12690c10c5f2e9f06b1518852f02b43e9" kindref="member">m_pobj</ref>;</highlight></codeline>
<codeline lineno="163"><highlight class="normal">}</highlight></codeline>
<codeline lineno="164"><highlight class="normal"></highlight></codeline>
<codeline lineno="165"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal">&lt;<sp/></highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>T_obj&gt;</highlight></codeline>
<codeline lineno="166"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="167" refid="classBakery_1_1sharedptr_104d2645057df5aff35933d7c4a721f1a" refkind="member"><highlight class="normal">T_obj&amp;<sp/><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr&lt;T_obj&gt;::operator*</ref>()</highlight></codeline>
<codeline lineno="168"><highlight class="normal">{</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>*<ref refid="classBakery_1_1sharedptr_12690c10c5f2e9f06b1518852f02b43e9" kindref="member">m_pobj</ref>;</highlight></codeline>
<codeline lineno="170"><highlight class="normal">}</highlight></codeline>
<codeline lineno="171"><highlight class="normal"></highlight></codeline>
<codeline lineno="172"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal">&lt;<sp/></highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>T_obj&gt;</highlight></codeline>
<codeline lineno="173"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="174" refid="classBakery_1_1sharedptr_1727696dbd7efe33f13eefe955d882f7b" refkind="member"><highlight class="normal"></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>T_obj&amp;<sp/><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr&lt;T_obj&gt;::operator*</ref>()</highlight><highlight class="keyword"><sp/>const</highlight></codeline>
<codeline lineno="175"><highlight class="keyword"></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>*<ref refid="classBakery_1_1sharedptr_12690c10c5f2e9f06b1518852f02b43e9" kindref="member">m_pobj</ref>;</highlight></codeline>
<codeline lineno="177"><highlight class="normal">}</highlight></codeline>
<codeline lineno="178"><highlight class="normal"></highlight></codeline>
<codeline lineno="179"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal">&lt;<sp/></highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>T_obj&gt;</highlight></codeline>
<codeline lineno="180"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="181" refid="classBakery_1_1sharedptr_18e9a6af6a2d80b472669edd1d6c806f5" refkind="member"><highlight class="normal">T_obj*<sp/><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr&lt;T_obj&gt;::operator-&gt;</ref>()</highlight><highlight class="keyword"><sp/>const</highlight></codeline>
<codeline lineno="182"><highlight class="keyword"></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classBakery_1_1sharedptr_12690c10c5f2e9f06b1518852f02b43e9" kindref="member">m_pobj</ref>;</highlight></codeline>
<codeline lineno="184"><highlight class="normal">}</highlight></codeline>
<codeline lineno="185"><highlight class="normal"></highlight></codeline>
<codeline lineno="186"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal"><sp/>&lt;</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>T_obj&gt;</highlight></codeline>
<codeline lineno="187"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="188" refid="classBakery_1_1sharedptr_1c365d19098b216db86f7f38fcbe919ee" refkind="member"><highlight class="normal"><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr&lt;T_obj&gt;::operator bool</ref>()</highlight><highlight class="keyword"><sp/>const</highlight></codeline>
<codeline lineno="189"><highlight class="keyword"></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="190"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(<ref refid="classBakery_1_1sharedptr_12690c10c5f2e9f06b1518852f02b43e9" kindref="member">m_pobj</ref><sp/>!=<sp/>0);</highlight></codeline>
<codeline lineno="191"><highlight class="normal">}</highlight></codeline>
<codeline lineno="192"><highlight class="normal"></highlight></codeline>
<codeline lineno="193"><highlight class="normal"></highlight></codeline>
<codeline lineno="194"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal"><sp/>&lt;</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>T_obj&gt;</highlight></codeline>
<codeline lineno="195"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="196" refid="classBakery_1_1sharedptr_18713e07f838779557de89ea184dc9a3f" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr&lt;T_obj&gt;::ref</ref>()</highlight></codeline>
<codeline lineno="197"><highlight class="normal">{</highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<ref refid="classBakery_1_1sharedptr_12690c10c5f2e9f06b1518852f02b43e9" kindref="member">m_pobj</ref>)<sp/></highlight><highlight class="comment">//Don&apos;t<sp/>waste<sp/>time<sp/>on<sp/>invalid<sp/>instances.<sp/>These<sp/>would<sp/>be<sp/>very<sp/>rare<sp/>anyway,<sp/>and<sp/>intentionally<sp/>created<sp/>with<sp/>(0,0)<sp/>construction.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/>{</highlight></codeline>
<codeline lineno="200"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<ref refid="classBakery_1_1sharedptr_1e5bf7b5de95fdde3eb6904e192040fe8" kindref="member">m_pRefCount</ref><sp/>==<sp/>0)</highlight></codeline>
<codeline lineno="201"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="202"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//std::cout<sp/>&lt;&lt;<sp/>&quot;sharedptr::ref():<sp/>first<sp/>ref&quot;<sp/>&lt;&lt;<sp/>std::endl;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="203"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//First<sp/>ref,<sp/>so<sp/>allocate<sp/>the<sp/>shared<sp/>count:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="204"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classBakery_1_1sharedptr_1e5bf7b5de95fdde3eb6904e192040fe8" kindref="member">m_pRefCount</ref><sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="classBakery_1_1sharedptr_1646d2a5108f6b75ed67450dbcddaf810" kindref="member">size_type</ref>();</highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>*<ref refid="classBakery_1_1sharedptr_1e5bf7b5de95fdde3eb6904e192040fe8" kindref="member">m_pRefCount</ref><sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//std::cout<sp/>&lt;&lt;<sp/>&quot;sharedptr::ref():<sp/>starting<sp/>at&quot;<sp/>&lt;&lt;<sp/>*m_pRefCount<sp/>&lt;&lt;<sp/>std::endl;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="210"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>(*m_pRefCount)++;</highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="212"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="213"><highlight class="normal">}</highlight></codeline>
<codeline lineno="214"><highlight class="normal"></highlight></codeline>
<codeline lineno="215"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal"><sp/>&lt;</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>T_obj&gt;</highlight></codeline>
<codeline lineno="216"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="217" refid="classBakery_1_1sharedptr_12ef5266b86fb825c0dec0a90b1dc656a" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classBakery_1_1sharedptr" kindref="compound" tooltip="A shared reference-counting smart-pointer.">sharedptr&lt;T_obj&gt;::unref</ref>()</highlight></codeline>
<codeline lineno="218"><highlight class="normal">{</highlight></codeline>
<codeline lineno="219"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<ref refid="classBakery_1_1sharedptr_1e5bf7b5de95fdde3eb6904e192040fe8" kindref="member">m_pRefCount</ref>)</highlight></codeline>
<codeline lineno="220"><highlight class="normal"><sp/><sp/>{</highlight></codeline>
<codeline lineno="221"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//std::cout<sp/>&lt;&lt;<sp/>&quot;sharedptr::unref():<sp/>starting<sp/>at<sp/>&quot;<sp/>&lt;&lt;<sp/>*m_pRefCount<sp/>&lt;&lt;<sp/>std::endl;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="222"><highlight class="normal"></highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<sp/>(*<ref refid="classBakery_1_1sharedptr_1e5bf7b5de95fdde3eb6904e192040fe8" kindref="member">m_pRefCount</ref>)<sp/>&gt;<sp/>0<sp/>)</highlight></codeline>
<codeline lineno="224"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(*m_pRefCount)--;</highlight></codeline>
<codeline lineno="225"><highlight class="normal"></highlight></codeline>
<codeline lineno="226"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Unalloc<sp/>if<sp/>this<sp/>is<sp/>the<sp/>last<sp/>user<sp/>of<sp/>the<sp/>obj:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="227"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(*<ref refid="classBakery_1_1sharedptr_1e5bf7b5de95fdde3eb6904e192040fe8" kindref="member">m_pRefCount</ref><sp/>==<sp/>0)</highlight></codeline>
<codeline lineno="228"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<ref refid="classBakery_1_1sharedptr_12690c10c5f2e9f06b1518852f02b43e9" kindref="member">m_pobj</ref>)</highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//try</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="232"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//{</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//std::cout<sp/>&lt;&lt;<sp/>&quot;sharedptr::unref():<sp/>deallocating<sp/>&quot;<sp/>&lt;&lt;<sp/>*m_pRefCount<sp/>&lt;&lt;<sp/>std::endl;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="234"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">delete</highlight><highlight class="normal"><sp/><ref refid="classBakery_1_1sharedptr_12690c10c5f2e9f06b1518852f02b43e9" kindref="member">m_pobj</ref>;</highlight></codeline>
<codeline lineno="235"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classBakery_1_1sharedptr_12690c10c5f2e9f06b1518852f02b43e9" kindref="member">m_pobj</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="236"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//}</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="237"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="238"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>catch(ex_base&amp;)</highlight></codeline>
<codeline lineno="239"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="240"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>//std::cout<sp/>&lt;&lt;<sp/>&quot;sharedptr::unref():<sp/>exception<sp/>thrown<sp/>during<sp/>deallocation.&quot;<sp/>&lt;&lt;<sp/>std::endl;</highlight></codeline>
<codeline lineno="241"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>//Ignore<sp/>it.<sp/>Can&apos;t<sp/>throw<sp/>an<sp/>expection<sp/>up<sp/>to<sp/>the<sp/>destructor.</highlight></codeline>
<codeline lineno="242"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="243"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="244"><highlight class="normal"></highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classBakery_1_1sharedptr_12690c10c5f2e9f06b1518852f02b43e9" kindref="member">m_pobj</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="247"><highlight class="normal"></highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Clear<sp/>ref<sp/>count:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">delete</highlight><highlight class="normal"><sp/><ref refid="classBakery_1_1sharedptr_1e5bf7b5de95fdde3eb6904e192040fe8" kindref="member">m_pRefCount</ref>;</highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classBakery_1_1sharedptr_1e5bf7b5de95fdde3eb6904e192040fe8" kindref="member">m_pRefCount</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="251"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="254"><highlight class="normal"><sp/><sp/>{</highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//std::cout<sp/>&lt;&lt;<sp/>&quot;sharedptr::unref():<sp/>ref<sp/>not<sp/>setup.&quot;<sp/>&lt;&lt;<sp/>std::endl;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="257"><highlight class="normal"></highlight></codeline>
<codeline lineno="258"><highlight class="normal">}</highlight></codeline>
<codeline lineno="259"><highlight class="normal"></highlight></codeline>
<codeline lineno="260"><highlight class="normal"></highlight></codeline>
<codeline lineno="261"><highlight class="normal">}<sp/></highlight><highlight class="comment">//namespace</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="262"><highlight class="normal"></highlight></codeline>
<codeline lineno="263"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/>//BAKERY_UTILITIES_SHAREDPTR_H</highlight></codeline>
<codeline lineno="264"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="/home/murrayc/svn/gnome220/bakery/bakery/Utilities/sharedptr.h"/>
  </compounddef>
</doxygen>
