Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
igtlLightObject.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Open IGT Link Library
4  Module: $HeadURL: http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink/Source/igtlLightObject.h $
5  Language: C++
6  Date: $Date: 2008-12-22 19:05:42 -0500 (Mon, 22 Dec 2008) $
7  Version: $Revision: 3460 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10 
11  This software is distributed WITHOUT ANY WARRANTY; without even
12  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  PURPOSE. See the above copyright notices for more information.
14 
15 =========================================================================*/
16 /*=========================================================================
17 
18  Program: Insight Segmentation & Registration Toolkit
19  Module: $RCSfile: itkLightObject.h,v $
20  Language: C++
21  Date: $Date: 2008-12-22 19:05:42 -0500 (Mon, 22 Dec 2008) $
22  Version: $Revision: 3460 $
23 
24  Copyright (c) Insight Software Consortium. All rights reserved.
25  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
26 
27  This software is distributed WITHOUT ANY WARRANTY; without even
28  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
29  PURPOSE. See the above copyright notices for more information.
30 
31 =========================================================================*/
32 #ifndef __igtlLightObject_h
33 #define __igtlLightObject_h
34 
35 #include "igtlSmartPointer.h"
37 #include "igtlMacro.h"
38 
39 #include <iostream>
40 #include <typeinfo>
41 
42 
43 namespace igtl
44 {
45 
61 {
62 public:
64  typedef LightObject Self;
67 
69  static Pointer New();
70 
76  virtual Pointer CreateAnother() const;
77 
81  virtual void Delete();
82 
86  virtual const char *GetNameOfClass() const
87  {return "LightObject";}
88 
89 #ifdef _WIN32
90 
91  void* operator new(size_t);
92  void* operator new[](size_t);
93  void operator delete(void*);
94  void operator delete[](void*, size_t);
95 #endif
96 
97 
99  void Print(std::ostream& os) const;
100 
103  static void BreakOnError();
104 
106  virtual void Register() const;
107 
109  virtual void UnRegister() const;
110 
112  virtual int GetReferenceCount() const
113  {return m_ReferenceCount;}
114 
117  virtual void SetReferenceCount(int);
118 
119 protected:
120  LightObject():m_ReferenceCount(1) {}
121  virtual ~LightObject();
122 
127  virtual void PrintSelf(std::ostream& os) const;
128  virtual void PrintHeader(std::ostream& os) const;
129  virtual void PrintTrailer(std::ostream& os) const;
131 
133  mutable volatile int m_ReferenceCount;
134 
137 
138 private:
139  LightObject(const Self&); //purposely not implemented
140  void operator=(const Self&); //purposely not implemented
141 
142 
143 };
144 
145 } // end namespace igtl
146 
147 #endif
148 

Generated at Thu Mar 20 2014 16:32:06 for OpenIGTLink by doxygen 1.8.1.2 written by Dimitri van Heesch, © 1997-2000