]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Config.h.in
Cast image filter added. ROI filter modified.
[cpPlugins.git] / lib / cpPlugins / Config.h.in
index 1540cb08de2a5e427101a753c6dcdb8cbb59277a..c58039cd24fe19e4ba59ea79904c922c9727c642 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __@prj_NAME@__Config__h__
-#define __@prj_NAME@__Config__h__
+#ifndef __cpPlugins__Config__h__
+#define __cpPlugins__Config__h__
 
 #define ITK_MANUAL_INSTANTIATION
-#include <@prj_NAME@_Export.h>
+#include <cpPlugins_Export.h>
 #include <stdexcept>
 #include <cpPlugins/RealConfig.h>
 
  * 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
+#define cpPlugins_OS_@CMAKE_SYSTEM_NAME@
+#ifdef cpPlugins_OS_Windows
+#  define cpPlugins_LIB_PREFIX     ""
+#  define cpPlugins_ENV_SEPARATOR  ";"
+#  define cpPlugins_PATH_SEPARATOR '\\'
+#  define cpPlugins_LIB_EXT        ".dll"
+#else // cpPlugins_OS_Windows
+#  define cpPlugins_LIB_PREFIX     "lib"
+#  define cpPlugins_ENV_SEPARATOR  ":"
+#  define cpPlugins_PATH_SEPARATOR '/'
+#  ifdef cpPlugins_OS_Linux
+#    define cpPlugins_LIB_EXT ".so"
+#  else // cpPlugins_OS_Linux
+#    define cpPlugins_LIB_EXT ".dylib"
+#  endif // cpPlugins_OS_Linux
+#endif // cpPlugins_OS_Windows
+
+#ifdef cpPlugins_OS_Windows
 #  ifndef WIN32_LEAN_AND_MEAN
 #    define WIN32_LEAN_AND_MEAN
 #  endif // WIN32_LEAN_AND_MEAN
 #  define NOMINMAX
 #  include <windows.h>
 #  include <tchar.h>
-#endif // @prj_NAME@_OS_Windows
+#endif // cpPlugins_OS_Windows
 
 /*
  * =========================================================================
  * =========================================================================
  */
 
-#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
+#define cpPlugins_PATHS "cpPlugins_PATHS"
+#define cpPlugins_CONFIG "cpPlugins_Libraries.config"
+#define cpPlugins_QT4_USED @QT4_FOUND@
+#if cpPlugins_QT4_USED == 1
+#  define cpPlugins_QT4
+#  define cpPlugins_QVTKWidget @cpPlugins_Qt4_VTKWidget@
+/* TODO
+   #  include <@cpPlugins_Qt4_VTKWidget@.h>
+*/
+#else // cpPlugins_QT4_USED == 1
+#  undef cpPlugins_QT4
+#endif // cpPlugins_QT4_USED == 1
 
 /*
  * =========================================================================
  * =========================================================================
  */
 
-#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@
+#define cpPlugins_MAJOR_VERSION   @prj_MAJ_VER@
+#define cpPlugins_MINOR_VERSION   @prj_MIN_VER@
+#define cpPlugins_RELEASE_VERSION @prj_REL_VER@
+#define cpPlugins_VERSION         "@prj_VERSION@"
+#define cpPlugins_SHORT_VERSION   "@prj_SHORT_VERSION@"
+#define cpPlugins_OpenGL_BackEnd_@VTK_RENDERING_BACKEND@
 
 /*
  * =========================================================================
  */
 
 #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
+#  define cpPlugins_OVERRIDE override
+#  define cpPlugins_DELETE_FUNCTION =delete
+#  define cpPlugins_NULLPTR  nullptr
+#  define cpPlugins_NOEXCEPT noexcept
+#  define cpPlugins_HAS_CXX11_STATIC_ASSERT
+#  define cpPlugins_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()
+#  define cpPlugins_OVERRIDE
+#  define cpPlugins_DELETE_FUNCTION
+#  define cpPlugins_NULLPTR  NULL
+#  define cpPlugins_NOEXCEPT throw()
 #endif // __cplusplus >= 201103L
 
 /*
  * =========================================================================
  */
 
-#define @prj_NAME@_Id_Macro( _class, _category )                        \
+#define cpPluginsNewMacro( x )                                       \
+  static Pointer New( )                                              \
+  {                                                                  \
+    Pointer smartPtr = new x( );                                     \
+    smartPtr->UnRegister( );                                         \
+    return( smartPtr );                                              \
+  }                                                                  \
+  virtual itk::LightObject::Pointer                                  \
+  CreateAnother( ) const cpPlugins_OVERRIDE                          \
+  {                                                                  \
+    itk::LightObject::Pointer smartPtr;                              \
+    smartPtr = x::New( ).GetPointer( );                              \
+    return( smartPtr );                                              \
+  }                                                                  \
+  Pointer Clone( ) const                                             \
+  {                                                                  \
+    Pointer rval =                                                   \
+      dynamic_cast< x* >( this->InternalClone( ).GetPointer( ) );    \
+    return( rval );                                                  \
+  }
+
+#define cpPlugins_Id_Macro( _class, _category )                         \
   public:                                                               \
-  virtual const char* GetClassName( ) const @prj_NAME@_OVERRIDE         \
+  virtual const char* GetClassName( ) const cpPlugins_OVERRIDE          \
   { return( #_class ); }                                                \
-  virtual const char* GetClassCategory( ) const @prj_NAME@_OVERRIDE     \
+  virtual const char* GetClassCategory( ) const cpPlugins_OVERRIDE      \
   { return( #_category ); }
 
-#define @prj_NAME@Object( _cls, _scls, _cat )                           \
+#define cpPluginsObject( _cls, _scls, _cat )                            \
   public:                                                               \
   typedef _cls                            Self;                         \
   typedef _scls                           Superclass;                   \
   typedef itk::SmartPointer< Self >       Pointer;                      \
   typedef itk::SmartPointer< const Self > ConstPointer;                 \
   public:                                                               \
-  itkNewMacro( Self );                                                  \
+  cpPluginsNewMacro( Self );                                            \
   itkTypeMacro( _cls, _scls );                                          \
   public:                                                               \
-  virtual const char* GetClassName( ) const @prj_NAME@_OVERRIDE         \
+  virtual const char* GetClassName( ) const cpPlugins_OVERRIDE          \
   { return( #_cls ); }                                                  \
-  virtual const char* GetClassCategory( ) const @prj_NAME@_OVERRIDE     \
+  virtual const char* GetClassCategory( ) const cpPlugins_OVERRIDE      \
   { return( #_cat ); }                                                  \
   protected:                                                            \
   _cls( );                                                              \
   virtual ~_cls( );                                                     \
-  virtual void _GenerateData( ) @prj_NAME@_OVERRIDE;                    \
+  virtual void _GenerateData( ) cpPlugins_OVERRIDE;                     \
   private:                                                              \
   _cls( const Self& );                                                  \
   Self& operator=( const Self& )
 
-#define @prj_NAME@_Compatibility_Macro                                  \
+#define cpPlugins_Compatibility_Macro                                   \
   virtual bool IsCompatible(                                            \
     const DataObject* other                                             \
-    ) const @prj_NAME@_OVERRIDE                                         \
+    ) const cpPlugins_OVERRIDE                                          \
   {                                                                     \
-  return( dynamic_cast< const Self* >( other ) != NULL );               \
+    return( dynamic_cast< const Self* >( other ) != NULL );             \
   }
 
-#endif // __@prj_NAME@__Config__h__
+#endif // __cpPlugins__Config__h__
 
 // eof - $RCSfile$