SoListSensor Class Reference
[Sensors]

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

#include <Inventor/sensors/SoListSensor.h>

Inheritance diagram for SoListSensor:
SoSensor

List of all members.

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 ()
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.

SEE ALSO

SbPList, SoSensor


Member Enumeration Documentation

Change type.

Enumerator:
UNSPECIFIED 

Unspecified change.

APPEND 

An item has been appended to the list.

INSERT 

An item has been inserted.

SET 

A previously existing item has been replaced.

REMOVE 

An item has been deleted.

TRUNCATE 

The list has been cleared.

COPY 

The list is resulting of a list copy.

TOUCH 

A touch() call has been done on list.


Constructor & Destructor Documentation

SoListSensor::SoListSensor (  ) 

Constructor.

SoListSensor::SoListSensor ( SoSensorCB func,
void *  data 
)

Constructor that takes standard callback function and data.

virtual SoListSensor::~SoListSensor (  )  [virtual]

Destructor.


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 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/