#include <UT_JSONValueMap.h>
Public Member Functions | |
| UT_JSONValueMap () | |
| ~UT_JSONValueMap () | |
| void | bumpRef (int d) |
| Reference count (for shared maps). | |
| int | getRef () const |
| Get the number of references to this map. | |
| bool | save (UT_JSONWriter &os) const |
| Save to an output stream. | |
| int64 | getKeys (UT_StringArray &keys) const |
| Get the list of keys. | |
| int64 | getKeyReferences (UT_StringArray &keys) const |
| int64 | entries () const |
| Return the number of entries in the map. | |
| const UT_JSONValue * | operator() (int64 i) const |
| Access const entry by index. | |
| UT_JSONValue * | operator() (int64 i) |
| Access entry by index. | |
| const UT_JSONValue * | operator() (const char *k) const |
| Access const entry by name (may be NULL pointer if k is not a key). | |
| UT_JSONValue * | operator() (const char *k) |
| Access entry by name (may be NULL pointer if k is not a key). | |
| const UT_JSONValue * | operator[] (int64 i) const |
| Access const entry by index. | |
| UT_JSONValue * | operator[] (int64 i) |
| Access entry by index. | |
| const UT_JSONValue * | operator[] (const char *k) const |
| Access const entry by name (may be NULL pointer if k is not a key). | |
| UT_JSONValue * | operator[] (const char *k) |
| Access entry by name (may be NULL pointer if k is not a key). | |
| const UT_JSONValue * | get (int64 i) const |
| Access a const entry by index. | |
| UT_JSONValue * | get (int64 i) |
| Access an entry by index. | |
| const UT_JSONValue * | get (const char *k) const |
| Access const entry by name (may be NULL pointer if k is not a key). | |
| UT_JSONValue * | get (const char *k) |
| Access entry by name (may be NULL pointer if k is not a key). | |
| int64 | append (const char *key, UT_JSONValue *v) |
UT_JSONValueMap stores a map of UT_JSONValue objects. Unlike a standard Houdini UT_SymbolTable, this object maintains the sort order in which objects were added.
Definition at line 38 of file UT_JSONValueMap.h.
| UT_JSONValueMap::UT_JSONValueMap | ( | ) |
| UT_JSONValueMap::~UT_JSONValueMap | ( | ) |
| int64 UT_JSONValueMap::append | ( | const char * | key, | |
| UT_JSONValue * | v | |||
| ) |
Add key/value pair to the map. If the key already exists, the previous value will be deleted.
| void UT_JSONValueMap::bumpRef | ( | int | d | ) | [inline] |
| int64 UT_JSONValueMap::entries | ( | void | ) | const [inline] |
| UT_JSONValue* UT_JSONValueMap::get | ( | const char * | k | ) |
Access entry by name (may be NULL pointer if k is not a key).
| const UT_JSONValue* UT_JSONValueMap::get | ( | const char * | k | ) | const |
Access const entry by name (may be NULL pointer if k is not a key).
| UT_JSONValue* UT_JSONValueMap::get | ( | int64 | i | ) | [inline] |
| const UT_JSONValue* UT_JSONValueMap::get | ( | int64 | i | ) | const [inline] |
| int64 UT_JSONValueMap::getKeyReferences | ( | UT_StringArray & | keys | ) | const |
Get a list of the keys. However, rather than duplicating the string values, this method simply keeps shallow references. While it's more efficient, it's also relies on the fact that the map will not change while the string array exists.
| int64 UT_JSONValueMap::getKeys | ( | UT_StringArray & | keys | ) | const |
Get the list of keys.
| int UT_JSONValueMap::getRef | ( | ) | const [inline] |
| UT_JSONValue* UT_JSONValueMap::operator() | ( | const char * | k | ) | [inline] |
Access entry by name (may be NULL pointer if k is not a key).
Definition at line 74 of file UT_JSONValueMap.h.
| const UT_JSONValue* UT_JSONValueMap::operator() | ( | const char * | k | ) | const [inline] |
Access const entry by name (may be NULL pointer if k is not a key).
Definition at line 72 of file UT_JSONValueMap.h.
| UT_JSONValue* UT_JSONValueMap::operator() | ( | int64 | i | ) | [inline] |
| const UT_JSONValue* UT_JSONValueMap::operator() | ( | int64 | i | ) | const [inline] |
| UT_JSONValue* UT_JSONValueMap::operator[] | ( | const char * | k | ) | [inline] |
Access entry by name (may be NULL pointer if k is not a key).
Definition at line 83 of file UT_JSONValueMap.h.
| const UT_JSONValue* UT_JSONValueMap::operator[] | ( | const char * | k | ) | const [inline] |
Access const entry by name (may be NULL pointer if k is not a key).
Definition at line 81 of file UT_JSONValueMap.h.
| UT_JSONValue* UT_JSONValueMap::operator[] | ( | int64 | i | ) | [inline] |
| const UT_JSONValue* UT_JSONValueMap::operator[] | ( | int64 | i | ) | const [inline] |
| bool UT_JSONValueMap::save | ( | UT_JSONWriter & | os | ) | const |
Save to an output stream.
1.5.9