Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 0102b942207b9d1f394a9a1ca1a811b6 > files > 65

bakery-devel-2.6.3-4.fc14.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>bakery: Client.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="classes.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
<h1>Client.h</h1><a href="Client_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright 2002 Murray Cumming</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
<a name="l00005"></a>00005 <span class="comment"> * modify it under the terms of the GNU Library General Public</span>
<a name="l00006"></a>00006 <span class="comment"> * License as published by the Free Software Foundation; either</span>
<a name="l00007"></a>00007 <span class="comment"> * version 2 of the License, or (at your option) any later version.</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> * This library is distributed in the hope that it will be useful,</span>
<a name="l00010"></a>00010 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00011"></a>00011 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00012"></a>00012 <span class="comment"> * Library General Public License for more details.</span>
<a name="l00013"></a>00013 <span class="comment"> *</span>
<a name="l00014"></a>00014 <span class="comment"> * You should have received a copy of the GNU Library General Public</span>
<a name="l00015"></a>00015 <span class="comment"> * License along with this library; if not, write to the Free</span>
<a name="l00016"></a>00016 <span class="comment"> * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span>
<a name="l00017"></a>00017 <span class="comment"> */</span>
<a name="l00018"></a>00018 
<a name="l00019"></a>00019 <span class="preprocessor">#ifndef BAKERY_CONFIGURATION_CONFCLIENT_H</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define BAKERY_CONFIGURATION_CONFCLIENT_H</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>
<a name="l00022"></a>00022 <span class="preprocessor">#include "<a class="code" href="Association_8h.html">bakery/Configuration/Association.h</a>"</span>
<a name="l00023"></a>00023 
<a name="l00024"></a>00024 <span class="keyword">namespace </span>Bakery
<a name="l00025"></a>00025 {
<a name="l00026"></a>00026 
<a name="l00027"></a>00027 <span class="keyword">namespace </span>Conf
<a name="l00028"></a>00028 {
<a name="l00029"></a>00029 
<a name="l00050"></a><a class="code" href="classBakery_1_1Conf_1_1Client.html">00050</a> <span class="keyword">class </span><a class="code" href="classBakery_1_1Conf_1_1Client.html" title="Configuration Client Allows you to associate widget &amp;quot;values&amp;quot; with configuration...">Client</a> : <span class="keyword">public</span> sigc::trackable
<a name="l00051"></a>00051 {
<a name="l00052"></a>00052 <span class="keyword">public</span>:
<a name="l00053"></a>00053   <a class="code" href="classBakery_1_1Conf_1_1Client.html#2b4cf3308f72b6c85f20261379fe3923">Client</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="glibmm_doxygen_tags:" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; configuration_directory);
<a name="l00054"></a>00054   <span class="keyword">virtual</span> <a class="code" href="classBakery_1_1Conf_1_1Client.html#a72afb2973c097c6c31883bd1b310db8">~Client</a>();
<a name="l00055"></a>00055 
<a name="l00056"></a>00056 <span class="preprocessor">#ifdef GLIBMM_EXCEPTIONS_ENABLED</span>
<a name="l00057"></a>00057 <span class="preprocessor"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1Conf_1_1Client.html#3c117e06fcdb742a8ca3817451a31f08">load</a>();
<a name="l00058"></a>00058   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1Conf_1_1Client.html#3bedfb42f86634146e191304477a97c0">save</a>();
<a name="l00059"></a>00059 <span class="preprocessor">#else</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1Conf_1_1Client.html#3c117e06fcdb742a8ca3817451a31f08">load</a>(std::auto_ptr&lt;Glib::Error&gt;&amp; error);
<a name="l00061"></a>00061   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1Conf_1_1Client.html#3bedfb42f86634146e191304477a97c0">save</a>(std::auto_ptr&lt;Glib::Error&gt;&amp; error);
<a name="l00062"></a>00062 <span class="preprocessor">#endif</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span>
<a name="l00065"></a>00065   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <span class="keyword">add</span>(<span class="keyword">const</span> <a class="codeRef" doxygen="glibmm_doxygen_tags:" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; key, <a class="codeRef" doxygen="gtkmm_doxygen_tags:" href="classGtk_1_1Widget.html">Gtk::Widget</a>&amp; widget);
<a name="l00066"></a>00066   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1Conf_1_1Client.html#aec6d1a564bdbcbeeae1d52decc46587">add_instant</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="glibmm_doxygen_tags:" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; key, <a class="codeRef" doxygen="gtkmm_doxygen_tags:" href="classGtk_1_1Widget.html">Gtk::Widget</a>&amp; widget);
<a name="l00067"></a>00067 
<a name="l00068"></a>00068 <span class="keyword">protected</span>:
<a name="l00069"></a>00069 
<a name="l00075"></a>00075   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1Conf_1_1Client.html#28b8a11643afe6b64252c329df398ed0" title="Override this method to add recognition of additional widget types to a derived class...">add_implementation</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="glibmm_doxygen_tags:" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; key, <a class="codeRef" doxygen="gtkmm_doxygen_tags:" href="classGtk_1_1Widget.html">Gtk::Widget</a>&amp; widget, <span class="keywordtype">bool</span> instant);
<a name="l00076"></a>00076 
<a name="l00077"></a><a class="code" href="classBakery_1_1Conf_1_1Client.html#b41a84ed0bd5c6fc3053d3e7e9fb7042">00077</a>   <span class="keyword">typedef</span> <a class="code" href="classBakery_1_1sharedptr.html" title="A shared reference-counting smart-pointer.">Bakery::Conf::AssociationBase::AssociationPtr</a> <a class="code" href="classBakery_1_1sharedptr.html" title="A shared reference-counting smart-pointer.">AssociationPtr</a>;
<a name="l00078"></a>00078 
<a name="l00079"></a>00079 <span class="keyword">public</span>:
<a name="l00080"></a>00080 
<a name="l00081"></a>00081 <span class="keyword">protected</span>:
<a name="l00082"></a>00082   <span class="keyword">template</span>&lt; <span class="keyword">class</span> T_W<span class="keywordtype">id</span>get &gt;
<a name="l00083"></a><a class="code" href="classBakery_1_1Conf_1_1Client.html#bc272f8a3a5f4a2cb73a3783e968c513">00083</a>   <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1Conf_1_1Client.html#bc272f8a3a5f4a2cb73a3783e968c513">add_association</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="glibmm_doxygen_tags:" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; key, T_Widget&amp; widget, <span class="keywordtype">bool</span> instant)
<a name="l00084"></a>00084   {
<a name="l00085"></a>00085     <a class="codeRef" doxygen="glibmm_doxygen_tags:" href="classGlib_1_1ustring.html">Glib::ustring</a> full_key = m_directory + <span class="stringliteral">"/"</span> + key;
<a name="l00086"></a>00086     <a class="code" href="classBakery_1_1sharedptr.html" title="A shared reference-counting smart-pointer.">AssociationPtr</a> assoc = <a class="code" href="classBakery_1_1Conf_1_1Association.html">Association&lt;T_Widget&gt;::create</a>(full_key, widget, instant);
<a name="l00087"></a>00087     m_vecWidgets.push_back(assoc);
<a name="l00088"></a>00088     assoc-&gt;add(m_refClient);
<a name="l00089"></a>00089   }
<a name="l00090"></a>00090 
<a name="l00091"></a>00091 <span class="keyword">private</span>:
<a name="l00092"></a>00092   <a class="codeRef" doxygen="glibmm_doxygen_tags:" href="classGlib_1_1RefPtr.html">Glib::RefPtr&lt;Gnome::Conf::Client&gt;</a> m_refClient;
<a name="l00093"></a>00093   <a class="codeRef" doxygen="glibmm_doxygen_tags:" href="classGlib_1_1ustring.html">Glib::ustring</a> m_directory;
<a name="l00094"></a>00094 
<a name="l00095"></a>00095   <span class="keyword">typedef</span> std::vector&lt;AssociationPtr&gt; type_vecWidgets;
<a name="l00096"></a>00096   type_vecWidgets m_vecWidgets;
<a name="l00097"></a>00097 };
<a name="l00098"></a>00098 
<a name="l00099"></a>00099 } <span class="comment">//namespace Conf</span>
<a name="l00100"></a>00100 
<a name="l00101"></a>00101 } <span class="comment">//namespace Bakery</span>
<a name="l00102"></a>00102 
<a name="l00103"></a>00103 
<a name="l00104"></a>00104 <span class="preprocessor">#endif //BAKERY_CONFIGURATION_CONFCLIENT_H</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Dec 8 18:42:35 2008 for bakery by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>