File: postconstructor_invoker.html

package info (click to toggle)
boost1.42 1.42.0-4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 277,864 kB
  • ctags: 401,076
  • sloc: cpp: 1,235,659; xml: 74,142; ansic: 41,313; python: 26,756; sh: 11,840; cs: 2,118; makefile: 655; perl: 494; yacc: 456; asm: 353; csh: 6
file content (109 lines) | stat: -rwxr-xr-x 9,889 bytes parent folder | download
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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class postconstructor_invoker</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../signals2/reference.html#header.boost.signals2.deconstruct_hpp" title="Header &lt;boost/signals2/deconstruct.hpp&gt;">
<link rel="prev" href="deconstruct_access.html" title="Class deconstruct_access">
<link rel="next" href="dummy_mutex.html" title="Class dummy_mutex">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="deconstruct_access.html"><img src="../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../signals2/reference.html#header.boost.signals2.deconstruct_hpp"><img src="../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="dummy_mutex.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="refentry" title="Class postconstructor_invoker">
<a name="boost.signals2.postconstructor_invoker"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class postconstructor_invoker</span></h2>
<p>boost::signals2::postconstructor_invoker &#8212; Pass arguments to and run postconstructors for objects created with <a class="link" href="deconstruct.html" title="Function deconstruct">deconstruct()</a>.</p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="emphasis"><em>// In header: &lt;<a class="link" href="../../signals2/reference.html#header.boost.signals2.deconstruct_hpp" title="Header &lt;boost/signals2/deconstruct.hpp&gt;">boost/signals2/deconstruct.hpp</a>&gt;

</em></span>
<span class="bold"><strong>class</strong></span> <a class="link" href="postconstructor_invoker.html" title="Class postconstructor_invoker">postconstructor_invoker</a> {
<span class="bold"><strong>public</strong></span>:

  <span class="emphasis"><em>// <a class="link" href="postconstructor_invoker.html#id1117569-bb">public methods</a></em></span>
  <a class="link" href="postconstructor_invoker.html#id1137470-bb"><span class="bold"><strong>operator</strong></span> <span class="bold"><strong>const</strong></span> shared_ptr&lt;T&gt; &amp;</a>();
  <span class="type"><span class="bold"><strong>const</strong></span> shared_ptr&lt;T&gt; &amp;</span> <a class="link" href="postconstructor_invoker.html#id621526-bb">postconstruct</a>();
  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> A1&gt; <span class="type"><span class="bold"><strong>const</strong></span> shared_ptr&lt;T&gt; &amp;</span> <a class="link" href="postconstructor_invoker.html#id1120333-bb">postconstruct</a>(A1);
  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> A1, <span class="bold"><strong>typename</strong></span> A2&gt; 
    <span class="type"><span class="bold"><strong>const</strong></span> shared_ptr&lt;T&gt; &amp;</span> <a class="link" href="postconstructor_invoker.html#id694894-bb">postconstruct</a>(A1, A1);
  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> A1, <span class="bold"><strong>typename</strong></span> A2, ..., <span class="bold"><strong>typename</strong></span> AN&gt; 
    <span class="type"><span class="bold"><strong>const</strong></span> shared_ptr&lt;T&gt; &amp;</span> <a class="link" href="postconstructor_invoker.html#id1136325-bb">postconstruct</a>(A1, A1, ..., A1);
};</pre></div>
<div class="refsect1" title="Description">
<a name="id1702801"></a><h2>Description</h2>
<p>
            Objects of type <code class="computeroutput">postconstructor_invoker</code> are returned by calls to the
            <a class="link" href="deconstruct.html" title="Function deconstruct">deconstruct()</a> factory function.  These objects are intended
            to either be immediately assigned to a shared_ptr (in which case the
            class' conversion operator will perform the conversion by calling the
            <a class="link" href="postconstructor_invoker.html#id621522-bb">postconstruct</a> with no arguments), or to be converted
            to shared_ptr explicitly by the user calling one of
            the <a class="link" href="postconstructor_invoker.html#id621522-bb">postconstruct</a> methods.
          </p>
<div class="refsect2" title="postconstructor_invoker public methods">
<a name="id1702842"></a><h3>
<a name="id1117569-bb"></a><code class="computeroutput">postconstructor_invoker</code> public methods</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="id1137470-bb"></a><span class="bold"><strong>operator</strong></span> <span class="bold"><strong>const</strong></span> shared_ptr&lt;T&gt; &amp;();</pre>
<p>
              The conversion operator has the same effect as explicitly calling
              the <code class="computeroutput"><a class="link" href="postconstructor_invoker.html#id621522-bb">postconstruct</a></code> method with no arguments.
            </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="id621522-bb"></a><span class="type"><span class="bold"><strong>const</strong></span> shared_ptr&lt;T&gt; &amp;</span> <a name="id621526-bb"></a>postconstruct();
<span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> A1&gt; <span class="type"><span class="bold"><strong>const</strong></span> shared_ptr&lt;T&gt; &amp;</span> <a name="id1120333-bb"></a>postconstruct(A1 a1);
<span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> A1, <span class="bold"><strong>typename</strong></span> A2&gt; 
  <span class="type"><span class="bold"><strong>const</strong></span> shared_ptr&lt;T&gt; &amp;</span> <a name="id694894-bb"></a>postconstruct(A1 a1, A1 a2);
<span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> A1, <span class="bold"><strong>typename</strong></span> A2, ..., <span class="bold"><strong>typename</strong></span> AN&gt; 
  <span class="type"><span class="bold"><strong>const</strong></span> shared_ptr&lt;T&gt; &amp;</span> <a name="id1136325-bb"></a>postconstruct(A1 a1, A1 a2, ..., A1 aN);</pre>
<p>
              The <code class="computeroutput">postconstruct</code> methods make an unqualified call to
              <code class="computeroutput">adl_postconstruct()</code> and then return the <code class="computeroutput">shared_ptr</code>
              which was wrapped inside the <code class="computeroutput">postconstructor_invoker</code>
              object by <code class="computeroutput"><a class="link" href="deconstruct.html" title="Function deconstruct">deconstruct()</a></code>.
              The first two arguments passed to the
              <code class="computeroutput">adl_postconstruct()</code> call are always the <code class="computeroutput">shared_ptr</code>
              owning the object created by <code class="computeroutput"><a class="link" href="deconstruct.html" title="Function deconstruct">deconstruct()</a></code>,
              followed by a ordinary pointer to the same object.  As a convenience,
              the ordinary pointer
              will always be cast to point to a non-const type before being passed
              to <code class="computeroutput">adl_postconstruct</code>.  The remaining arguments passed to
              <code class="computeroutput">adl_postconstruct</code> are whatever arguments the user may have
              passed to the <code class="computeroutput">postconstruct</code>
              method.
            </p>
</li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2001-2004 Douglas Gregor<br>Copyright &#169; 2007-2009 Frank Mori Hess<p>Distributed under the Boost
    Software License, Version 1.0. (See accompanying file
    <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="deconstruct_access.html"><img src="../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../signals2/reference.html#header.boost.signals2.deconstruct_hpp"><img src="../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="dummy_mutex.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>