00001
00002
00003
#ifndef _GCONFMM_CHANGESET_H
00004
#define _GCONFMM_CHANGESET_H
00005
00006
#include <glibmm.h>
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
#include <glibmm/ustring.h>
00031
#include <gconfmm/value.h>
00032
#include <gconfmm/setinterface.h>
00033
#include <sigc++/slot.h>
00034
00035
00036
extern "C" {
00037 typedef struct _GConfChangeSet
GConfChangeSet;
00038 }
00039
00040
namespace Gnome
00041 {
00042
namespace Conf
00043 {
00044
00045
00056 class ChangeSet :
public SetInterface
00057 {
00058
public:
00059
#ifndef DOXYGEN_SHOULD_SKIP_THIS
00060
typedef ChangeSet CppObjectType;
00061
typedef GConfChangeSet BaseObjectType;
00062
#endif
00063
00064
private:
00065
00066
00067
public:
00068
ChangeSet();
00069
explicit ChangeSet(
GConfChangeSet* castitem,
bool make_a_copy =
false);
00070
00071
ChangeSet(
const ChangeSet& src);
00072
ChangeSet&
operator=(
const ChangeSet& src);
00073
virtual ~ChangeSet();
00074
00075 GConfChangeSet*
gobj() {
return gobject_; }
00076 const GConfChangeSet*
gobj()
const {
return gobject_; }
00077
GConfChangeSet*
gobj_copy() const;
00078
00079 protected:
00080 GConfChangeSet* gobject_;
00081
00082 public:
00086
void clear();
00087
00090
unsigned int size() const;
00091
00095
void remove(const Glib::ustring& key);
00096
00100
Value* exists(const Glib::ustring& key) const;
00101
00102
00106
void unset(const Glib::ustring& key);
00107
00108
00109
void set(const Glib::ustring& key,
bool what);
00110
00111
void set(const Glib::ustring& key,
int what);
00112
00113
void set(const Glib::ustring& key,
double what);
00114
00115
void set(const Glib::ustring& key, const Glib::ustring& what);
00116
00117
void set(const Glib::ustring& key, const
Schema& val);
00118
00119
00120
void set(const Glib::ustring& key, const
Value& what);
00121
00122
00123 typedef SigC::Slot2<
void, const Glib::ustring&, const
Value&>
ForeachSlot;
00128
void for_each(const ForeachSlot& slot);
00129
00130 private:
00131 static GConfChangeSet* do_ref(GConfChangeSet*);
00132
00133
00134 };
00135
00136
00137 }
00138 }
00139
00140 #endif
00141