File: Poco.AutoPtr.html

package info (click to toggle)
poco-doc 1.3.6-1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 10,076 kB
  • ctags: 9,611
  • sloc: makefile: 31
file content (279 lines) | stat: -rw-r--r-- 19,979 bytes parent folder | download | duplicates (2)
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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<!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>
<title>Class Poco::AutoPtr</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.html" class="namespace">Poco</a></h1>
<h1 class="template">template &lt; class C &gt;</h1>
<h1 class="symbol">class AutoPtr</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Foundation<br />
<b>Package:</b> Core<br />
<b>Header:</b> Poco/AutoPtr.h</p>
<h2>Description</h2>
<div class="description">
<p><a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> is a &quot;smart&quot; pointer for classes implementing reference counting based garbage collection. To be usable with the <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> template, a class must implement the following behaviour: A class must maintain a reference count. The constructors of the object initialize the reference count to one. The class must implement a public <a href="Poco.AutoPtr.html#3679" title="Poco::AutoPtr::duplicate()">duplicate</a>() method: </p>
<pre>void duplicate();
</pre>
<p>that increments the reference count by one. The class must implement a public release() method: </p>
<pre>void release()
</pre>
<p>that decrements the reference count by one, and, if the reference count reaches zero, deletes the object. </p>
<p><a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> works in the following way: If an <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> is assigned an ordinary pointer to an object (via the constructor or the assignment operator), it takes ownership of the object and the object's reference  count remains unchanged. If the <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> is assigned another <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a>, the object's reference count is incremented by one by calling <a href="Poco.AutoPtr.html#3679" title="Poco::AutoPtr::duplicate()">duplicate</a>() on its object. The destructor of <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> calls release() on its object. <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> supports dereferencing with both the -&gt; and the * operator. An attempt to dereference a null <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> results in a <a href="Poco.NullPointerException.html" title="class Poco::NullPointerException">NullPointerException</a> being thrown. <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> also implements all relational operators. Note that <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> allows casting of its encapsulated data types. </p>
</div>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.AutoPtr.html#3650" title="Poco::AutoPtr::assign()">assign</a>, <a href="Poco.AutoPtr.html#3667" title="Poco::AutoPtr::cast()">cast</a>, <a href="Poco.AutoPtr.html#3679" title="Poco::AutoPtr::duplicate()">duplicate</a>, <a href="Poco.AutoPtr.html#3673" title="Poco::AutoPtr::get()">get</a>, <a href="Poco.AutoPtr.html#3678" title="Poco::AutoPtr::isNull()">isNull</a>, <a href="Poco.AutoPtr.html#3677" title="Poco::AutoPtr::operator !()">operator&nbsp;!</a>, <a href="Poco.AutoPtr.html#3686" title="Poco::AutoPtr::operator !=()">operator&nbsp;!=</a>, <a href="Poco.AutoPtr.html#3671" title="Poco::AutoPtr::operator *()">operator&nbsp;*</a>, <a href="Poco.AutoPtr.html#3692" title="Poco::AutoPtr::operator <()">operator&nbsp;&lt;</a>, <a href="Poco.AutoPtr.html#3698" title="Poco::AutoPtr::operator <=()">operator&nbsp;&lt;=</a>, <a href="Poco.AutoPtr.html#3659" title="Poco::AutoPtr::operator =()">operator&nbsp;=</a>, <a href="Poco.AutoPtr.html#3680" title="Poco::AutoPtr::operator ==()">operator&nbsp;==</a>, <a href="Poco.AutoPtr.html#3704" title="Poco::AutoPtr::operator >()">operator&nbsp;&gt;</a>, <a href="Poco.AutoPtr.html#3710" title="Poco::AutoPtr::operator >=()">operator&nbsp;&gt;=</a>, <a href="Poco.AutoPtr.html#3675" title="Poco::AutoPtr::operator C *()">operator&nbsp;C&nbsp;*</a>, <a href="Poco.AutoPtr.html#3676" title="Poco::AutoPtr::operator const C *()">operator&nbsp;const&nbsp;C&nbsp;*</a>, <a href="Poco.AutoPtr.html#3669" title="Poco::AutoPtr::operator->()">operator-&gt;</a>, <a href="Poco.AutoPtr.html#3665" title="Poco::AutoPtr::swap()">swap</a>, <a href="Poco.AutoPtr.html#3668" title="Poco::AutoPtr::unsafeCast()">unsafeCast</a></p>
<h2>Constructors</h2>
<h3><a name="3639">AutoPtr</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a>();</p>
<div class="description">
<p></p>
</div>
<h3><a name="3640">AutoPtr</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;C * ptr<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3645">AutoPtr</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &amp; ptr<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3647">AutoPtr</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">template &lt; class Other &gt; <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &lt; Other &gt; &amp; ptr<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3642">AutoPtr</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;C * ptr,<br />&nbsp;&nbsp;&nbsp;&nbsp;bool shared<br />);</p>
<div class="description">
<p></p>
</div>
<h2>Destructor</h2>
<h3><a name="3649">~AutoPtr</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">~<a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a>();</p>
<div class="description">
<p></p>
</div>
<h2>Member Functions</h2>
<h3><a name="3650">assign</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &amp; assign(<br />&nbsp;&nbsp;&nbsp;&nbsp;C * ptr<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3652">assign</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &amp; assign(<br />&nbsp;&nbsp;&nbsp;&nbsp;C * ptr,<br />&nbsp;&nbsp;&nbsp;&nbsp;bool shared<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3655">assign</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &amp; assign(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &amp; ptr<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3657">assign</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">template &lt; class Other &gt; <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &amp; assign(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &lt; Other &gt; &amp; ptr<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3667">cast</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">template &lt; class Other &gt; <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &lt; Other &gt; cast() const;</p>
<div class="description">
<p>Casts the <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> via a dynamic cast to the given type. Returns an <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> containing NULL if the cast fails. Example: (assume class Sub: public Super) </p>
<pre>AutoPtr&lt;Super&gt; super(new Sub());
AutoPtr&lt;Sub&gt; sub = super.cast&lt;Sub&gt;();
poco_assert (sub.get());
</pre>
</div>
<h3><a name="3679">duplicate</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">C * duplicate();</p>
<div class="description">
<p></p>
</div>
<h3><a name="3673">get</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">C * get();</p>
<div class="description">
<p></p>
</div>
<h3><a name="3674">get</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">const C * get() const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3678">isNull</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool isNull() const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3677">operator !</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator ! () const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3686">operator !=</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator != (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &amp; ptr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3688">operator !=</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator != (<br />&nbsp;&nbsp;&nbsp;&nbsp;const C * ptr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3690">operator !=</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator != (<br />&nbsp;&nbsp;&nbsp;&nbsp;C * ptr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3671">operator *</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">C &amp; operator * ();</p>
<div class="description">
<p></p>
</div>
<h3><a name="3672">operator *</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">const C &amp; operator * () const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3692">operator &lt;</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator &lt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &amp; ptr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3694">operator &lt;</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator &lt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;const C * ptr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3696">operator &lt;</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator &lt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;C * ptr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3698">operator &lt;=</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator &lt;= (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &amp; ptr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3700">operator &lt;=</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator &lt;= (<br />&nbsp;&nbsp;&nbsp;&nbsp;const C * ptr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3702">operator &lt;=</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator &lt;= (<br />&nbsp;&nbsp;&nbsp;&nbsp;C * ptr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3659">operator =</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &amp; operator = (<br />&nbsp;&nbsp;&nbsp;&nbsp;C * ptr<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3661">operator =</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &amp; operator = (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &amp; ptr<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3663">operator =</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">template &lt; class Other &gt; <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &amp; operator = (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &lt; Other &gt; &amp; ptr<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3680">operator ==</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator == (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &amp; ptr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3682">operator ==</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator == (<br />&nbsp;&nbsp;&nbsp;&nbsp;const C * ptr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3684">operator ==</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator == (<br />&nbsp;&nbsp;&nbsp;&nbsp;C * ptr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3704">operator &gt;</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator &gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &amp; ptr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3706">operator &gt;</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator &gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;const C * ptr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3708">operator &gt;</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator &gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;C * ptr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3710">operator &gt;=</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator &gt;= (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &amp; ptr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3712">operator &gt;=</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator &gt;= (<br />&nbsp;&nbsp;&nbsp;&nbsp;const C * ptr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3714">operator &gt;=</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator &gt;= (<br />&nbsp;&nbsp;&nbsp;&nbsp;C * ptr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3675">operator C *</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">operator C * ();</p>
<div class="description">
<p></p>
</div>
<h3><a name="3676">operator const C *</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">operator const C * () const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3669">operator-&gt;</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">C * operator-&gt; ();</p>
<div class="description">
<p></p>
</div>
<h3><a name="3670">operator-&gt;</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">const C * operator-&gt; () const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3665">swap</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void swap(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &amp; ptr<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3668">unsafeCast</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">template &lt; class Other &gt; <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> &lt; Other &gt; unsafeCast() const;</p>
<div class="description">
<p>Casts the <a href="Poco.AutoPtr.html" title="class Poco::AutoPtr">AutoPtr</a> via a static cast to the given type. Example: (assume class Sub: public Super) </p>
<pre>AutoPtr&lt;Super&gt; super(new Sub());
AutoPtr&lt;Sub&gt; sub = super.unsafeCast&lt;Sub&gt;();
poco_assert (sub.get());
</pre>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright &copy; 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>

</div>
</body>
</html>