79
78
<table class="memberdecls">
80
79
<tr><td colspan="2"><h2><a name="pub-types"></a>
81
80
Public Types</h2></td></tr>
82
<tr><td class="memItemLeft" align="right" valign="top">typedef Tr::CppType </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html#a90ac15f84f6b3f055aa651b29f0c5258">CppType</a></td></tr>
83
<tr><td class="memItemLeft" align="right" valign="top">typedef Tr::CType </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html#a0a730b0c4ea34673aa944f34ae9ccd88">CType</a></td></tr>
81
<tr><td class="memItemLeft" align="right" valign="top">typedef Tr::CppType </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html#a59d9ba249e844314e302ee44462f5c0a">CppType</a></td></tr>
82
<tr><td class="memItemLeft" align="right" valign="top">typedef Tr::CType </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html#abcfafd933ea7c40d19d95a61e594d453">CType</a></td></tr>
84
83
<tr><td colspan="2"><h2><a name="pub-methods"></a>
85
84
Public Member Functions</h2></td></tr>
86
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html#a4207dc51d04222c557591b1c95efa0fc">GListKeeper</a> (const GList* glist, <a class="el" href="group__ContHandles.html#ga64c27560b41710ccf64a3679a3ba3f20">Glib::OwnershipType</a> ownership)</td></tr>
87
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructs an <a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html" title="A keeper class for GList.">GListKeeper</a> holding <em>glist</em>. <a href="#a4207dc51d04222c557591b1c95efa0fc"></a><br/></td></tr>
88
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html#abddfd000ad4ba2a9e2b7cf0db8254690">GListKeeper</a> (const <a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html">GListKeeper</a>& keeper)</td></tr>
89
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html#a2f5fc263abf15d826a4c39b23d39b463">~GListKeeper</a> ()</td></tr>
90
<tr><td class="memItemLeft" align="right" valign="top">GList* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html#a4091150e8dbfbdf5c55addf13293972c">data</a> () const </td></tr>
91
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets data the keeper holds. <a href="#a4091150e8dbfbdf5c55addf13293972c"></a><br/></td></tr>
85
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html#adfdce64d0c4125bc2e06c2c5a3450c62">GListKeeper</a> (const GList* glist, <a class="el" href="group__ContHandles.html#ga64c27560b41710ccf64a3679a3ba3f20">Glib::OwnershipType</a> ownership)</td></tr>
86
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructs an <a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html" title="A keeper class for GList.">GListKeeper</a> holding <em>glist</em>. <a href="#adfdce64d0c4125bc2e06c2c5a3450c62"></a><br/></td></tr>
87
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html#a23cd1b6528a618ee62d3b74a4207006b">GListKeeper</a> (const <a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html">GListKeeper</a>& keeper)</td></tr>
88
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html#aaa6a8f25d403a9d8c9de052c01fcb480">~GListKeeper</a> ()</td></tr>
89
<tr><td class="memItemLeft" align="right" valign="top">GList* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html#a86b59e9ff57c7b10288a4ee62e5a7a84">data</a> () const </td></tr>
90
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets data the keeper holds. <a href="#a86b59e9ff57c7b10288a4ee62e5a7a84"></a><br/></td></tr>
93
92
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
94
<div class="textblock"><h3>template<typename Tr><br/>
95
class Glib::Container_Helpers::GListKeeper< Tr ></h3>
97
<p>A keeper class for GList. </p>
93
<div class="textblock"><p>A keeper class for GList. </p>
98
94
<p>Primarily used by C++ wrappers like gtkmm.</p>
99
95
<p>Its main purpose is to free its data when they are not needed. What will be destroyed depends on passed ownership upon construction.</p>
100
<p>The most common usage of Glib::GListKeeper is getting its data when converting <a class="elRef" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00938.html">std::vector</a> to a GList*: </p>
101
<div class="fragment"><pre class="fragment"> <span class="keywordtype">void</span> G::Temp::do_something(<span class="keyword">const</span> <a class="codeRef" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00938.html">std::vector<int></a>& v)
96
<p>The most common usage of Glib::GListKeeper is getting its data when converting <a class="elRef" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00970.html">std::vector</a> to a GList*: </p>
97
<div class="fragment"><pre class="fragment"> <span class="keywordtype">void</span> G::Temp::do_something(<span class="keyword">const</span> <a class="codeRef" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00970.html">std::vector<int></a>& v)
103
g_temp_do_something(gobj(), <a class="code" href="classGlib_1_1ListHandler.html" title="A utility for converting between std::vector and GList.">Glib::ListHandler<int>::vector_to_list</a>(v).<a class="code" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html#a4091150e8dbfbdf5c55addf13293972c" title="Gets data the keeper holds.">data</a>());
99
g_temp_do_something(gobj(), <a class="code" href="classGlib_1_1ListHandler.html" title="A utility for converting between std::vector and GList.">Glib::ListHandler<int>::vector_to_list</a>(v).<a class="code" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html#a86b59e9ff57c7b10288a4ee62e5a7a84" title="Gets data the keeper holds.">data</a>());
105
</pre></div><p> Variables of this class are seldom defined directly - it is mostly used as a temporary variable returned by <a class="el" href="classGlib_1_1ListHandler.html#aa3f1c38cb301fa89706d517744b813a1">Glib::ListHandler::vector_to_list()</a>.</p>
106
<p>Note that the usage above is correct with regards to C++ standard point 12.2.3. That means that data returned by <a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html#a4091150e8dbfbdf5c55addf13293972c" title="Gets data the keeper holds.">data()</a> method is valid through whole g_temp_do_something function and is destroyed, when this function returns. </p>
101
</pre></div><p> Variables of this class are seldom defined directly - it is mostly used as a temporary variable returned by <a class="el" href="classGlib_1_1ListHandler.html#a62b4ad5ad07478e19fcb75511def04b1">Glib::ListHandler::vector_to_list()</a>.</p>
102
<p>Note that the usage above is correct with regards to C++ standard point 12.2.3. That means that data returned by <a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html#a86b59e9ff57c7b10288a4ee62e5a7a84" title="Gets data the keeper holds.">data()</a> method is valid through whole g_temp_do_something function and is destroyed, when this function returns. </p>
107
103
</div><hr/><h2>Member Typedef Documentation</h2>
108
<a class="anchor" id="a90ac15f84f6b3f055aa651b29f0c5258"></a><!-- doxytag: member="Glib::Container_Helpers::GListKeeper::CppType" ref="a90ac15f84f6b3f055aa651b29f0c5258" args="" -->
104
<a class="anchor" id="a59d9ba249e844314e302ee44462f5c0a"></a><!-- doxytag: member="Glib::Container_Helpers::GListKeeper::CppType" ref="a59d9ba249e844314e302ee44462f5c0a" args="" -->
109
105
<div class="memitem">
110
106
<div class="memproto">
111
<div class="memtemplate">
112
template <typename Tr > </div>
113
107
<table class="memname">
115
<td class="memname">typedef Tr::CppType <a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html">Glib::Container_Helpers::GListKeeper</a>< Tr >::<a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html#a90ac15f84f6b3f055aa651b29f0c5258">CppType</a></td>
109
<td class="memname">typedef Tr::CppType <a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html#a59d9ba249e844314e302ee44462f5c0a">Glib::Container_Helpers::GListKeeper::CppType</a></td>
138
130
<hr/><h2>Constructor & Destructor Documentation</h2>
139
<a class="anchor" id="a4207dc51d04222c557591b1c95efa0fc"></a><!-- doxytag: member="Glib::Container_Helpers::GListKeeper::GListKeeper" ref="a4207dc51d04222c557591b1c95efa0fc" args="(const GList *glist, Glib::OwnershipType ownership)" -->
131
<a class="anchor" id="adfdce64d0c4125bc2e06c2c5a3450c62"></a><!-- doxytag: member="Glib::Container_Helpers::GListKeeper::GListKeeper" ref="adfdce64d0c4125bc2e06c2c5a3450c62" args="(const GList *glist, Glib::OwnershipType ownership)" -->
140
132
<div class="memitem">
141
133
<div class="memproto">
142
<div class="memtemplate">
143
template <typename Tr > </div>
144
134
<table class="memname">
146
<td class="memname"><a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html">Glib::Container_Helpers::GListKeeper</a>< Tr >::<a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html">GListKeeper</a> </td>
136
<td class="memname">Glib::Container_Helpers::GListKeeper::GListKeeper </td>
148
138
<td class="paramtype">const GList * </td>
149
139
<td class="paramname"><em>glist</em>, </td>
186
<a class="anchor" id="abddfd000ad4ba2a9e2b7cf0db8254690"></a><!-- doxytag: member="Glib::Container_Helpers::GListKeeper::GListKeeper" ref="abddfd000ad4ba2a9e2b7cf0db8254690" args="(const GListKeeper &keeper)" -->
176
<a class="anchor" id="a23cd1b6528a618ee62d3b74a4207006b"></a><!-- doxytag: member="Glib::Container_Helpers::GListKeeper::GListKeeper" ref="a23cd1b6528a618ee62d3b74a4207006b" args="(const GListKeeper &keeper)" -->
187
177
<div class="memitem">
188
178
<div class="memproto">
189
<div class="memtemplate">
190
template <typename Tr > </div>
191
179
<table class="memname">
193
<td class="memname"><a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html">Glib::Container_Helpers::GListKeeper</a>< Tr >::<a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html">GListKeeper</a> </td>
181
<td class="memname">Glib::Container_Helpers::GListKeeper::GListKeeper </td>
195
<td class="paramtype">const <a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html">GListKeeper</a>< Tr >& </td>
183
<td class="paramtype">const <a class="el" href="classGlib_1_1Container__Helpers_1_1GListKeeper.html">GListKeeper</a>& </td>
196
184
<td class="paramname"><em>keeper</em></td><td>)</td>
197
185
<td><code> [inline]</code></td>