|
AvogadroLibs
1.95.1
|
The VariantMap class provides a map between string keys and variant values.
#include <avogadro/core/variantmap.h>
Public Types | |
| typedef std::map< std::string, Variant >::iterator | iterator |
| typedef std::map< std::string, Variant >::const_iterator | const_iterator |
Public Member Functions | |
| VariantMap () | |
| ~VariantMap () | |
| size_t | size () const |
| bool | isEmpty () const |
| std::vector< std::string > | names () const |
| void | setValue (const std::string &name, const Variant &v) |
| Variant | value (const std::string &name) const |
| bool | hasValue (const std::string &name) const |
| iterator | begin () |
| const_iterator | begin () const |
| const_iterator | constBegin () const |
| iterator | end () |
| const_iterator | end () const |
| const_iterator | constEnd () const |
| VariantMap | ( | ) |
Creates a new variant map object.
| ~VariantMap | ( | ) |
Destroys the variant map.
| size_t size | ( | ) | const |
Returns the size of the variant map.
| bool isEmpty | ( | ) | const |
Returns true if the variant map is empty (i.e. size() == 0).
| std::vector<std::string> names | ( | ) | const |
Returns the names of the entries in the map.
| void setValue | ( | const std::string & | name, |
| const Variant & | v | ||
| ) |
Sets the value of name to v.
| Variant value | ( | const std::string & | name | ) | const |
Returns the value for name. If name is not found a null variant is returned.
| bool hasValue | ( | const std::string & | name | ) | const |
Returns true if the key exists in the map.
| iterator begin | ( | ) |
Return an iterator pointing to the beginning of the map.
| const_iterator begin | ( | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| const_iterator constBegin | ( | ) | const |
Return a const_iterator pointing to the beginning of the map.
| iterator end | ( | ) |
Return an iterator pointing to the end of the map.
| const_iterator end | ( | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| const_iterator constEnd | ( | ) | const |
Return a const_iterator pointing to the end of the map.
1.8.14