Jamoma API
0.6.0.a19
|
A type that contains a key and a value. More...
#include <TTDictionaryBase.h>
Public Member Functions | |
TTErr | setSchema (const TTSymbol schemaName) |
TODO: Add documentation schemaName TODO: Add documentation. More... | |
const TTSymbol | getSchema () const |
TODO: Add documentation. More... | |
TTErr | setValue (const TTValue &newValue) |
TODO: Add documentation. More... | |
TTErr | getValue (TTValue &returnedValue) const |
TODO: Add documentation. More... | |
template<class T > | |
TTErr | getValue (T &aReturnedValue) const |
Get a dictionary's primary value. More... | |
TTErr | append (const TTSymbol key, const TTValue &value) |
Insert an item into the hash table. More... | |
TTErr | lookup (const TTSymbol key, TTValue &value) const |
Find the value for the given key. More... | |
TTErr | remove (const TTSymbol key) |
Remove an item from the hash table. More... | |
TTErr | clear () |
Remove all items from the hash table. More... | |
TTErr | getKeys (TTValue &hashKeys) |
Get an array of all of the keys for the hash table. More... | |
TTUInt32 | getSize () |
Return the number of keys in the hash table. More... | |
TTBoolean | isEmpty () |
Return true if the hash has nothing stored in it. More... | |
Friends | |
class | TTDictionary |
A type that contains a key and a value.
The dictionary is a data structure that combines the fast lookup of a hashtable, but may be sorted like a linked-list. This accomplished internally by maintaining the two data structures in parallel.
Note that generally speaking you should not directly create a TTDictionaryBase! Instead, TTDictionaryBase objects should only by created by the instantiating a TTDictionary.
Definition at line 55 of file TTDictionaryBase.h.
Insert an item into the hash table.
value | The value to instert. |
Definition at line 77 of file TTDictionaryBase.cpp.
References kTTErrNone, and TTSymbol::rawpointer().
Referenced by TTDictionary::append(), jamoma_explorer_default_filter_bank(), setSchema(), setValue(), TTDataParseCommand(), and TTMapperReceiveValueCallback().
TTErr TTDictionaryBase::clear | ( | ) |
Remove all items from the hash table.
Definition at line 137 of file TTDictionaryBase.cpp.
References kTTErrNone.
Referenced by TTDictionary::clear().
Get an array of all of the keys for the hash table.
hashKeys | Used to return an array of all of the keys for the hash table |
Definition at line 146 of file TTDictionaryBase.cpp.
References TTValue::append(), TTValue::clear(), and kTTErrNone.
Referenced by TTDictionary::getKeys().
const TTSymbol TTDictionaryBase::getSchema | ( | ) | const |
TODO: Add documentation.
Definition at line 56 of file TTDictionaryBase.cpp.
References lookup().
Referenced by TTDictionary::getSchema().
TTUInt32 TTDictionaryBase::getSize | ( | ) |
Return the number of keys in the hash table.
Definition at line 163 of file TTDictionaryBase.cpp.
Referenced by TTDictionary::size().
TODO: Add documentation.
returnedValue | TODO: Add documentation |
Definition at line 71 of file TTDictionaryBase.cpp.
References lookup().
Referenced by TTDictionary::getValue().
|
inline |
Get a dictionary's primary value.
value | The returned value of the dictionary. |
Definition at line 118 of file TTDictionaryBase.h.
References TTDictionary::getValue().
TTBoolean TTDictionaryBase::isEmpty | ( | ) |
Return true if the hash has nothing stored in it.
Definition at line 169 of file TTDictionaryBase.cpp.
Referenced by TTDictionary::empty().
Find the value for the given key.
Definition at line 95 of file TTDictionaryBase.cpp.
References kTTErrNone, kTTErrValueNotFound, and TTSymbol::rawpointer().
Referenced by getSchema(), getValue(), and TTDictionary::lookup().
Remove an item from the hash table.
key | The key of the item to remove. |
Definition at line 121 of file TTDictionaryBase.cpp.
References kTTErrNone, and TTSymbol::rawpointer().
Referenced by TTDictionary::remove().
TODO: Add documentation schemaName TODO: Add documentation.
Definition at line 50 of file TTDictionaryBase.cpp.
References append().
Referenced by jamoma_explorer_default_filter_bank(), TTDictionary::setSchema(), TTDataParseCommand(), and TTMapperReceiveValueCallback().
TODO: Add documentation.
newValue | TODO: Add documentation |
Definition at line 65 of file TTDictionaryBase.cpp.
References append().
Referenced by TTDictionary::setValue(), TTDataParseCommand(), and TTMapperReceiveValueCallback().