SoListSensor Class Reference

Sensor class that can be attached to Open Inventor base lists. More...

#include <Inventor/sensors/SoListSensor.h>

Inheritance diagram for SoListSensor:

List of all members.

Public Types

enum  ChangeType {

Public Member Functions

 SoListSensor ()
 SoListSensor (SoSensorCB *func, void *data)
virtual ~SoListSensor ()
void attach (SoBaseList *list)
void detach ()
SoBaseListgetAttachedList () const
void setDeleteCallback (SoSensorCB *f, void *data=NULL)
ChangeType getTriggerType () const
int getTriggerIndex () const

Detailed Description

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.


SbPList, SoSensor

Member Enumeration Documentation

Change type.


Unspecified change.


An item has been appended to the list.


An item has been inserted.


A previously existing item has been replaced.


An item has been deleted.


The list has been cleared.


The list is resulting of a list copy.


A touch() call has been done on list.

Constructor & Destructor Documentation

SoListSensor::SoListSensor (  ) 


SoListSensor::SoListSensor ( SoSensorCB func,
void *  data 

Constructor that takes standard callback function and data.

virtual SoListSensor::~SoListSensor (  )  [virtual]


Member Function Documentation

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.

The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 12 Sep 2022
Copyright © Thermo Fisher Scientific All rights reserved.