X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FMacros.h;h=922d036c4a1bd422cabae919f985e1cd9bcee88f;hb=1b600247da314fe62d007ca8a0ce24d0006931f4;hp=790a99765c64d508ebfe0d0c32b97a0965e5d7c7;hpb=273699a71c538630c162de031f0c95014319311d;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Macros.h b/lib/cpPlugins/Interface/Macros.h index 790a997..922d036 100644 --- a/lib/cpPlugins/Interface/Macros.h +++ b/lib/cpPlugins/Interface/Macros.h @@ -1,7 +1,6 @@ #ifndef __CPPLUGINS__INTERFACE__MACROS__H__ #define __CPPLUGINS__INTERFACE__MACROS__H__ -#include #include #include @@ -11,49 +10,6 @@ virtual const char* GetClassName( ) const { return( #N ); } \ virtual const char* GetClassCategory( ) const { return( #C ); } -// ------------------------------------------------------------------------- -#define CPPLUGINS_PROVIDER_HEADER_BEGIN( 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 CPPLUGINS_PROVIDER_HEADER_END }; - -// ------------------------------------------------------------------------- -#define CPPLUGINS_PROVIDER_HEADER( TYPE ) \ - CPPLUGINS_PROVIDER_HEADER_BEGIN( TYPE ) \ - virtual TYPE::Pointer create( ) const = 0; \ - CPPLUGINS_PROVIDER_HEADER_END - -// ------------------------------------------------------------------------- -#define CPPLUGINS_PROVIDER_SOURCE( TYPE, Version, LowestVersion ) \ - PLUMA_PROVIDER_SOURCE( TYPE, Version, LowestVersion ) - -// ------------------------------------------------------------------------- -#define CPPLUGINS_INHERIT_PROVIDER( TYPE ) \ - class TYPE##Provider \ - : public cpPlugins::Interface::ProcessObjectProvider \ - { \ - public: \ - cpPlugins::Interface::ProcessObject::Pointer create( ) const \ - { \ - TYPE::Pointer a = TYPE::New( ); \ - cpPlugins::Interface::ProcessObject::Pointer b = a.GetPointer( ); \ - return( b ); \ - } \ - }; - /** * Based upon: http://www.itk.org/Wiki/Proposals:Explicit_Instantiation */