17 #ifndef __igstkObject_h
18 #define __igstkObject_h
21 #include "itkObject.h"
22 #include "itkLogger.h"
50 typedef ::itk::SmartPointer< Self >
Pointer;
77 virtual void PrintSelf( std::ostream& os, itk::Indent indent )
const;
82 const ::igstk::Object *
object,
unsigned long tag );
91 unsigned long> ObservedObjectTagPair;
92 typedef std::list< ObservedObjectTagPair > ObservedObjectPairContainer;
93 typedef ::itk::MemberCommand< Self > DeleteEventCommandType;
94 typedef ::itk::EventObject EventType;
97 ObservedObjectPairContainer m_ObservedObjectPairContainer;
98 DeleteEventCommandType::Pointer m_ObservedObjectDeleteReceptor;
105 void ObservedObjectDeleteProcessing(
const itk::Object* caller,
106 const EventType& event );
109 class ObservedObjectTagPairObjectMatchPredicate
112 ObservedObjectTagPairObjectMatchPredicate(
const itk::Object* obj )
113 : m_TargetObject( obj )
117 bool operator()(
const igstk::Object::ObservedObjectTagPair& objTagPair )
119 if (objTagPair.first == m_TargetObject)
130 const itk::Object* m_TargetObject;
137 #endif //__igstk_Object_h_
#define igstkTypeMacro(thisClass, superclass)
Type Macro defines the GetNameOfClass() method for every class where it is invoked.
Object(void)
Constructor is protected in order to enforce the use of the New() operator.
void RemoveObserver(unsigned long tag) const
virtual void PrintSelf(std::ostream &os, itk::Indent indent) const
Print the object information.
Base class for all the IGSTK classes.
::itk::SmartPointer< Self > Pointer
Object Self
General Typedefs.
void RemoveFromObservedObjects()
Remove observers that this object may have connected to other objects.
defines standard system-wide macros, constants, and other common parameters in the IGSTK Library...
#define igstkNewMacro(x)
New Macro creates a new object of a class that is using SmartPointers.
void SetLogger(LoggerType *logger)
Connect the Logger for this class.
::itk::SmartPointer< Self > Pointer
::itk::SmartPointer< const Self > ConstPointer
LoggerType * GetLogger() const
Class used for handling logging tasks.
void RegisterObservedObject(const ::igstk::Object *object, unsigned long tag)
Register observed objects in an internal array so that they can be disconnected upon destruction...