]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Object.h
...
[cpPlugins.git] / lib / cpPlugins / Interface / Object.h
index d64ece2221e262b20342c6bd165cbdb57f48b552..92de13cb646f4823107a073628e5558dc3e5c065 100644 (file)
@@ -1,8 +1,15 @@
 #ifndef __CPPLUGINS__INTERFACE__OBJECT__H__
 #define __CPPLUGINS__INTERFACE__OBJECT__H__
 
+#include <cpPlugins/Interface/Macros.h>
+
 #include <string>
-#include <Pluma/Pluma.hpp>
+
+#include <itkObject.h>
+#include <itkObjectFactory.h>
+
+#include <vtkSmartPointer.h>
+#include <vtkObjectBase.h>
 
 namespace cpPlugins
 {
@@ -10,22 +17,68 @@ namespace cpPlugins
   {
     /**
      */
-    class Object
+    class cpPlugins_Interface_EXPORT Object
+      : public itk::Object
     {
     public:
+      typedef Object                          Self;
+      typedef itk::Object                     Superclass;
+      typedef itk::SmartPointer< Self >       Pointer;
+      typedef itk::SmartPointer< const Self > ConstPointer;
+
+    public:
+      itkNewMacro( Self );
+      itkTypeMacro( Object, itkObject );
+      cpPlugins_Id_Macro( Object, BaseObject );
+
+      itkGetStringMacro( Name );
+      itkGetConstMacro( ViewX, float );
+      itkGetConstMacro( ViewY, float );
+
+      itkSetStringMacro( Name );
+      itkSetMacro( ViewX, float );
+      itkSetMacro( ViewY, float );
+
+    public:
+      virtual void Modified( ) const;
+      void SetViewCoords( float x, float y );
+
+      template< class T >
+        inline T* GetITK( );
+
+      template< class T >
+        inline const T* GetITK( ) const;
+
+      template< class T >
+        inline T* GetVTK( );
+
+      template< class T >
+        inline const T* GetVTK( ) const;
+
+    protected:
       Object( );
       virtual ~Object( );
 
-      virtual std::string GetClassName( ) const;
-    };
+    private:
+      // Purposely not implemented
+      Object( const Self& );
+      Self& operator=( const Self& );
+
+    protected:
+      itk::LightObject::Pointer        m_ITKObject;
+      vtkSmartPointer< vtkObjectBase > m_VTKObject;
+      std::string                      m_Name;
 
-    // TODO: doc
-    PLUMA_PROVIDER_HEADER( Object );
+      float m_ViewX;
+      float m_ViewY;
+    };
 
   } // ecapseman
 
 } // ecapseman
 
+#include <cpPlugins/Interface/Object.hxx>
+
 #endif // __CPPLUGINS__INTERFACE__OBJECT__H__
 
 // eof - $RCSfile$