]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Config.h.in
...
[cpPlugins.git] / lib / cpPlugins / Config.h.in
index c58039cd24fe19e4ba59ea79904c922c9727c642..4e58a1d334576b4d23ddd44844aac41787491f1b 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef __cpPlugins__Config__h__
 #define __cpPlugins__Config__h__
 
-#define ITK_MANUAL_INSTANTIATION
 #include <cpPlugins_Export.h>
 #include <stdexcept>
 #include <cpPlugins/RealConfig.h>
  * Some global values
  * =========================================================================
  */
-
 #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
+
+#define cpPlugins_QT4_@QT4_FOUND@
+#ifdef cpPlugins_QT4_TRUE
+#  ifndef cpPlugins_QT4
+#    define cpPlugins_QT4
+#  endif // cpPlugins_QT4
+#else // cpPlugins_QT4_TRUE
 #  undef cpPlugins_QT4
-#endif // cpPlugins_QT4_USED == 1
+#endif // cpPlugins_QT4_TRUE
 
 /*
  * =========================================================================
  * Version numbers and strings
  * =========================================================================
  */
-
 #define cpPlugins_MAJOR_VERSION   @prj_MAJ_VER@
 #define cpPlugins_MINOR_VERSION   @prj_MIN_VER@
 #define cpPlugins_RELEASE_VERSION @prj_REL_VER@
  * Language related macros
  * =========================================================================
  */
-
-#if __cplusplus >= 201103L
-#  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 cpPlugins_OVERRIDE
-#  define cpPlugins_DELETE_FUNCTION
-#  define cpPlugins_NULLPTR  NULL
-#  define cpPlugins_NOEXCEPT throw()
-#endif // __cplusplus >= 201103L
+/* TODO
+   #if __cplusplus >= 201103L
+   #  define 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 override
+   #  define cpPlugins_DELETE_FUNCTION
+   #  define cpPlugins_NULLPTR  NULL
+   #  define cpPlugins_NOEXCEPT throw()
+   #endif // __cplusplus >= 201103L
+*/
 
 /*
  * =========================================================================
  * =========================================================================
  */
 
-#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 cpPlugins_OVERRIDE          \
+  virtual const char* GetClassName( ) const override          \
   { return( #_class ); }                                                \
-  virtual const char* GetClassCategory( ) const cpPlugins_OVERRIDE      \
+  virtual const char* GetClassCategory( ) const override      \
   { return( #_category ); }
 
 #define cpPluginsObject( _cls, _scls, _cat )                            \
   typedef itk::SmartPointer< Self >       Pointer;                      \
   typedef itk::SmartPointer< const Self > ConstPointer;                 \
   public:                                                               \
-  cpPluginsNewMacro( Self );                                            \
+  itkNewMacro( Self );                                                  \
   itkTypeMacro( _cls, _scls );                                          \
   public:                                                               \
-  virtual const char* GetClassName( ) const cpPlugins_OVERRIDE          \
+  virtual const char* GetClassName( ) const override          \
   { return( #_cls ); }                                                  \
-  virtual const char* GetClassCategory( ) const cpPlugins_OVERRIDE      \
+  virtual const char* GetClassCategory( ) const override      \
   { return( #_cat ); }                                                  \
   protected:                                                            \
   _cls( );                                                              \
   virtual ~_cls( );                                                     \
-  virtual void _GenerateData( ) cpPlugins_OVERRIDE;                     \
+  virtual void _GenerateData( ) override;                     \
   private:                                                              \
   _cls( const Self& );                                                  \
   Self& operator=( const Self& )
 
-#define cpPlugins_Compatibility_Macro                                   \
-  virtual bool IsCompatible(                                            \
-    const DataObject* other                                             \
-    ) const cpPlugins_OVERRIDE                                          \
-  {                                                                     \
-    return( dynamic_cast< const Self* >( other ) != NULL );             \
+#define cpPlugins_Compatibility_Macro                           \
+  virtual bool IsCompatible(                                    \
+    const DataObject* other                                     \
+    ) const override                                  \
+  {                                                             \
+    return( dynamic_cast< const Self* >( other ) != NULL );     \
   }
 
 #endif // __cpPlugins__Config__h__