<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>glibmm 2.4: Glib::Value< T > Class Template Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#ffffff"> <table border="0" width="100%"> <tr> <td width="10%" height="40"><img src="../../images/gtkmm_logo.gif" alt="logo" border="0" width="100%" height="100%"/></td> <td width="90%" height="40"><img src="../../images/top.gif" alt="top" width="100%" height="40"/></td> </tr> </table> <center> <a class="qindex" href="../../../../gtkmm-2.4/docs/index.html">Main Page</a> <a href="../../../../gtkmm-2.4/docs/reference/html/group__Widgets.html">Widgets</a> <a class="qindex" href="namespaces.html">glibmm Namespaces</a> <a href="../../../../gtkmm-2.4/docs/tutorial/html/index.html"> Book</a> </center> <hr width="100%"/> <!-- begin main content --> <div id="content"> <!-- Generated by Doxygen 1.5.3 --> <div class="nav"> <a class="el" href="namespaceGlib.html">Glib</a>::<a class="el" href="classGlib_1_1Value.html">Value</a></div> <h1>Glib::Value< T > Class Template Reference<br> <small> [<a class="el" href="group__glibmmValue.html">Generic Values</a>]</small> </h1><!-- doxytag: class="Glib::Value" --><!-- doxytag: inherits="Glib::ValueBase_Boxed" -->Generic value implementation for custom types. <a href="#_details">More...</a> <p> <div class="dynheader"> Inheritance diagram for Glib::Value< T >:</div> <div class="dynsection"> <p><center><img src="classGlib_1_1Value__inherit__graph.png" border="0" usemap="#Glib_1_1Value_3_01T_01_4__inherit__map" alt="Inheritance graph"></center> <map name="Glib_1_1Value_3_01T_01_4__inherit__map"> <area shape="rect" href="classGlib_1_1ValueBase__Boxed.html" title="Glib::ValueBase_Boxed" alt="" coords="5,84,173,111"><area shape="rect" href="classGlib_1_1ValueBase.html" title="Glib::ValueBase" alt="" coords="29,7,149,33"></map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> <p> <a href="classGlib_1_1Value-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Types</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef T </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Value.html#43ab35a7b991e3a3383e25315593b942">CppType</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef T* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Value.html#c841aa34bcc65ae94ea869ae8cb6ef20">CType</a></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Value.html#d9750eff16879524796c8c13d4045c0e">set</a> (const <a class="el" href="classGlib_1_1Value.html#43ab35a7b991e3a3383e25315593b942">CppType</a>& data)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classGlib_1_1Value.html#43ab35a7b991e3a3383e25315593b942">CppType</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Value.html#8639f0b564d3f68d99c6a7295367f5be">get</a> () const </td></tr> <tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static GType </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Value.html#1a78ff909a3caf8062b9243aef39c6af">value_type</a> () G_GNUC_CONST</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> <h3>template <class T><br> class Glib::Value< T ></h3> Generic value implementation for custom types. <p> Any type to be used with this template must implement:<ul> <li>default constructor</li><li>copy constructor</li><li>assignment operator</li><li>destructor</li></ul> <p> Compiler-generated implementations are OK, provided they do the right thing for the type. In other words, any type that works with <code><a class="elRef" doxygen="libstdc++.tag.xml:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/classstd_1_1vector.html">std::vector</a></code> will work with Glib::Value<>.<p> <dl class="note" compact><dt><b>Note:</b></dt><dd>None of the operations listed above are allowed to throw. If you cannot ensure that no exceptions will be thrown, consider using either a normal pointer or a smart pointer to hold your objects indirectly. </dd></dl> <hr><h2>Member Typedef Documentation</h2> <a class="anchor" name="43ab35a7b991e3a3383e25315593b942"></a><!-- doxytag: member="Glib::Value::CppType" ref="43ab35a7b991e3a3383e25315593b942" args="" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template <class T> </div> <table class="memname"> <tr> <td class="memname">typedef T <a class="el" href="classGlib_1_1Value.html">Glib::Value</a><T>::<a class="el" href="classGlib_1_1Value.html#43ab35a7b991e3a3383e25315593b942">CppType</a> </td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="c841aa34bcc65ae94ea869ae8cb6ef20"></a><!-- doxytag: member="Glib::Value::CType" ref="c841aa34bcc65ae94ea869ae8cb6ef20" args="" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template <class T> </div> <table class="memname"> <tr> <td class="memname">typedef T* <a class="el" href="classGlib_1_1Value.html">Glib::Value</a><T>::<a class="el" href="classGlib_1_1Value.html#c841aa34bcc65ae94ea869ae8cb6ef20">CType</a> </td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="1a78ff909a3caf8062b9243aef39c6af"></a><!-- doxytag: member="Glib::Value::value_type" ref="1a78ff909a3caf8062b9243aef39c6af" args="() G_GNUC_CONST" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template <class T> </div> <table class="memname"> <tr> <td class="memname">static GType <a class="el" href="classGlib_1_1Value.html">Glib::Value</a><T>::value_type </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <p>Reimplemented from <a class="el" href="classGlib_1_1ValueBase__Boxed.html#e318a8c011c742c570a20c712f867015">Glib::ValueBase_Boxed</a>.</p> </div> </div><p> <a class="anchor" name="d9750eff16879524796c8c13d4045c0e"></a><!-- doxytag: member="Glib::Value::set" ref="d9750eff16879524796c8c13d4045c0e" args="(const CppType &data)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template <class T> </div> <table class="memname"> <tr> <td class="memname">void <a class="el" href="classGlib_1_1Value.html">Glib::Value</a><T>::set </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGlib_1_1Value.html#43ab35a7b991e3a3383e25315593b942">CppType</a>& </td> <td class="paramname"> <em>data</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="8639f0b564d3f68d99c6a7295367f5be"></a><!-- doxytag: member="Glib::Value::get" ref="8639f0b564d3f68d99c6a7295367f5be" args="() const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template <class T> </div> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGlib_1_1Value.html#43ab35a7b991e3a3383e25315593b942">CppType</a> <a class="el" href="classGlib_1_1Value.html">Glib::Value</a><T>::get </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="value__custom_8h.html">value_custom.h</a></ul> </div> <!-- end main content --> <hr><address><small> Generated for glibmm 2.4 by <a href="http://www.doxygen.org/index.html"> Doxygen</a> 1.5.3 © 1997-2001</small></address> </body> </html>