changeset.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _GCONFMM_CHANGESET_H
00004 #define _GCONFMM_CHANGESET_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 // -*- Mode: C++; c-basic-offset: 4  -*-
00010 /* $Id: changeset.hg,v 1.4 2006/06/05 17:54:23 murrayc Exp $ */
00011 
00012 /* changeset.hg 
00013  * 
00014  * Copyright (C) 2002 GConfmm Development Team
00015  *
00016  * This library is free software; you can redistribute it and/or
00017  * modify it under the terms of the GNU Library General Public
00018  * License as published by the Free Software Foundation; either
00019  * version 2 of the License, or (at your option) any later version.
00020  *
00021  * This library is distributed in the hope that it will be useful,
00022  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00023  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00024  * Library General Public License for more details.
00025  *
00026  * You should have received a copy of the GNU Library General Public
00027  * License along with this library; if not, write to the Free
00028  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00029  */
00030 
00031 #include <glibmm/ustring.h>
00032 #include <gconfmm/value.h>
00033 #include <gconfmm/setinterface.h>
00034 #include <sigc++/slot.h>
00035 
00036 
00037 extern "C" {
00038     typedef struct _GConfChangeSet GConfChangeSet;
00039 }
00040 
00041 namespace Gnome
00042 {
00043 namespace Conf
00044 {
00045 
00046 
00057 class ChangeSet : public SetInterface
00058 {
00059     public:
00060 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00061   typedef ChangeSet CppObjectType;
00062   typedef GConfChangeSet BaseObjectType;
00063 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00064 
00065 private:
00066 
00067     
00068 public:
00069     ChangeSet();
00070     explicit ChangeSet(GConfChangeSet* castitem, bool make_a_copy = false);
00071 
00072     ChangeSet(const ChangeSet& src);
00073     ChangeSet& operator=(const ChangeSet& src);
00074     virtual ~ChangeSet();
00075 
00076     GConfChangeSet*       gobj()       { return gobject_; }
00077     const GConfChangeSet* gobj() const { return gobject_; }
00078     GConfChangeSet* gobj_copy() const;
00079 
00080 protected:
00081     GConfChangeSet* gobject_;
00082 
00083 public:
00087   void clear();
00088 
00091   unsigned int size() const;
00092 
00096   void remove(const Glib::ustring& key);
00097 
00101     Value* exists(const Glib::ustring& key) const;
00102     
00103 
00107   void unset(const Glib::ustring& key);
00108 
00109     //Hand-code these, because we need to ignore the Glib::Error argument when using --enable-api-exceptions=no:
00110     //We must match the virtual method signatures in SetInterface, even though these implementations of that 
00111     //interface do not actually throw exceptions.
00112     //_WRAP_METHOD(void set(const Glib::ustring& key, bool what), gconf_change_set_set_bool)
00113     //_WRAP_METHOD(void set(const Glib::ustring& key, int what), gconf_change_set_set_int)
00114     //_WRAP_METHOD(void set(const Glib::ustring& key, double what), gconf_change_set_set_float)
00115     //_WRAP_METHOD(void set(const Glib::ustring& key, const Glib::ustring& what), gconf_change_set_set_string)
00116     //_WRAP_METHOD(void set(const Glib::ustring& key, const Schema& val), gconf_change_set_set_schema)
00117     //_WRAP_METHOD(void set(const Glib::ustring& key, const Value& what), gconf_change_set_set)
00118     
00119     
00120     #ifdef GLIBMM_EXCEPTIONS_ENABLED
00121     virtual void set(const Glib::ustring& key, const Value& value);
00122     virtual void set(const Glib::ustring& key, bool what);
00123     virtual void set(const Glib::ustring& key, int what);
00124     virtual void set(const Glib::ustring& key, double what);
00125     virtual void set(const Glib::ustring& key, const Glib::ustring& what);
00126     virtual void set(const Glib::ustring& key, const Schema& what);
00127     #else
00128     virtual void set(const Glib::ustring& key, const Value& value, std::auto_ptr<Glib::Error>& error);
00129     virtual void set(const Glib::ustring& key, bool what, std::auto_ptr<Glib::Error>& error);
00130     virtual void set(const Glib::ustring& key, int what, std::auto_ptr<Glib::Error>& error);
00131     virtual void set(const Glib::ustring& key, double what, std::auto_ptr<Glib::Error>& error);
00132     virtual void set(const Glib::ustring& key, const Glib::ustring& what, std::auto_ptr<Glib::Error>& error);
00133     virtual void set(const Glib::ustring& key, const Schema& what, std::auto_ptr<Glib::Error>& error);    
00134     #endif //GLIBMM_EXCEPTIONS_ENABLED
00135 
00136     
00137     typedef sigc::slot<void, const Glib::ustring&, const Value&> ForeachSlot;
00142     void for_each(const ForeachSlot& slot);
00143     
00144 private:
00145     static GConfChangeSet* do_ref(GConfChangeSet*);
00146 
00147 
00148 };
00149 
00150 
00151 } // namespace Conf
00152 } // namespace Gnome
00153 
00154 
00155 #endif /* _GCONFMM_CHANGESET_H */
00156 

Generated on Fri Aug 11 09:35:39 2006 for gconfmm by  doxygen 1.4.7