glibmm 2.82.0
|
The Variant classes deal with strongly typed variant data. More...
Classes | |
class | Glib::DBusObjectPathString |
String class for D-Bus object paths in Glib::Variant. More... | |
class | Glib::DBusSignatureString |
String class for D-Bus signatures in Glib::Variant. More... | |
class | Glib::DBusHandle |
Class for D-Bus handles in Glib::Variant. More... | |
class | Glib::VariantBase |
This is the base class for all Variant types. More... | |
class | Glib::VariantStringBase |
Base class from which string variant classes derive. More... | |
class | Glib::VariantContainerBase |
The base class for multiple-item Variants, such as Variants containing tuples or arrays, and also for maybe-typed (that is, nullable) Variant types. More... | |
class | Glib::Variant< T > |
Template class used for the specialization of the Variant<> classes. More... | |
class | Glib::Variant< VariantBase > |
Specialization of Variant containing a VariantBase. More... | |
class | Glib::Variant< Variant< T > > |
Specialization of Variant containing a Variant<T>. More... | |
class | Glib::Variant< Glib::ustring > |
Specialization of Variant containing a Glib::ustring, for variants of type string, object path, or signature. More... | |
class | Glib::Variant< Glib::DBusObjectPathString > |
Specialization of Variant containing a Glib::DBusObjectPathString, for variants of type object path. More... | |
class | Glib::Variant< Glib::DBusSignatureString > |
Specialization of Variant containing a Glib::DBusSignatureString, for variants of type signature. More... | |
class | Glib::Variant< std::string > |
Specialization of Variant containing a std::string, for variants of type bytestring, string, object path, or signature. More... | |
class | Glib::Variant< std::vector< T > > |
Specialization of Variant containing an array of items. More... | |
class | Glib::Variant< std::vector< Glib::ustring > > |
Specialization of Variant containing an array of UTF-8 capable strings. More... | |
class | Glib::Variant< std::vector< Glib::DBusObjectPathString > > |
Specialization of Variant containing an array of D-Bus object paths. More... | |
class | Glib::Variant< std::vector< std::string > > |
Specialization of Variant containing an array of non-UTF-8 strings (byte string arrays). More... | |
class | Glib::Variant< std::map< K, V > > |
Specialization of Variant containing a dictionary (a map of (key, value) elements). More... | |
class | Glib::Variant< std::tuple< Types... > > |
Specialization of Variant containing a tuple. More... | |
class | Glib::VariantType |
VariantType - The VariantBase type system. More... | |
class | Glib::Variant< bool > |
Specialization of Glib::Variant containing a bool type. More... | |
class | Glib::Variant< unsigned char > |
Specialization of Glib::Variant containing a unsigned char type. More... | |
class | Glib::Variant< gint16 > |
Specialization of Glib::Variant containing a gint16 type. More... | |
class | Glib::Variant< guint16 > |
Specialization of Glib::Variant containing a guint16 type. More... | |
class | Glib::Variant< gint32 > |
Specialization of Glib::Variant containing a gint32 type. More... | |
class | Glib::Variant< guint32 > |
Specialization of Glib::Variant containing a guint32 type. More... | |
class | Glib::Variant< long > |
Specialization of Glib::Variant containing a long type. More... | |
class | Glib::Variant< unsigned long > |
Specialization of Glib::Variant containing a unsigned long type. More... | |
class | Glib::Variant< long long > |
Specialization of Glib::Variant containing a long long type. More... | |
class | Glib::Variant< unsigned long long > |
Specialization of Glib::Variant containing a unsigned long long type. More... | |
class | Glib::Variant< DBusHandle > |
Specialization of Glib::Variant containing a DBusHandle type. More... | |
class | Glib::Variant< double > |
Specialization of Glib::Variant containing a double type. More... | |
Functions | |
template<typename T > | |
Variant< T > | create_variant (const T &data) |
Creates a Glib::Variant instance. | |
The Variant classes deal with strongly typed variant data.
A Variant stores a value along with information about the type of that value. The range of possible values is determined by the type. The type system used is VariantType.
See the VariantBase class and its derived types, such as VariantContainerBase, and the Variant<> template type.
Variant instances always have a type and a value (which are given at construction time). The type and value of a Variant can never change other than by the Variant itself being destroyed. A Variant cannot contain a pointer.
Variant is heavily optimised for dealing with data in serialised form. It works particularly well with data located in memory-mapped files. It can perform nearly all deserialisation operations in a small constant time, usually touching only a single memory page. Serialised Variant data can also be sent over the network.
Variant is largely compatible with D-Bus. Almost all types of Variant instances can be sent over D-Bus. See VariantType for exceptions.
There is a Python-inspired text language for describing Variant values. Variant includes a printer for this language and a parser with type inferencing.
Creates a Glib::Variant instance.
is an alternative to
Glib::create_variant() can usually deduce the type of the Glib::Variant from the type of the argument.
There is no Glib::Variant<const char*> specialization.