]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/DataObject.h
...
[cpPlugins.git] / lib / cpPlugins / Interface / DataObject.h
index c08365463e5e9a8abf736a85a4df4f90bf1da078..e2d79ffcc16ba3313d4b50b2b1e4e7f26759a60e 100644 (file)
@@ -1,16 +1,13 @@
 #ifndef __CPPLUGINS__INTERFACE__DATAOBJECT__H__
 #define __CPPLUGINS__INTERFACE__DATAOBJECT__H__
 
-#include <map>
-#include <string>
-#include <itkDataObject.h>
-#include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
 #include <cpPlugins/Interface/Object.h>
 
 namespace cpPlugins
 {
   namespace Interface
   {
+    // Some forward declarations
     class ProcessObject;
 
     /**
@@ -19,24 +16,34 @@ namespace cpPlugins
       : public Object
     {
     public:
-      typedef DataObject Self;
-      typedef Object     Superclass;
+      typedef DataObject                      Self;
+      typedef Object                          Superclass;
+      typedef itk::SmartPointer< Self >       Pointer;
+      typedef itk::SmartPointer< const Self > ConstPointer;
 
     public:
-      DataObject( );
-      virtual ~DataObject( );
+      itkNewMacro( Self );
+      itkTypeMacro( DataObject, Object );
+      cpPlugins_Id_Macro( DataObject, BasicObject );
 
-      virtual std::string GetClassName( ) const;
+    public:
+      ProcessObject* GetSource( );
+      const ProcessObject* GetSource( ) const;
+      void SetSource( ProcessObject* src );
 
-      itk::DataObject* GetDataObject( ) const;
-      virtual void SetDataObject( itk::DataObject* src );
+      void DisconnectPipeline( );
 
-      ProcessObject* GetSource( ) const;
-      void SetSource( ProcessObject* src );
+    protected:
+      DataObject( );
+      virtual ~DataObject( );
+
+    private:
+      // Purposely not implemented
+      DataObject( const Self& );
+      Self& operator=( const Self& );
 
     protected:
-      itk::DataObject::Pointer m_DataObject;
-      ProcessObject*           m_Source;
+      ProcessObject* m_Source;
     };
 
   } // ecapseman