<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>glibmm: Glib::Value< T > Class Template Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespaceGlib.html">Glib</a>::<a class="el" href="classGlib_1_1Value.html">Value</a> </div> </div> <div class="contents"> <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" --> <p>Generic value implementation for custom types. <a href="#_details">More...</a></p> <p>Inherits <a class="el" href="classGlib_1_1ValueBase__Boxed.html">Glib::ValueBase_Boxed</a>.</p> <div class="dynheader"> Collaboration diagram for Glib::Value< T >:</div> <div class="dynsection"> <div class="center"><img src="classGlib_1_1Value__coll__graph.png" border="0" usemap="#Glib_1_1Value_3_01T_01_4_coll__map" alt="Collaboration graph"/></div> <map name="Glib_1_1Value_3_01T_01_4_coll__map" id="Glib_1_1Value_3_01T_01_4_coll__map"> <area shape="rect" href="classGlib_1_1ValueBase__Boxed.html" title="Glib::ValueBase_Boxed" alt="" coords="5,83,163,112"/><area shape="rect" href="classGlib_1_1ValueBase.html" title="Glib::ValueBase" alt="" coords="27,5,141,35"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classGlib_1_1Value-members.html">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Public Types</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">typedef T </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Value.html#a43ab35a7b991e3a3383e25315593b942">CppType</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">typedef T* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Value.html#ac841aa34bcc65ae94ea869ae8cb6ef20">CType</a></td></tr> <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Value.html#ad9750eff16879524796c8c13d4045c0e">set</a> (const <a class="el" href="classGlib_1_1Value.html#a43ab35a7b991e3a3383e25315593b942">CppType</a>& data)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1Value.html#a43ab35a7b991e3a3383e25315593b942">CppType</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Value.html#a8639f0b564d3f68d99c6a7295367f5be">get</a> () const </td></tr> <tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static GType </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Value.html#aab385c17d1f31b8fc691eb1e802548c1">value_type</a> ()</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <h3>template <class T><br/> class Glib::Value< T ></h3> <p>Generic value implementation for custom types. </p> <p>Any type to be used with this template must implement:</p> <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" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00601.html">std::vector</a></code> will work with Glib::Value<>.</p> <dl class="note"><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" id="a43ab35a7b991e3a3383e25315593b942"></a><!-- doxytag: member="Glib::Value::CppType" ref="a43ab35a7b991e3a3383e25315593b942" 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#a43ab35a7b991e3a3383e25315593b942">CppType</a></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="ac841aa34bcc65ae94ea869ae8cb6ef20"></a><!-- doxytag: member="Glib::Value::CType" ref="ac841aa34bcc65ae94ea869ae8cb6ef20" 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#ac841aa34bcc65ae94ea869ae8cb6ef20">CType</a></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a8639f0b564d3f68d99c6a7295367f5be"></a><!-- doxytag: member="Glib::Value::get" ref="a8639f0b564d3f68d99c6a7295367f5be" 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#a43ab35a7b991e3a3383e25315593b942">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> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="ad9750eff16879524796c8c13d4045c0e"></a><!-- doxytag: member="Glib::Value::set" ref="ad9750eff16879524796c8c13d4045c0e" 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#a43ab35a7b991e3a3383e25315593b942">CppType</a>& </td> <td class="paramname"> <em>data</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="aab385c17d1f31b8fc691eb1e802548c1"></a><!-- doxytag: member="Glib::Value::value_type" ref="aab385c17d1f31b8fc691eb1e802548c1" args="()" --> <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><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Reimplemented from <a class="el" href="classGlib_1_1ValueBase__Boxed.html#ac3757fa4722632be1455ac5ddde63cd2">Glib::ValueBase_Boxed</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>glibmm/value_custom.h</li> </ul> </div> <hr size="1"/><address style="text-align: right;"><small>Generated on Mon Sep 21 11:07:27 2009 for glibmm by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> </body> </html>