glibmm 2.46.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Examples

Classes
Variant Data Types

The Variant classes deal with strongly typed variant data. More...

## Classes

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 from which multiple-item Variants derive, such as Variants containing tuples or arrays. 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< 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< 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::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< gint64 >
| Specialization of Glib::Variant containing a gint64 type. More...
class | Glib::Variant< guint64 >
| Specialization of Glib::Variant containing a guint64 type. More...
class | Glib::Variant< double >
| Specialization of Glib::Variant containing a double type. More...

## Detailed Description

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.