diff options
author | Daniel Boles <dboles@src.gnome.org> | 2017-02-06 00:00:57 +0000 |
---|---|---|
committer | Daniel Boles <dboles@src.gnome.org> | 2017-02-13 15:46:10 +0000 |
commit | 5a3d8dac838abb4acd084be1eeb2f82e706edb19 (patch) | |
tree | 2a76a237644de998e1cb05f31b2b3b4b549cc5e7 | |
parent | 134bb7c0b2448003dd7601cfffb3de14bf22ca51 (diff) | |
download | glibmm-5a3d8dac838abb4acd084be1eeb2f82e706edb19.tar.gz |
Glib::Variant—Explain how to create “maybe” types
It’s not exactly intuitive why the *_maybe() methods are kept in
ContainerBase, nor that Variant<VariantBase> inherits from the former
and is the way to get a maybe-typed Variant in glibmm. Let’s fix that!
https://bugzilla.gnome.org/show_bug.cgi?id=778219
-rw-r--r-- | glib/src/variant.hg | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/glib/src/variant.hg b/glib/src/variant.hg index 6758c89d..be0f4a78 100644 --- a/glib/src/variant.hg +++ b/glib/src/variant.hg @@ -340,8 +340,8 @@ public: _WRAP_METHOD(static bool is_signature(const std::string& string), g_variant_is_signature) }; -/** The base class from which multiple-item Variants derive, such as Variants - * containing tuples or arrays. +/** The base class for multiple-item Variants, such as Variants containing + * tuples or arrays, and also for maybe-typed (i.e. nullable) Variant types. * * @newin{2,28} * @ingroup Variant @@ -448,6 +448,9 @@ public: /****************** Specializations ***********************************/ /** Specialization of Variant containing a VariantBase. + * Perhaps the main use of this is as a maybe-typed (i.e. nullable) Variant, as + * it inherits methods create_maybe() and get_maybe() from VariantContainerBase. + * * @newin{2,28} * @ingroup Variant */ |