]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Config.h.in
dea43e50b4182ccfeef1e2c05431a26a6372d0d9
[cpPlugins.git] / lib / cpPlugins / Config.h.in
1 #ifndef __@prj_NAME@__h__
2 #define __@prj_NAME@__h__
3
4 #define ITK_MANUAL_INSTANTIATION
5 #include <@prj_NAME@_Export.h>
6 #include <stdexcept>
7
8 /*
9  * =========================================================================
10  * Identify OS
11  * =========================================================================
12  */
13 #define @prj_NAME_OS@
14 #define @prj_NAME@_LIB_PREFIX     "@prj_NAME_LIB_PREFIX@"
15 #define @prj_NAME@_LIB_EXT        "@prj_NAME_LIB_EXT@"
16 #define @prj_NAME@_ENV_SEPARATOR  "@prj_NAME_ENV_SEPARATOR@"
17 #define @prj_NAME@_PATH_SEPARATOR "@prj_NAME_PATH_SEPARATOR@"
18
19 #ifdef @prj_NAME@_Windows
20 #  ifndef WIN32_LEAN_AND_MEAN
21 #    define WIN32_LEAN_AND_MEAN
22 #  endif
23 #  define NOMINMAX
24 #  include <windows.h>
25 #  include <tchar.h>
26 #endif
27
28 /*
29  * =========================================================================
30  * Some global values
31  * =========================================================================
32  */
33
34 #define @prj_NAME@_PATHS "@prj_NAME@_PATHS"
35 #define @prj_NAME@_CONFIG "@prj_NAME@_Libraries.config"
36 #define @prj_NAME@_QT4_USED @QT4_FOUND@
37 #if @prj_NAME@_QT4_USED == 1
38 #  define @prj_NAME@_QT4
39 #  define @prj_NAME@_QVTKWidget @cpPlugins_Qt4_VTKWidget@
40 #  include <@cpPlugins_Qt4_VTKWidget@.h>
41 #else // @prj_NAME@_QT4_USED == 1
42 #  undef @prj_NAME@_QT4
43 #endif // @prj_NAME@_QT4_USED == 1
44
45 /*
46  * =========================================================================
47  * Version numbers and strings
48  * =========================================================================
49  */
50
51 #define @prj_NAME@_MAJOR_VERSION   @prj_MAJ_VER@
52 #define @prj_NAME@_MINOR_VERSION   @prj_MIN_VER@
53 #define @prj_NAME@_RELEASE_VERSION @prj_REL_VER@
54 #define @prj_NAME@_VERSION         "@prj_VERSION@"
55 #define @prj_NAME@_SHORT_VERSION   "@prj_SHORT_VERSION@"
56
57 /*
58  * =========================================================================
59  * Language related macros
60  * =========================================================================
61  */
62
63 #if __cplusplus >= 201103L
64 #  define @prj_NAME@_OVERRIDE override
65 #  define @prj_NAME@_DELETE_FUNCTION =delete
66 #  define @prj_NAME@_NULLPTR  nullptr
67 #  define @prj_NAME@_NOEXCEPT noexcept
68 #  define @prj_NAME@_HAS_CXX11_STATIC_ASSERT
69 #  define @prj_NAME@_HAS_CXX11_RVREF
70 #else
71 #  define @prj_NAME@_OVERRIDE
72 #  define @prj_NAME@_DELETE_FUNCTION
73 #  define @prj_NAME@_NULLPTR  NULL
74 #  define @prj_NAME@_NOEXCEPT throw()
75 #endif
76
77 /*
78  * =========================================================================
79  * Some macros
80  * =========================================================================
81  */
82
83 #define @prj_NAME@_Id_Macro( _class, _category )                        \
84   public:                                                               \
85   virtual const char* GetClassName( ) const @prj_NAME@_OVERRIDE         \
86   { return( #_class ); }                                                \
87   virtual const char* GetClassCategory( ) const @prj_NAME@_OVERRIDE     \
88   { return( #_category ); }
89
90 #define @prj_NAME@Object( _cls, _scls, _cat )                           \
91   public:                                                               \
92   typedef _cls                            Self;                         \
93   typedef _scls                           Superclass;                   \
94   typedef itk::SmartPointer< Self >       Pointer;                      \
95   typedef itk::SmartPointer< const Self > ConstPointer;                 \
96   public:                                                               \
97   itkNewMacro( Self );                                                  \
98   itkTypeMacro( _cls, _scls );                                          \
99   public:                                                               \
100   virtual const char* GetClassName( ) const @prj_NAME@_OVERRIDE         \
101   { return( #_cls ); }                                                  \
102   virtual const char* GetClassCategory( ) const @prj_NAME@_OVERRIDE     \
103   { return( #_cat ); }                                                  \
104   protected:                                                            \
105   _cls( );                                                              \
106   virtual ~_cls( );                                                     \
107   virtual void _GenerateData( ) @prj_NAME@_OVERRIDE;                    \
108   private:                                                              \
109   _cls( const Self& );                                                  \
110   Self& operator=( const Self& )
111
112 #define @prj_NAME@_Compatibility_Macro                                  \
113   virtual bool IsCompatible(                                            \
114     const DataObject* other                                             \
115     ) const @prj_NAME@_OVERRIDE                                         \
116   {                                                                     \
117   return( dynamic_cast< const Self* >( other ) != NULL );               \
118   }
119
120 #endif // __@prj_NAME@__h__
121
122 // eof - $RCSfile$