Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > ba6e5e1a033bd8535c43a771ce407926 > files > 166

lib64cxx-gtk-utils2.2-devel-2.2.3-2.mga4.x86_64.rpm

<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>c++-gtk-utils: Cgu::GobjHandle&lt; T &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">c++-gtk-utils
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceCgu.html">Cgu</a></li><li class="navelem"><a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classCgu_1_1GobjHandle-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Cgu::GobjHandle&lt; T &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__handles.html">handles and smart pointers</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>This is a handle for managing the reference count of GObjects.  
 <a href="classCgu_1_1GobjHandle.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="gobj__handle_8h_source.html">c++-gtk-utils/gobj_handle.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac93d923d4899beca947f82e4dd2b01e1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1GobjHandle.html#ac93d923d4899beca947f82e4dd2b01e1">GobjHandle</a> (T *ptr=0) noexcept</td></tr>
<tr class="separator:ac93d923d4899beca947f82e4dd2b01e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93e0943687dc51f7bbb115cee4138629"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1GobjHandle.html#a93e0943687dc51f7bbb115cee4138629">reset</a> (T *ptr=0)</td></tr>
<tr class="separator:a93e0943687dc51f7bbb115cee4138629"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2bbd77d0e3b0f2bb1e96cc03e02b15be"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1GobjHandle.html#a2bbd77d0e3b0f2bb1e96cc03e02b15be">GobjHandle</a> (const <a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a> &amp;gobj) noexcept</td></tr>
<tr class="separator:a2bbd77d0e3b0f2bb1e96cc03e02b15be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73aa088c57f9a3793a66c22bb6f76dd3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1GobjHandle.html#a73aa088c57f9a3793a66c22bb6f76dd3">GobjHandle</a> (<a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a> &amp;&amp;gobj) noexcept</td></tr>
<tr class="separator:a73aa088c57f9a3793a66c22bb6f76dd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8cd42c69b5eea1725b891ee3b81e4995"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1GobjHandle.html#a8cd42c69b5eea1725b891ee3b81e4995">operator=</a> (const <a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a> &amp;gobj)</td></tr>
<tr class="separator:a8cd42c69b5eea1725b891ee3b81e4995"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03be4ca53ebef146acc19b42b89676f6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1GobjHandle.html#a03be4ca53ebef146acc19b42b89676f6">operator=</a> (<a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a> &amp;&amp;gobj)</td></tr>
<tr class="separator:a03be4ca53ebef146acc19b42b89676f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3084128f75535d4a0260dd055c5f01e"><td class="memItemLeft" align="right" valign="top">T *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1GobjHandle.html#ab3084128f75535d4a0260dd055c5f01e">get</a> () const noexcept</td></tr>
<tr class="separator:ab3084128f75535d4a0260dd055c5f01e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af93d18a058f5eb8ea2f6234c9c0bccc6"><td class="memItemLeft" align="right" valign="top">T &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1GobjHandle.html#af93d18a058f5eb8ea2f6234c9c0bccc6">operator*</a> () const noexcept</td></tr>
<tr class="separator:af93d18a058f5eb8ea2f6234c9c0bccc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7aeaeada0661ce711c1767861e98c4c4"><td class="memItemLeft" align="right" valign="top">T *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1GobjHandle.html#a7aeaeada0661ce711c1767861e98c4c4">operator-&gt;</a> () const noexcept</td></tr>
<tr class="separator:a7aeaeada0661ce711c1767861e98c4c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9815db18f4baa77a8176335b09317ca"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1GobjHandle.html#ad9815db18f4baa77a8176335b09317ca">operator T *</a> () const noexcept</td></tr>
<tr class="separator:ad9815db18f4baa77a8176335b09317ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85ac74d4fa9650241e2480ff1308b1bd"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1GobjHandle.html#a85ac74d4fa9650241e2480ff1308b1bd">~GobjHandle</a> ()</td></tr>
<tr class="separator:a85ac74d4fa9650241e2480ff1308b1bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;class T&gt;<br/>
class Cgu::GobjHandle&lt; T &gt;</h3>

