diff options
author | Murray Cumming <murrayc@murrayc.com> | 2010-07-22 22:40:12 +0200 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2010-07-22 22:40:12 +0200 |
commit | 96c1f18cd3b695c925553d0ccda47da7c1d56d8c (patch) | |
tree | d06bfee333598a45f4ffe63c5aa8238d8b338845 /gio/src/settings.hg | |
parent | 1da3fe549cf604b5b07263965676c59f745ea38f (diff) | |
download | glibmm-96c1f18cd3b695c925553d0ccda47da7c1d56d8c.tar.gz |
Variant<>: Make this usable as an ouput parameter.
* glib/src/variant.[hg|ccg]: VariantBase: Added init(), like Value::init().
This just changes the gobject_, with appropriate unref and ref.
* gio/src/settings.[hg|ccg]: get_value(): Use an output parameter for the
VariantBase, instead of a return value, as we do for Value, allowing the
caller to use a derived (templated) type.
* examples/settings/settings.cc: Show how Variant<> can be used.
Diffstat (limited to 'gio/src/settings.hg')
-rw-r--r-- | gio/src/settings.hg | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gio/src/settings.hg b/gio/src/settings.hg index 9b3e4577..d06b55a4 100644 --- a/gio/src/settings.hg +++ b/gio/src/settings.hg @@ -53,7 +53,11 @@ public: // FIXME: implement the GVariant stuff _WRAP_METHOD(bool set_value(const Glib::ustring& key, const Glib::VariantBase& value), g_settings_set_value) - _WRAP_METHOD(Glib::VariantBase get_value(const Glib::ustring& key), g_settings_get_value) + + /** TODO: Documentation. + */ + void get_value(const Glib::ustring& key, Glib::VariantBase& value); + _IGNORE(g_settings_get_value); _WRAP_METHOD(int get_int(const Glib::ustring& key) const, g_settings_get_int) _WRAP_METHOD(void set_int(const Glib::ustring& key, int value), g_settings_set_int) |