+#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 \
+ { return( #_class ); } \
+ virtual const char* GetClassCategory( ) const cpPlugins_OVERRIDE \
+ { return( #_category ); }
+
+#define cpPluginsObject( _cls, _scls, _cat ) \
+ public: \
+ typedef _cls Self; \
+ typedef _scls Superclass; \
+ typedef itk::SmartPointer< Self > Pointer; \
+ typedef itk::SmartPointer< const Self > ConstPointer; \
+ public: \
+ cpPluginsNewMacro( Self ); \
+ itkTypeMacro( _cls, _scls ); \
+ public: \
+ virtual const char* GetClassName( ) const cpPlugins_OVERRIDE \
+ { return( #_cls ); } \
+ virtual const char* GetClassCategory( ) const cpPlugins_OVERRIDE \
+ { return( #_cat ); } \
+ protected: \
+ _cls( ); \
+ virtual ~_cls( ); \
+ virtual void _GenerateData( ) cpPlugins_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 ); \
+ }