|
| ProgramSettings (const char *applicationName, const char *version="") |
|
bool | read (const char *fn) |
|
bool | write (const char *fn) |
|
| AnyCollection (AnyValue value) |
|
template<class T > |
| AnyCollection (const std::vector< T > &array) |
|
template<class T , class T2 > |
| AnyCollection (const std::map< T, T2 > &map) |
|
template<class T , class T2 > |
| AnyCollection (const UNORDERED_MAP_TEMPLATE< T, T2 > &map) |
|
size_t | size () const |
|
bool | null () const |
| returns true if this is a null
|
|
bool | collection () const |
| returns true if it is a non-primitive data type
|
|
bool | isvalue () const |
| returns true if this is a primitive data type
|
|
bool | isarray () const |
| returns true if this is an array data type
|
|
bool | ismap () const |
| returns true if this is a map data type
|
|
size_t | depth () const |
| depth of nesting: 0 for a primitive data type, 1 for vector or map etc
|
|
| operator const AnyValue & () const |
| cast to AnyValue, if this is a primitive data type
|
|
| operator AnyValue & () |
|
template<class T > |
| operator T () const |
|
template<class T > |
bool | as (T &value) const |
|
template<class T > |
bool | asvector (std::vector< T > &values) const |
|
bool | asvector (std::vector< AnyValue > &values) const |
|
template<class T > |
bool | operator== (const T &value) const |
|
template<class T > |
bool | operator!= (const T &value) const |
|
void | resize (size_t n) |
|
void | clear () |
|
AnyCollectionPtr | find (int i) const |
|
AnyCollectionPtr | find (const char *str) const |
|
AnyCollectionPtr | find (AnyKeyable key) const |
|
AnyCollectionPtr | insert (int i) |
|
AnyCollectionPtr | insert (const char *str) |
|
AnyCollectionPtr | insert (AnyKeyable key) |
|
AnyCollection & | operator[] (int i) |
|
const AnyCollection & | operator[] (int i) const |
|
AnyCollection & | operator[] (const char *str) |
|
const AnyCollection & | operator[] (const char *str) const |
|
AnyCollection & | operator[] (AnyKeyable key) |
|
const AnyCollection & | operator[] (AnyKeyable key) const |
|
void | shallow_copy (const AnyCollection &rhs) |
| shallow copy
|
|
void | deep_copy (const AnyCollection &rhs) |
| deep copy
|
|
AnyCollection & | operator= (const AnyCollection &rhs) |
| shallow copy
|
|
AnyCollection & | operator= (AnyValue value) |
| set to a value
|
|
AnyCollection & | operator= (bool v) |
| set to a primitive data type that can accidentally be cast to a char*
|
|
AnyCollection & | operator= (char v) |
|
AnyCollection & | operator= (unsigned char v) |
|
AnyCollection & | operator= (int v) |
|
AnyCollection & | operator= (unsigned int v) |
|
AnyCollection & | operator= (float v) |
|
AnyCollection & | operator= (double v) |
|
AnyCollection & | operator= (const std::string &str) |
|
AnyCollection & | operator= (const char *str) |
| set to a C-string
|
|
template<class T > |
AnyCollection & | operator= (const std::vector< T > &array) |
| set to an array
|
|
template<class T , class T2 > |
AnyCollection & | operator= (const std::map< T, T2 > &map) |
| set to a map
|
|
template<class T , class T2 > |
AnyCollection & | operator= (const UNORDERED_MAP_TEMPLATE< T, T2 > &map) |
| set to a map
|
|
AnyCollectionPtr | lookup (const std::string &reference, bool insert=false, char delim='.', char lbracket='[', char rbracket=']') |
|
AnyCollectionPtr | lookup (const std::vector< std::string > &path, bool insert=false) |
|
AnyCollectionPtr | lookup (const std::vector< AnyKeyable > &path, bool insert=false) |
|
bool | match_path (const std::vector< std::string > &path, std::vector< AnyKeyable > &key_path) const |
|
AnyCollectionPtr | slice (const std::string &reference, const char *delims=".[]:,") |
|
bool | subcollection (const std::vector< std::string > &paths, AnyCollection &subset, const char *delims=".[]:,") |
|
void | enumerate (std::vector< AnyCollectionPtr > &collections) const |
| if this is a collection, returns the list of sub-collections
|
|
void | enumerate_keys (std::vector< AnyKeyable > &elements) const |
| returns an enumerated list of keys contained within
|
|
void | enumerate_values (std::vector< AnyValue > &elements) const |
| returns an enumerated list of primitive values contained within
|
|
void | enumerate_keys_dfs (std::vector< std::vector< AnyKeyable > > &paths) const |
| returns an enumerated list of keys contained within
|
|
void | enumerate_values_dfs (std::vector< AnyValue > &elements) const |
| returns an enumerated list of elements contained within
|
|
void | merge (const AnyCollection &other) |
|
void | deepmerge (const AnyCollection &other) |
|
bool | fill (AnyCollection &universe, bool checkSuperset=false) |
|
bool | read (std::istream &in) |
| Reads in JSON format.
|
|
bool | read (const char *data) |
|
void | write (std::ostream &out, int indent=0) const |
| Writes in JSON format.
|
|
void | write_inline (std::ostream &out) const |
| Same as write, but puts everything onto one line.
|
|
A convenience class for reading/writing settings to the application data folder