From 5a3d8dac838abb4acd084be1eeb2f82e706edb19 Mon Sep 17 00:00:00 2001 From: Daniel Boles Date: Mon, 6 Feb 2017 00:00:57 +0000 Subject: =?UTF-8?q?Glib::Variant=E2=80=94Explain=20how=20to=20create=20?= =?UTF-8?q?=E2=80=9Cmaybe=E2=80=9D=20types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s not exactly intuitive why the *_maybe() methods are kept in ContainerBase, nor that Variant 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 --- glib/src/variant.hg | 7 +++++-- 1 file 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 */ -- cgit v1.2.1