Manages adding and deleting of obserevers with events.
More...
#include <Libs/MRML/Core/vtkObserverManager.h>
|
void | AddObjectEvents (vtkObject *nodePtr, vtkIntArray *events, vtkFloatArray *priorities=nullptr) |
| add observers for specified events More...
|
|
void | AssignOwner (vtkObject *owner) |
|
virtual vtkCallbackCommand * | GetCallbackCommand () |
|
virtual const char * | GetClassName () |
|
void | GetObjectEvents (vtkObject *nodePtr, vtkIntArray *events, vtkFloatArray *priorities) |
| get a list of all observed events and priorities for the selected node More...
|
|
int | GetObservationsCount (vtkObject *nodePtr, unsigned long event=0) |
|
vtkObject * | GetObserver () |
| Returns the owner if any, otherwise returns the manager itself. More...
|
|
virtual vtkObject * | GetOwner () |
|
virtual int | IsA (const char *type) |
|
void | ObserveObject (vtkObject *node, float priority=0.0) |
| Observe ModifiedEvent on the object. More...
|
|
void | PrintSelf (ostream &os, vtkIndent indent) override |
|
void | RemoveObjectEvents (vtkObject *nodePtr) |
| remove all observers for all events More...
|
|
void | SetAndObserveObject (vtkObject **nodePtr, vtkObject *node, float priority=0.0, bool logWarningIfSameObservationExists=true) |
| set vtkObject to a specified pointer, remove all observers for all events, add observer for Modify event More...
|
|
void | SetAndObserveObjectEvents (vtkObject **nodePtr, vtkObject *node, vtkIntArray *events, vtkFloatArray *priorities=nullptr, bool logWarningIfSameObservationExists=true) |
| set vtkObject to a specified pointer, remove all observers for all events, add observers for specified events More...
|
|
void | SetObject (vtkObject **nodePtr, vtkObject *node) |
| set vtkObject to a specified pointer and remove all observers for all events More...
|
|
Manages adding and deleting of obserevers with events.
Class that manages adding and deleting of obserevers with events This class keeps track of obserevers and events added to each vtk object it caches tags returned by AddObserver method so that obserevers can be removed properly.
Definition at line 41 of file vtkObserverManager.h.
◆ Superclass
◆ vtkObserverManager() [1/2]
vtkObserverManager::vtkObserverManager |
( |
| ) |
|
|
protected |
◆ ~vtkObserverManager()
vtkObserverManager::~vtkObserverManager |
( |
| ) |
|
|
overrideprotected |
◆ vtkObserverManager() [2/2]
◆ AddObjectEvents()
void vtkObserverManager::AddObjectEvents |
( |
vtkObject * |
nodePtr, |
|
|
vtkIntArray * |
events, |
|
|
vtkFloatArray * |
priorities = nullptr |
|
) |
| |
add observers for specified events
◆ AssignOwner()
void vtkObserverManager::AssignOwner |
( |
vtkObject * |
owner | ) |
|
|
inline |
◆ GetCallbackCommand()
virtual vtkCallbackCommand* vtkObserverManager::GetCallbackCommand |
( |
| ) |
|
|
virtual |
◆ GetClassName()
virtual const char* vtkObserverManager::GetClassName |
( |
| ) |
|
|
virtual |
◆ GetObjectEvents()
void vtkObserverManager::GetObjectEvents |
( |
vtkObject * |
nodePtr, |
|
|
vtkIntArray * |
events, |
|
|
vtkFloatArray * |
priorities |
|
) |
| |
get a list of all observed events and priorities for the selected node
◆ GetObservationsCount()
int vtkObserverManager::GetObservationsCount |
( |
vtkObject * |
nodePtr, |
|
|
unsigned long |
event = 0 |
|
) |
| |
Return the number of observations by the manager on the node. If event is != 0 , only observations matching the events are counted
◆ GetObserver()
vtkObject* vtkObserverManager::GetObserver |
( |
| ) |
|
Returns the owner if any, otherwise returns the manager itself.
◆ GetOwner()
virtual vtkObject* vtkObserverManager::GetOwner |
( |
| ) |
|
|
virtual |
accessors for the owner class
- note we do not hold a registered pointer to the owner to avoid reference loops
- the owner must be careful to always clean up the ObserverManager in the destructor (this is the standard use case)
◆ IsA()
virtual int vtkObserverManager::IsA |
( |
const char * |
type | ) |
|
|
virtual |
◆ IsTypeOf()
static int vtkObserverManager::IsTypeOf |
( |
const char * |
type | ) |
|
|
static |
◆ New()
The Usual vtk class functions.
◆ ObserveObject()
void vtkObserverManager::ObserveObject |
( |
vtkObject * |
node, |
|
|
float |
priority = 0.0 |
|
) |
| |
Observe ModifiedEvent on the object.
◆ operator=()
◆ PrintSelf()
void vtkObserverManager::PrintSelf |
( |
ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
| |
|
override |
◆ RemoveObjectEvents()
void vtkObserverManager::RemoveObjectEvents |
( |
vtkObject * |
nodePtr | ) |
|
remove all observers for all events
◆ SafeDownCast()
◆ SetAndObserveObject()
void vtkObserverManager::SetAndObserveObject |
( |
vtkObject ** |
nodePtr, |
|
|
vtkObject * |
node, |
|
|
float |
priority = 0.0 , |
|
|
bool |
logWarningIfSameObservationExists = true |
|
) |
| |
set vtkObject to a specified pointer, remove all observers for all events, add observer for Modify event
◆ SetAndObserveObjectEvents()
void vtkObserverManager::SetAndObserveObjectEvents |
( |
vtkObject ** |
nodePtr, |
|
|
vtkObject * |
node, |
|
|
vtkIntArray * |
events, |
|
|
vtkFloatArray * |
priorities = nullptr , |
|
|
bool |
logWarningIfSameObservationExists = true |
|
) |
| |
set vtkObject to a specified pointer, remove all observers for all events, add observers for specified events
◆ SetObject()
void vtkObserverManager::SetObject |
( |
vtkObject ** |
nodePtr, |
|
|
vtkObject * |
node |
|
) |
| |
set vtkObject to a specified pointer and remove all observers for all events
◆ CallbackCommand
vtkCallbackCommand* vtkObserverManager::CallbackCommand |
|
protected |
◆ ObserverTags
std::map< vtkObject*, vtkUnsignedLongArray* > vtkObserverManager::ObserverTags |
|
protected |
◆ Owner
vtkObject* vtkObserverManager::Owner |
|
protected |
The documentation for this class was generated from the following file: