1 #ifndef __CPPLUGINS__INTERFACE__OBJECT__H__
2 #define __CPPLUGINS__INTERFACE__OBJECT__H__
5 #include <Pluma/Pluma.hpp>
7 #include <itkObjectFactory.h>
8 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
11 // -------------------------------------------------------------------------
12 #define PLUMA_PROVIDER_HEADER_BEGIN_CPPLUGINS( TYPE )\
13 class cpPlugins_Interface_EXPORT TYPE##Provider\
14 : public pluma::Provider{\
16 friend class pluma::Pluma;\
17 static const unsigned int PLUMA_INTERFACE_VERSION;\
18 static const unsigned int PLUMA_INTERFACE_LOWEST_VERSION;\
19 static const std::string PLUMA_PROVIDER_TYPE;\
20 std::string plumaGetType( ) const\
21 { return( PLUMA_PROVIDER_TYPE ); }\
23 unsigned int getVersion( ) const\
24 { return( PLUMA_INTERFACE_VERSION ); }
26 // -------------------------------------------------------------------------
27 #define PLUMA_PROVIDER_HEADER_END_CPPLUGINS };
29 // -------------------------------------------------------------------------
30 #define PLUMA_PROVIDER_HEADER_CPPLUGINS( TYPE ) \
31 PLUMA_PROVIDER_HEADER_BEGIN_CPPLUGINS( TYPE ) \
32 virtual TYPE::Pointer create( ) const = 0; \
33 PLUMA_PROVIDER_HEADER_END_CPPLUGINS
35 // -------------------------------------------------------------------------
36 #define PLUMA_INHERIT_PROVIDER_CPPLUGINS( TYPE, SUPER ) \
37 class TYPE##Provider \
38 : public SUPER##Provider \
41 SUPER::Pointer create( ) const \
43 TYPE::Pointer a = TYPE::New( ); \
44 SUPER::Pointer b = a.GetPointer( ); \
55 class cpPlugins_Interface_EXPORT Object
60 typedef itk::Object Superclass;
61 typedef itk::SmartPointer< Self > Pointer;
62 typedef itk::SmartPointer< const Self > ConstPointer;
66 itkTypeMacro( Object, itkObject );
69 virtual std::string GetClassName( ) const;
70 virtual std::string GetClassType( ) const;
77 // Purposely not implemented
78 Object( const Self& );
79 Self& operator=( const Self& );
83 PLUMA_PROVIDER_HEADER_CPPLUGINS( Object );
89 #endif // __CPPLUGINS__INTERFACE__OBJECT__H__