|
glibmm
2.31.22
|
Specialization of Variant containing a dictionary (a map of (key, value) elements). More...
#include <glibmm/variant.h>

Public Types | |
| typedef std::pair< K, V > | CppType |
| typedef std::map< K, V > | CppContainerType |
Public Member Functions | |
| Variant () | |
| Default constructor. | |
| Variant (GVariant* castitem, bool take_a_reference=false) | |
| GVariant constructor. | |
| std::pair< K, V > | get_child (gsize index) const |
| Gets a specific dictionary entry from the string array. | |
| bool | lookup (const K& key, V&value) const |
| Looks up a value in a dictionary Variant. | |
| std::map< K, V > | get () const |
| Gets the map (the dictionary) of the Variant. | |
| VariantIter | get_iter () const |
| Gets a VariantIter of the Variant. | |
Static Public Member Functions | |
| static const VariantType& | variant_type () |
| Gets the VariantType. | |
| static Variant< std::map< K, V > > | create (const std::map< K, V >& data) |
| Creates a new Variant containing a dictionary from a map. | |
Specialization of Variant containing a dictionary (a map of (key, value) elements).
| typedef std::map<K, V> Glib::Variant< std::map< K, V > >::CppContainerType |
| typedef std::pair<K, V> Glib::Variant< std::map< K, V > >::CppType |
Reimplemented from Glib::VariantContainerBase.
| Glib::Variant< std::map< K, V > >::Variant | ( | ) | [inline] |
Default constructor.
| Glib::Variant< std::map< K, V > >::Variant | ( | GVariant< std::map< K, V > > * | castitem, |
| bool | take_a_reference = false |
||
| ) | [inline, explicit] |
GVariant constructor.
| castitem | The GVariant to wrap. |
| take_a_reference | Whether to take an extra reference of the GVariant or not (not taking one could destroy the GVariant with the wrapper). |
| Variant< std::map< K, V > > Glib::Variant< std::map< K, V > >::create | ( | const std::map< K, V > & | data | ) | [static] |
| std::map< K, V > Glib::Variant< std::map< K, V > >::get | ( | ) | const |
| std::pair< K, V > Glib::Variant< std::map< K, V > >::get_child | ( | gsize | index | ) | const |
Gets a specific dictionary entry from the string array.
It is an error if index is greater than the number of child items in the container. See VariantContainerBase::get_n_children().
This function is O(1).
| index | The index of the element. |
| std::out_of_range |
| VariantIter Glib::Variant< std::map< K, V > >::get_iter | ( | ) | const |
| bool Glib::Variant< std::map< K, V > >::lookup | ( | const K & | key, |
| V & | value | ||
| ) | const |
Looks up a value in a dictionary Variant.
| key | The key to look up. |
| value | A location in which to store the value if found. |
true if the key is found, false otherwise. | const VariantType& Glib::Variant< std::map< K, V > >::variant_type | ( | ) | [static] |
1.7.6.1