205 lines
34 KiB
HTML
205 lines
34 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
|
<title>XQilla Simple API Documentation</title>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
|
</head><body>
|
|
<a style="float:right;" href="http://sourceforge.net/projects/xqilla"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=152021&type=2" border="0" alt="SourceForge.net Logo" /></a>
|
|
<!-- Generated by Doxygen 1.8.5 -->
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
|
<li><a href="examples.html"><span>Examples</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>File Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_e3266bbc227f825a287bdb912a8a79c0.html">include</a></li><li class="navelem"><a class="el" href="dir_a1bc92396ffc8a3dc7aa16f9f9aed8c7.html">xqilla</a></li><li class="navelem"><a class="el" href="dir_21314fd8aa3f00deb23a3694b8fb0d10.html">framework</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">ReferenceCounted.hpp</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="ReferenceCounted_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2001, 2008,</span></div>
|
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * DecisionSoft Limited. All rights reserved.</span></div>
|
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.</span></div>
|
|
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * </span></div>
|
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> *</span></div>
|
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span></div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * you may not use this file except in compliance with the License.</span></div>
|
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * You may obtain a copy of the License at</span></div>
|
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> *</span></div>
|
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
|
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> *</span></div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span></div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * See the License for the specific language governing permissions and</span></div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * limitations under the License.</span></div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> */</span></div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> </div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#ifndef _REFERENCECOUNTED_HPP</span></div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor"></span><span class="preprocessor">#define _REFERENCECOUNTED_HPP</span></div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor"></span></div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include <xqilla/framework/XQillaExport.hpp></span></div>
|
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <<a class="code" href="MemoryManager_8hpp.html">xercesc/framework/MemoryManager.hpp</a>></span></div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment">// for null RefCountPointer instances</span></div>
|
|
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="ReferenceCounted_8hpp.html#a0b9d38d36c9739bb9e286ea387daea2b"> 27</a></span> <span class="preprocessor">#define NULLRCP ((void *)0)</span></div>
|
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor"></span></div>
|
|
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="classReferenceCounted.html"> 30</a></span> <span class="keyword">class </span>XQILLA_API <a class="code" href="classReferenceCounted.html">ReferenceCounted</a></div>
|
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> {</div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classReferenceCounted.html#a5dc30ae895897b5008dc71ea26f175a1"> 33</a></span>  <a class="code" href="classReferenceCounted.html#a5dc30ae895897b5008dc71ea26f175a1">ReferenceCounted</a>()</div>
|
|
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  : _ref_count(0) {}</div>
|
|
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classReferenceCounted.html#a039b1f45b252a226c55598f31e3993cc"> 35</a></span>  <span class="keyword">virtual</span> <a class="code" href="classReferenceCounted.html#a039b1f45b252a226c55598f31e3993cc">~ReferenceCounted</a>() {}</div>
|
|
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="classReferenceCounted.html#a386d6aab0473c14a32ce81226b939cb3"> 38</a></span>  <span class="keywordtype">void</span> <a class="code" href="classReferenceCounted.html#a386d6aab0473c14a32ce81226b939cb3">incrementRefCount</a>()<span class="keyword"> const</span></div>
|
|
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  ++<span class="keyword">const_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>&<span class="keyword">></span>(_ref_count);</div>
|
|
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  }</div>
|
|
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classReferenceCounted.html#a426ce234c4797e7150f44a9bb50537b5"> 44</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classReferenceCounted.html#a426ce234c4797e7150f44a9bb50537b5">decrementRefCount</a>()<span class="keyword"> const</span></div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keywordflow">if</span>(--const_cast<unsigned int&>(_ref_count) == 0) {</div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keyword">delete</span> <span class="keyword">this</span>;</div>
|
|
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  }</div>
|
|
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  }</div>
|
|
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> </div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="classReferenceCounted.html#a462eca1b13abf41350ef3d969435db2c"> 51</a></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classReferenceCounted.html#a462eca1b13abf41350ef3d969435db2c">getRefCount</a>()<span class="keyword"> const</span></div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="keywordflow">return</span> _ref_count;</div>
|
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  }</div>
|
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="keyword">protected</span>:</div>
|
|
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classReferenceCounted.html#a09e5d033e5224cd8b94cdc061cb56fe0"> 57</a></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classReferenceCounted.html#a09e5d033e5224cd8b94cdc061cb56fe0">_ref_count</a>; <span class="comment">// mutable</span></div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> };</div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div>
|
|
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="classRefCountPointer.html"> 61</a></span> <span class="keyword">template</span><<span class="keyword">class</span> T> <span class="keyword">class </span><a class="code" href="classRefCountPointer.html">RefCountPointer</a></div>
|
|
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> {</div>
|
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="classRefCountPointer.html#a19e599ede99710afeca89ba65cdcb2a1"> 64</a></span>  <a class="code" href="classRefCountPointer.html#a19e599ede99710afeca89ba65cdcb2a1">RefCountPointer</a>(T *p = 0) : <a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a>(p)</div>
|
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  {</div>
|
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordflow">if</span>(<a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a> != 0) <a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a>->incrementRefCount();</div>
|
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  }</div>
|
|
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> </div>
|
|
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classRefCountPointer.html#afcdde22eed8a271196e22f1ef5e6b48b"> 69</a></span>  <span class="keyword">template</span><<span class="keyword">class</span> T2> <a class="code" href="classRefCountPointer.html#afcdde22eed8a271196e22f1ef5e6b48b">RefCountPointer</a>(<span class="keyword">const</span> <a class="code" href="classRefCountPointer.html">RefCountPointer<T2></a> &o) : <a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a>((T*)(T2*)o)</div>
|
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  {</div>
|
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <span class="keywordflow">if</span>(<a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a> != 0) <a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a>->incrementRefCount();</div>
|
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  }</div>
|
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> </div>
|
|
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="classRefCountPointer.html#adeb7f9624e9181b2b04950c38d4a8fce"> 74</a></span>  <a class="code" href="classRefCountPointer.html#adeb7f9624e9181b2b04950c38d4a8fce">RefCountPointer</a>(<span class="keyword">const</span> <a class="code" href="classRefCountPointer.html">RefCountPointer<T></a> &o) : <a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a>(o.<a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a>)</div>
|
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  {</div>
|
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordflow">if</span>(<a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a> != 0) <a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a>->incrementRefCount();</div>
|
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  }</div>
|
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> </div>
|
|
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classRefCountPointer.html#aaed4cb34420ba9a5190e142cdb3c786d"> 79</a></span>  <a class="code" href="classRefCountPointer.html">RefCountPointer</a> &<a class="code" href="classRefCountPointer.html#aaed4cb34420ba9a5190e142cdb3c786d">operator=</a>(<span class="keyword">const</span> <a class="code" href="classRefCountPointer.html">RefCountPointer<T></a> &o)</div>
|
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  {</div>
|
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="keywordflow">if</span>(<a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a> != o.<a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a>) {</div>
|
|
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keywordflow">if</span>(<a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a> != 0) <a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a>->decrementRefCount();</div>
|
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a> = o.<a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a>;</div>
|
|
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordflow">if</span>(<a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a> != 0) <a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a>->incrementRefCount();</div>
|
|
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  }</div>
|
|
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
|
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  }</div>
|
|
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> </div>
|
|
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classRefCountPointer.html#a15aac5f85305a123c357bbddf5030ef3"> 89</a></span>  <a class="code" href="classRefCountPointer.html#a15aac5f85305a123c357bbddf5030ef3">~RefCountPointer</a>()</div>
|
|
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  {</div>
|
|
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keywordflow">if</span>(<a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a> != 0) <a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a>->decrementRefCount();</div>
|
|
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  }</div>
|
|
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> </div>
|
|
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="classRefCountPointer.html#a19c9fb1b8719f5b010c0943e3594296a"> 94</a></span>  T *<a class="code" href="classRefCountPointer.html#a19c9fb1b8719f5b010c0943e3594296a">operator-></a>()<span class="keyword"> const</span></div>
|
|
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keywordflow">return</span> <a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a>;</div>
|
|
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  }</div>
|
|
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> </div>
|
|
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="classRefCountPointer.html#a6522f582ede5cc4a36fc990bf5165f7d"> 99</a></span>  <span class="keyword">operator</span> T*() <span class="keyword">const</span></div>
|
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  {</div>
|
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keywordflow">return</span> <a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a>;</div>
|
|
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  }</div>
|
|
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span> </div>
|
|
<div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="classRefCountPointer.html#aad04c84082534aa246546bd0c3355848"> 104</a></span>  T *<span class="keyword">get</span>() <span class="keyword">const</span></div>
|
|
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  {</div>
|
|
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="keywordflow">return</span> <a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a>;</div>
|
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  }</div>
|
|
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> </div>
|
|
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classRefCountPointer.html#a62f15012bafcbe02f0dcdbd2c0a749ee"> 109</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classRefCountPointer.html#a62f15012bafcbe02f0dcdbd2c0a749ee">isNull</a>()<span class="keyword"> const</span></div>
|
|
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <span class="keywordflow">return</span> (<a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a> == 0);</div>
|
|
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  }</div>
|
|
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> </div>
|
|
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classRefCountPointer.html#a1de8e3bd6a0af6661047049983243e1c"> 114</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classRefCountPointer.html#a1de8e3bd6a0af6661047049983243e1c">notNull</a>()<span class="keyword"> const</span></div>
|
|
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="keywordflow">return</span> (<a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a> != 0);</div>
|
|
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  }</div>
|
|
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> </div>
|
|
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="keyword">protected</span>:</div>
|
|
<div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a"> 120</a></span>  T *<a class="code" href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">_p</a>;</div>
|
|
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span> };</div>
|
|
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> </div>
|
|
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span> <span class="keyword">template</span><<span class="keyword">class</span> T1, <span class="keyword">class</span> T2></div>
|
|
<div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="ReferenceCounted_8hpp.html#a4bec5cbdca1b3e8f9965c9f154f4cacf"> 124</a></span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="ReferenceCounted_8hpp.html#a4bec5cbdca1b3e8f9965c9f154f4cacf">operator==</a>(<span class="keyword">const</span> <a class="code" href="classRefCountPointer.html">RefCountPointer<T1></a> &a, <span class="keyword">const</span> <a class="code" href="classRefCountPointer.html">RefCountPointer<T2></a> &b)</div>
|
|
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> {</div>
|
|
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keywordflow">return</span> (<span class="keywordtype">void</span>*)(T1*)a == (<span class="keywordtype">void</span>*)(T2*)b;</div>
|
|
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span> }</div>
|
|
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span> </div>
|
|
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span> <span class="keyword">template</span><<span class="keyword">class</span> T1, <span class="keyword">class</span> T2></div>
|
|
<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="ReferenceCounted_8hpp.html#a6213078fb81c3272e67abadae990ece9"> 130</a></span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="ReferenceCounted_8hpp.html#a6213078fb81c3272e67abadae990ece9">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classRefCountPointer.html">RefCountPointer<T1></a> &a, <span class="keyword">const</span> <a class="code" href="classRefCountPointer.html">RefCountPointer<T2></a> &b)</div>
|
|
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span> {</div>
|
|
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keywordflow">return</span> (<span class="keywordtype">void</span>*)(T1*)a != (<span class="keywordtype">void</span>*)(T2*)b;</div>
|
|
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span> }</div>
|
|
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span> </div>
|
|
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span> <span class="keyword">template</span><<span class="keyword">class</span> T></div>
|
|
<div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="ReferenceCounted_8hpp.html#ae25a499f63ae19762f3d2e67a3a83656"> 136</a></span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="ReferenceCounted_8hpp.html#a4bec5cbdca1b3e8f9965c9f154f4cacf">operator==</a>(<span class="keyword">const</span> <a class="code" href="classRefCountPointer.html">RefCountPointer<T></a> &a, <span class="keywordtype">void</span> *b)</div>
|
|
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span> {</div>
|
|
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="keywordflow">return</span> (T*)a == (T*)b;</div>
|
|
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span> }</div>
|
|
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span> </div>
|
|
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span> <span class="keyword">template</span><<span class="keyword">class</span> T></div>
|
|
<div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="ReferenceCounted_8hpp.html#a887df24a18810316c056818d5f938733"> 142</a></span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="ReferenceCounted_8hpp.html#a6213078fb81c3272e67abadae990ece9">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classRefCountPointer.html">RefCountPointer<T></a> &a, <span class="keywordtype">void</span> *b)</div>
|
|
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span> {</div>
|
|
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keywordflow">return</span> (T*)a != (T*)b;</div>
|
|
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span> }</div>
|
|
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span> </div>
|
|
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span> <span class="preprocessor">#endif</span></div>
|
|
<div class="ttc" id="MemoryManager_8hpp_html"><div class="ttname"><a href="MemoryManager_8hpp.html">MemoryManager.hpp</a></div></div>
|
|
<div class="ttc" id="classReferenceCounted_html"><div class="ttname"><a href="classReferenceCounted.html">ReferenceCounted</a></div><div class="ttdoc">Super class for reference counted classes. </div><div class="ttdef"><b>Definition:</b> ReferenceCounted.hpp:30</div></div>
|
|
<div class="ttc" id="classRefCountPointer_html_aaed4cb34420ba9a5190e142cdb3c786d"><div class="ttname"><a href="classRefCountPointer.html#aaed4cb34420ba9a5190e142cdb3c786d">RefCountPointer::operator=</a></div><div class="ttdeci">RefCountPointer & operator=(const RefCountPointer< T > &o)</div><div class="ttdef"><b>Definition:</b> ReferenceCounted.hpp:79</div></div>
|
|
<div class="ttc" id="classRefCountPointer_html"><div class="ttname"><a href="classRefCountPointer.html">RefCountPointer</a></div><div class="ttdoc">Super class of all the reference counted wrappers for Items. </div><div class="ttdef"><b>Definition:</b> ReferenceCounted.hpp:61</div></div>
|
|
<div class="ttc" id="classReferenceCounted_html_a386d6aab0473c14a32ce81226b939cb3"><div class="ttname"><a href="classReferenceCounted.html#a386d6aab0473c14a32ce81226b939cb3">ReferenceCounted::incrementRefCount</a></div><div class="ttdeci">void incrementRefCount() const </div><div class="ttdoc">Increment the reference count. </div><div class="ttdef"><b>Definition:</b> ReferenceCounted.hpp:38</div></div>
|
|
<div class="ttc" id="classRefCountPointer_html_abdad2242b59d285fe75208c5fed5a90a"><div class="ttname"><a href="classRefCountPointer.html#abdad2242b59d285fe75208c5fed5a90a">RefCountPointer::_p</a></div><div class="ttdeci">T * _p</div><div class="ttdef"><b>Definition:</b> ReferenceCounted.hpp:120</div></div>
|
|
<div class="ttc" id="ReferenceCounted_8hpp_html_a4bec5cbdca1b3e8f9965c9f154f4cacf"><div class="ttname"><a href="ReferenceCounted_8hpp.html#a4bec5cbdca1b3e8f9965c9f154f4cacf">operator==</a></div><div class="ttdeci">bool operator==(const RefCountPointer< T1 > &a, const RefCountPointer< T2 > &b)</div><div class="ttdef"><b>Definition:</b> ReferenceCounted.hpp:124</div></div>
|
|
<div class="ttc" id="classRefCountPointer_html_a19c9fb1b8719f5b010c0943e3594296a"><div class="ttname"><a href="classRefCountPointer.html#a19c9fb1b8719f5b010c0943e3594296a">RefCountPointer::operator-></a></div><div class="ttdeci">T * operator->() const </div><div class="ttdef"><b>Definition:</b> ReferenceCounted.hpp:94</div></div>
|
|
<div class="ttc" id="classReferenceCounted_html_a462eca1b13abf41350ef3d969435db2c"><div class="ttname"><a href="classReferenceCounted.html#a462eca1b13abf41350ef3d969435db2c">ReferenceCounted::getRefCount</a></div><div class="ttdeci">unsigned int getRefCount() const </div><div class="ttdef"><b>Definition:</b> ReferenceCounted.hpp:51</div></div>
|
|
<div class="ttc" id="classReferenceCounted_html_a09e5d033e5224cd8b94cdc061cb56fe0"><div class="ttname"><a href="classReferenceCounted.html#a09e5d033e5224cd8b94cdc061cb56fe0">ReferenceCounted::_ref_count</a></div><div class="ttdeci">unsigned int _ref_count</div><div class="ttdef"><b>Definition:</b> ReferenceCounted.hpp:57</div></div>
|
|
<div class="ttc" id="ReferenceCounted_8hpp_html_a6213078fb81c3272e67abadae990ece9"><div class="ttname"><a href="ReferenceCounted_8hpp.html#a6213078fb81c3272e67abadae990ece9">operator!=</a></div><div class="ttdeci">bool operator!=(const RefCountPointer< T1 > &a, const RefCountPointer< T2 > &b)</div><div class="ttdef"><b>Definition:</b> ReferenceCounted.hpp:130</div></div>
|
|
<div class="ttc" id="classRefCountPointer_html_afcdde22eed8a271196e22f1ef5e6b48b"><div class="ttname"><a href="classRefCountPointer.html#afcdde22eed8a271196e22f1ef5e6b48b">RefCountPointer::RefCountPointer</a></div><div class="ttdeci">RefCountPointer(const RefCountPointer< T2 > &o)</div><div class="ttdef"><b>Definition:</b> ReferenceCounted.hpp:69</div></div>
|
|
<div class="ttc" id="classReferenceCounted_html_a039b1f45b252a226c55598f31e3993cc"><div class="ttname"><a href="classReferenceCounted.html#a039b1f45b252a226c55598f31e3993cc">ReferenceCounted::~ReferenceCounted</a></div><div class="ttdeci">virtual ~ReferenceCounted()</div><div class="ttdef"><b>Definition:</b> ReferenceCounted.hpp:35</div></div>
|
|
<div class="ttc" id="classRefCountPointer_html_a62f15012bafcbe02f0dcdbd2c0a749ee"><div class="ttname"><a href="classRefCountPointer.html#a62f15012bafcbe02f0dcdbd2c0a749ee">RefCountPointer::isNull</a></div><div class="ttdeci">bool isNull() const </div><div class="ttdef"><b>Definition:</b> ReferenceCounted.hpp:109</div></div>
|
|
<div class="ttc" id="classReferenceCounted_html_a426ce234c4797e7150f44a9bb50537b5"><div class="ttname"><a href="classReferenceCounted.html#a426ce234c4797e7150f44a9bb50537b5">ReferenceCounted::decrementRefCount</a></div><div class="ttdeci">virtual void decrementRefCount() const </div><div class="ttdoc">Decrement the reference count, deleting if it becomes zero. </div><div class="ttdef"><b>Definition:</b> ReferenceCounted.hpp:44</div></div>
|
|
<div class="ttc" id="classRefCountPointer_html_a1de8e3bd6a0af6661047049983243e1c"><div class="ttname"><a href="classRefCountPointer.html#a1de8e3bd6a0af6661047049983243e1c">RefCountPointer::notNull</a></div><div class="ttdeci">bool notNull() const </div><div class="ttdef"><b>Definition:</b> ReferenceCounted.hpp:114</div></div>
|
|
<div class="ttc" id="classRefCountPointer_html_a19e599ede99710afeca89ba65cdcb2a1"><div class="ttname"><a href="classRefCountPointer.html#a19e599ede99710afeca89ba65cdcb2a1">RefCountPointer::RefCountPointer</a></div><div class="ttdeci">RefCountPointer(T *p=0)</div><div class="ttdef"><b>Definition:</b> ReferenceCounted.hpp:64</div></div>
|
|
<div class="ttc" id="classReferenceCounted_html_a5dc30ae895897b5008dc71ea26f175a1"><div class="ttname"><a href="classReferenceCounted.html#a5dc30ae895897b5008dc71ea26f175a1">ReferenceCounted::ReferenceCounted</a></div><div class="ttdeci">ReferenceCounted()</div><div class="ttdef"><b>Definition:</b> ReferenceCounted.hpp:33</div></div>
|
|
<div class="ttc" id="classRefCountPointer_html_a15aac5f85305a123c357bbddf5030ef3"><div class="ttname"><a href="classRefCountPointer.html#a15aac5f85305a123c357bbddf5030ef3">RefCountPointer::~RefCountPointer</a></div><div class="ttdeci">~RefCountPointer()</div><div class="ttdef"><b>Definition:</b> ReferenceCounted.hpp:89</div></div>
|
|
<div class="ttc" id="classRefCountPointer_html_adeb7f9624e9181b2b04950c38d4a8fce"><div class="ttname"><a href="classRefCountPointer.html#adeb7f9624e9181b2b04950c38d4a8fce">RefCountPointer::RefCountPointer</a></div><div class="ttdeci">RefCountPointer(const RefCountPointer< T > &o)</div><div class="ttdef"><b>Definition:</b> ReferenceCounted.hpp:74</div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.5
|
|
</small></address>
|
|
</body>
|
|
</html>
|