Orfeo Toolbox  3.16
itkObject.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkObject.h,v $
5  Language: C++
6  Date: $Date: 2009-02-06 20:53:14 $
7  Version: $Revision: 1.45 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  Portions of this code are covered under the VTK copyright.
13  See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.
14 
15  This software is distributed WITHOUT ANY WARRANTY; without even
16  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
17  PURPOSE. See the above copyright notices for more information.
18 
19 =========================================================================*/
20 #ifndef __itkObject_h
21 #define __itkObject_h
22 
23 #include "itkLightObject.h"
24 #include "itkEventObject.h"
25 #include "itkMetaDataDictionary.h"
26 
27 namespace itk
28 {
29 class SubjectImplementation;
30 class Command;
31 
45 {
46 public:
48  typedef Object Self;
52 
54  static Pointer New();
55 
61  virtual LightObject::Pointer CreateAnother() const;
62 
64  itkTypeMacro(Object, LightObject);
65 
67  virtual void DebugOn() const;
68 
70  virtual void DebugOff() const;
71 
73  bool GetDebug() const;
74 
76  void SetDebug(bool debugFlag) const;
77 
79  virtual unsigned long GetMTime() const;
80 
83  virtual void Modified() const;
84 
86  virtual void Register() const;
87 
89  virtual void UnRegister() const;
90 
92  virtual void SetReferenceCount(int);
93 
96  static void SetGlobalWarningDisplay(bool flag);
97  static bool GetGlobalWarningDisplay();
98  static void GlobalWarningDisplayOn()
100  static void GlobalWarningDisplayOff()
102 
111  unsigned long AddObserver(const EventObject & event, Command *);
112  unsigned long AddObserver(const EventObject & event, Command *) const;
113 
119  Command* GetCommand(unsigned long tag);
120 
122  void InvokeEvent( const EventObject & );
123 
126  void InvokeEvent( const EventObject & ) const;
127 
129  void RemoveObserver(unsigned long tag);
130 
132  void RemoveAllObservers();
133 
135  bool HasObserver( const EventObject & event ) const;
136 
141  MetaDataDictionary & GetMetaDataDictionary(void);
142 
146  const MetaDataDictionary & GetMetaDataDictionary(void) const;
147 
151  void SetMetaDataDictionary(const MetaDataDictionary & rhs);
152 
153 
154 protected:
155  Object();
156  virtual ~Object();
157 
162  virtual void PrintSelf(std::ostream& os, Indent indent) const;
163 
164  bool PrintObservers(std::ostream& os, Indent indent) const;
165 
166 private:
167  Object(const Self&); //purposely not implemented
168  void operator=(const Self&); //purposely not implemented
169 
171  mutable bool m_Debug;
172 
175 
178 
190 };
191 
192 } // end namespace itk
193 
194 #endif

Generated at Sat Jun 15 2013 23:57:44 for Orfeo Toolbox with doxygen 1.8.3.1