blob: 9466ae97d14b56d4546214aa8155822b2facab03 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="canonical" href="https://ignite.apache.org/releases/2.6.0/cppdoc/reference_8h_source.html" />
<META NAME="ROBOTS" CONTENT="NOINDEX">
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>&nbsp; Apache Ignite C++: reference.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-61232409-1', 'auto');
ga('send', 'pageview');
</script></head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="ignite_logo.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">&nbsp; Apache Ignite C++
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;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>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_bdd9a5d540de89e9fe90efdfc6973a4f.html">common</a></li><li class="navelem"><a class="el" href="dir_11fbc4217d50ab21044e5ad6614aede5.html">include</a></li><li class="navelem"><a class="el" href="dir_2dedece15635f75054d44afc50ccfbaf.html">ignite</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">reference.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="reference_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> * contributor license agreements. See the NOTICE file distributed with</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * this work for additional information regarding copyright ownership.</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * (the &quot;License&quot;); you may not use this file except in compliance with</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> * the License. You may obtain a copy of the License at</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * limitations under the License.</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#ifndef _IGNITE_COMMON_REFERENCE</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#define _IGNITE_COMMON_REFERENCE</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &lt;cstddef&gt;</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#include &lt;ignite/common/common.h&gt;</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &lt;ignite/common/concurrent.h&gt;</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &lt;ignite/common/reference_impl.h&gt;</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceignite.html">ignite</a></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;{</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classignite_1_1Reference.html"> 35</a></span>&#160; <span class="keyword">class </span><a class="code" href="classignite_1_1Reference.html">Reference</a>;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classignite_1_1ConstReference.html"> 47</a></span>&#160; <span class="keyword">class </span><a class="code" href="classignite_1_1ConstReference.html">ConstReference</a></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; {</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span>&gt;</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classignite_1_1ConstReference.html">ConstReference</a>;</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span>&gt;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classignite_1_1Reference.html">Reference</a>;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classignite_1_1ConstReference.html#a63f63927e65aea9923eb6b207352d7e3"> 59</a></span>&#160; <a class="code" href="classignite_1_1ConstReference.html#a63f63927e65aea9923eb6b207352d7e3">ConstReference</a>() :</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; ptr(),</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; offset(0)</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; {</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="comment">// No-op.</span></div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; }</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="classignite_1_1ConstReference.html#a6ea08f582e635a46f00a7c97f323118d"> 72</a></span>&#160; <span class="keyword">explicit</span> <a class="code" href="classignite_1_1ConstReference.html#a6ea08f582e635a46f00a7c97f323118d">ConstReference</a>(common::ConstReferenceImplBase* ptr, ptrdiff_t offset = 0) :</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; ptr(ptr),</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; offset(offset)</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; {</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <span class="comment">// No-op.</span></div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; }</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="classignite_1_1ConstReference.html#a95beded1e753e6d23535304d5c3c09ea"> 84</a></span>&#160; <a class="code" href="classignite_1_1ConstReference.html#a95beded1e753e6d23535304d5c3c09ea">ConstReference</a>(<span class="keyword">const</span> <a class="code" href="classignite_1_1ConstReference.html">ConstReference</a>&amp; other) :</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; ptr(other.ptr),</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; offset(other.offset)</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; {</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="comment">// No-op.</span></div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; }</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T2&gt;</div><div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="classignite_1_1ConstReference.html#ab9d8957625a01e494bf2d931c84a0bbb"> 100</a></span>&#160; <a class="code" href="classignite_1_1ConstReference.html#ab9d8957625a01e494bf2d931c84a0bbb">ConstReference</a>(<span class="keyword">const</span> <a class="code" href="classignite_1_1ConstReference.html">ConstReference&lt;T2&gt;</a>&amp; other) :</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; ptr(other.ptr),</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; offset(other.offset)</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; {</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; T2* p0 = <span class="keyword">reinterpret_cast&lt;</span>T2*<span class="keyword">&gt;</span>(common::POINTER_CAST_MAGIC_NUMBER);</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; T* p1 = <span class="keyword">static_cast&lt;</span>T*<span class="keyword">&gt;</span>(p0);</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; ptrdiff_t diff = <span class="keyword">reinterpret_cast&lt;</span>ptrdiff_t<span class="keyword">&gt;</span>(p1) - reinterpret_cast&lt;ptrdiff_t&gt;(p0);</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; offset += diff;</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; }</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="classignite_1_1ConstReference.html#a32b372113f08ffa0bd798613dd7bef8e"> 116</a></span>&#160; <a class="code" href="classignite_1_1ConstReference.html">ConstReference</a>&amp; <a class="code" href="classignite_1_1ConstReference.html#a32b372113f08ffa0bd798613dd7bef8e">operator=</a>(<span class="keyword">const</span> <a class="code" href="classignite_1_1ConstReference.html">ConstReference</a>&amp; other)</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; {</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; ptr = other.ptr;</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; offset = other.offset;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; }</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; </div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T2&gt;</div><div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="classignite_1_1ConstReference.html#a407552c66ea32aa700e6523832f6efb6"> 133</a></span>&#160; <a class="code" href="classignite_1_1ConstReference.html">ConstReference</a>&amp; <a class="code" href="classignite_1_1ConstReference.html#a407552c66ea32aa700e6523832f6efb6">operator=</a>(<span class="keyword">const</span> <a class="code" href="classignite_1_1ConstReference.html">ConstReference&lt;T2&gt;</a>&amp; other)</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; {</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; ptr = other.ptr;</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; offset = other.offset;</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; T2* p0 = <span class="keyword">reinterpret_cast&lt;</span>T2*<span class="keyword">&gt;</span>(common::POINTER_CAST_MAGIC_NUMBER);</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; T* p1 = <span class="keyword">static_cast&lt;</span>T*<span class="keyword">&gt;</span>(p0);</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; ptrdiff_t diff = <span class="keyword">reinterpret_cast&lt;</span>ptrdiff_t<span class="keyword">&gt;</span>(p1) - reinterpret_cast&lt;ptrdiff_t&gt;(p0);</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; offset += diff;</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; }</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="classignite_1_1ConstReference.html#a8969e0b386401978058310d6dc2a126f"> 150</a></span>&#160; <a class="code" href="classignite_1_1ConstReference.html#a8969e0b386401978058310d6dc2a126f">~ConstReference</a>()</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; {</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; <span class="comment">// No-op.</span></div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; }</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;</div><div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="classignite_1_1ConstReference.html#a1328b74243e12ccddd0fdbc2b81ebe88"> 163</a></span>&#160; <span class="keyword">const</span> T* <a class="code" href="classignite_1_1ConstReference.html#a1328b74243e12ccddd0fdbc2b81ebe88">Get</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160;<span class="keyword"> </span>{</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span>T*<span class="keyword">&gt;</span>(<span class="keyword">reinterpret_cast&lt;</span>ptrdiff_t<span class="keyword">&gt;</span>(ptr.Get()-&gt;Get()) + offset);</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; }</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="classignite_1_1ConstReference.html#ab23dcbb1d85082d3e51f8e21cff45bff"> 173</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classignite_1_1ConstReference.html#ab23dcbb1d85082d3e51f8e21cff45bff">IsNull</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160;<span class="keyword"> </span>{</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; <span class="keyword">const</span> common::ConstReferenceImplBase* raw = ptr.Get();</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <span class="keywordflow">return</span> !raw || !raw-&gt;Get();</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; }</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160;</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; common::concurrent::SharedPointer&lt;common::ConstReferenceImplBase&gt; ptr;</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; ptrdiff_t offset;</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; };</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160;</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; <span class="keyword">class </span><a class="code" href="classignite_1_1Reference.html">Reference</a></div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; {</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span>&gt;</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classignite_1_1Reference.html">Reference</a>;</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00205"></a><span class="lineno"><a class="line" href="classignite_1_1Reference.html#ad5f8125a11a0a61673858c6e75ced9c2"> 205</a></span>&#160; <a class="code" href="classignite_1_1Reference.html#ad5f8125a11a0a61673858c6e75ced9c2">Reference</a>() :</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; ptr(),</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; offset(0)</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; {</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; <span class="comment">// No-op.</span></div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; }</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160;</div><div class="line"><a name="l00218"></a><span class="lineno"><a class="line" href="classignite_1_1Reference.html#a447aa7f80238431a16f32ce60e453b26"> 218</a></span>&#160; <span class="keyword">explicit</span> <a class="code" href="classignite_1_1Reference.html#a447aa7f80238431a16f32ce60e453b26">Reference</a>(common::ReferenceImplBase* ptr, ptrdiff_t offset = 0) :</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; ptr(ptr),</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; offset(offset)</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; {</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; <span class="comment">// No-op.</span></div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; }</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160;</div><div class="line"><a name="l00230"></a><span class="lineno"><a class="line" href="classignite_1_1Reference.html#a052137299ad55af40b28018d3c63c167"> 230</a></span>&#160; <a class="code" href="classignite_1_1Reference.html#a052137299ad55af40b28018d3c63c167">Reference</a>(<span class="keyword">const</span> <a class="code" href="classignite_1_1Reference.html">Reference</a>&amp; other) :</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; ptr(other.ptr),</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; offset(other.offset)</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; {</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; <span class="comment">// No-op.</span></div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; }</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160;</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T2&gt;</div><div class="line"><a name="l00245"></a><span class="lineno"><a class="line" href="classignite_1_1Reference.html#a3a779a19fd6c4a8a4e189ec46213ce10"> 245</a></span>&#160; <a class="code" href="classignite_1_1Reference.html#a3a779a19fd6c4a8a4e189ec46213ce10">Reference</a>(<span class="keyword">const</span> <a class="code" href="classignite_1_1Reference.html">Reference&lt;T2&gt;</a>&amp; other) :</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; ptr(other.ptr),</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; offset(other.offset)</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; {</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; T2* p0 = <span class="keyword">reinterpret_cast&lt;</span>T2*<span class="keyword">&gt;</span>(common::POINTER_CAST_MAGIC_NUMBER);</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; T* p1 = <span class="keyword">static_cast&lt;</span>T*<span class="keyword">&gt;</span>(p0);</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160;</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; ptrdiff_t diff = <span class="keyword">reinterpret_cast&lt;</span>ptrdiff_t<span class="keyword">&gt;</span>(p1) - reinterpret_cast&lt;ptrdiff_t&gt;(p0);</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; offset += diff;</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; }</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160;</div><div class="line"><a name="l00261"></a><span class="lineno"><a class="line" href="classignite_1_1Reference.html#a6c7943df1753b8c13cd200347843424d"> 261</a></span>&#160; <a class="code" href="classignite_1_1Reference.html">Reference</a>&amp; <a class="code" href="classignite_1_1Reference.html#a6c7943df1753b8c13cd200347843424d">operator=</a>(<span class="keyword">const</span> <a class="code" href="classignite_1_1Reference.html">Reference</a>&amp; other)</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; {</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; ptr = other.ptr;</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; offset = other.offset;</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160;</div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; }</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; </div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T2&gt;</div><div class="line"><a name="l00277"></a><span class="lineno"><a class="line" href="classignite_1_1Reference.html#afdf65f728290032bec9def699482586b"> 277</a></span>&#160; <a class="code" href="classignite_1_1Reference.html">Reference</a>&amp; <a class="code" href="classignite_1_1Reference.html#afdf65f728290032bec9def699482586b">operator=</a>(<span class="keyword">const</span> <a class="code" href="classignite_1_1Reference.html">Reference&lt;T2&gt;</a>&amp; other)</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; {</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160; ptr = other.ptr;</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160; offset = other.offset;</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160;</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; T2* p0 = <span class="keyword">reinterpret_cast&lt;</span>T2*<span class="keyword">&gt;</span>(common::POINTER_CAST_MAGIC_NUMBER);</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; T* p1 = <span class="keyword">static_cast&lt;</span>T*<span class="keyword">&gt;</span>(p0);</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160;</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; ptrdiff_t diff = <span class="keyword">reinterpret_cast&lt;</span>ptrdiff_t<span class="keyword">&gt;</span>(p1) - reinterpret_cast&lt;ptrdiff_t&gt;(p0);</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; offset += diff;</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160;</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; }</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160;</div><div class="line"><a name="l00294"></a><span class="lineno"><a class="line" href="classignite_1_1Reference.html#aa65cdfb8035bf373b8b588ac2f1f8df7"> 294</a></span>&#160; <a class="code" href="classignite_1_1Reference.html#aa65cdfb8035bf373b8b588ac2f1f8df7">~Reference</a>()</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; {</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; <span class="comment">// No-op.</span></div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160; }</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160;</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T2&gt;</div><div class="line"><a name="l00307"></a><span class="lineno"><a class="line" href="classignite_1_1Reference.html#afd2dae4aa5c8210ae2f4b1c606a023bd"> 307</a></span>&#160; <span class="keyword">operator</span> <a class="code" href="classignite_1_1ConstReference.html">ConstReference&lt;T2&gt;</a>()</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; {</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160; <a class="code" href="classignite_1_1ConstReference.html">ConstReference&lt;T2&gt;</a> cr;</div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160;</div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; cr.ptr = ptr;</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; cr.offset = offset;</div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160;</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; T2* p0 = <span class="keyword">reinterpret_cast&lt;</span>T2*<span class="keyword">&gt;</span>(common::POINTER_CAST_MAGIC_NUMBER);</div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160; <span class="keyword">const</span> T* p1 = <span class="keyword">static_cast&lt;</span>T*<span class="keyword">&gt;</span>(p0);</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160;</div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160; ptrdiff_t diff = <span class="keyword">reinterpret_cast&lt;</span>ptrdiff_t<span class="keyword">&gt;</span>(p1) - reinterpret_cast&lt;ptrdiff_t&gt;(p0);</div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160; cr.offset -= diff;</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160;</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160; <span class="keywordflow">return</span> cr;</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160; }</div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160;</div><div class="line"><a name="l00331"></a><span class="lineno"><a class="line" href="classignite_1_1Reference.html#ab0d0b94ad24eb93ec1f89d253d5ff2ff"> 331</a></span>&#160; <span class="keyword">const</span> T* <a class="code" href="classignite_1_1Reference.html#ab0d0b94ad24eb93ec1f89d253d5ff2ff">Get</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160;<span class="keyword"> </span>{</div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160; <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span>T*<span class="keyword">&gt;</span>(<span class="keyword">reinterpret_cast&lt;</span>ptrdiff_t<span class="keyword">&gt;</span>(ptr.Get()-&gt;Get()) + offset);</div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160; }</div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160;</div><div class="line"><a name="l00344"></a><span class="lineno"><a class="line" href="classignite_1_1Reference.html#a5c1bffd02cdd02552ba5ad144578db66"> 344</a></span>&#160; T* <a class="code" href="classignite_1_1Reference.html#a5c1bffd02cdd02552ba5ad144578db66">Get</a>()</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span>&#160; {</div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span>&#160; <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span>T*<span class="keyword">&gt;</span>(<span class="keyword">reinterpret_cast&lt;</span>ptrdiff_t<span class="keyword">&gt;</span>(ptr.Get()-&gt;Get()) + offset);</div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span>&#160; }</div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>&#160;</div><div class="line"><a name="l00354"></a><span class="lineno"><a class="line" href="classignite_1_1Reference.html#af843ca5cbc6dd3e9c46c3a1adb658b23"> 354</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classignite_1_1Reference.html#af843ca5cbc6dd3e9c46c3a1adb658b23">IsNull</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>&#160;<span class="keyword"> </span>{</div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span>&#160; <span class="keyword">const</span> common::ReferenceImplBase* raw = ptr.Get();</div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span>&#160;</div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span>&#160; <span class="keywordflow">return</span> !raw || !raw-&gt;Get();</div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span>&#160; }</div><div class="line"><a name="l00360"></a><span class="lineno"> 360</span>&#160;</div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span>&#160; common::concurrent::SharedPointer&lt;common::ReferenceImplBase&gt; ptr;</div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span>&#160;</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>&#160; ptrdiff_t offset;</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span>&#160; };</div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span>&#160;</div><div class="line"><a name="l00383"></a><span class="lineno"> 383</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00384"></a><span class="lineno"><a class="line" href="namespaceignite.html#a01845a228a65220aed4fa281e408c610"> 384</a></span>&#160; <a class="code" href="classignite_1_1Reference.html">Reference&lt;typename T::element_type&gt;</a> <a class="code" href="namespaceignite.html#a01845a228a65220aed4fa281e408c610">MakeReferenceFromSmartPointer</a>(T ptr)</div><div class="line"><a name="l00385"></a><span class="lineno"> 385</span>&#160; {</div><div class="line"><a name="l00386"></a><span class="lineno"> 386</span>&#160; common::ReferenceSmartPointer&lt;T&gt;* impl = <span class="keyword">new</span> common::ReferenceSmartPointer&lt;T&gt;();</div><div class="line"><a name="l00387"></a><span class="lineno"> 387</span>&#160;</div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span>&#160; <a class="code" href="classignite_1_1Reference.html">Reference&lt;typename T::element_type&gt;</a> res(impl);</div><div class="line"><a name="l00389"></a><span class="lineno"> 389</span>&#160;</div><div class="line"><a name="l00390"></a><span class="lineno"> 390</span>&#160; impl-&gt;Swap(ptr);</div><div class="line"><a name="l00391"></a><span class="lineno"> 391</span>&#160;</div><div class="line"><a name="l00392"></a><span class="lineno"> 392</span>&#160; <span class="keywordflow">return</span> res;</div><div class="line"><a name="l00393"></a><span class="lineno"> 393</span>&#160; }</div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span>&#160;</div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00410"></a><span class="lineno"><a class="line" href="namespaceignite.html#a4d056cf27c881af6b06bda130d0f64ed"> 410</a></span>&#160; <a class="code" href="classignite_1_1ConstReference.html">ConstReference&lt;typename T::element_type&gt;</a> <a class="code" href="namespaceignite.html#a4d056cf27c881af6b06bda130d0f64ed">MakeConstReferenceFromSmartPointer</a>(T ptr)</div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>&#160; {</div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>&#160; common::ReferenceSmartPointer&lt;T&gt;* impl = <span class="keyword">new</span> common::ReferenceSmartPointer&lt;T&gt;();</div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span>&#160;</div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>&#160; <a class="code" href="classignite_1_1ConstReference.html">ConstReference&lt;typename T::element_type&gt;</a> res(impl);</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>&#160;</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>&#160; impl-&gt;Swap(ptr);</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span>&#160;</div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span>&#160; <span class="keywordflow">return</span> res;</div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>&#160; }</div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span>&#160;</div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00431"></a><span class="lineno"><a class="line" href="namespaceignite.html#a1876725dc2d3119c5a0b15cf417aa1d0"> 431</a></span>&#160; <a class="code" href="classignite_1_1Reference.html">Reference&lt;T&gt;</a> <a class="code" href="namespaceignite.html#a1876725dc2d3119c5a0b15cf417aa1d0">MakeReferenceFromCopy</a>(<span class="keyword">const</span> T&amp; val)</div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>&#160; {</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>&#160; common::ReferenceOwningRawPointer&lt;T&gt;* impl = <span class="keyword">new</span> common::ReferenceOwningRawPointer&lt;T&gt;(<span class="keyword">new</span> T(val));</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>&#160;</div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classignite_1_1Reference.html">Reference&lt;T&gt;</a>(impl);</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>&#160; }</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span>&#160;</div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00448"></a><span class="lineno"><a class="line" href="namespaceignite.html#a713b8934e0021d44b99f15acae86efe2"> 448</a></span>&#160; <a class="code" href="classignite_1_1ConstReference.html">ConstReference&lt;T&gt;</a> <a class="code" href="namespaceignite.html#a713b8934e0021d44b99f15acae86efe2">MakeConstReferenceFromCopy</a>(<span class="keyword">const</span> T&amp; val)</div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span>&#160; {</div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span>&#160; common::ReferenceOwningRawPointer&lt;T&gt;* impl = <span class="keyword">new</span> common::ReferenceOwningRawPointer&lt;T&gt;(<span class="keyword">new</span> T(val));</div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>&#160;</div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classignite_1_1ConstReference.html">ConstReference&lt;T&gt;</a>(impl);</div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>&#160; }</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span>&#160;</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00466"></a><span class="lineno"><a class="line" href="namespaceignite.html#a700a57aef7b1a3ebd13feed33dcf4170"> 466</a></span>&#160; <a class="code" href="classignite_1_1Reference.html">Reference&lt;T&gt;</a> <a class="code" href="namespaceignite.html#a700a57aef7b1a3ebd13feed33dcf4170">MakeReferenceFromOwningPointer</a>(T* val)</div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>&#160; {</div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>&#160; common::ReferenceOwningRawPointer&lt;T&gt;* impl = <span class="keyword">new</span> common::ReferenceOwningRawPointer&lt;T&gt;(val);</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>&#160;</div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classignite_1_1Reference.html">Reference&lt;T&gt;</a>(impl);</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>&#160; }</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>&#160;</div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00484"></a><span class="lineno"><a class="line" href="namespaceignite.html#a6b46914ac275250143be90e5bc2411e2"> 484</a></span>&#160; <a class="code" href="classignite_1_1ConstReference.html">ConstReference&lt;T&gt;</a> <a class="code" href="namespaceignite.html#a6b46914ac275250143be90e5bc2411e2">MakeConstReferenceFromOwningPointer</a>(T* val)</div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span>&#160; {</div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span>&#160; common::ReferenceOwningRawPointer&lt;T&gt;* impl = <span class="keyword">new</span> common::ReferenceOwningRawPointer&lt;T&gt;(val);</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span>&#160;</div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classignite_1_1ConstReference.html">ConstReference&lt;T&gt;</a>(impl);</div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>&#160; }</div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span>&#160;</div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00502"></a><span class="lineno"><a class="line" href="namespaceignite.html#a55790b7e48e45cd757e7d34aacc4357a"> 502</a></span>&#160; <a class="code" href="classignite_1_1Reference.html">Reference&lt;T&gt;</a> <a class="code" href="namespaceignite.html#a55790b7e48e45cd757e7d34aacc4357a">MakeReference</a>(T&amp; val)</div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span>&#160; {</div><div class="line"><a name="l00504"></a><span class="lineno"> 504</span>&#160; common::ReferenceNonOwningRawPointer&lt;T&gt;* impl = <span class="keyword">new</span> common::ReferenceNonOwningRawPointer&lt;T&gt;(&amp;val);</div><div class="line"><a name="l00505"></a><span class="lineno"> 505</span>&#160;</div><div class="line"><a name="l00506"></a><span class="lineno"> 506</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classignite_1_1Reference.html">Reference&lt;T&gt;</a>(impl);</div><div class="line"><a name="l00507"></a><span class="lineno"> 507</span>&#160; }</div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span>&#160;</div><div class="line"><a name="l00519"></a><span class="lineno"> 519</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00520"></a><span class="lineno"><a class="line" href="namespaceignite.html#ac1523106a14156cf653b3366d92562cd"> 520</a></span>&#160; <a class="code" href="classignite_1_1Reference.html">Reference&lt;T&gt;</a> <a class="code" href="namespaceignite.html#a55790b7e48e45cd757e7d34aacc4357a">MakeReference</a>(T* val)</div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span>&#160; {</div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>&#160; common::ReferenceNonOwningRawPointer&lt;T&gt;* impl = <span class="keyword">new</span> common::ReferenceNonOwningRawPointer&lt;T&gt;(val);</div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span>&#160;</div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classignite_1_1Reference.html">Reference&lt;T&gt;</a>(impl);</div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span>&#160; }</div><div class="line"><a name="l00526"></a><span class="lineno"> 526</span>&#160;</div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00538"></a><span class="lineno"><a class="line" href="namespaceignite.html#ae78424fdffadc92e84b815d5df9c6fee"> 538</a></span>&#160; <a class="code" href="classignite_1_1ConstReference.html">ConstReference&lt;T&gt;</a> <a class="code" href="namespaceignite.html#ae78424fdffadc92e84b815d5df9c6fee">MakeConstReference</a>(<span class="keyword">const</span> T&amp; val)</div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>&#160; {</div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span>&#160; common::ConstReferenceNonOwningRawPointer&lt;T&gt;* impl = <span class="keyword">new</span> common::ConstReferenceNonOwningRawPointer&lt;T&gt;(&amp;val);</div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span>&#160;</div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classignite_1_1ConstReference.html">ConstReference&lt;T&gt;</a>(impl);</div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span>&#160; }</div><div class="line"><a name="l00544"></a><span class="lineno"> 544</span>&#160;</div><div class="line"><a name="l00555"></a><span class="lineno"> 555</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00556"></a><span class="lineno"><a class="line" href="namespaceignite.html#ae937deaf9a618b1441ad3e49c76f4b8d"> 556</a></span>&#160; <a class="code" href="classignite_1_1ConstReference.html">ConstReference&lt;T&gt;</a> <a class="code" href="namespaceignite.html#ae78424fdffadc92e84b815d5df9c6fee">MakeConstReference</a>(<span class="keyword">const</span> T* val)</div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span>&#160; {</div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span>&#160; common::ConstReferenceNonOwningRawPointer&lt;T&gt;* impl = <span class="keyword">new</span> common::ConstReferenceNonOwningRawPointer&lt;T&gt;(val);</div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span>&#160;</div><div class="line"><a name="l00560"></a><span class="lineno"> 560</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classignite_1_1ConstReference.html">ConstReference&lt;T&gt;</a>(impl);</div><div class="line"><a name="l00561"></a><span class="lineno"> 561</span>&#160; }</div><div class="line"><a name="l00562"></a><span class="lineno"> 562</span>&#160;}</div><div class="line"><a name="l00563"></a><span class="lineno"> 563</span>&#160;</div><div class="line"><a name="l00564"></a><span class="lineno"> 564</span>&#160;<span class="preprocessor">#endif //_IGNITE_COMMON_REFERENCE</span></div><div class="ttc" id="classignite_1_1Reference_html_afdf65f728290032bec9def699482586b"><div class="ttname"><a href="classignite_1_1Reference.html#afdf65f728290032bec9def699482586b">ignite::Reference::operator=</a></div><div class="ttdeci">Reference &amp; operator=(const Reference&lt; T2 &gt; &amp;other)</div><div class="ttdoc">Assignment operator. </div><div class="ttdef"><b>Definition:</b> reference.h:277</div></div>
<div class="ttc" id="classignite_1_1ConstReference_html"><div class="ttname"><a href="classignite_1_1ConstReference.html">ignite::ConstReference</a></div><div class="ttdoc">Constant Reference class. </div><div class="ttdef"><b>Definition:</b> reference.h:47</div></div>
<div class="ttc" id="classignite_1_1ConstReference_html_ab23dcbb1d85082d3e51f8e21cff45bff"><div class="ttname"><a href="classignite_1_1ConstReference.html#ab23dcbb1d85082d3e51f8e21cff45bff">ignite::ConstReference::IsNull</a></div><div class="ttdeci">bool IsNull() const </div><div class="ttdoc">Check if the pointer is null. </div><div class="ttdef"><b>Definition:</b> reference.h:173</div></div>
<div class="ttc" id="classignite_1_1ConstReference_html_ab9d8957625a01e494bf2d931c84a0bbb"><div class="ttname"><a href="classignite_1_1ConstReference.html#ab9d8957625a01e494bf2d931c84a0bbb">ignite::ConstReference::ConstReference</a></div><div class="ttdeci">ConstReference(const ConstReference&lt; T2 &gt; &amp;other)</div><div class="ttdoc">Copy constructor. </div><div class="ttdef"><b>Definition:</b> reference.h:100</div></div>
<div class="ttc" id="classignite_1_1ConstReference_html_a95beded1e753e6d23535304d5c3c09ea"><div class="ttname"><a href="classignite_1_1ConstReference.html#a95beded1e753e6d23535304d5c3c09ea">ignite::ConstReference::ConstReference</a></div><div class="ttdeci">ConstReference(const ConstReference &amp;other)</div><div class="ttdoc">Copy constructor. </div><div class="ttdef"><b>Definition:</b> reference.h:84</div></div>
<div class="ttc" id="namespaceignite_html_a1876725dc2d3119c5a0b15cf417aa1d0"><div class="ttname"><a href="namespaceignite.html#a1876725dc2d3119c5a0b15cf417aa1d0">ignite::MakeReferenceFromCopy</a></div><div class="ttdeci">Reference&lt; T &gt; MakeReferenceFromCopy(const T &amp;val)</div><div class="ttdoc">Copy object and wrap it to make ignite::Reference instance. </div><div class="ttdef"><b>Definition:</b> reference.h:431</div></div>
<div class="ttc" id="classignite_1_1Reference_html_ad5f8125a11a0a61673858c6e75ced9c2"><div class="ttname"><a href="classignite_1_1Reference.html#ad5f8125a11a0a61673858c6e75ced9c2">ignite::Reference::Reference</a></div><div class="ttdeci">Reference()</div><div class="ttdoc">Default constructor. </div><div class="ttdef"><b>Definition:</b> reference.h:205</div></div>
<div class="ttc" id="namespaceignite_html_a01845a228a65220aed4fa281e408c610"><div class="ttname"><a href="namespaceignite.html#a01845a228a65220aed4fa281e408c610">ignite::MakeReferenceFromSmartPointer</a></div><div class="ttdeci">Reference&lt; typename T::element_type &gt; MakeReferenceFromSmartPointer(T ptr)</div><div class="ttdoc">Make ignite::Reference instance out of smart pointer. </div><div class="ttdef"><b>Definition:</b> reference.h:384</div></div>
<div class="ttc" id="classignite_1_1Reference_html_ab0d0b94ad24eb93ec1f89d253d5ff2ff"><div class="ttname"><a href="classignite_1_1Reference.html#ab0d0b94ad24eb93ec1f89d253d5ff2ff">ignite::Reference::Get</a></div><div class="ttdeci">const T * Get() const </div><div class="ttdoc">Dereference the pointer. </div><div class="ttdef"><b>Definition:</b> reference.h:331</div></div>
<div class="ttc" id="namespaceignite_html_ae78424fdffadc92e84b815d5df9c6fee"><div class="ttname"><a href="namespaceignite.html#ae78424fdffadc92e84b815d5df9c6fee">ignite::MakeConstReference</a></div><div class="ttdeci">ConstReference&lt; T &gt; MakeConstReference(const T &amp;val)</div><div class="ttdoc">Make ignite::ConstReference instance out of constant reference. </div><div class="ttdef"><b>Definition:</b> reference.h:538</div></div>
<div class="ttc" id="classignite_1_1ConstReference_html_a8969e0b386401978058310d6dc2a126f"><div class="ttname"><a href="classignite_1_1ConstReference.html#a8969e0b386401978058310d6dc2a126f">ignite::ConstReference::~ConstReference</a></div><div class="ttdeci">~ConstReference()</div><div class="ttdoc">Destructor. </div><div class="ttdef"><b>Definition:</b> reference.h:150</div></div>
<div class="ttc" id="classignite_1_1Reference_html_a6c7943df1753b8c13cd200347843424d"><div class="ttname"><a href="classignite_1_1Reference.html#a6c7943df1753b8c13cd200347843424d">ignite::Reference::operator=</a></div><div class="ttdeci">Reference &amp; operator=(const Reference &amp;other)</div><div class="ttdoc">Assignment operator. </div><div class="ttdef"><b>Definition:</b> reference.h:261</div></div>
<div class="ttc" id="classignite_1_1ConstReference_html_a63f63927e65aea9923eb6b207352d7e3"><div class="ttname"><a href="classignite_1_1ConstReference.html#a63f63927e65aea9923eb6b207352d7e3">ignite::ConstReference::ConstReference</a></div><div class="ttdeci">ConstReference()</div><div class="ttdoc">Default constructor. </div><div class="ttdef"><b>Definition:</b> reference.h:59</div></div>
<div class="ttc" id="classignite_1_1Reference_html_a052137299ad55af40b28018d3c63c167"><div class="ttname"><a href="classignite_1_1Reference.html#a052137299ad55af40b28018d3c63c167">ignite::Reference::Reference</a></div><div class="ttdeci">Reference(const Reference &amp;other)</div><div class="ttdoc">Copy constructor. </div><div class="ttdef"><b>Definition:</b> reference.h:230</div></div>
<div class="ttc" id="classignite_1_1Reference_html_a447aa7f80238431a16f32ce60e453b26"><div class="ttname"><a href="classignite_1_1Reference.html#a447aa7f80238431a16f32ce60e453b26">ignite::Reference::Reference</a></div><div class="ttdeci">Reference(common::ReferenceImplBase *ptr, ptrdiff_t offset=0)</div><div class="ttdoc">Constructor. </div><div class="ttdef"><b>Definition:</b> reference.h:218</div></div>
<div class="ttc" id="classignite_1_1ConstReference_html_a6ea08f582e635a46f00a7c97f323118d"><div class="ttname"><a href="classignite_1_1ConstReference.html#a6ea08f582e635a46f00a7c97f323118d">ignite::ConstReference::ConstReference</a></div><div class="ttdeci">ConstReference(common::ConstReferenceImplBase *ptr, ptrdiff_t offset=0)</div><div class="ttdoc">Constructor. </div><div class="ttdef"><b>Definition:</b> reference.h:72</div></div>
<div class="ttc" id="classignite_1_1Reference_html_aa65cdfb8035bf373b8b588ac2f1f8df7"><div class="ttname"><a href="classignite_1_1Reference.html#aa65cdfb8035bf373b8b588ac2f1f8df7">ignite::Reference::~Reference</a></div><div class="ttdeci">~Reference()</div><div class="ttdoc">Destructor. </div><div class="ttdef"><b>Definition:</b> reference.h:294</div></div>
<div class="ttc" id="namespaceignite_html_a700a57aef7b1a3ebd13feed33dcf4170"><div class="ttname"><a href="namespaceignite.html#a700a57aef7b1a3ebd13feed33dcf4170">ignite::MakeReferenceFromOwningPointer</a></div><div class="ttdeci">Reference&lt; T &gt; MakeReferenceFromOwningPointer(T *val)</div><div class="ttdoc">Make ignite::Reference instance out of pointer and pass its ownership. </div><div class="ttdef"><b>Definition:</b> reference.h:466</div></div>
<div class="ttc" id="classignite_1_1Reference_html_af843ca5cbc6dd3e9c46c3a1adb658b23"><div class="ttname"><a href="classignite_1_1Reference.html#af843ca5cbc6dd3e9c46c3a1adb658b23">ignite::Reference::IsNull</a></div><div class="ttdeci">bool IsNull() const </div><div class="ttdoc">Check if the pointer is null. </div><div class="ttdef"><b>Definition:</b> reference.h:354</div></div>
<div class="ttc" id="namespaceignite_html_a6b46914ac275250143be90e5bc2411e2"><div class="ttname"><a href="namespaceignite.html#a6b46914ac275250143be90e5bc2411e2">ignite::MakeConstReferenceFromOwningPointer</a></div><div class="ttdeci">ConstReference&lt; T &gt; MakeConstReferenceFromOwningPointer(T *val)</div><div class="ttdoc">Make ignite::ConstReference instance out of pointer and pass its ownership. </div><div class="ttdef"><b>Definition:</b> reference.h:484</div></div>
<div class="ttc" id="classignite_1_1ConstReference_html_a1328b74243e12ccddd0fdbc2b81ebe88"><div class="ttname"><a href="classignite_1_1ConstReference.html#a1328b74243e12ccddd0fdbc2b81ebe88">ignite::ConstReference::Get</a></div><div class="ttdeci">const T * Get() const </div><div class="ttdoc">Dereference the pointer. </div><div class="ttdef"><b>Definition:</b> reference.h:163</div></div>
<div class="ttc" id="classignite_1_1Reference_html"><div class="ttname"><a href="classignite_1_1Reference.html">ignite::Reference</a></div><div class="ttdoc">Reference class. </div><div class="ttdef"><b>Definition:</b> reference.h:35</div></div>
<div class="ttc" id="classignite_1_1Reference_html_a3a779a19fd6c4a8a4e189ec46213ce10"><div class="ttname"><a href="classignite_1_1Reference.html#a3a779a19fd6c4a8a4e189ec46213ce10">ignite::Reference::Reference</a></div><div class="ttdeci">Reference(const Reference&lt; T2 &gt; &amp;other)</div><div class="ttdoc">Copy constructor. </div><div class="ttdef"><b>Definition:</b> reference.h:245</div></div>
<div class="ttc" id="classignite_1_1ConstReference_html_a32b372113f08ffa0bd798613dd7bef8e"><div class="ttname"><a href="classignite_1_1ConstReference.html#a32b372113f08ffa0bd798613dd7bef8e">ignite::ConstReference::operator=</a></div><div class="ttdeci">ConstReference &amp; operator=(const ConstReference &amp;other)</div><div class="ttdoc">Assignment operator. </div><div class="ttdef"><b>Definition:</b> reference.h:116</div></div>
<div class="ttc" id="classignite_1_1ConstReference_html_a407552c66ea32aa700e6523832f6efb6"><div class="ttname"><a href="classignite_1_1ConstReference.html#a407552c66ea32aa700e6523832f6efb6">ignite::ConstReference::operator=</a></div><div class="ttdeci">ConstReference &amp; operator=(const ConstReference&lt; T2 &gt; &amp;other)</div><div class="ttdoc">Assignment operator. </div><div class="ttdef"><b>Definition:</b> reference.h:133</div></div>
<div class="ttc" id="namespaceignite_html"><div class="ttname"><a href="namespaceignite.html">ignite</a></div><div class="ttdoc">Apache Ignite API. </div><div class="ttdef"><b>Definition:</b> cache.h:48</div></div>
<div class="ttc" id="namespaceignite_html_a55790b7e48e45cd757e7d34aacc4357a"><div class="ttname"><a href="namespaceignite.html#a55790b7e48e45cd757e7d34aacc4357a">ignite::MakeReference</a></div><div class="ttdeci">Reference&lt; T &gt; MakeReference(T &amp;val)</div><div class="ttdoc">Make ignite::Reference instance out of reference. </div><div class="ttdef"><b>Definition:</b> reference.h:502</div></div>
<div class="ttc" id="namespaceignite_html_a4d056cf27c881af6b06bda130d0f64ed"><div class="ttname"><a href="namespaceignite.html#a4d056cf27c881af6b06bda130d0f64ed">ignite::MakeConstReferenceFromSmartPointer</a></div><div class="ttdeci">ConstReference&lt; typename T::element_type &gt; MakeConstReferenceFromSmartPointer(T ptr)</div><div class="ttdoc">Make ignite::ConstReference instance out of smart pointer. </div><div class="ttdef"><b>Definition:</b> reference.h:410</div></div>
<div class="ttc" id="namespaceignite_html_a713b8934e0021d44b99f15acae86efe2"><div class="ttname"><a href="namespaceignite.html#a713b8934e0021d44b99f15acae86efe2">ignite::MakeConstReferenceFromCopy</a></div><div class="ttdeci">ConstReference&lt; T &gt; MakeConstReferenceFromCopy(const T &amp;val)</div><div class="ttdoc">Copy object and wrap it to make ignite::ConstReference instance. </div><div class="ttdef"><b>Definition:</b> reference.h:448</div></div>
<div class="ttc" id="classignite_1_1Reference_html_a5c1bffd02cdd02552ba5ad144578db66"><div class="ttname"><a href="classignite_1_1Reference.html#a5c1bffd02cdd02552ba5ad144578db66">ignite::Reference::Get</a></div><div class="ttdeci">T * Get()</div><div class="ttdoc">Dereference the pointer. </div><div class="ttdef"><b>Definition:</b> reference.h:344</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Jul 10 2018 10:57:32 for &nbsp; Apache Ignite C++ by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>