X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FConfig.h.in;h=1540cb08de2a5e427101a753c6dcdb8cbb59277a;hb=22c3c302e6fb4932c6598a8acbf043436c4c06c6;hp=c7668b578bd4af586dab0f6941c52aec6164438c;hpb=24d0c2ad34de2cbd89fed76058f2995cdf81d239;p=cpPlugins.git diff --git a/lib/cpPlugins/Config.h.in b/lib/cpPlugins/Config.h.in index c7668b5..1540cb0 100644 --- a/lib/cpPlugins/Config.h.in +++ b/lib/cpPlugins/Config.h.in @@ -1,46 +1,135 @@ -#ifndef __CPPLUGINS__CONFIG__H__ -#define __CPPLUGINS__CONFIG__H__ +#ifndef __@prj_NAME@__Config__h__ +#define __@prj_NAME@__Config__h__ -#include -#include -#include +#define ITK_MANUAL_INSTANTIATION +#include <@prj_NAME@_Export.h> +#include +#include + +/* + * ========================================================================= + * Identify OS + * ========================================================================= + */ +#define @prj_NAME@_OS_@CMAKE_SYSTEM_NAME@ +#ifdef @prj_NAME@_OS_Windows +# define @prj_NAME@_LIB_PREFIX "" +# define @prj_NAME@_ENV_SEPARATOR ";" +# define @prj_NAME@_PATH_SEPARATOR '\\' +# define @prj_NAME@_LIB_EXT ".dll" +#else // @prj_NAME@_OS_Windows +# define @prj_NAME@_LIB_PREFIX "lib" +# define @prj_NAME@_ENV_SEPARATOR ":" +# define @prj_NAME@_PATH_SEPARATOR '/' +# ifdef @prj_NAME@_OS_Linux +# define @prj_NAME@_LIB_EXT ".so" +# else // @prj_NAME@_OS_Linux +# define @prj_NAME@_LIB_EXT ".dylib" +# endif // @prj_NAME@_OS_Linux +#endif // @prj_NAME@_OS_Windows + +#ifdef @prj_NAME@_OS_Windows +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif // WIN32_LEAN_AND_MEAN +# define NOMINMAX +# include +# include +#endif // @prj_NAME@_OS_Windows + +/* + * ========================================================================= + * Some global values + * ========================================================================= + */ + +#define @prj_NAME@_PATHS "@prj_NAME@_PATHS" +#define @prj_NAME@_CONFIG "@prj_NAME@_Libraries.config" +#define @prj_NAME@_QT4_USED @QT4_FOUND@ +#if @prj_NAME@_QT4_USED == 1 +# define @prj_NAME@_QT4 +# define @prj_NAME@_QVTKWidget @cpPlugins_Qt4_VTKWidget@ +# include <@cpPlugins_Qt4_VTKWidget@.h> +#else // @prj_NAME@_QT4_USED == 1 +# undef @prj_NAME@_QT4 +#endif // @prj_NAME@_QT4_USED == 1 /* * ========================================================================= * Version numbers and strings * ========================================================================= */ -#define cpPlugins_MAJ_VER @prj_MAJ_VER@ -#define cpPlugins_MIN_VER @prj_MIN_VER@ -#define cpPlugins_REL_VER @prj_REL_VER@ -#define cpPlugins_VER "@prj_VER@" -#define cpPlugins_sVER "@prj_sVER@" + +#define @prj_NAME@_MAJOR_VERSION @prj_MAJ_VER@ +#define @prj_NAME@_MINOR_VERSION @prj_MIN_VER@ +#define @prj_NAME@_RELEASE_VERSION @prj_REL_VER@ +#define @prj_NAME@_VERSION "@prj_VERSION@" +#define @prj_NAME@_SHORT_VERSION "@prj_SHORT_VERSION@" +#define @prj_NAME@_OpenGL_BackEnd_@VTK_RENDERING_BACKEND@ /* * ========================================================================= - * Some useful constants and values + * Language related macros * ========================================================================= */ -#define cpPlugins_QT4_USED @QT4_FOUND@ -#if cpPlugins_QT4_USED == 1 -# define cpPlugins_QT4 -#else // cpPlugins_QT4_USED == 1 -# undef cpPlugins_QT4 -#endif // cpPlugins_QT4_USED == 1 +#if __cplusplus >= 201103L +# define @prj_NAME@_OVERRIDE override +# define @prj_NAME@_DELETE_FUNCTION =delete +# define @prj_NAME@_NULLPTR nullptr +# define @prj_NAME@_NOEXCEPT noexcept +# define @prj_NAME@_HAS_CXX11_STATIC_ASSERT +# define @prj_NAME@_HAS_CXX11_RVREF +#else // __cplusplus >= 201103L +# define @prj_NAME@_OVERRIDE +# define @prj_NAME@_DELETE_FUNCTION +# define @prj_NAME@_NULLPTR NULL +# define @prj_NAME@_NOEXCEPT throw() +#endif // __cplusplus >= 201103L /* * ========================================================================= * Some macros * ========================================================================= */ -#define cpPlugins_Id_Macro( N, C ) \ + +#define @prj_NAME@_Id_Macro( _class, _category ) \ public: \ - virtual const char* GetClassName( ) const ITK_OVERRIDE \ - { return( #N ); } \ - virtual const char* GetClassCategory( ) const ITK_OVERRIDE \ - { return( #C ); } + virtual const char* GetClassName( ) const @prj_NAME@_OVERRIDE \ + { return( #_class ); } \ + virtual const char* GetClassCategory( ) const @prj_NAME@_OVERRIDE \ + { return( #_category ); } + +#define @prj_NAME@Object( _cls, _scls, _cat ) \ + public: \ + typedef _cls Self; \ + typedef _scls Superclass; \ + typedef itk::SmartPointer< Self > Pointer; \ + typedef itk::SmartPointer< const Self > ConstPointer; \ + public: \ + itkNewMacro( Self ); \ + itkTypeMacro( _cls, _scls ); \ + public: \ + virtual const char* GetClassName( ) const @prj_NAME@_OVERRIDE \ + { return( #_cls ); } \ + virtual const char* GetClassCategory( ) const @prj_NAME@_OVERRIDE \ + { return( #_cat ); } \ + protected: \ + _cls( ); \ + virtual ~_cls( ); \ + virtual void _GenerateData( ) @prj_NAME@_OVERRIDE; \ + private: \ + _cls( const Self& ); \ + Self& operator=( const Self& ) + +#define @prj_NAME@_Compatibility_Macro \ + virtual bool IsCompatible( \ + const DataObject* other \ + ) const @prj_NAME@_OVERRIDE \ + { \ + return( dynamic_cast< const Self* >( other ) != NULL ); \ + } -#endif // __CPPLUGINS__CONFIG__H__ +#endif // __@prj_NAME@__Config__h__ // eof - $RCSfile$