A class representing a dictionary mapping keys to values.
A VdoMap object supports getting/settings properties in the form of key/value pairs with values of the following types.
- boolean
- byte
- uint16, uint32, uint64
- uint32x2, uint32x4
- int16, int32, int64
- double
- doublex4
- string
The key is always the name of the property as a string. A VdoMap object does not support duplicate keys. NULL or the empty string "" are not valid keys.
A VdoMap supports different operations to test if maps contains a specific key or set of keys, for example:
gboolean contains = FALSE;
const gchar *keys[] = { "key1", "key2", "key3", };
gboolean vdo_map_contains_strv(const VdoMap *self, const gchar *const *names)
Checks if this map contains the specified set of keys.
gboolean vdo_map_contains_va(const VdoMap *self,...)
Checks if this map contains the specified set of keys.
gboolean vdo_map_contains(const VdoMap *self, const gchar *name)
Checks if this map contains the specified key.
A VdoMap also supports different operations to test two maps, or a subset of two maps for equality, for example:
gboolean equals = FALSE;
const gchar *keys[] = { "key1", "key2", "key3", };
gboolean vdo_map_equals(const VdoMap *self, const VdoMap *map)
Checks if all entries in this map and the specified map are equal.
gboolean vdo_map_equals_strv(const VdoMap *self, const VdoMap *map, const gchar *const *names)
Checks if all of the specified entries in this map and the specified map are equal.
gboolean vdo_map_equals_va(const VdoMap *self, const VdoMap *map,...)
Checks if all of the specified entries in this map and the specified map are equal.
- Examples
- vdo-example-blocking.cc, vdo-example-channel-filter.cc, and vdo-example.cc.