![]() |
Public API Reference |
#include <objwatch.h>
Inheritance diagram for csObjectWatcher:
Public Methods | |
csObjectWatcher () | |
Create a default movable. More... | |
virtual | ~csObjectWatcher () |
Destructor. More... | |
virtual void | WatchLight (iLight *light) |
Add a light to watch. More... | |
virtual void | RemoveLight (iLight *light) |
Remove a light to watch. More... | |
virtual int | GetWatchedLightCount () const |
Get the number of watched lights. More... | |
virtual iLight * | GetLight (int idx) |
Get the specified watched light. More... | |
virtual void | WatchMovable (iMovable *movable) |
Add a movable to watch. More... | |
virtual void | RemoveMovable (iMovable *movable) |
Remove a movable to watch. More... | |
virtual int | GetWatchedMovableCount () const |
Get the number of watched movables. More... | |
virtual iMovable * | GetMovable (int idx) |
Get the specified watched movable. More... | |
virtual void | Reset () |
Reset. Remove all watched objects from this watcher. More... | |
virtual uint32 | GetWatchNumber () const |
Get the current number for his watcher. More... | |
virtual int | GetLastOperation () const |
Get the last operation that occured. More... | |
virtual iLight * | GetLastLight () const |
Get the last light. More... | |
virtual iMovable * | GetLastMovable () const |
Get the last movable. More... | |
virtual void | AddListener (iObjectWatcherListener *cb) |
Add a listener to this object watcher. More... | |
virtual void | RemoveListener (iObjectWatcherListener *cb) |
Remove a listener. More... |
Definition at line 35 of file csengine/objwatch.h.
|
Create a default movable.
|
|
Destructor.
|
|
Add a listener to this object watcher. This will call IncRef() on the listener So make sure you call DecRef() to release your own reference. Implements iObjectWatcher. Definition at line 89 of file csengine/objwatch.h. References csArray< T *, csRefArrayElementHandler< T * > >::Push. |
|
Get the last light. Only valid if the last operation (GetLastOperation()) is one of CS_WATCH_LIGHT_.... Implements iObjectWatcher. Definition at line 86 of file csengine/objwatch.h. |
|
Get the last movable. Only valid if the last operation (GetLastOperation()) is one of CS_WATCH_MOVABLE_.... Implements iObjectWatcher. Definition at line 87 of file csengine/objwatch.h. |
|
Get the last operation that occured. This will be one of:
Implements iObjectWatcher. Definition at line 85 of file csengine/objwatch.h. |
|
Get the specified watched light.
Implements iObjectWatcher. |
|
Get the specified watched movable.
Implements iObjectWatcher. |
|
Get the number of watched lights.
Implements iObjectWatcher. Definition at line 74 of file csengine/objwatch.h. References csArray::Length. |
|
Get the number of watched movables.
Implements iObjectWatcher. Definition at line 79 of file csengine/objwatch.h. References csArray::Length. |
|
Get the current number for his watcher. This number will increase as soon as some of the watched objects change. When this happens you can query the last change (only the last change!) by calling GetLastOperation() and/or GetLastLight() or GetLastMovable(). Note that if the operation indicates that something is destroyed then you should no longer use the pointer returned by GetLastLight() or GetLastMovable() as the object will already be gone by then. You can only use the returned pointer to clean up from internal data structures. Implements iObjectWatcher. Definition at line 84 of file csengine/objwatch.h. References uint32. |
|
Remove a light to watch.
Implements iObjectWatcher. |
|
Remove a listener.
Implements iObjectWatcher. Definition at line 94 of file csengine/objwatch.h. References csArray< T *, csRefArrayElementHandler< T * > >::Delete. |
|
Remove a movable to watch.
Implements iObjectWatcher. |
|
Reset. Remove all watched objects from this watcher.
Implements iObjectWatcher. |
|
Add a light to watch.
Implements iObjectWatcher. |
|
Add a movable to watch.
Implements iObjectWatcher. |