]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Interface/Object.h
345be7f9cb8a9733bb2eb40636e9643e16c1b99c
[cpPlugins.git] / lib / cpPlugins / Interface / Object.h
1 #ifndef __CPPLUGINS__INTERFACE__OBJECT__H__
2 #define __CPPLUGINS__INTERFACE__OBJECT__H__
3
4 #include <cpPlugins/Interface/Macros.h>
5
6 #include <string>
7 #include <itkObject.h>
8 #include <itkObjectFactory.h>
9
10 namespace cpPlugins
11 {
12   namespace Interface
13   {
14     /**
15      */
16     class cpPlugins_Interface_EXPORT Object
17       : public itk::Object
18     {
19     public:
20       typedef Object                          Self;
21       typedef itk::Object                     Superclass;
22       typedef itk::SmartPointer< Self >       Pointer;
23       typedef itk::SmartPointer< const Self > ConstPointer;
24
25     public:
26       itkNewMacro( Self );
27       itkTypeMacro( Object, itkObject );
28       cpPlugins_Id_Macro( Object, BaseObject );
29
30       itkGetStringMacro( Name );
31       itkGetConstMacro( ViewX, float );
32       itkGetConstMacro( ViewY, float );
33
34       itkSetStringMacro( Name );
35       itkSetMacro( ViewX, float );
36       itkSetMacro( ViewY, float );
37
38     public:
39       inline float SetViewCoords( float x, float y )
40         {
41           this->SetViewX( x );
42           this->SetViewY( y );
43         }
44
45     protected:
46       Object( );
47       virtual ~Object( );
48
49     private:
50       // Purposely not implemented
51       Object( const Self& );
52       Self& operator=( const Self& );
53
54     protected:
55       std::string m_Name;
56       float m_ViewX, m_ViewY;
57     };
58
59   } // ecapseman
60
61 } // ecapseman
62
63 #endif // __CPPLUGINS__INTERFACE__OBJECT__H__
64
65 // eof - $RCSfile$