#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 <cpPlugins/Interface/cpPlugins_Interface_Export.h>
-
-
-// -------------------------------------------------------------------------
-#define PLUMA_PROVIDER_HEADER_BEGIN_CPPLUGINS( TYPE )\
-class cpPlugins_Interface_EXPORT TYPE##Provider\
-: public pluma::Provider{\
-private:\
- friend class pluma::Pluma;\
- static const unsigned int PLUMA_INTERFACE_VERSION;\
- static const unsigned int PLUMA_INTERFACE_LOWEST_VERSION;\
- static const std::string PLUMA_PROVIDER_TYPE;\
- std::string plumaGetType( ) const\
-{ return( PLUMA_PROVIDER_TYPE ); }\
-public:\
- unsigned int getVersion( ) const\
-{ return( PLUMA_INTERFACE_VERSION ); }
-
-// -------------------------------------------------------------------------
-#define PLUMA_PROVIDER_HEADER_END_CPPLUGINS };
-
-// -------------------------------------------------------------------------
-#define PLUMA_PROVIDER_HEADER_CPPLUGINS( TYPE ) \
- PLUMA_PROVIDER_HEADER_BEGIN_CPPLUGINS( TYPE ) \
- virtual TYPE::Pointer create( ) const = 0; \
- PLUMA_PROVIDER_HEADER_END_CPPLUGINS
-
-// -------------------------------------------------------------------------
-#define PLUMA_INHERIT_PROVIDER_CPPLUGINS( TYPE, SUPER ) \
- class TYPE##Provider \
- : public SUPER##Provider \
- { \
- public: \
- SUPER::Pointer create( ) const \
- { \
- TYPE::Pointer a = TYPE::New( ); \
- SUPER::Pointer b = a.GetPointer( ); \
- return( b ); \
- } \
- };
+
+#include <vtkSmartPointer.h>
+#include <vtkObjectBase.h>
namespace cpPlugins
{
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 std::string GetClassName( ) const;
- virtual std::string GetClassType( ) const;
+ 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( );
// Purposely not implemented
Object( const Self& );
Self& operator=( const Self& );
- };
- // TODO: doc
- PLUMA_PROVIDER_HEADER_CPPLUGINS( Object );
+ protected:
+ itk::LightObject::Pointer m_ITKObject;
+ vtkSmartPointer< vtkObjectBase > m_VTKObject;
+ std::string m_Name;
+
+ float m_ViewX;
+ float m_ViewY;
+ };
} // ecapseman
} // ecapseman
+#include <cpPlugins/Interface/Object.hxx>
+
#endif // __CPPLUGINS__INTERFACE__OBJECT__H__
// eof - $RCSfile$