X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FObject.h;h=03eb2ae1f912047a88153ad96031f91a7bb4e480;hb=00b54bc0344d74f31df8b93f7c28a07cfc8d6873;hp=b15d1f0824ccfb87e9c5542642d681918ce77205;hpb=6a03e0119795c077abdeff74404bf8b5151acda0;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Object.h b/lib/cpPlugins/Interface/Object.h index b15d1f0..03eb2ae 100644 --- a/lib/cpPlugins/Interface/Object.h +++ b/lib/cpPlugins/Interface/Object.h @@ -1,50 +1,11 @@ #ifndef __CPPLUGINS__INTERFACE__OBJECT__H__ #define __CPPLUGINS__INTERFACE__OBJECT__H__ +#include + #include -#include #include #include -#include - -// ------------------------------------------------------------------------- -#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 ); \ - } \ - }; namespace cpPlugins { @@ -64,10 +25,10 @@ namespace cpPlugins public: itkNewMacro( Self ); itkTypeMacro( Object, itkObject ); + cpPlugins_Id_Macro( Object, "BaseObject" ); - public: - virtual std::string GetClassName( ) const; - virtual std::string GetClassType( ) const; + itkGetStringMacro( Name ); + itkSetStringMacro( Name ); protected: Object( ); @@ -77,10 +38,10 @@ namespace cpPlugins // Purposely not implemented Object( const Self& ); Self& operator=( const Self& ); - }; - // TODO: doc - PLUMA_PROVIDER_HEADER_CPPLUGINS( Object ); + protected: + std::string m_Name; + }; } // ecapseman