1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.8.9.1"/>
7 <title>libsigc++: sigc::visitor< T_functor > Struct Template Reference</title>
8 <link href="tabs.css" rel="stylesheet" type="text/css"/>
9 <script type="text/javascript" src="jquery.js"></script>
10 <script type="text/javascript" src="dynsections.js"></script>
11 <link href="doxygen.css" rel="stylesheet" type="text/css" />
12 <link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
15 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
17 <table cellspacing="0" cellpadding="0">
19 <tr style="height: 56px;">
20 <td style="padding-left: 0.5em;">
21 <div id="projectname">libsigc++
22  <span id="projectnumber">2.9.1</span>
29 <!-- end header part -->
30 <!-- Generated by Doxygen 1.8.9.1 -->
31 <div id="navrow1" class="tabs">
33 <li><a href="index.html"><span>Main Page</span></a></li>
34 <li><a href="pages.html"><span>Related Pages</span></a></li>
35 <li><a href="modules.html"><span>Modules</span></a></li>
36 <li><a href="namespaces.html"><span>Namespaces</span></a></li>
37 <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
40 <div id="navrow2" class="tabs2">
42 <li><a href="annotated.html"><span>Class List</span></a></li>
43 <li><a href="classes.html"><span>Class Index</span></a></li>
44 <li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
45 <li><a href="functions.html"><span>Class Members</span></a></li>
48 <div id="nav-path" class="navpath">
50 <li class="navelem"><a class="el" href="namespacesigc.html">sigc</a></li><li class="navelem"><a class="el" href="structsigc_1_1visitor.html">visitor</a></li> </ul>
55 <a href="#pub-static-methods">Static Public Member Functions</a> |
56 <a href="structsigc_1_1visitor-members.html">List of all members</a> </div>
57 <div class="headertitle">
58 <div class="title">sigc::visitor< T_functor > Struct Template Reference<div class="ingroups"><a class="el" href="group__sigcfunctors.html">Functors</a></div></div> </div>
60 <div class="contents">
62 <p><a class="el" href="structsigc_1_1visitor.html#a9fe5d6be845e622a99a0db5d3621d4b3">sigc::visitor<T_functor>::do_visit_each()</a> performs a functor on each of the targets of a functor.
63 <a href="structsigc_1_1visitor.html#details">More...</a></p>
65 <p><code>#include <sigc++/visit_each.h></code></p>
66 <table class="memberdecls">
67 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
68 Static Public Member Functions</h2></td></tr>
69 <tr class="memitem:a9fe5d6be845e622a99a0db5d3621d4b3"><td class="memTemplParams" colspan="2">template<class T_action > </td></tr>
70 <tr class="memitem:a9fe5d6be845e622a99a0db5d3621d4b3"><td class="memTemplItemLeft" align="right" valign="top">static void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structsigc_1_1visitor.html#a9fe5d6be845e622a99a0db5d3621d4b3">do_visit_each</a> (const T_action& _A_action, const T_functor& _A_functor)</td></tr>
71 <tr class="separator:a9fe5d6be845e622a99a0db5d3621d4b3"><td class="memSeparator" colspan="2"> </td></tr>
73 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
74 <div class="textblock"><h3>template<class T_functor><br />
75 struct sigc::visitor< T_functor ></h3>
77 <p><a class="el" href="structsigc_1_1visitor.html#a9fe5d6be845e622a99a0db5d3621d4b3">sigc::visitor<T_functor>::do_visit_each()</a> performs a functor on each of the targets of a functor. </p>
78 <p>All unknown types just call <em>_A_action</em> on them. Add specializations that specialize the <em>T_functor</em> argument for your own functor types, so that subobjects get visited. This is needed to enable auto-disconnection support for your functor types.</p>
79 <dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line"><span class="keyword">namespace </span>some_ns</div>
80 <div class="line">{</div>
81 <div class="line"> <span class="keyword">struct </span>some_functor</div>
82 <div class="line"> {</div>
83 <div class="line"> <span class="keywordtype">void</span> operator()() {}</div>
84 <div class="line"> some_possibly_sigc_trackable_derived_type some_data_member;</div>
85 <div class="line"> some_other_functor_type some_other_functor;</div>
86 <div class="line"> };</div>
87 <div class="line">}</div>
88 <div class="line"></div>
89 <div class="line"><span class="keyword">namespace </span><a class="code" href="namespacesigc.html">sigc</a></div>
90 <div class="line">{</div>
91 <div class="line"> <span class="keyword">template</span> <></div>
92 <div class="line"> <span class="keyword">struct </span>visitor<some_ns::some_functor></div>
93 <div class="line"> {</div>
94 <div class="line"> <span class="keyword">template</span> <<span class="keyword">class</span> T_action></div>
95 <div class="line"> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="structsigc_1_1visitor.html#a9fe5d6be845e622a99a0db5d3621d4b3">do_visit_each</a>(<span class="keyword">const</span> T_action& _A_action,</div>
96 <div class="line"> <span class="keyword">const</span> some_ns::some_functor& _A_target)</div>
97 <div class="line"> {</div>
98 <div class="line"> <a class="code" href="group__sigcfunctors.html#ga64cb7832acc1e58efb5ffe0b4f5e9404">sigc::visit_each</a>(_A_action, _A_target.some_data_member);</div>
99 <div class="line"> <a class="code" href="group__sigcfunctors.html#ga64cb7832acc1e58efb5ffe0b4f5e9404">sigc::visit_each</a>(_A_action, _A_target.some_other_functor);</div>
100 <div class="line"> }</div>
101 <div class="line"> };</div>
102 <div class="line">}</div>
103 </div><!-- fragment --> </dd></dl>
104 </div><h2 class="groupheader">Member Function Documentation</h2>
105 <a class="anchor" id="a9fe5d6be845e622a99a0db5d3621d4b3"></a>
106 <div class="memitem">
107 <div class="memproto">
108 <div class="memtemplate">
109 template <class T_functor > </div>
110 <div class="memtemplate">
111 template <class T_action > </div>
112 <table class="mlabels">
114 <td class="mlabels-left">
115 <table class="memname">
117 <td class="memname">static void <a class="el" href="structsigc_1_1visitor.html">sigc::visitor</a>< T_functor >::do_visit_each </td>
119 <td class="paramtype">const T_action & </td>
120 <td class="paramname"><em>_A_action</em>, </td>
123 <td class="paramkey"></td>
125 <td class="paramtype">const T_functor & </td>
126 <td class="paramname"><em>_A_functor</em> </td>
135 <td class="mlabels-right">
136 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
139 </div><div class="memdoc">
143 </div><!-- contents -->
144 <!-- start footer part -->
145 <hr class="footer"/><address class="footer"><small>
146 Generated on Wed Mar 16 2016 13:54:33 for libsigc++ by  <a href="http://www.doxygen.org/index.html">
147 <img class="footer" src="doxygen.png" alt="doxygen"/>