Jamoma API  0.6.0.a19
TTDictionary.cpp
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup foundationLibrary
4  *
5  * @brief Foundation Dictionary Class.
6  *
7  * @details The dictionary is a data structure that combines the fast lookup of a hashtable,
8  * but may be sorted like a linked-list.
9  * The linked list contains the key-value pairs of the hash a linked-list of TTKeyValues.
10  *
11  * @author Timothy Place, Trond Lossius
12  *
13  * @copyright Copyright © 2010, Timothy Place @n
14  * This code is licensed under the terms of the "New BSD License" @n
15  * http://creativecommons.org/licenses/BSD/
16  */
17 
18 #include "TTDictionary.h"
19 #include "TTObject.h"
20 
21 
22 TTDictionaryTable gTTDictionaryTable;
23 
24 
26 {
27  return mDictionaryInstance->registerObserverForNotifications(anObservingObject);
28 }
29 
31 {
32  return mDictionaryInstance->registerObserverForNotifications(*anObservingObject.instance());
33 }
34 
35 
37 {
38  return mDictionaryInstance->unregisterObserverForNotifications(anObservingObject);
39 }
41 {
42  return mDictionaryInstance->unregisterObserverForNotifications(*anObservingObject.instance());
43 }
44 
Create Jamoma object instances.
TTErr unregisterObserverForNotifications(const TTObjectBase &anObservingObject)
Unregister an observer for notifications.
Create and use Jamoma object instances.
Definition: TTObject.h:29
Base class for all first-class Jamoma objects.
Definition: TTObjectBase.h:109
Foundation Dictionary Class.
TTErr registerObserverForNotifications(const TTObjectBase &anObservingObject)
Register an observer.
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
std::unordered_map< TTPtr, TTDictionaryBase * > TTDictionaryTable
Map names to internal dictionary instances.
Definition: TTDictionary.h:24
TTObjectBase * instance() const
Return a direct pointer to the internal instance.
Definition: TTObject.cpp:105