|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is a generic object watcher. Currently it can watch on light and movable changes. You can query if something has changed by examining the 'number' or else you can register a listener and get notified when one of the objects changes. This object will not keep real references to the objects it is watching but it will clean up the watcher for some object if that object is removed.
Method Summary | |
void |
addListener(iObjectWatcherListener cb)
Add a listener to this object watcher. |
iLight |
getLastLight()
Get the last light.Only valid if the last operation(GetLastOperation()) is one of CS_WATCH_LIGHT_. |
iMovable |
getLastMovable()
Get the last movable.Only valid if the last operation(GetLastOperation()) is one of CS_WATCH_MOVABLE_. |
int |
getLastOperation()
Get the last operation that occured.This will be one of : * CS_WATCH_NONE : nothing happened yet. * CS_WATCH_LIGHT_DESTROY : light is destroyed. * CS_WATCH_LIGHT_MOVE : light has moved. * CS_WATCH_LIGHT_COLOR : light has changed color. * CS_WATCH_LIGHT_SECTOR : light has changed sector. * CS_WATCH_LIGHT_RADIUS : light has changed radius. * CS_WATCH_MOVABLE_DESTROY : movable is destroyed. * CS_WATCH_MOVABLE_CHANGED : movable is changed Implemented in csObjectWatcher |
iLight |
getLight(int idx)
Get the specified watched light.Implemented in csObjectWatcher |
iMovable |
getMovable(int idx)
Get the specified watched movable.Implemented in csObjectWatcher |
int |
getWatchedLightCount()
Get the number of watched lights.Implemented in csObjectWatcher |
int |
getWatchedMovableCount()
Get the number of watched movables.Implemented in csObjectWatcher |
int |
getWatchNumber()
Get the current number for his watcher. |
void |
removeLight(iLight light)
Remove a light to watch.Implemented in csObjectWatcher |
void |
removeListener(iObjectWatcherListener cb)
Remove a listener.Implemented in csObjectWatcher |
void |
removeMovable(iMovable movable)
Remove a movable to watch.Implemented in csObjectWatcher |
void |
reset()
Reset.Remove all watched objects from this watcher. |
void |
watchLight(iLight light)
Add a light to watch.Implemented in csObjectWatcher |
void |
watchMovable(iMovable movable)
Add a movable to watch.Implemented in csObjectWatcher |
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase |
decRef, getName, getRefCount, getVersion, incRef, queryInterface, queryInterfaceSafe |
Methods inherited from interface crystalspace.jbind.interfaces.iPointer |
changePointer, getPointer, isMemoryOwner, setMemoryOwner |
Method Detail |
public void addListener(iObjectWatcherListener cb)
cb
- public iLight getLastLight()
public iMovable getLastMovable()
public int getLastOperation()
public iLight getLight(int idx)
idx
-
public iMovable getMovable(int idx)
idx
-
public int getWatchedLightCount()
public int getWatchedMovableCount()
public int getWatchNumber()
public void removeLight(iLight light)
light
- public void removeListener(iObjectWatcherListener cb)
cb
- public void removeMovable(iMovable movable)
movable
- public void reset()
public void watchLight(iLight light)
light
- public void watchMovable(iMovable movable)
movable
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |