Specialization of Variant containing a dictionary (a map of (key, value) elements). More...
#include <glibmm/variant.h>
List of all members.
Detailed Description
template <class K, class V>
class Glib::Variant< std::map< K, V > >
Specialization of Variant containing a dictionary (a map of (key, value) elements).
- Since glibmm 2.28:
Member Typedef Documentation
template <class K , class V >
template <class K , class V >
Constructor & Destructor Documentation
template <class K , class V >
template <class K , class V >
GVariant constructor.
- Parameters:
-
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). |
Member Function Documentation
template <class K , class V >
Creates a new Variant containing a dictionary from a map.
- Parameters:
-
data | The map to use for creation. |
- Returns:
- The new Variant holding a dictionary.
- Since glibmm 2.28:
template <class K , class V >
template <class K , class V >
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).
- Parameters:
-
index | The index of the element. |
- Returns:
- The dictionary entry at index .
- Exceptions:
-
- Since glibmm 2.28:
template <class K , class V >
template <class K , class V >
Looks up a value in a dictionary Variant.
- Parameters:
-
key | The key to look up. |
value | A location in which to store the value if found. |
- Returns:
true
if the key is found, false
otherwise.
template <class K , class V >