Sensor class that can be attached to Open Inventor base lists. More...
#include <Inventor/sensors/SoListSensor.h>
Public Types | |
enum | ChangeType { UNSPECIFIED, APPEND, INSERT, SET, REMOVE, TRUNCATE, COPY, TOUCH } |
Public Member Functions | |
SoListSensor () | |
SoListSensor (SoSensorCB *func, void *data) | |
virtual | ~SoListSensor () |
void | attach (SoBaseList *list) |
void | detach () |
SoBaseList * | getAttachedList () const |
void | setDeleteCallback (SoSensorCB *f, void *data=NULL) |
ChangeType | getTriggerType () const |
int | getTriggerIndex () const |
Sensor class that can be attached to Open Inventor base lists.
List sensors detect changes to SoBaseList derived lists (field list, engine list, ...) and trigger their callback when the list changes.
List sensors provide a delete callback that is called just before the list the list sensor is attached to is deleted; note that the callback should not attempt to modify the list in any way, or core dumps may result.
List sensors also provide methods that can be called in the callback to determine exactly which item of the list caused the sensor to be triggered.
Change type.
SoListSensor::SoListSensor | ( | ) |
Constructor.
SoListSensor::SoListSensor | ( | SoSensorCB * | func, | |
void * | data | |||
) |
Constructor that takes standard callback function and data.
virtual SoListSensor::~SoListSensor | ( | ) | [virtual] |
Destructor.
void SoListSensor::attach | ( | SoBaseList * | list | ) |
Makes this sensor detect changes to the given list.
void SoListSensor::detach | ( | ) |
Unschedules this sensor (if it is scheduled) and makes it ignore changes to the list.
SoBaseList* SoListSensor::getAttachedList | ( | ) | const [inline] |
Returns the list that this sensor is sensing, or NULL if it is not attached to any list.
int SoListSensor::getTriggerIndex | ( | ) | const |
Returns the index of the item that was added, removed, inserted, set, .
..
ChangeType SoListSensor::getTriggerType | ( | ) | const |
Returns the type of change that occurred.
void SoListSensor::setDeleteCallback | ( | SoSensorCB * | f, | |
void * | data = NULL | |||
) | [inline] |
Sets a callback that will be called when the object the sensor is sensing is deleted.