52#ifndef _SO_DATA_SENSOR_
53#define _SO_DATA_SENSOR_
60#include <Inventor/sensors/SoDelayQueueSensor.h>
61#include <Inventor/threads/SbThreadStorage.h>
62#include <Inventor/threads/SbThreadSpinlock.h>
63#include <Inventor/STL/list>
67#pragma warning(disable:4251)
260#ifndef HIDDEN_FROM_DOC
269 { deleteFunc = f; deleteData = data; }
310 { doTrigPath = flag; }
320 { doTrigFastEditInfo = flag; }
327 {
return doTrigPath; }
335 {
return doTrigFastEditInfo; }
394 virtual void trigger();
400 virtual void notify(SoNotList *list);
405 virtual void dyingReference() = 0;
408 static void clearPendingDeleteList();
411 static void addToPendingDeleteList(
SoDataSensor* dataSensor);
415 void invokeDeleteCallback();
421 class SoDataSensorData
436 trigMFieldStartIndex = -1;
437 trigMFieldNumValues = -1;
439 m_flag.trigFromFastEdit = 0;
444 return (trigNode==NULL) && (trigField==NULL) && (trigPath==NULL) && (m_flag.trigChangeType==
UNSPECIFIED);
450 m_flag.trigChangeType = changeType;
454 {
return (
ChangeType)(m_flag.trigChangeType); }
456 void setTriggerFromFastEdit(
bool flag)
457 { m_flag.trigFromFastEdit = flag; }
459 bool isTriggerFromFastEdit()
const
460 {
return m_flag.trigFromFastEdit; }
469 int trigMFieldStartIndex;
470 int trigMFieldNumValues;
474 unsigned int trigChangeType : 31;
476 unsigned int trigFromFastEdit : 1;
487 SoDataSensorData m_notifyData;
489 SoDataSensorData m_triggerNotifyData;
493 bool doTrigFastEditInfo;
497 static std::list<SoDataSensor*> s_pendingDeleteList;
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Portable spinloc...
Base class for all nodes, paths, and engines.
Abstract base class for sensors attached to parts of a scene.
int getTriggerChildIndex() const
If this is a priority 0 data sensor, and a change to a group node's children caused this sensor to be...
SoNode * getTriggerChild() const
If this is a priority 0 data sensor, and a change to a group node's children caused this sensor to be...
virtual void unschedule()
If this sensor is scheduled, removes it from the delay queue so that it will not be triggered.
SoDataSensor(SoSensorCB *func, void *data)
Constructor that takes standard callback function and data.
SoDataSensor()
Constructor.
SoField * getTriggerField() const
If this is a priority 0 data sensor, returns the field that was modified that caused this sensor to t...
SbBool getTriggerPathFlag() const
Queries the flag that indicates whether the trigger path (see getTriggerPath()) is available to call...
void setTriggerPathFlag(SbBool flag)
Sets the flag that indicates whether the trigger path (see getTriggerPath()) is available to callbac...
int getTriggerMFieldNumValues() const
If this is a priority 0 data sensor, and a change in the data values of a multiple field (e....
SbBool getTriggerFastEditInfoFlag() const
Queries the flag that indicates whether the trigger path fastEdit info (see getTriggerFastEditInfo())...
SoPath * getTriggerPath() const
If this is a priority 0 data sensor, returns a path to the node that caused this sensor to trigger.
SoNode * getTriggerNode() const
If this is a priority 0 data sensor, returns the node that was modified that caused this sensor to tr...
ChangeType getTriggerType() const
If this is a priority 0 data sensor, returns the type of change that occurred.
int getTriggerMFieldStartIndex() const
If this is a priority 0 data sensor, and a change in the data values of a multiple field (e....
int getTriggerFastEditInfo() const
Returns true if the triggered changes come from a field or node that was below a Separator with a fas...
@ GROUP_REPLACE_CHILD
Group replace child.
@ UNSPECIFIED
Unspecified.
@ GROUP_INSERT_CHILD
Group insert child.
@ FIELD_MULTIVALUE
Field multivalue.
@ GROUP_REMOVE_ALL_CHILDREN
Group remove all children.
@ GROUP_REMOVE_CHILD
Group remove child.
@ GROUP_ADD_CHILD
Group add child.
void setDeleteCallback(SoSensorCB *f, void *data=NULL)
Sets a callback that will be called when the object the sensor is sensing is deleted.
void setTriggerFastEditInfoFlag(SbBool flag)
Sets the flag that indicates whether the trigger path fastEdit info (see getTriggerFastEditInfo()) is...
Abstract base class for sensors not dependent on time.
Base class for all fields.
Abstract base class for all database nodes.
Path that points to a list of hierarchical nodes.
void SoSensorCB(void *data, SoSensor *sensor)
This typedef defines the calling sequence for all callbacks from sensors.