Reference Manual

Inti Logo
Main Page | Namespace List | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

changeset.h

Go to the documentation of this file.
00001 /*  Inti-GConf: Integrated Foundation Classes
00002  *  Copyright (C) 2002-2003 The Inti Development Team.
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU Library General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU Library General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017  */
00018 
00023 
00024 #ifndef INTI_GCONF_CHANGESET_H
00025 #define INTI_GCONF_CHANGESET_H
00026 
00027 #ifndef GCONF_GCONF_CHANGESET_H
00028 #include <gconf/gconf-changeset.h>
00029 #endif
00030 
00031 #ifndef INTI_MEMORY_HANDLER_H
00032 #include <inti/memoryhandler.h>
00033 #endif
00034 #ifndef INTI_SLOT_H
00035 #include <inti/base.h>
00036 #endif
00037 
00038 #ifndef INTI_SLOT_H
00039 #include <inti/slot.h>
00040 #endif
00041 
00042 #ifndef CPP_VECTOR_H
00043 #include <vector>
00044 #endif
00045 
00046 namespace Inti {
00047 
00048 namespace G {
00049 class Error;
00050 }
00051 
00052 namespace GConf {
00053 
00054 class Schema;
00055 class Value;
00056 
00066 
00067 class ChangeSet : public ReferencedBase, public MemoryHandler
00068 {
00069         ChangeSet(const ChangeSet&);
00070         ChangeSet& operator=(const ChangeSet&);
00071 
00072         GConfChangeSet *cs_;
00073         
00074         static void destroy_notify(void *data);
00075 
00076 public:
00077         typedef Slot2<void, String&, const Value*> ForeachSlot;
00090 
00093 
00094         ChangeSet();
00096 
00097         explicit ChangeSet(GConfChangeSet *cs);
00099 
00100         ~ChangeSet();
00101 
00105 
00106         GConfChangeSet* gconf_change_set() const { return cs_; }
00108 
00112 
00113         virtual void ref();
00115 
00116         virtual void unref();
00119 
00120         void clear();
00122 
00123         unsigned int size() const;
00125 
00126         void remove(const String& key);
00132 
00133         void foreach(ForeachSlot *each);
00134 
00135         bool check_value(const String& key, Value *value = 0);
00154 
00155         void set(const String& key, const Value& value);
00162 
00163         void unset(const String& key);
00168 
00169         void set_int(const String& key, int value);
00173 
00174         void set_bool(const String& key, bool value);
00178 
00179         void set_float(const String& key, double value);
00183 
00184         void set_string(const String& key, const String& value);
00188 
00189         void set_schema(const String& key, const Schema& value);
00193 
00194         void set_list(const String& key, const std::vector<int>& list);
00198 
00199         void set_list(const String& key, const std::vector<bool>& list);
00203 
00204         void set_list(const String& key, const std::vector<double>& list);
00208 
00209         void set_list(const String& key, const std::vector<String>& list);
00213 
00214         void set_list(const String& key, const std::vector<Schema>& list);
00218 
00219         void set_pair(const String& key, int car_data, int cdr_data);
00221 
00222         void set_pair(const String& key, int car_data, bool cdr_data);
00224 
00225         void set_pair(const String& key, int car_data, double cdr_data);
00227 
00228         void set_pair(const String& key, int car_data, const String& cdr_data);
00230 
00231         void set_pair(const String& key, int car_data, const Schema& cdr_data);
00233 
00234         void set_pair(const String& key, bool car_data, int cdr_data);
00236 
00237         void set_pair(const String& key, bool car_data, bool cdr_data);
00239 
00240         void set_pair(const String& key, bool car_data, double cdr_data);
00242 
00243         void set_pair(const String& key, bool car_data, const String& cdr_data);
00245 
00246         void set_pair(const String& key, bool car_data, const Schema& cdr_data);
00248 
00249         void set_pair(const String& key, double car_data, int cdr_data);
00251 
00252         void set_pair(const String& key, double car_data, bool cdr_data);
00254 
00255         void set_pair(const String& key, double car_data, double cdr_data);
00257 
00258         void set_pair(const String& key, double car_data, const String& cdr_data);
00260 
00261         void set_pair(const String& key, double car_data, const Schema& cdr_data);
00263 
00264         void set_pair(const String& key, const String& car_data, int cdr_data);
00266 
00267         void set_pair(const String& key, const String& car_data, bool cdr_data);
00269 
00270         void set_pair(const String& key, const String& car_data, double cdr_data);
00272 
00273         void set_pair(const String& key, const String& car_data, const String& cdr_data);
00275 
00276         void set_pair(const String& key, const String& car_data, const Schema& cdr_data);
00278 
00279         void set_pair(const String& key, const Schema& car_data, int cdr_data);
00281 
00282         void set_pair(const String& key, const Schema& car_data, bool cdr_data);
00284 
00285         void set_pair(const String& key, const Schema& car_data, double cdr_data);
00287 
00288         void set_pair(const String& key, const Schema& car_data, const String& cdr_data);
00290 
00291         void set_pair(const String& key, const Schema& car_data, const Schema& cdr_data);
00293 
00295 };
00296 
00297 } // namespace GConf
00298 
00299 } // namespace Inti
00300 
00301 #endif // INTI_GCONF_CHANGESET_H
00302 
Main Page - Footer


Generated on Sun Sep 14 23:52:40 2003 for Inti-GConf by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002