<p>This is a handle for managing the reference count of GObjects. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCgu_1_1MainWidgetBase.html" title="This is a class to manage the lifetime of widgets which are not top-level widgets (ie which are not d...">MainWidgetBase</a> <a class="el" href="classCgu_1_1GobjWeakHandle.html" title="This is a handle for managing weak references to GObjects. ">GobjWeakHandle</a></dd></dl>
<p>This is a class which manages the reference count of GObjects. It does not maintain its own reference count, but interfaces with that kept by the glib object system.</p>
<p>GobjHandles are most useful to manage GObjects which are not also GtkWidgets or GInitiallyUnowned objects - GtkWidgets and GInitiallyUnowned objects have initial floating references which will result in them being automatically managed by the container in which they are held. Nonetheless, GobjHandles can be used to hold GtkWidgets and GInitiallyUnowned objects, as the constructor of a <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a> which takes a pointer will automatically take ownership of a newly created GtkWidget or GInitiallyUnowned object, by calling g_object_ref_sink(). Plain GObjects do not need to be sunk to be owned by the <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a>.</p>
<p>Note that g_object_ref_sink() is not called by the constructor taking a pointer if the floating reference has already been sunk, so if that constructor is passed an object already owned by a GTK+ container it will be necessary to call g_object_ref() on it explicitly. This behaviour will ensure that the handle behaves the same whether it is holding a plain GObject, or it is holding a GInitiallyUnowned/GtkWidget object. Generally however, where an object is already owned by a container, the object should be passed by another handle - ie by the copy constructor (or by the assignment operator), as those always increment the reference count automatically.</p>
<p>In other words, invoke the constructor taking a pointer only with a newly created object (whether a GObject, GInitiallyUnowned or GtkWidget object), and everything else will take care of itself. In this respect, GobjHandles work the same way as conventional shared pointer implementations managing objects allocated on free store. The same applies to the <a class="el" href="classCgu_1_1GobjHandle.html#a93e0943687dc51f7bbb115cee4138629">reset()</a> method. (Care is required however if initializing a <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">Cgu::GobjHandle</a> with a widget or GObject object obtained from GtkBuilder, since these are not "newly created" in this sense. It is necessary to call g_object_ref() by hand in that case, since GtkBuilder does not by itself pass ownership of any objects it creates.)</p>
<p>Because any GTK+ containers themselves increment the reference count of a GObject or GtkWidget where they need to take ownership, an already-managed object held by a <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a> can safely be passed by pointer to a GTK+ container, and that is one of the intended usages. For that purpose, although the class has <a class="el" href="classCgu_1_1GobjHandle.html#af93d18a058f5eb8ea2f6234c9c0bccc6">operator*()</a> and <a class="el" href="classCgu_1_1GobjHandle.html#a7aeaeada0661ce711c1767861e98c4c4">operator-&gt;()</a> dereferencing operators, and so has normal smart pointer functionality, as it is intended for use with the normal C GObject/pango/GTK+ interfaces, ordinary use would involve passing the handle to a function taking a pointer by means of the operatorT*() type conversion operator (which returns the underlying pointer), or by explicitly calling the <a class="el" href="classCgu_1_1GobjHandle.html#ab3084128f75535d4a0260dd055c5f01e">get()</a> method to obtain the underlying pointer.</p>
<p>The principal intended usage of <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a> is to automatically handle GObject reference counts and therefore to make GObjects exception-safe, but they also permit GObjects/GtkWidgets to be kept in standard C++ containers.</p>
<p>As of glib-2.8, g_object_ref() and g_object_unref() are thread safe, so with glib-2.8 or greater there can be different <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a> instances in different threads referencing the same GObject object. Of course, if that is done, this does not affect the need (or otherwise) in the particular use in question to lock anything other than the reference count - say when accessing the referenced object itself in different threads.</p>
<p>Typical usage might be, for example, as follows:</p>
<div class="fragment"><div class="line"><span class="keyword">using namespace </span>Cgu;</div>
<div class="line"><a class="code" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle&lt;GtkListStore&gt;</a> store(gtk_list_store_new(1, G_TYPE_STRING));</div>
<div class="line"></div>
<div class="line">[ ... fill the list store ... ]</div>
<div class="line"></div>
<div class="line"><a class="code" href="classCgu_1_1GobjHandle.html">GobjHandle&lt;GtkWidget&gt;</a> view(gtk_tree_view_new_with_model(GTK_TREE_MODEL(store.get()));</div>
<div class="line"><span class="comment">// &#39;view&#39; will take sole ownership of the list store when &#39;store&#39; goes out of scope, or</span></div>
<div class="line"><span class="comment">// &#39;store&#39; could be kept alive so that the list store will survive removal from the view</span></div>
<div class="line"></div>
<div class="line">[ ... set up an <span class="keyword">interface </span>including a GtkVBox &#39;vbox&#39; which will hold the tree view ... ]</div>
<div class="line"></div>
<div class="line">gtk_container_add(GTK_CONTAINER(vbox), view);</div>
<div class="line"><span class="comment">// &#39;vbox&#39; will take sole ownership of the tree view when &#39;view&#39; goes out of scope, or</span></div>
<div class="line"><span class="comment">// &#39;view&#39; could be kept alive so that the tree view will survive removal from the vbox</span></div>
</div><!-- fragment --> </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ac93d923d4899beca947f82e4dd2b01e1"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCgu_1_1GobjHandle.html">Cgu::GobjHandle</a>&lt; T &gt;::<a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a> </td>
          <td>(</td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>ptr</em> = <code>0</code>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The constructor does not throw. g_object_ref_sink() is called if the managed object has a floating reference. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ptr</td><td>The object which the <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a> is to manage (if any). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The object passed should not normally be already owned by a GTK+ container or managed by any other <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a> object. If it is, g_object_ref() must be called explicitly by the user code. </dd></dl>

</div>
</div>
<a class="anchor" id="a2bbd77d0e3b0f2bb1e96cc03e02b15be"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCgu_1_1GobjHandle.html">Cgu::GobjHandle</a>&lt; T &gt;::<a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&lt; T &gt; &amp;&#160;</td>
          <td class="paramname"><em>gobj</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The copy constructor does not throw. It increments the reference count of the managed object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gobj</td><td>The handle to be copied. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a73aa088c57f9a3793a66c22bb6f76dd3"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCgu_1_1GobjHandle.html">Cgu::GobjHandle</a>&lt; T &gt;::<a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&lt; T &gt; &amp;&amp;&#160;</td>
          <td class="paramname"><em>gobj</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The move constructor does not throw. It has move semantics. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gobj</td><td>The handle to be moved. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a85ac74d4fa9650241e2480ff1308b1bd"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCgu_1_1GobjHandle.html">Cgu::GobjHandle</a>&lt; T &gt;::~<a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a> </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The destructor does not throw. It decrements the reference count of the managed object (if any), so destroying it if the reference count thereby becomes 0. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ab3084128f75535d4a0260dd055c5f01e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T* <a class="el" href="classCgu_1_1GobjHandle.html">Cgu::GobjHandle</a>&lt; T &gt;::get </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This method does not throw. </p>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the handled GObject (or NULL if none is handled). </dd></dl>

</div>
</div>
<a class="anchor" id="ad9815db18f4baa77a8176335b09317ca"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCgu_1_1GobjHandle.html">Cgu::GobjHandle</a>&lt; T &gt;::operator T * </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This method does not throw. </p>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the handled GObject (or NULL if none is handled). </dd></dl>

</div>
</div>
<a class="anchor" id="af93d18a058f5eb8ea2f6234c9c0bccc6"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T&amp; <a class="el" href="classCgu_1_1GobjHandle.html">Cgu::GobjHandle</a>&lt; T &gt;::operator* </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This method does not throw. </p>
<dl class="section return"><dt>Returns</dt><dd>A reference to the handled GObject. </dd></dl>

</div>
</div>
<a class="anchor" id="a7aeaeada0661ce711c1767861e98c4c4"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T* <a class="el" href="classCgu_1_1GobjHandle.html">Cgu::GobjHandle</a>&lt; T &gt;::operator-&gt; </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This method does not throw. </p>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the handled GObject (or NULL if none is handled). </dd></dl>

</div>
</div>
<a class="anchor" id="a8cd42c69b5eea1725b891ee3b81e4995"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&amp; <a class="el" href="classCgu_1_1GobjHandle.html">Cgu::GobjHandle</a>&lt; T &gt;::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&lt; T &gt; &amp;&#160;</td>
          <td class="paramname"><em>gobj</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This method decrements the reference count of the former managed object (if any), so destroying it if the reference count thereby becomes 0, and increments the reference count of the new managed object. This method does not throw (unless this method destroys a sub-classed GObject which has a member object whose destructor throws). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gobj</td><td>The assignor. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a> object after assignment. </dd></dl>

</div>
</div>
<a class="anchor" id="a03be4ca53ebef146acc19b42b89676f6"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&amp; <a class="el" href="classCgu_1_1GobjHandle.html">Cgu::GobjHandle</a>&lt; T &gt;::operator= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&lt; T &gt; &amp;&amp;&#160;</td>
          <td class="paramname"><em>gobj</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This method decrements the reference count of the former managed object (if any), so destroying it if the reference count thereby becomes 0, and has move semantics with respect to the new managed object. This method does not throw (unless this method destroys a sub-classed GObject which has a member object whose destructor throws). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gobj</td><td>The handle to be moved. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a> object after the move operation. </dd></dl>

</div>
</div>
<a class="anchor" id="a93e0943687dc51f7bbb115cee4138629"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classCgu_1_1GobjHandle.html">Cgu::GobjHandle</a>&lt; T &gt;::reset </td>
          <td>(</td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>ptr</em> = <code>0</code>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Causes the handle to cease to manage its managed object (if any) and decrements its reference count, so destroying it if the reference count thereby becomes 0. If the argument passed is not NULL, the handle will manage the new object passed and g_object_ref_sink() is called if the new object has a floating reference. This method does not throw (unless this method destroys a sub-classed GObject which has a member object whose destructor throws). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ptr</td><td>NULL (the default), or a new object to manage. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The new object passed should not normally be already owned by a GTK+ container or managed by any other <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a> object. If it is, g_object_ref() must be called explicitly by the user code. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="gobj__handle_8h_source.html">gobj_handle.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Sep 16 2013 20:45:31 for c++-gtk-utils by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.4
</small></address>
</body>
</html>