15 #ifndef __vtkObserverManager_h 16 #define __vtkObserverManager_h 22 #include <vtkObject.h> 27 class vtkCallbackCommand;
30 class vtkUnsignedLongArray;
32 #ifndef vtkObjectPointer 33 #define vtkObjectPointer(xx) (reinterpret_cast <vtkObject **>( (xx) )) 48 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
51 void SetObject(vtkObject **nodePtr, vtkObject *node);
54 void SetAndObserveObject(vtkObject **nodePtr, vtkObject *node,
float priority=0.0,
bool logWarningIfSameObservationExists=
true);
57 void SetAndObserveObjectEvents(vtkObject **nodePtr, vtkObject *node, vtkIntArray *events, vtkFloatArray *priorities=0,
bool logWarningIfSameObservationExists=
true);
60 void RemoveObjectEvents(vtkObject *nodePtr);
63 void GetObjectEvents(vtkObject *nodePtr, vtkIntArray *events, vtkFloatArray *priorities);
66 void ObserveObject(vtkObject *node,
float priority=0.0);
69 void AddObjectEvents(vtkObject *nodePtr, vtkIntArray *events, vtkFloatArray *priorities=0);
76 vtkGetObjectMacro (Owner, vtkObject);
79 vtkObject* GetObserver();
81 vtkGetObjectMacro (CallbackCommand, vtkCallbackCommand);
85 int GetObservationsCount(vtkObject* nodePtr,
unsigned long event = 0);
vtkCallbackCommand * CallbackCommand
Holder for callback
void AssignOwner(vtkObject *owner)
Manages adding and deleting of obserevers with events.
std::map< vtkObject *, vtkUnsignedLongArray *> ObserverTags
vtkObject * Owner
The owner of the observer manager (e.g. the vtkMRMLNode)