00001 #ifndef COIN_SODATASENSOR_H
00002 #define COIN_SODATASENSOR_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include <Inventor/sensors/SoDelayQueueSensor.h>
00028 #include <stdlib.h>
00029
00030 class SoNode;
00031 class SoField;
00032 class SoPath;
00033 class SoNotList;
00034
00035 class COIN_DLL_API SoDataSensor : public SoDelayQueueSensor {
00036 typedef SoDelayQueueSensor inherited;
00037
00038 public:
00039 SoDataSensor(void);
00040 SoDataSensor(SoSensorCB * func, void * data);
00041 virtual ~SoDataSensor(void);
00042
00043 void setDeleteCallback(SoSensorCB * function, void * data = NULL);
00044 SoNode * getTriggerNode(void) const;
00045 SoField * getTriggerField(void) const;
00046 SoPath * getTriggerPath(void) const;
00047 void setTriggerPathFlag(SbBool flag);
00048 SbBool getTriggerPathFlag(void) const;
00049
00050 virtual void trigger(void);
00051 virtual void notify(SoNotList * l);
00052 virtual void dyingReference(void) = 0;
00053
00054 protected:
00055 void invokeDeleteCallback(void);
00056
00057 private:
00058 SoSensorCB * cbfunc;
00059 void * cbdata;
00060 SbBool findpath;
00061 SoField * triggerfield;
00062 SoNode * triggernode;
00063 SoPath * triggerpath;
00064 };
00065
00066 #endif // !COIN_SODATASENSOR_H