|
| | Dict (Int numPairsToPreAllocate=0) |
| |
| | Dict (const Dict &src) |
| |
| | ~Dict () |
| |
| Dict & | operator= (const Dict &src) |
| |
| void | clear () |
| |
| Int | getPairCount () const |
| |
| NameKeyType | getNthKey (Int n) const |
| |
| DataType | getType (NameKeyType key) const |
| |
| Bool | known (NameKeyType key, DataType d) const |
| |
| DataType | getNthType (Int n) const |
| |
| Bool | getBool (NameKeyType key, Bool *exists=NULL) const |
| |
| Int | getInt (NameKeyType key, Bool *exists=NULL) const |
| |
| Real | getReal (NameKeyType key, Bool *exists=NULL) const |
| |
| AsciiString | getAsciiString (NameKeyType key, Bool *exists=NULL) const |
| |
| UnicodeString | getUnicodeString (NameKeyType key, Bool *exists=NULL) const |
| |
| Bool | getNthBool (Int n) const |
| |
| Int | getNthInt (Int n) const |
| |
| Real | getNthReal (Int n) const |
| |
| AsciiString | getNthAsciiString (Int n) const |
| |
| UnicodeString | getNthUnicodeString (Int n) const |
| |
| void | setBool (NameKeyType key, Bool value) |
| |
| void | setInt (NameKeyType key, Int value) |
| |
| void | setReal (NameKeyType key, Real value) |
| |
| void | setAsciiString (NameKeyType key, const AsciiString &value) |
| |
| void | setUnicodeString (NameKeyType key, const UnicodeString &value) |
| |
| Bool | remove (NameKeyType key) |
| |
| void | copyPairFrom (const Dict &that, NameKeyType key) |
| |
Dict provides a general utility class for maintaining a sorted key-value pair list. Keys are currently required to be of type NameKeyType, and data may be Bool, int, real, or string.
Current implementation keeps the pairs sorted by key, and does a binary search for lookups; this might change in the future, depending on usage and performance (e.g., to a hashtable). So don't rely on the quirks of this implementation.
Definition at line 66 of file Dict.h.