]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Pipeline/DataObject.h
yet another refactoring
[cpPlugins.git] / lib / cpPlugins / Pipeline / DataObject.h
diff --git a/lib/cpPlugins/Pipeline/DataObject.h b/lib/cpPlugins/Pipeline/DataObject.h
new file mode 100644 (file)
index 0000000..04623cf
--- /dev/null
@@ -0,0 +1,62 @@
+#ifndef __cpPlugins__Pipeline__DataObject__h__
+#define __cpPlugins__Pipeline__DataObject__h__
+
+#include <cpPlugins/Pipeline/Object.h>
+
+namespace cpPlugins
+{
+  namespace Pipeline
+  {
+    // Some forward declarations
+    class ProcessObject;
+
+    /**
+     */
+    class cpPlugins_EXPORT DataObject
+      : public Object
+    {
+      friend class ProcessObject;
+
+    public:
+      typedef DataObject                      Self;
+      typedef Object                          Superclass;
+      typedef itk::SmartPointer< Self >       Pointer;
+      typedef itk::SmartPointer< const Self > ConstPointer;
+
+    public:
+      itkNewMacro( Self );
+      itkTypeMacro( DataObject, Object );
+      cpPlugins_Id_Macro( DataObject, Object );
+
+    public:
+      virtual bool IsCompatible( const Self* other ) const;
+
+      ProcessObject* GetSource( );
+      const ProcessObject* GetSource( ) const;
+      void SetSource( ProcessObject* src );
+
+      void DisconnectFromPipeline( );
+
+    protected:
+      DataObject( );
+      virtual ~DataObject( );
+
+      template< class _TType >
+      inline bool _DisconnectVTK( );
+
+    private:
+      // Purposely not implemented
+      DataObject( const Self& );
+      Self& operator=( const Self& );
+
+    protected:
+      ProcessObject* m_Source;
+    };
+
+  } // ecapseman
+
+} // ecapseman
+
+#endif // __cpPlugins__Pipeline__DataObject__h__
+
+// eof - $RCSfile$