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