]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Config.h.in
1c0f1066d1a4716fa70ad353ac2e8cf14909175c
[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@_OS_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 // @prj_NAME@_OS_Windows
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 #define @prj_NAME@_OpenGL_BackEnd_@VTK_RENDERING_BACKEND@
57
58 /*
59  * =========================================================================
60  * Language related macros
61  * =========================================================================
62  */
63
64 #if __cplusplus >= 201103L
65 #  define @prj_NAME@_OVERRIDE override
66 #  define @prj_NAME@_DELETE_FUNCTION =delete
67 #  define @prj_NAME@_NULLPTR  nullptr
68 #  define @prj_NAME@_NOEXCEPT noexcept
69 #  define @prj_NAME@_HAS_CXX11_STATIC_ASSERT
70 #  define @prj_NAME@_HAS_CXX11_RVREF
71 #else // __cplusplus >= 201103L
72 #  define @prj_NAME@_OVERRIDE
73 #  define @prj_NAME@_DELETE_FUNCTION
74 #  define @prj_NAME@_NULLPTR  NULL
75 #  define @prj_NAME@_NOEXCEPT throw()
76 #endif // __cplusplus >= 201103L
77
78 /*
79  * =========================================================================
80  * Some macros
81  * =========================================================================
82  */
83
84 #define @prj_NAME@_Id_Macro( _class, _category )                        \
85   public:                                                               \
86   virtual const char* GetClassName( ) const @prj_NAME@_OVERRIDE         \
87   { return( #_class ); }                                                \
88   virtual const char* GetClassCategory( ) const @prj_NAME@_OVERRIDE     \
89   { return( #_category ); }
90
91 #define @prj_NAME@Object( _cls, _scls, _cat )                           \
92   public:                                                               \
93   typedef _cls                            Self;                         \
94   typedef _scls                           Superclass;                   \
95   typedef itk::SmartPointer< Self >       Pointer;                      \
96   typedef itk::SmartPointer< const Self > ConstPointer;                 \
97   public:                                                               \
98   itkNewMacro( Self );                                                  \
99   itkTypeMacro( _cls, _scls );                                          \
100   public:                                                               \
101   virtual const char* GetClassName( ) const @prj_NAME@_OVERRIDE         \
102   { return( #_cls ); }                                                  \
103   virtual const char* GetClassCategory( ) const @prj_NAME@_OVERRIDE     \
104   { return( #_cat ); }                                                  \
105   protected:                                                            \
106   _cls( );                                                              \
107   virtual ~_cls( );                                                     \
108   virtual void _GenerateData( ) @prj_NAME@_OVERRIDE;                    \
109   private:                                                              \
110   _cls( const Self& );                                                  \
111   Self& operator=( const Self& )
112
113 #define @prj_NAME@_Compatibility_Macro                                  \
114   virtual bool IsCompatible(                                            \
115     const DataObject* other                                             \
116     ) const @prj_NAME@_OVERRIDE                                         \
117   {                                                                     \
118   return( dynamic_cast< const Self* >( other ) != NULL );               \
119   }
120
121 #endif // __@prj_NAME@__h__
122
123 // eof - $RCSfile$