[glibmm] Variant: Remove unncessary Glib:: namespace qualification.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Variant: Remove unncessary Glib:: namespace qualification.
- Date: Wed, 16 Mar 2011 11:25:26 +0000 (UTC)
commit 78d0746f6c79b471758c7ebe1defc391b90fb0c9
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Mar 16 12:16:39 2011 +0100
Variant: Remove unncessary Glib:: namespace qualification.
* glib/src/variant.[hg|ccg]
* glib/src/variantiter.hg:
* glib/src/varianttype.hg: Remove the unnecessary Glib:: namespace
qualification in the API and documentation.
ChangeLog | 11 ++++
glib/src/variant.ccg | 4 +-
glib/src/variant.hg | 152 +++++++++++++++++++++++-----------------------
glib/src/variantiter.hg | 2 +-
glib/src/varianttype.hg | 26 ++++----
5 files changed, 103 insertions(+), 92 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index eca20cd..6143c64 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-03-16 Murray Cumming <murrayc murrayc-desktop>
+
+ Variant: Remove unncessary Glib:: namespace qualification.
+
+ * glib/src/variant.[hg|ccg]
+ * glib/src/variantiter.hg:
+ * glib/src/varianttype.hg: Remove the unnecessary Glib:: namespace
+ qualification in the API and documentation.
+
2011-03-16 Murray Cumming <murrayc murrayc com>
Gio::Variant: Add some get() method overloads.
@@ -26,6 +35,8 @@
signal g-properties-changed from "GStrv" to
"const gchar * const *" to match the signal declaration.
+ Bug #644886
+
2011-03-16 Murray Cumming <murrayc murrayc com>
Gio::Variant: Use _WRAP_METHOD() instead of hand-coding.
diff --git a/glib/src/variant.ccg b/glib/src/variant.ccg
index 39b88e0..d47ae6c 100644
--- a/glib/src/variant.ccg
+++ b/glib/src/variant.ccg
@@ -109,7 +109,7 @@ throw(std::bad_cast)
}
}
-bool VariantContainerBase::get_maybe(Glib::VariantBase& maybe) const
+bool VariantContainerBase::get_maybe(VariantBase& maybe) const
{
GVariant* const g_value =
g_variant_get_maybe(const_cast<GVariant*>(gobj()));
@@ -152,7 +152,7 @@ Variant<VariantBase> Variant<VariantBase>::create(const VariantBase& data)
return result;
}
-void Variant<VariantBase>::get(Glib::VariantBase& variant) const
+void Variant<VariantBase>::get(VariantBase& variant) const
{
GVariant* const gvariant = g_variant_get_variant(gobject_);
variant.init(gvariant);
diff --git a/glib/src/variant.hg b/glib/src/variant.hg
index 7ed7d80..2a10aff 100644
--- a/glib/src/variant.hg
+++ b/glib/src/variant.hg
@@ -34,7 +34,7 @@ namespace Glib
/** @defgroup Variant Variant Data Types
*
- * Glib::Variant<> are specialized classes that deal with strongly typed
+ * Variant<> are specialized classes that deal with strongly typed
* variant data. They are used to wrap glib's GVariant API. For more
* information see the <a
* href="http://library.gnome.org/devel/glib/stable/glib-GVariant.html">glib
@@ -260,7 +260,7 @@ public:
* @throw std::out_of_range
* @newin{2,28}
*/
- void get(Glib::VariantBase& child, gsize index = 0) const;
+ void get(VariantBase& child, gsize index = 0) const;
_IGNORE(g_variant_get_child, g_variant_get_child_value)
_WRAP_METHOD(VariantBase get(gsize index = 0), g_variant_get_child_value)
@@ -278,7 +278,7 @@ public:
* <tt>0</tt>).
* @newin{2,28}
*/
- bool get_maybe(Glib::VariantBase& maybe) const;
+ bool get_maybe(VariantBase& maybe) const;
_IGNORE(g_variant_get_maybe)
};
@@ -286,7 +286,7 @@ template<>
VariantContainerBase VariantBase::cast_dynamic<VariantContainerBase>(const VariantBase& v)
throw(std::bad_cast);
-/** Template class used for the specialization of the Glib::Variant<> classes.
+/** Template class used for the specialization of the Variant<> classes.
* @newin{2,28}
* @ingroup Variant
*/
@@ -303,7 +303,7 @@ _IGNORE(g_variant_get_type)
/****************** Specializations ***********************************/
-/** Specialization of Glib::Variant containing a Glib::VariantBase.
+/** Specialization of Variant containing a VariantBase.
* @newin{2,28}
* @ingroup Variant
*/
@@ -335,29 +335,29 @@ public:
: VariantContainerBase(castitem, take_a_reference)
{}
- /** Gets the Glib::VariantType.
- * @return The Glib::VariantType.
+ /** Gets the VariantType.
+ * @return The VariantType.
* @newin{2,28}
*/
- static const Glib::VariantType& variant_type() G_GNUC_CONST;
+ static const VariantType& variant_type() G_GNUC_CONST;
//This must have a create() method because otherwise it would be a copy
//constructor.
- /** Creates a new Glib::Variant<VariantBase>.
- * @param data The value of the new Glib::Variant.
- * @return The new Glib::Variant.
+ /** Creates a new Variant<VariantBase>.
+ * @param data The value of the new Variant.
+ * @return The new Variant.
* @newin{2,28}
*/
- static Variant<VariantBase> create(const Glib::VariantBase& data);
+ static Variant<VariantBase> create(const VariantBase& data);
_IGNORE(g_variant_new_variant)
//TODO: Documentation
- void get(Glib::VariantBase& variant) const;
+ void get(VariantBase& variant) const;
_WRAP_METHOD(VariantBase get() const, g_variant_get_variant)
};
-/** Specialization of Glib::Variant containing a Glib::ustring.
+/** Specialization of Variant containing a Glib::ustring.
* @newin{2,28}
* @ingroup Variant
*/
@@ -387,29 +387,29 @@ public:
: VariantStringBase(castitem, take_a_reference)
{}
- /** Gets the Glib::VariantType.
- * @return The Glib::VariantType.
+ /** Gets the VariantType.
+ * @return The VariantType.
* @newin{2,28}
*/
- static const Glib::VariantType& variant_type() G_GNUC_CONST;
+ static const VariantType& variant_type() G_GNUC_CONST;
- /** Creates a new Glib::Variant<Glib::ustring>.
- * @param data The value of the new Glib::Variant.
- * @return The new Glib::Variant.
+ /** Creates a new Variant<Glib::ustring>.
+ * @param data The value of the new Variant.
+ * @return The new Variant.
* @newin{2,28}
*/
static Variant<Glib::ustring> create(const Glib::ustring& data);
//We can't use WRAP_METHOD() here because g_variant_get_string() takes an extra length parameter.
- /** Gets the contents of the Glib::Variant.
- * @return The contents of the Glib::Variant.
+ /** Gets the contents of the Variant.
+ * @return The contents of the Variant.
* @newin{2,28}
*/
Glib::ustring get() const;
_IGNORE(g_variant_get_string, g_variant_dup_string)
};
-/** Specialization of Glib::Variant containing a std::string (a non-capable
+/** Specialization of Variant containing a std::string (a non-capable
* UTF-8 string).
* @newin{2,28}
* @ingroup Variant
@@ -440,15 +440,15 @@ public:
: VariantStringBase(castitem, take_a_reference)
{}
- /** Gets the Glib::VariantType.
- * @return The Glib::VariantType.
+ /** Gets the VariantType.
+ * @return The VariantType.
* @newin{2,28}
*/
- static const Glib::VariantType& variant_type() G_GNUC_CONST;
+ static const VariantType& variant_type() G_GNUC_CONST;
- /** Creates a new Glib::Variant<std::string>.
- * @param data The value of the new Glib::Variant.
- * @return The new Glib::Variant.
+ /** Creates a new Variant<std::string>.
+ * @param data The value of the new Variant.
+ * @return The new Variant.
* @newin{2,28}
*/
static Variant<std::string> create(const std::string& data);
@@ -457,8 +457,8 @@ public:
_IGNORE(g_variant_dup_bytestring)
};
-/** Specialization of Glib::Variant containing a dictionary entry. See also
- * Glib::Variant< std::map<K, V> >.
+/** Specialization of Variant containing a dictionary entry. See also
+ * Variant< std::map<K, V> >.
* @newin{2,28}
* @ingroup Variant
*/
@@ -467,7 +467,7 @@ class Variant< std::pair<K, V> > : public VariantContainerBase
{
public:
typedef std::pair<K, V> CppType;
- typedef Glib::Variant<CppType> CppContainerType;
+ typedef Variant<CppType> CppContainerType;
/// Default constructor.
Variant< std::pair<K, V> >()
@@ -485,29 +485,29 @@ public:
: VariantContainerBase(castitem, take_a_reference)
{}
- /** Gets the Glib::VariantType.
- * @return The Glib::VariantType.
+ /** Gets the VariantType.
+ * @return The VariantType.
* @newin{2,28}
*/
- static const Glib::VariantType& variant_type() G_GNUC_CONST;
+ static const VariantType& variant_type() G_GNUC_CONST;
- /** Creates a new Glib::Variant< std::pair<K, V> >.
- * @param data The value of the new Glib::Variant.
- * @return The new Glib::Variant.
+ /** Creates a new Variant< std::pair<K, V> >.
+ * @param data The value of the new Variant.
+ * @return The new Variant.
* @newin{2,28}
*/
static Variant< std::pair<K, V> > create(const std::pair<K, V>& data);
_IGNORE(g_variant_new_dict_entry)
- /** Gets the contents of the Glib::Variant.
- * @return The contents of the Glib::Variant.
+ /** Gets the contents of the Variant.
+ * @return The contents of the Variant.
* @throw std::out_of_range
* @newin{2,28}
*/
std::pair<K, V> get() const;
};
-/** Specialization of Glib::Variant containing an array of items.
+/** Specialization of Variant containing an array of items.
* @newin{2,28}
* @ingroup Variant
*/
@@ -534,15 +534,15 @@ public:
: VariantContainerBase(castitem, take_a_reference)
{}
- /** Gets the Glib::VariantType.
- * @return The Glib::VariantType.
+ /** Gets the VariantType.
+ * @return The VariantType.
* @newin{2,28}
*/
- static const Glib::VariantType& variant_type() G_GNUC_CONST;
+ static const VariantType& variant_type() G_GNUC_CONST;
- /** Creates a new Glib::Variant from an array of numeric types.
+ /** Creates a new Variant from an array of numeric types.
* @param data The array to use for creation.
- * @return The new Glib::Variant.
+ * @return The new Variant.
* @newin{2,28}
*/
static Variant< std::vector<T> > create(const std::vector<T>& data);
@@ -550,7 +550,7 @@ public:
/** Gets a specific element of the array. It is an error if @a index is
* greater than the number of child items in the container. See
- * Glib::VariantContainerBase::get_n_children().
+ * VariantContainerBase::get_n_children().
*
* This function is O(1).
*
@@ -561,7 +561,7 @@ public:
*/
T get(gsize index) const;
- /** Gets the vector of the Glib::Variant.
+ /** Gets the vector of the Variant.
* @return The vector.
* @newin{2,28}
*/
@@ -575,7 +575,7 @@ public:
VariantIter get_iter() const;
};
-/** Specialization of Glib::Variant containing an array of UTF-8 capable
+/** Specialization of Variant containing an array of UTF-8 capable
* strings.
* @newin{2,28}
* @ingroup Variant
@@ -603,15 +603,15 @@ public:
: VariantContainerBase(castitem, take_a_reference)
{}
- /** Gets the Glib::VariantType.
- * @return The Glib::VariantType.
+ /** Gets the VariantType.
+ * @return The VariantType.
* @newin{2,28}
*/
- static const Glib::VariantType& variant_type() G_GNUC_CONST;
+ static const VariantType& variant_type() G_GNUC_CONST;
- /** Creates a new Glib::Variant from an array of strings.
+ /** Creates a new Variant from an array of strings.
* @param data The array to use for creation.
- * @return The new Glib::Variant.
+ * @return The new Variant.
* @newin{2,28}
*/
static Variant< std::vector<Glib::ustring> >
@@ -619,7 +619,7 @@ public:
/** Gets a specific element of the string array. It is an error if @a index
* is greater than the number of child items in the container. See
- * Glib::VariantContainerBase::get_n_children().
+ * VariantContainerBase::get_n_children().
*
* This function is O(1).
*
@@ -630,7 +630,7 @@ public:
*/
Glib::ustring get(gsize index) const;
- /** Gets the string vector of the Glib::Variant.
+ /** Gets the string vector of the Variant.
* @return The vector.
* @newin{2,28}
*/
@@ -644,7 +644,7 @@ public:
VariantIter get_iter() const;
};
-/** Specialization of Glib::Variant containing an array of non-UTF-8 strings
+/** Specialization of Variant containing an array of non-UTF-8 strings
* (byte string arrays).
* @newin{2,28}
* @ingroup Variant
@@ -672,15 +672,15 @@ public:
: VariantContainerBase(castitem, take_a_reference)
{}
- /** Gets the Glib::VariantType.
- * @return The Glib::VariantType.
+ /** Gets the VariantType.
+ * @return The VariantType.
* @newin{2,28}
*/
- static const Glib::VariantType& variant_type() G_GNUC_CONST;
+ static const VariantType& variant_type() G_GNUC_CONST;
- /** Creates a new Glib::Variant from an array of strings.
+ /** Creates a new Variant from an array of strings.
* @param data The array to use for creation.
- * @return The new Glib::Variant.
+ * @return The new Variant.
* @newin{2,28}
*/
static Variant< std::vector<std::string> >
@@ -688,7 +688,7 @@ public:
/** Gets a specific element of the string array. It is an error if @a index
* is greater than the number of child items in the container. See
- * Glib::VariantContainerBase::get_n_children().
+ * VariantContainerBase::get_n_children().
*
* This function is O(1).
*
@@ -699,7 +699,7 @@ public:
*/
std::string get(gsize index) const;
- /** Gets the string vector of the Glib::Variant.
+ /** Gets the string vector of the Variant.
* @return The vector.
* @newin{2,28}
*/
@@ -713,7 +713,7 @@ public:
VariantIter get_iter() const;
};
-/** Specialization of Glib::Variant containing a dictionary (a map of (key,
+/** Specialization of Variant containing a dictionary (a map of (key,
* value) elements).
* @newin{2,28}
* @ingroup Variant
@@ -741,22 +741,22 @@ public:
: VariantContainerBase(castitem, take_a_reference)
{}
- /** Gets the Glib::VariantType.
- * @return The Glib::VariantType.
+ /** Gets the VariantType.
+ * @return The VariantType.
* @newin{2,28}
*/
- static const Glib::VariantType& variant_type() G_GNUC_CONST;
+ static const VariantType& variant_type() G_GNUC_CONST;
- /** Creates a new Glib::Variant containing a dictionary from a map.
+ /** Creates a new Variant containing a dictionary from a map.
* @param data The map to use for creation.
- * @return The new Glib::Variant holding a dictionary.
+ * @return The new Variant holding a dictionary.
* @newin{2,28}
*/
static Variant< std::map<K, V> > create(const std::map<K, V>& data);
/** Gets a specific dictionary entry from the string array. It is an error
* if @a index is greater than the number of child items in the container.
- * See Glib::VariantContainerBase::get_n_children().
+ * See VariantContainerBase::get_n_children().
*
* This function is O(1).
*
@@ -775,7 +775,7 @@ public:
bool lookup(const K& key, V& value) const;
_IGNORE(g_variant_lookup_value, g_variant_lookup)
- /** Gets the map (the dictionary) of the Glib::Variant.
+ /** Gets the map (the dictionary) of the Variant.
* @return The vector.
* @newin{2,28}
*/
@@ -805,7 +805,7 @@ _IGNORE(
g_variant_iter_new
)
-/* Include generated specializations of Glib::Variant<> for fundamental types:
+/* Include generated specializations of Variant<> for fundamental types:
*/
#define _GLIBMM_VARIANT_H_INCLUDE_VARIANT_BASICTYPES_H
#include <glibmm/variant_basictypes.h>
@@ -814,7 +814,7 @@ _IGNORE(
namespace Glib
{
-/*--------------------Glib::Variant< std::pair<K, V> >---------------------*/
+/*--------------------Variant< std::pair<K, V> >---------------------*/
// static
template<class K, class V>
@@ -859,7 +859,7 @@ std::pair<K, V> Variant< std::pair<K, V> >::get() const
return result;
}
-/*---------------------Glib::Variant< std::vector<T> >---------------------*/
+/*---------------------Variant< std::vector<T> >---------------------*/
// static
template<class T>
@@ -949,7 +949,7 @@ VariantIter Variant< std::vector<T> >::get_iter() const
return VariantIter(g_iter);
}
-/*---------------------Glib::Variant< std::map<K, V> > --------------------*/
+/*---------------------Variant< std::map<K, V> > --------------------*/
// static
template<class K, class V>
diff --git a/glib/src/variantiter.hg b/glib/src/variantiter.hg
index 7f38a77..09353e9 100644
--- a/glib/src/variantiter.hg
+++ b/glib/src/variantiter.hg
@@ -27,7 +27,7 @@ class VariantBase;
//because g_iter_value_get_next_value() both gets a value and changes the iterator.
//GtkTextIter allows us to go forward and then separately get the current value.
/** VariantIter - An opaque data structure used to iterate through
- * Glib::VariantBase containers such as arrays.
+ * VariantBase containers such as arrays.
* @newin{2,28}
*/
class VariantIter
diff --git a/glib/src/varianttype.hg b/glib/src/varianttype.hg
index 9942ef7..73136ea 100644
--- a/glib/src/varianttype.hg
+++ b/glib/src/varianttype.hg
@@ -28,23 +28,23 @@ typedef struct _GVariantType GVariantType;
namespace Glib
{
-/** VariantType - The Glib::VariantBase type system.
- * The Glib::VariantBase type system is based, in large part, on the DBus type
+/** VariantType - The VariantBase type system.
+ * The VariantBase type system is based, in large part, on the DBus type
* system, with two major changes and some minor lifting of restrictions. <a
* href="http://dbus.freedesktop.org/doc/dbus-specification.html">The
* DBus specification</a>, therefore, provides a significant amount of
- * information that is useful when working with Glib::VariantBase.
+ * information that is useful when working with VariantBase.
*
* The first major change with respect to the DBus type system is the
- * introduction of maybe (or "nullable") types. Any type in Glib::VariantBase
+ * introduction of maybe (or "nullable") types. Any type in VariantBase
* can be converted to a maybe type, in which case, "nothing" (or "null")
* becomes a valid value. Maybe types have been added by introducing the
* character "m" to type strings.
*
- * The second major change is that the Glib::VariantBase type system supports
+ * The second major change is that the VariantBase type system supports
* the concept of "indefinite types" -- types that are less specific than the
* normal types found in DBus. For example, it is possible to speak of "an
- * array of any type" in Glib::VariantBase, where the DBus type system would
+ * array of any type" in VariantBase, where the DBus type system would
* require you to speak of "an array of integers" or "an array of strings".
* Indefinite types have been added by introducing the characters "*", "?" and
* "r" to type strings.
@@ -53,22 +53,22 @@ namespace Glib
* lifted along with the restriction that dictionary entries may only appear
* nested inside of arrays.
*
- * Just as in DBus, Glib::VariantBase types are described with strings ("type
+ * Just as in DBus, VariantBase types are described with strings ("type
* strings"). Subject to the differences mentioned above, these strings are of
* the same form as those found in DBus. Note, however: DBus always works in
* terms of messages and therefore individual type strings appear nowhere in
* its interface. Instead, "signatures" are a concatenation of the strings of
- * the type of each argument in a message. Glib::VariantBase deals with single
- * values directly so Glib::VariantBase type strings always describe the type
+ * the type of each argument in a message. VariantBase deals with single
+ * values directly so VariantBase type strings always describe the type
* of exactly one value. This means that a DBus signature string is generally
- * not a valid Glib::VariantBase type string -- except in the case that it is
+ * not a valid VariantBase type string -- except in the case that it is
* the signature of a message containing exactly one argument.
*
* An indefinite type is similar in spirit to what may be called an abstract
* type in other type systems. No value can exist that has an indefinite type
* as its type, but values can exist that have types that are subtypes of
- * indefinite types. That is to say, Glib::VariantBase::get_type() will never
- * return an indefinite type, but calling Glib::VariantBase::is_of_type() with
+ * indefinite types. That is to say, VariantBase::get_type() will never
+ * return an indefinite type, but calling VariantBase::is_of_type() with
* an indefinite type may return <tt>true</tt>. For example, you can not have a
* value that represents "an array of no particular type", but you can have an
* "array of integers" which certainly matches the type of "an array of no
@@ -82,7 +82,7 @@ namespace Glib
* instantiated, and you would say that the Gtk::Window is a Gtk::Bin (since
* Gtk::Window is a subclass of Gtk::Bin).
*
- * For a detailed description of the Glib::VariantBase type strings see the C
+ * For a detailed description of the VariantBase type strings see the C
* API docs of GVariantType.
* @newin{2,28}
* @ingroup Variant
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]