Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkObject.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkObject.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:18 $ 00007 Version: $Revision: 1.39 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 Portions of this code are covered under the VTK copyright. 00013 See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details. 00014 00015 This software is distributed WITHOUT ANY WARRANTY; without even 00016 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00017 PURPOSE. See the above copyright notices for more information. 00018 00019 =========================================================================*/ 00020 #ifndef __itkObject_h 00021 #define __itkObject_h 00022 00023 #include "itkLightObject.h" 00024 #include "itkEventObject.h" 00025 00026 #include "itkMetaDataDictionary.h" 00027 namespace itk 00028 { 00029 class SubjectImplementation; 00030 class Command; 00031 00044 class ITKCommon_EXPORT Object: public LightObject 00045 { 00046 public: 00048 typedef Object Self; 00049 typedef LightObject Superclass; 00050 typedef SmartPointer<Self> Pointer; 00051 typedef SmartPointer<const Self> ConstPointer; 00052 00054 static Pointer New(); 00055 00057 itkTypeMacro(Object, LightObject); 00058 00060 virtual void DebugOn() const; 00061 00063 virtual void DebugOff() const; 00064 00066 bool GetDebug() const; 00067 00069 void SetDebug(bool debugFlag) const; 00070 00072 virtual unsigned long GetMTime() const; 00073 00076 virtual void Modified() const; 00077 00079 virtual void Register() const; 00080 00082 virtual void UnRegister() const; 00083 00085 virtual void SetReferenceCount(int); 00086 00089 static void SetGlobalWarningDisplay(bool flag); 00090 static bool GetGlobalWarningDisplay(); 00091 static void GlobalWarningDisplayOn() 00092 { Object::SetGlobalWarningDisplay(true); } 00093 static void GlobalWarningDisplayOff() 00094 { Object::SetGlobalWarningDisplay(false); } 00095 00104 unsigned long AddObserver(const EventObject & event, Command *); 00105 00111 Command* GetCommand(unsigned long tag); 00112 00114 void InvokeEvent( const EventObject & ); 00115 00118 void InvokeEvent( const EventObject & ) const; 00119 00121 void RemoveObserver(unsigned long tag); 00122 00124 bool HasObserver( const EventObject & event ) const; 00125 00130 MetaDataDictionary & GetMetaDataDictionary(void); 00131 00135 const MetaDataDictionary & GetMetaDataDictionary(void) const; 00136 00140 void SetMetaDataDictionary(const MetaDataDictionary & rhs); 00141 00142 00143 protected: 00144 Object(); 00145 virtual ~Object(); 00146 00151 virtual void PrintSelf(std::ostream& os, Indent indent) const; 00152 00153 bool PrintObservers(std::ostream& os, Indent indent) const; 00154 00155 private: 00156 Object(const Self&); //purposely not implemented 00157 void operator=(const Self&); //purposely not implemented 00158 00160 mutable bool m_Debug; 00161 00163 mutable TimeStamp m_MTime; 00164 00166 static bool m_GlobalWarningDisplay; 00167 00170 SubjectImplementation* m_SubjectImplementation; 00178 mutable MetaDataDictionary * m_MetaDataDictionary; 00179 }; 00180 00181 } // end namespace itk 00182 00183 #endif 00184

Generated at Sun Apr 1 02:40:00 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000