X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FObject.h;h=03eb2ae1f912047a88153ad96031f91a7bb4e480;hb=00b54bc0344d74f31df8b93f7c28a07cfc8d6873;hp=33cfdd7079cd61ab1e361369a3af305c271d3872;hpb=cb833d2fface96e020fe91584d2206860a8174ee;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Object.h b/lib/cpPlugins/Interface/Object.h index 33cfdd7..03eb2ae 100644 --- a/lib/cpPlugins/Interface/Object.h +++ b/lib/cpPlugins/Interface/Object.h @@ -1,31 +1,11 @@ #ifndef __CPPLUGINS__INTERFACE__OBJECT__H__ #define __CPPLUGINS__INTERFACE__OBJECT__H__ +#include + #include -#include #include #include -#include - -// ------------------------------------------------------------------------- -#define PLUMA_PROVIDER_HEADER_CPPLUGINS( TYPE ) \ - PLUMA_PROVIDER_HEADER_BEGIN( TYPE ) \ - virtual TYPE::Pointer create( ) const = 0; \ - PLUMA_PROVIDER_HEADER_END - -// ------------------------------------------------------------------------- -#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 { @@ -45,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( ); @@ -58,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