#include <changeset.h>
Inheritance diagram for Gnome::Conf::ChangeSet:
Public Types | |
typedef sigc::slot< void, const Glib::ustring &, const Value & > | ForeachSlot |
Public Member Functions | |
ChangeSet () | |
ChangeSet (GConfChangeSet *castitem, bool make_a_copy=false) | |
ChangeSet (const ChangeSet &src) | |
ChangeSet & | operator= (const ChangeSet &src) |
virtual | ~ChangeSet () |
GConfChangeSet * | gobj () |
const GConfChangeSet * | gobj () const |
GConfChangeSet * | gobj_copy () const |
void | clear () |
Clear all entries. | |
unsigned int | size () const |
Returns the number of keys in the changeset. | |
void | remove (const Glib::ustring &key) |
Remove the specified key from the changeset. | |
Value * | exists (const Glib::ustring &key) const |
Check whether the given key will be modified by a commit operation. | |
void | unset (const Glib::ustring &key) |
Unset the given key. | |
virtual void | set (const Glib::ustring &key, const Value &value, std::auto_ptr< Glib::Error > &error) |
virtual void | set (const Glib::ustring &key, bool what, std::auto_ptr< Glib::Error > &error) |
virtual void | set (const Glib::ustring &key, int what, std::auto_ptr< Glib::Error > &error) |
virtual void | set (const Glib::ustring &key, double what, std::auto_ptr< Glib::Error > &error) |
virtual void | set (const Glib::ustring &key, const Glib::ustring &what, std::auto_ptr< Glib::Error > &error) |
virtual void | set (const Glib::ustring &key, const Schema &what, std::auto_ptr< Glib::Error > &error) |
void | for_each (const ForeachSlot &slot) |
Iterate over the keys marked in this ChangeSet. | |
Protected Attributes | |
GConfChangeSet * | gobject_ |
The changes can be both set and unset operations. Currently the ChangeSet operations are not atomic, and not specially optimized for. However, it is suitable for use, for instance, preferences dialogs.
The set*() methods do not throw errors, they simply store the keys and the values.
typedef sigc::slot<void, const Glib::ustring&, const Value&> Gnome::Conf::ChangeSet::ForeachSlot |
Gnome::Conf::ChangeSet::ChangeSet | ( | ) |
Gnome::Conf::ChangeSet::ChangeSet | ( | GConfChangeSet * | castitem, | |
bool | make_a_copy = false | |||
) | [explicit] |
Gnome::Conf::ChangeSet::ChangeSet | ( | const ChangeSet & | src | ) |
virtual Gnome::Conf::ChangeSet::~ChangeSet | ( | ) | [virtual] |
void Gnome::Conf::ChangeSet::clear | ( | ) |
Clear all entries.
After this method, commiting the changeset is a no-op.
Value* Gnome::Conf::ChangeSet::exists | ( | const Glib::ustring & | key | ) | const |
Check whether the given key will be modified by a commit operation.
void Gnome::Conf::ChangeSet::for_each | ( | const ForeachSlot & | slot | ) |
const GConfChangeSet* Gnome::Conf::ChangeSet::gobj | ( | ) | const [inline] |
GConfChangeSet* Gnome::Conf::ChangeSet::gobj | ( | ) | [inline] |
GConfChangeSet* Gnome::Conf::ChangeSet::gobj_copy | ( | ) | const |
void Gnome::Conf::ChangeSet::remove | ( | const Glib::ustring & | key | ) |
Remove the specified key from the changeset.
This means that the given key will not be modified by a commit.
virtual void Gnome::Conf::ChangeSet::set | ( | const Glib::ustring & | key, | |
const Schema & | what, | |||
std::auto_ptr< Glib::Error > & | error | |||
) | [virtual] |
Implements Gnome::Conf::SetInterface.
virtual void Gnome::Conf::ChangeSet::set | ( | const Glib::ustring & | key, | |
const Glib::ustring & | what, | |||
std::auto_ptr< Glib::Error > & | error | |||
) | [virtual] |
Implements Gnome::Conf::SetInterface.
virtual void Gnome::Conf::ChangeSet::set | ( | const Glib::ustring & | key, | |
double | what, | |||
std::auto_ptr< Glib::Error > & | error | |||
) | [virtual] |
Implements Gnome::Conf::SetInterface.
virtual void Gnome::Conf::ChangeSet::set | ( | const Glib::ustring & | key, | |
int | what, | |||
std::auto_ptr< Glib::Error > & | error | |||
) | [virtual] |
Implements Gnome::Conf::SetInterface.
virtual void Gnome::Conf::ChangeSet::set | ( | const Glib::ustring & | key, | |
bool | what, | |||
std::auto_ptr< Glib::Error > & | error | |||
) | [virtual] |
Implements Gnome::Conf::SetInterface.
virtual void Gnome::Conf::ChangeSet::set | ( | const Glib::ustring & | key, | |
const Value & | value, | |||
std::auto_ptr< Glib::Error > & | error | |||
) | [virtual] |
Implements Gnome::Conf::SetInterface.
unsigned int Gnome::Conf::ChangeSet::size | ( | ) | const |
Returns the number of keys in the changeset.
void Gnome::Conf::ChangeSet::unset | ( | const Glib::ustring & | key | ) |
Unset the given key.
Mark the key, so that it will be removed from the configuration database during a commit.
GConfChangeSet* Gnome::Conf::ChangeSet::gobject_ [protected] |