-
Notifications
You must be signed in to change notification settings - Fork 1
/
Alias_8h_source.html
259 lines (257 loc) · 40.4 KB
/
Alias_8h_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>DGtal: Alias.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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.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/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</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="projectalign" style="padding-left: 0.5em;">
<div id="projectname">DGtal
 <span id="projectnumber">1.4.2</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('Alias_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- 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 class="header">
<div class="headertitle">
<div class="title">Alias.h</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>  </div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  </div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#if defined(Alias_RECURSES)</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#error Recursive header files inclusion detected in Alias.h</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#else </span><span class="comment">// defined(Alias_RECURSES)</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment"></span>#define Alias_RECURSES</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  </div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">#if !defined Alias_h</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="preprocessor">#define Alias_h</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  </div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="comment">// Inclusions</span></div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="preprocessor">#include <iostream></span></div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="preprocessor">#include "DGtal/base/Common.h"</span></div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="preprocessor">#include "DGtal/base/CountedPtr.h"</span></div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="preprocessor">#include "DGtal/base/CowPtr.h"</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> <span class="keyword">namespace </span><a class="code" href="namespaceDGtal.html">DGtal</a></div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> {</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  </div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="comment">// template class Alias</span></div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span> <span class="comment"></span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
<div class="line"><a name="l00182"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html"> 182</a></span>  <span class="keyword">class </span><a class="code" href="classDGtal_1_1Alias.html">Alias</a></div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  {</div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  </div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="comment">// ----------------------- Internal classes ------------------------------</span></div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <span class="keyword">protected</span>:</div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  </div>
<div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a11981c83117f3dac4ec7da5e691c21d0"> 189</a></span>  <span class="keyword">enum</span> <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08">Parameter</a> { <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a11981c83117f3dac4ec7da5e691c21d0">CONST_LEFT_VALUE_REF</a>, <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08afea753ac644b7a0f920cda1814c543bf">LEFT_VALUE_REF</a>, <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a3f6ad271e4b9bc20db0935cf8ad44a34">PTR</a>, <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a7e5cd5746826eb3eb32ca77efabd6320">CONST_PTR</a>,</div>
<div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a21d10cb90601ddbb3bb41c7a9f914dca"> 190</a></span>  <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a3a7790db20f8e1dd5e07b843e75444a9">COW_PTR</a>, <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a21d10cb90601ddbb3bb41c7a9f914dca">COUNTED_PTR</a>, <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a72333d922685156e4c98795e2e03e6a9">RIGHT_VALUE_REF</a>, <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08ac357bf1178e882164564d19932c07b40">COUNTED_PTR_OR_PTR</a>,</div>
<div class="line"><a name="l00191"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08aece4bfb7c26c6e5658766c149ff0de36"> 191</a></span>  <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08aece4bfb7c26c6e5658766c149ff0de36">COUNTED_CONST_PTR_OR_CONST_PTR</a> };</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  </div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  <span class="comment">// ----------------------- Standard services ------------------------------</span></div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keyword">public</span>:</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  </div>
<div class="line"><a name="l00200"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html#a124456ed4ae1a65dca4e6714dd9ebd48"> 200</a></span>  <a class="code" href="classDGtal_1_1Alias.html#a124456ed4ae1a65dca4e6714dd9ebd48">Alias</a>( <span class="keyword">const</span> <a class="code" href="classDGtal_1_1Alias.html">Alias</a> & other ) = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  </div>
<div class="line"><a name="l00205"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html#a135299e424df4d945c05a9b7bc7ba90e"> 205</a></span>  <span class="keyword">inline</span> <a class="code" href="classDGtal_1_1Alias.html#a135299e424df4d945c05a9b7bc7ba90e">~Alias</a>() {}</div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  </div>
<div class="line"><a name="l00212"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html#addf3247987f21b6b047632dc47fe055f"> 212</a></span>  <a class="code" href="classDGtal_1_1Alias.html#addf3247987f21b6b047632dc47fe055f">Alias</a>( <span class="keyword">const</span> T& ) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  </div>
<div class="line"><a name="l00219"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html#a491b1fe9b7233e16b9b6ca9e1c7dff20"> 219</a></span>  <a class="code" href="classDGtal_1_1Alias.html#a491b1fe9b7233e16b9b6ca9e1c7dff20">Alias</a>( <span class="keyword">const</span> T* ) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  </div>
<div class="line"><a name="l00226"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html#a9014119389c0f301204f3b041a097e23"> 226</a></span>  <span class="keyword">inline</span> <a class="code" href="classDGtal_1_1Alias.html#a9014119389c0f301204f3b041a097e23">Alias</a>( T& t )</div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  : <a class="code" href="classDGtal_1_1Alias.html#a143f8a02862f5d26b0258db54487b587">myParam</a>( <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08afea753ac644b7a0f920cda1814c543bf">LEFT_VALUE_REF</a> ), <a class="code" href="classDGtal_1_1Alias.html#ab41d7caa179e969b563f4569e346622e">myPtr</a>( static_cast<const void*>( &t ) )</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  {}</div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  </div>
<div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html#af98f2306441a985223becd4101916638"> 235</a></span>  <span class="keyword">inline</span> <a class="code" href="classDGtal_1_1Alias.html#af98f2306441a985223becd4101916638">Alias</a>( T* t )</div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  : <a class="code" href="classDGtal_1_1Alias.html#a143f8a02862f5d26b0258db54487b587">myParam</a>( <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a3f6ad271e4b9bc20db0935cf8ad44a34">PTR</a> ), <a class="code" href="classDGtal_1_1Alias.html#ab41d7caa179e969b563f4569e346622e">myPtr</a>( static_cast<const void*>( t ) ) {}</div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  </div>
<div class="line"><a name="l00243"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html#a0dc91a41fda05514ca745e47fed75daa"> 243</a></span>  <a class="code" href="classDGtal_1_1Alias.html#a0dc91a41fda05514ca745e47fed75daa">Alias</a>( <span class="keyword">const</span> <a class="code" href="classDGtal_1_1CowPtr.html">CowPtr<T></a>& ) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  </div>
<div class="line"><a name="l00250"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html#aead4282ef1764521264f3f9c8326bceb"> 250</a></span>  <span class="keyword">inline</span> <a class="code" href="classDGtal_1_1Alias.html#aead4282ef1764521264f3f9c8326bceb">Alias</a>( <span class="keyword">const</span> <a class="code" href="classDGtal_1_1CountedPtr.html">CountedPtr<T></a>& t )</div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  : <a class="code" href="classDGtal_1_1Alias.html#a143f8a02862f5d26b0258db54487b587">myParam</a>( <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a21d10cb90601ddbb3bb41c7a9f914dca">COUNTED_PTR</a> ), <a class="code" href="classDGtal_1_1Alias.html#ab41d7caa179e969b563f4569e346622e">myPtr</a>( static_cast<const void*>( &t ) )</div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  {}</div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  </div>
<div class="line"><a name="l00259"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html#a707d4456c3f59e5ff4a2821c5e97b3a3"> 259</a></span>  <span class="keyword">inline</span> <a class="code" href="classDGtal_1_1Alias.html#a707d4456c3f59e5ff4a2821c5e97b3a3">Alias</a>( <span class="keyword">const</span> <a class="code" href="classDGtal_1_1CountedPtrOrPtr.html">CountedPtrOrPtr<T></a>& t )</div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  : <a class="code" href="classDGtal_1_1Alias.html#a143f8a02862f5d26b0258db54487b587">myParam</a>( <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08ac357bf1178e882164564d19932c07b40">COUNTED_PTR_OR_PTR</a> ), <a class="code" href="classDGtal_1_1Alias.html#ab41d7caa179e969b563f4569e346622e">myPtr</a>( static_cast<const void*>( &t ) )</div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  {}</div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  </div>
<div class="line"><a name="l00268"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html#a6fa99c59d38be64c4a134a3448942d6e"> 268</a></span>  <a class="code" href="classDGtal_1_1Alias.html#a6fa99c59d38be64c4a134a3448942d6e">Alias</a>( T&& ) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  </div>
<div class="line"><a name="l00276"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html#a682a107ae2a1b8cc8d95190485262dcb"> 276</a></span>  <span class="keyword">inline</span> <span class="keyword">operator</span> T&() <span class="keyword">const</span></div>
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  {</div>
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  <span class="keywordflow">switch</span>( <a class="code" href="classDGtal_1_1Alias.html#a143f8a02862f5d26b0258db54487b587">myParam</a> ) {</div>
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="keywordflow">case</span> <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08afea753ac644b7a0f920cda1814c543bf">LEFT_VALUE_REF</a>:</div>
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <span class="keywordflow">case</span> <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a3f6ad271e4b9bc20db0935cf8ad44a34">PTR</a>:</div>
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <span class="keywordflow">return</span> *( <span class="keyword">const_cast<</span> T* <span class="keyword">></span>( <span class="keyword">static_cast<</span> <span class="keyword">const </span>T* <span class="keyword">></span>( <a class="code" href="classDGtal_1_1Alias.html#ab41d7caa179e969b563f4569e346622e">myPtr</a> ) ) );</div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <span class="keywordflow">default</span>: ASSERT( <span class="keyword">false</span> && <span class="stringliteral">"[Alias::operator T&() const] Invalid cast for given type. Consider passing a left-value reference or a pointer as a parameter."</span> );</div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  <span class="keywordflow">return</span> *( <span class="keyword">const_cast<</span> T* <span class="keyword">></span>( <span class="keyword">static_cast<</span> <span class="keyword">const </span>T* <span class="keyword">></span>( <a class="code" href="classDGtal_1_1Alias.html#ab41d7caa179e969b563f4569e346622e">myPtr</a> ) ) );</div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  }</div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  }</div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  </div>
<div class="line"><a name="l00293"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html#a42eeabe2ecdeeafddeda9c5b704357cb"> 293</a></span>  <span class="keyword">inline</span> T* <a class="code" href="classDGtal_1_1Alias.html#a42eeabe2ecdeeafddeda9c5b704357cb">operator&</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span> <span class="keyword"> </span>{</div>
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  <span class="keywordflow">switch</span>( <a class="code" href="classDGtal_1_1Alias.html#a143f8a02862f5d26b0258db54487b587">myParam</a> ) {</div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  <span class="keywordflow">case</span> <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08afea753ac644b7a0f920cda1814c543bf">LEFT_VALUE_REF</a>:</div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  <span class="keywordflow">case</span> <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a3f6ad271e4b9bc20db0935cf8ad44a34">PTR</a>:</div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  <span class="keywordflow">return</span> <span class="keyword">const_cast<</span> T* <span class="keyword">></span>( <span class="keyword">static_cast<</span> <span class="keyword">const </span>T* <span class="keyword">></span>( <a class="code" href="classDGtal_1_1Alias.html#ab41d7caa179e969b563f4569e346622e">myPtr</a> ) );</div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  <span class="keywordflow">default</span>: ASSERT( <span class="keyword">false</span> && <span class="stringliteral">"[T* Alias::operator&() const] Invalid address operator for given type. Consider passing a left-value reference or a pointer as a parameter."</span> );</div>
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  <span class="keywordflow">return</span> <span class="keyword">const_cast<</span> T* <span class="keyword">></span>( <span class="keyword">static_cast<</span> <span class="keyword">const </span>T* <span class="keyword">></span>( <a class="code" href="classDGtal_1_1Alias.html#ab41d7caa179e969b563f4569e346622e">myPtr</a> ) );</div>
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  }</div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  }</div>
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  </div>
<div class="line"><a name="l00313"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html#abcd29d6b74955a54b01c8af68cb2cd79"> 313</a></span>  <span class="keyword">inline</span> <span class="keyword">operator</span> <a class="code" href="classDGtal_1_1CountedPtrOrPtr.html">CountedPtrOrPtr<T></a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span> <span class="keyword"> </span>{</div>
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  <span class="keywordflow">switch</span>( <a class="code" href="classDGtal_1_1Alias.html#a143f8a02862f5d26b0258db54487b587">myParam</a> ) {</div>
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  <span class="keywordflow">case</span> <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08afea753ac644b7a0f920cda1814c543bf">LEFT_VALUE_REF</a>:</div>
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  <span class="keywordflow">case</span> <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a3f6ad271e4b9bc20db0935cf8ad44a34">PTR</a>:</div>
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  <span class="keywordflow">return</span> <a class="code" href="classDGtal_1_1CountedPtrOrPtr.html">CountedPtrOrPtr<T></a>( <span class="keyword">const_cast<</span> T* <span class="keyword">></span>( <span class="keyword">static_cast<</span> <span class="keyword">const </span>T* <span class="keyword">></span>( <a class="code" href="classDGtal_1_1Alias.html#ab41d7caa179e969b563f4569e346622e">myPtr</a> ) ), <span class="keyword">false</span> );</div>
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  <span class="keywordflow">case</span> <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a21d10cb90601ddbb3bb41c7a9f914dca">COUNTED_PTR</a>:</div>
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  <span class="keywordflow">return</span> <a class="code" href="classDGtal_1_1CountedPtrOrPtr.html">CountedPtrOrPtr<T></a>( *( <span class="keyword">static_cast<</span> <span class="keyword">const </span><a class="code" href="classDGtal_1_1CountedPtr.html">CountedPtr<T></a>* <span class="keyword">></span>( <a class="code" href="classDGtal_1_1Alias.html#ab41d7caa179e969b563f4569e346622e">myPtr</a> ) ) );</div>
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  <span class="keywordflow">case</span> <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08ac357bf1178e882164564d19932c07b40">COUNTED_PTR_OR_PTR</a>:</div>
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  <span class="keywordflow">return</span> <a class="code" href="classDGtal_1_1CountedPtrOrPtr.html">CountedPtrOrPtr<T></a>( *( <span class="keyword">static_cast<</span> <span class="keyword">const </span><a class="code" href="classDGtal_1_1CountedPtrOrPtr.html">CountedPtrOrPtr<T></a>* <span class="keyword">></span>( <a class="code" href="classDGtal_1_1Alias.html#ab41d7caa179e969b563f4569e346622e">myPtr</a> ) ) );</div>
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  <span class="keywordflow">default</span>: ASSERT( <span class="keyword">false</span> && <span class="stringliteral">"[Alias::operator CountedPtrOrPtr<T>() const] Invalid cast for given type. Consider passing a reference, a pointer or a CountedPtr as a parameter."</span> );</div>
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  <span class="keywordflow">return</span> <a class="code" href="classDGtal_1_1CountedPtrOrPtr.html">CountedPtrOrPtr<T></a>( 0 );</div>
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  }</div>
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  }</div>
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  </div>
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  <span class="comment">// ------------------------- Private Datas --------------------------------</span></div>
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  <span class="keyword">private</span>:</div>
<div class="line"><a name="l00331"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html#a143f8a02862f5d26b0258db54487b587"> 331</a></span>  <span class="keyword">const</span> <a class="code" href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08">Parameter</a> <a class="code" href="classDGtal_1_1Alias.html#a143f8a02862f5d26b0258db54487b587">myParam</a>;</div>
<div class="line"><a name="l00333"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html#ab41d7caa179e969b563f4569e346622e"> 333</a></span>  <span class="keyword">const</span> <span class="keywordtype">void</span>* <span class="keyword">const</span> <a class="code" href="classDGtal_1_1Alias.html#ab41d7caa179e969b563f4569e346622e">myPtr</a>;</div>
<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  </div>
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  </div>
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  <span class="comment">// ------------------------- Internals ------------------------------------</span></div>
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  <span class="keyword">private</span>:</div>
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  </div>
<div class="line"><a name="l00345"></a><span class="lineno"><a class="line" href="classDGtal_1_1Alias.html#ae90d93d1351adbef66b2d89c0f51466d"> 345</a></span>  <a class="code" href="classDGtal_1_1Alias.html">Alias</a> & <a class="code" href="classDGtal_1_1Alias.html#ae90d93d1351adbef66b2d89c0f51466d">operator= </a>( <span class="keyword">const</span> <a class="code" href="classDGtal_1_1Alias.html">Alias</a> & other );</div>
<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  </div>
<div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  }; <span class="comment">// end of class Alias</span></div>
<div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  </div>
<div class="line"><a name="l00349"></a><span class="lineno"> 349</span> } <span class="comment">// namespace DGtal</span></div>
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  </div>
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  </div>
<div class="line"><a name="l00353"></a><span class="lineno"> 353</span> <span class="comment">// Includes inline functions.</span></div>
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  </div>
<div class="line"><a name="l00355"></a><span class="lineno"> 355</span> <span class="comment">// //</span></div>
<div class="line"><a name="l00357"></a><span class="lineno"> 357</span> <span class="comment"></span> </div>
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span> <span class="preprocessor">#endif </span><span class="comment">// !defined Alias_h</span></div>
<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  </div>
<div class="line"><a name="l00360"></a><span class="lineno"> 360</span> <span class="preprocessor">#undef Alias_RECURSES</span></div>
<div class="line"><a name="l00361"></a><span class="lineno"> 361</span> <span class="preprocessor">#endif </span><span class="comment">// else defined(Alias_RECURSES)</span></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html"><div class="ttname"><a href="classDGtal_1_1Alias.html">DGtal::Alias</a></div><div class="ttdoc">Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...</div><div class="ttdef"><b>Definition:</b> <a href="Alias_8h_source.html#l00182">Alias.h:183</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_a0dc91a41fda05514ca745e47fed75daa"><div class="ttname"><a href="classDGtal_1_1Alias.html#a0dc91a41fda05514ca745e47fed75daa">DGtal::Alias::Alias</a></div><div class="ttdeci">Alias(const CowPtr< T > &)=delete</div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_a124456ed4ae1a65dca4e6714dd9ebd48"><div class="ttname"><a href="classDGtal_1_1Alias.html#a124456ed4ae1a65dca4e6714dd9ebd48">DGtal::Alias::Alias</a></div><div class="ttdeci">Alias(const Alias &other)=default</div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_a135299e424df4d945c05a9b7bc7ba90e"><div class="ttname"><a href="classDGtal_1_1Alias.html#a135299e424df4d945c05a9b7bc7ba90e">DGtal::Alias::~Alias</a></div><div class="ttdeci">~Alias()</div><div class="ttdef"><b>Definition:</b> <a href="Alias_8h_source.html#l00205">Alias.h:205</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_a143f8a02862f5d26b0258db54487b587"><div class="ttname"><a href="classDGtal_1_1Alias.html#a143f8a02862f5d26b0258db54487b587">DGtal::Alias::myParam</a></div><div class="ttdeci">const Parameter myParam</div><div class="ttdoc">Characterizes the type of the input parameter at clone instanciation.</div><div class="ttdef"><b>Definition:</b> <a href="Alias_8h_source.html#l00331">Alias.h:331</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_a22a7083f7b9350124620c5d49e329b08"><div class="ttname"><a href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08">DGtal::Alias::Parameter</a></div><div class="ttdeci">Parameter</div><div class="ttdoc">Internal class that allows to distinguish the different types of parameters.</div><div class="ttdef"><b>Definition:</b> <a href="Alias_8h_source.html#l00189">Alias.h:189</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_a22a7083f7b9350124620c5d49e329b08a11981c83117f3dac4ec7da5e691c21d0"><div class="ttname"><a href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a11981c83117f3dac4ec7da5e691c21d0">DGtal::Alias::CONST_LEFT_VALUE_REF</a></div><div class="ttdeci">@ CONST_LEFT_VALUE_REF</div><div class="ttdef"><b>Definition:</b> <a href="Alias_8h_source.html#l00189">Alias.h:189</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_a22a7083f7b9350124620c5d49e329b08a21d10cb90601ddbb3bb41c7a9f914dca"><div class="ttname"><a href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a21d10cb90601ddbb3bb41c7a9f914dca">DGtal::Alias::COUNTED_PTR</a></div><div class="ttdeci">@ COUNTED_PTR</div><div class="ttdef"><b>Definition:</b> <a href="Alias_8h_source.html#l00190">Alias.h:190</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_a22a7083f7b9350124620c5d49e329b08a3a7790db20f8e1dd5e07b843e75444a9"><div class="ttname"><a href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a3a7790db20f8e1dd5e07b843e75444a9">DGtal::Alias::COW_PTR</a></div><div class="ttdeci">@ COW_PTR</div><div class="ttdef"><b>Definition:</b> <a href="Alias_8h_source.html#l00190">Alias.h:190</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_a22a7083f7b9350124620c5d49e329b08a3f6ad271e4b9bc20db0935cf8ad44a34"><div class="ttname"><a href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a3f6ad271e4b9bc20db0935cf8ad44a34">DGtal::Alias::PTR</a></div><div class="ttdeci">@ PTR</div><div class="ttdef"><b>Definition:</b> <a href="Alias_8h_source.html#l00189">Alias.h:189</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_a22a7083f7b9350124620c5d49e329b08a72333d922685156e4c98795e2e03e6a9"><div class="ttname"><a href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a72333d922685156e4c98795e2e03e6a9">DGtal::Alias::RIGHT_VALUE_REF</a></div><div class="ttdeci">@ RIGHT_VALUE_REF</div><div class="ttdef"><b>Definition:</b> <a href="Alias_8h_source.html#l00190">Alias.h:190</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_a22a7083f7b9350124620c5d49e329b08a7e5cd5746826eb3eb32ca77efabd6320"><div class="ttname"><a href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08a7e5cd5746826eb3eb32ca77efabd6320">DGtal::Alias::CONST_PTR</a></div><div class="ttdeci">@ CONST_PTR</div><div class="ttdef"><b>Definition:</b> <a href="Alias_8h_source.html#l00189">Alias.h:189</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_a22a7083f7b9350124620c5d49e329b08ac357bf1178e882164564d19932c07b40"><div class="ttname"><a href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08ac357bf1178e882164564d19932c07b40">DGtal::Alias::COUNTED_PTR_OR_PTR</a></div><div class="ttdeci">@ COUNTED_PTR_OR_PTR</div><div class="ttdef"><b>Definition:</b> <a href="Alias_8h_source.html#l00190">Alias.h:190</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_a22a7083f7b9350124620c5d49e329b08aece4bfb7c26c6e5658766c149ff0de36"><div class="ttname"><a href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08aece4bfb7c26c6e5658766c149ff0de36">DGtal::Alias::COUNTED_CONST_PTR_OR_CONST_PTR</a></div><div class="ttdeci">@ COUNTED_CONST_PTR_OR_CONST_PTR</div><div class="ttdef"><b>Definition:</b> <a href="Alias_8h_source.html#l00191">Alias.h:191</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_a22a7083f7b9350124620c5d49e329b08afea753ac644b7a0f920cda1814c543bf"><div class="ttname"><a href="classDGtal_1_1Alias.html#a22a7083f7b9350124620c5d49e329b08afea753ac644b7a0f920cda1814c543bf">DGtal::Alias::LEFT_VALUE_REF</a></div><div class="ttdeci">@ LEFT_VALUE_REF</div><div class="ttdef"><b>Definition:</b> <a href="Alias_8h_source.html#l00189">Alias.h:189</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_a42eeabe2ecdeeafddeda9c5b704357cb"><div class="ttname"><a href="classDGtal_1_1Alias.html#a42eeabe2ecdeeafddeda9c5b704357cb">DGtal::Alias::operator&</a></div><div class="ttdeci">T * operator&() const</div><div class="ttdef"><b>Definition:</b> <a href="Alias_8h_source.html#l00293">Alias.h:293</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_a491b1fe9b7233e16b9b6ca9e1c7dff20"><div class="ttname"><a href="classDGtal_1_1Alias.html#a491b1fe9b7233e16b9b6ca9e1c7dff20">DGtal::Alias::Alias</a></div><div class="ttdeci">Alias(const T *)=delete</div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_a6fa99c59d38be64c4a134a3448942d6e"><div class="ttname"><a href="classDGtal_1_1Alias.html#a6fa99c59d38be64c4a134a3448942d6e">DGtal::Alias::Alias</a></div><div class="ttdeci">Alias(T &&)=delete</div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_a707d4456c3f59e5ff4a2821c5e97b3a3"><div class="ttname"><a href="classDGtal_1_1Alias.html#a707d4456c3f59e5ff4a2821c5e97b3a3">DGtal::Alias::Alias</a></div><div class="ttdeci">Alias(const CountedPtrOrPtr< T > &t)</div><div class="ttdef"><b>Definition:</b> <a href="Alias_8h_source.html#l00259">Alias.h:259</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_a9014119389c0f301204f3b041a097e23"><div class="ttname"><a href="classDGtal_1_1Alias.html#a9014119389c0f301204f3b041a097e23">DGtal::Alias::Alias</a></div><div class="ttdeci">Alias(T &t)</div><div class="ttdef"><b>Definition:</b> <a href="Alias_8h_source.html#l00226">Alias.h:226</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_ab41d7caa179e969b563f4569e346622e"><div class="ttname"><a href="classDGtal_1_1Alias.html#ab41d7caa179e969b563f4569e346622e">DGtal::Alias::myPtr</a></div><div class="ttdeci">const void *const myPtr</div><div class="ttdoc">Stores the address of the input parameter for further use.</div><div class="ttdef"><b>Definition:</b> <a href="Alias_8h_source.html#l00333">Alias.h:333</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_addf3247987f21b6b047632dc47fe055f"><div class="ttname"><a href="classDGtal_1_1Alias.html#addf3247987f21b6b047632dc47fe055f">DGtal::Alias::Alias</a></div><div class="ttdeci">Alias(const T &)=delete</div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_ae90d93d1351adbef66b2d89c0f51466d"><div class="ttname"><a href="classDGtal_1_1Alias.html#ae90d93d1351adbef66b2d89c0f51466d">DGtal::Alias::operator=</a></div><div class="ttdeci">Alias & operator=(const Alias &other)</div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_aead4282ef1764521264f3f9c8326bceb"><div class="ttname"><a href="classDGtal_1_1Alias.html#aead4282ef1764521264f3f9c8326bceb">DGtal::Alias::Alias</a></div><div class="ttdeci">Alias(const CountedPtr< T > &t)</div><div class="ttdef"><b>Definition:</b> <a href="Alias_8h_source.html#l00250">Alias.h:250</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Alias_html_af98f2306441a985223becd4101916638"><div class="ttname"><a href="classDGtal_1_1Alias.html#af98f2306441a985223becd4101916638">DGtal::Alias::Alias</a></div><div class="ttdeci">Alias(T *t)</div><div class="ttdef"><b>Definition:</b> <a href="Alias_8h_source.html#l00235">Alias.h:235</a></div></div>
<div class="ttc" id="aclassDGtal_1_1CountedPtrOrPtr_html"><div class="ttname"><a href="classDGtal_1_1CountedPtrOrPtr.html">DGtal::CountedPtrOrPtr</a></div><div class="ttdoc">Aim: Smart or simple pointer on T. It can be a smart pointer based on reference counts or a simple po...</div><div class="ttdef"><b>Definition:</b> <a href="CountedPtrOrPtr_8h_source.html#l00095">CountedPtrOrPtr.h:96</a></div></div>
<div class="ttc" id="aclassDGtal_1_1CountedPtr_html"><div class="ttname"><a href="classDGtal_1_1CountedPtr.html">DGtal::CountedPtr</a></div><div class="ttdoc">Aim: Smart pointer based on reference counts.</div><div class="ttdef"><b>Definition:</b> <a href="CountedPtr_8h_source.html#l00079">CountedPtr.h:80</a></div></div>
<div class="ttc" id="aclassDGtal_1_1CowPtr_html"><div class="ttname"><a href="classDGtal_1_1CowPtr.html">DGtal::CowPtr</a></div><div class="ttdoc">Aim: Copy on write shared pointer.</div><div class="ttdef"><b>Definition:</b> <a href="CowPtr_8h_source.html#l00067">CowPtr.h:68</a></div></div>
<div class="ttc" id="anamespaceDGtal_html"><div class="ttname"><a href="namespaceDGtal.html">DGtal</a></div><div class="ttdoc">DGtal is the top-level namespace which contains all DGtal functions and types.</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_f2cd1aeea1cfa982bb13a5f95fa4218c.html">DGtal</a></li><li class="navelem"><a class="el" href="dir_c72d96e2c8210585cd8a59fe221b7478.html">base</a></li><li class="navelem"><b>Alias.h</b></li>
<li class="footer">Generated on Mon Dec 23 2024 13:18:26 for DGtal by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
</ul>
</div>
</body>
</html>