1 #ifndef __CPPLUGINS__INTERFACE__MACROS__H__
2 #define __CPPLUGINS__INTERFACE__MACROS__H__
4 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
5 #include <cpPlugins/Interface/Config.h>
7 // -------------------------------------------------------------------------
8 #define cpPlugins_Id_Macro( N, C ) \
10 virtual const char* GetClassName( ) const { return( #N ); } \
11 virtual const char* GetClassCategory( ) const { return( #C ); }
14 * Based upon: http://www.itk.org/Wiki/Proposals:Explicit_Instantiation
16 // -------------------------------------------------------------------------
17 #define cpPlugins_TEMPLATE_1( X1 ) \
19 #define cpPlugins_TEMPLATE_2( X1, X2 ) \
21 #define cpPlugins_TEMPLATE_3( X1, X2, X3 ) \
23 #define cpPlugins_TEMPLATE_4( X1, X2, X3, X4 ) \
25 #define cpPlugins_TEMPLATE_5( X1, X2, X3, X4, X5 ) \
27 #define cpPlugins_TEMPLATE_6( X1, X2, X3, X4, X5, X6 ) \
29 #define cpPlugins_TEMPLATE_7( X1, X2, X3, X4, X5, X6, X7 ) \
31 #define cpPlugins_TEMPLATE_8( X1, X2, X3, X4, X5, X6, X7, X8 ) \
32 X1,X2,X3,X4,X5,X6,X7,X8
33 #define cpPlugins_TEMPLATE_9( X1, X2, X3, X4, X5, X6, X7, X8, X9 ) \
34 X1,X2,X3,X4,X5,X6,X7,X8,X9
36 #define cpPlugins_TEMPLATE_EXPORT( X ) \
37 template cpPlugins_TEMPLATE_##X;
38 #define cpPlugins_TEMPLATE_IMPORT( X ) \
39 extern template cpPlugins_TEMPLATE_##X;
41 #endif // __CPPLUGINS__INTERFACE__MACROS__H__