|
| AnyValue (AnyValue const &other) |
|
| AnyValue (AnyValue &&other) |
|
AnyValue & | operator= (AnyValue const &other) |
|
AnyValue & | operator= (AnyValue &&other) |
|
AnyValue & | operator[] (const std::string &key) |
|
bool | hasKey (const std::string &key) const |
|
void | setKey (const std::string &key) |
|
template<class T > |
const T & | as () const |
|
template<class T > |
T & | as () |
|
const std::type_info & | type () |
|
template<class T > |
bool | is () const |
|
AnyValue & | operator= (const std::string &value) |
|
AnyValue & | operator= (const char *value) |
|
const std::string & | asString () const |
|
AnyValue & | operator= (double value) |
|
double | asDouble () const |
|
AnyValue & | operator= (bool value) |
|
bool | asBool () const |
|
AnyValue & | operator= (long int value) |
|
AnyValue & | operator= (int value) |
|
long int | asInt () const |
|
template<class T > |
AnyValue & | operator= (const std::vector< T > &value) |
|
template<class T > |
const std::vector< T > & | asVector () const |
|
template<class T > |
std::vector< T > & | asVector () |
|
AnyValue & | operator= (const AnyMap &value) |
|
AnyValue & | operator= (AnyMap &&value) |
|
template<class T > |
AnyValue & | operator= (const std::unordered_map< std::string, T > items) |
|
template<class T > |
AnyValue & | operator= (const std::map< std::string, T > items) |
|
template<class T > |
std::map< std::string, T > | asMap () |
|
template<> |
AnyMap & | as () |
|
A wrapper for a variable whose type is determined at runtime.
Instances of AnyValue are used as values in an AnyMap. Values are converted to a concrete type using the templated as() method or convenience methods such as asString() and asDouble(). See AnyMap for usage examples.
Elements are set using assignment, and the assignment operator has been overloaded for specific types so that only those types are allowed to be used in an AnyValue.
Definition at line 35 of file AnyMap.h.