1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
6 <meta name="generator" content="Doxygen 1.9.1"/>
7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
8 <title>libsigc++: sigc::bound_argument< T_type > Class Template Reference</title>
9 <link href="tabs.css" rel="stylesheet" type="text/css"/>
10 <script type="text/javascript" src="jquery.js"></script>
11 <script type="text/javascript" src="dynsections.js"></script>
12 <link href="doxygen.css" rel="stylesheet" type="text/css" />
13 <link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
16 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
18 <table cellspacing="0" cellpadding="0">
20 <tr style="height: 56px;">
21 <td id="projectalign" style="padding-left: 0.5em;">
22 <div id="projectname">libsigc++
23  <span id="projectnumber">2.10.8</span>
30 <!-- end header part -->
31 <!-- Generated by Doxygen 1.9.1 -->
32 <script type="text/javascript" src="menudata.js"></script>
33 <script type="text/javascript" src="menu.js"></script>
34 <script type="text/javascript">
35 /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
37 initMenu('',false,false,'search.php','Search');
39 /* @license-end */</script>
40 <div id="main-nav"></div>
41 <div id="nav-path" class="navpath">
43 <li class="navelem"><a class="el" href="namespacesigc.html">sigc</a></li><li class="navelem"><a class="el" href="classsigc_1_1bound__argument.html">bound_argument</a></li> </ul>
48 <a href="#pub-methods">Public Member Functions</a> |
49 <a href="classsigc_1_1bound__argument-members.html">List of all members</a> </div>
50 <div class="headertitle">
51 <div class="title">sigc::bound_argument< T_type > Class Template Reference</div> </div>
53 <div class="contents">
55 <p>A bound_argument<Foo> object stores a bound (for instance, with <a class="el" href="group__bind.html#ga2f099bc6056b32f2a58134ba8537c6f4" title="Creates an adaptor of type sigc::bind_functor which binds the passed argument to the passed functor.">sigc::bind()</a>, or <a class="el" href="group__bind.html#gaca1ae2466988d67d00a5f2cd16c8d90a" title="Creates an adaptor of type sigc::bind_return_functor which fixes the return value of the passed funct...">sigc::bind_return()</a>) argument.
56 <a href="classsigc_1_1bound__argument.html#details">More...</a></p>
58 <p><code>#include <sigc++/adaptors/bound_argument.h></code></p>
59 <table class="memberdecls">
60 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
61 Public Member Functions</h2></td></tr>
62 <tr class="memitem:a495bb69a41b38eda5d6ace5a36807a37"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1bound__argument.html#a495bb69a41b38eda5d6ace5a36807a37">bound_argument</a> (const T_type & _A_argument)</td></tr>
63 <tr class="memdesc:a495bb69a41b38eda5d6ace5a36807a37"><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="classsigc_1_1bound__argument.html#a495bb69a41b38eda5d6ace5a36807a37">More...</a><br /></td></tr>
64 <tr class="separator:a495bb69a41b38eda5d6ace5a36807a37"><td class="memSeparator" colspan="2"> </td></tr>
65 <tr class="memitem:af1cf20526bade89328a1ed398055bbba"><td class="memItemLeft" align="right" valign="top">T_type & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1bound__argument.html#af1cf20526bade89328a1ed398055bbba">invoke</a> ()</td></tr>
66 <tr class="memdesc:af1cf20526bade89328a1ed398055bbba"><td class="mdescLeft"> </td><td class="mdescRight">Retrieve the entity to pass to the bound functor or return. <a href="classsigc_1_1bound__argument.html#af1cf20526bade89328a1ed398055bbba">More...</a><br /></td></tr>
67 <tr class="separator:af1cf20526bade89328a1ed398055bbba"><td class="memSeparator" colspan="2"> </td></tr>
68 <tr class="memitem:ab29e53c5e983c45e4963e0ecace26465"><td class="memItemLeft" align="right" valign="top">const T_type & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1bound__argument.html#ab29e53c5e983c45e4963e0ecace26465">visit</a> () const</td></tr>
69 <tr class="memdesc:ab29e53c5e983c45e4963e0ecace26465"><td class="mdescLeft"> </td><td class="mdescRight">Retrieve the entity to visit in <a class="el" href="group__sigcfunctors.html#ga64cb7832acc1e58efb5ffe0b4f5e9404" title="This function performs a functor on each of the targets of a functor.">visit_each()</a>. <a href="classsigc_1_1bound__argument.html#ab29e53c5e983c45e4963e0ecace26465">More...</a><br /></td></tr>
70 <tr class="separator:ab29e53c5e983c45e4963e0ecace26465"><td class="memSeparator" colspan="2"> </td></tr>
72 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
73 <div class="textblock"><h3>template<class T_type><br />
74 class sigc::bound_argument< T_type ></h3>
76 <p>A bound_argument<Foo> object stores a bound (for instance, with <a class="el" href="group__bind.html#ga2f099bc6056b32f2a58134ba8537c6f4" title="Creates an adaptor of type sigc::bind_functor which binds the passed argument to the passed functor.">sigc::bind()</a>, or <a class="el" href="group__bind.html#gaca1ae2466988d67d00a5f2cd16c8d90a" title="Creates an adaptor of type sigc::bind_return_functor which fixes the return value of the passed funct...">sigc::bind_return()</a>) argument. </p>
77 <p>If Foo is a wrapped reference to a class Bar (reference_wrapper<Bar>) then this object is implemented on top of a <a class="el" href="classsigc_1_1limit__reference.html" title="A limit_reference<Foo> object stores a reference (Foo&), but make sure that, if Foo inherits from sig...">limit_reference</a>. When the slot is invoked, the <a class="el" href="classsigc_1_1limit__reference.html#affd2902cd78ccdae45c499058c83e992" title="Retrieve the reference.">limit_reference::invoke()</a> method provides the argument (a Bar&). When the slot is visited (e.g. <a class="el" href="group__sigcfunctors.html#ga64cb7832acc1e58efb5ffe0b4f5e9404" title="This function performs a functor on each of the targets of a functor.">visit_each<>()</a>), we simply visit the <a class="el" href="classsigc_1_1limit__reference.html" title="A limit_reference<Foo> object stores a reference (Foo&), but make sure that, if Foo inherits from sig...">limit_reference</a>, which will visit the derived type, or a <a class="el" href="structsigc_1_1trackable.html" title="Base class for objects with auto-disconnection.">sigc::trackable</a> base if necessary.</p>
78 <p>Likewise, If Foo is a wrapped const reference to a class Bar (const_reference_wrapper<Bar>) then this object is implemented on top of a <a class="el" href="classsigc_1_1const__limit__reference.html" title="A const_limit_reference<Foo> object stores a reference (Foo&), but make sure that,...">const_limit_reference</a>.</p>
79 <p>If Foo is something else (such as an argument that is bound by value) <a class="el" href="classsigc_1_1bound__argument.html" title="A bound_argument<Foo> object stores a bound (for instance, with sigc::bind(), or sigc::bind_return())...">bound_argument</a> just stores a cop of that value, and both <a class="el" href="classsigc_1_1bound__argument.html#af1cf20526bade89328a1ed398055bbba" title="Retrieve the entity to pass to the bound functor or return.">invoke()</a> and <a class="el" href="classsigc_1_1bound__argument.html#ab29e53c5e983c45e4963e0ecace26465" title="Retrieve the entity to visit in visit_each().">visit()</a> simply return it.</p>
80 <p>This object is used by the bind_functor<> and bind_return_functor<> objects, depending on whether the argument is bound as a parameter or as a return value.</p>
81 <p>The general template implementation is used for parameters that are passed by value. <em>T_type</em> The type of the bound argument. </p>
82 </div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
83 <a id="a495bb69a41b38eda5d6ace5a36807a37"></a>
84 <h2 class="memtitle"><span class="permalink"><a href="#a495bb69a41b38eda5d6ace5a36807a37">◆ </a></span>bound_argument()</h2>
87 <div class="memproto">
88 <div class="memtemplate">
89 template <class T_type > </div>
90 <table class="mlabels">
92 <td class="mlabels-left">
93 <table class="memname">
95 <td class="memname"><a class="el" href="classsigc_1_1bound__argument.html">sigc::bound_argument</a>< T_type >::<a class="el" href="classsigc_1_1bound__argument.html">bound_argument</a> </td>
97 <td class="paramtype">const T_type & </td>
98 <td class="paramname"><em>_A_argument</em></td><td>)</td>
103 <td class="mlabels-right">
104 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
107 </div><div class="memdoc">
110 <dl class="params"><dt>Parameters</dt><dd>
111 <table class="params">
112 <tr><td class="paramname">_A_argument</td><td>The argument to bind. </td></tr>
119 <h2 class="groupheader">Member Function Documentation</h2>
120 <a id="af1cf20526bade89328a1ed398055bbba"></a>
121 <h2 class="memtitle"><span class="permalink"><a href="#af1cf20526bade89328a1ed398055bbba">◆ </a></span>invoke()</h2>
123 <div class="memitem">
124 <div class="memproto">
125 <div class="memtemplate">
126 template <class T_type > </div>
127 <table class="mlabels">
129 <td class="mlabels-left">
130 <table class="memname">
132 <td class="memname">T_type& <a class="el" href="classsigc_1_1bound__argument.html">sigc::bound_argument</a>< T_type >::invoke </td>
134 <td class="paramname"></td><td>)</td>
139 <td class="mlabels-right">
140 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
143 </div><div class="memdoc">
145 <p>Retrieve the entity to pass to the bound functor or return. </p>
146 <dl class="section return"><dt>Returns</dt><dd>The bound argument. </dd></dl>
150 <a id="ab29e53c5e983c45e4963e0ecace26465"></a>
151 <h2 class="memtitle"><span class="permalink"><a href="#ab29e53c5e983c45e4963e0ecace26465">◆ </a></span>visit()</h2>
153 <div class="memitem">
154 <div class="memproto">
155 <div class="memtemplate">
156 template <class T_type > </div>
157 <table class="mlabels">
159 <td class="mlabels-left">
160 <table class="memname">
162 <td class="memname">const T_type& <a class="el" href="classsigc_1_1bound__argument.html">sigc::bound_argument</a>< T_type >::visit </td>
164 <td class="paramname"></td><td>)</td>
169 <td class="mlabels-right">
170 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
173 </div><div class="memdoc">
175 <p>Retrieve the entity to visit in <a class="el" href="group__sigcfunctors.html#ga64cb7832acc1e58efb5ffe0b4f5e9404" title="This function performs a functor on each of the targets of a functor.">visit_each()</a>. </p>
176 <dl class="section return"><dt>Returns</dt><dd>The bound argument. </dd></dl>
180 </div><!-- contents -->
181 <!-- start footer part -->
182 <hr class="footer"/><address class="footer"><small>
183 Generated on Fri Feb 11 2022 15:40:57 for libsigc++ 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