#include <watchble.h>
Public Methods | |
| Watchable () | |
| Constructor. More... | |
| virtual | ~Watchable () |
| Destructor. More... | |
| const CallbackBase & | addWatch (const CallbackBase &newWatch) const |
| Add a callback to be invoked when the watchable object is updated. More... | |
| void | removeWatch (const CallbackBase &oldWatch) const |
| Remove a callback to be invoked when the watchable object is updated. More... | |
| void | removeWatcher (const void *watcher) const |
| Remove all callbacks with a given target object. More... | |
| virtual void | updated (const void *updateData=0) const |
| Invoke all callbacks in list. More... | |
| void | freeze () const |
| Disable invocation of callbacks on update. More... | |
| void | thaw () const |
| Enable invocation of callbacks on update. More... | |
Private Attributes | |
| CallbackList * | watchList |
| List of callbacks to be invoked when the watchable object is updated. More... | |
| int | frozen |
| Flag to indicate updates shouldn't invoke callbacks. More... | |
Definition at line 51 of file watchble.h.
|
|
Constructor.
Definition at line 47 of file watchble.cpp. |
|
|
Destructor.
Definition at line 57 of file watchble.cpp. References watchList. |
|
|
Add a callback to be invoked when the watchable object is updated.
Definition at line 68 of file watchble.cpp. References watchList. |
|
|
Disable invocation of callbacks on update.
Definition at line 117 of file watchble.cpp. References frozen. |
|
|
Remove a callback to be invoked when the watchable object is updated.
Definition at line 81 of file watchble.cpp. References watchList. |
|
|
Remove all callbacks with a given target object.
Definition at line 92 of file watchble.cpp. References watchList. |
|
|
Enable invocation of callbacks on update.
Definition at line 128 of file watchble.cpp. References frozen. |
|
|
Invoke all callbacks in list.
Definition at line 103 of file watchble.cpp. |
|
|
Flag to indicate updates shouldn't invoke callbacks.
Definition at line 121 of file watchble.h. |
|
|
List of callbacks to be invoked when the watchable object is updated.
Definition at line 116 of file watchble.h. Referenced by addWatch, removeWatch, removeWatcher, updated, and ~Watchable. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002