]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/DataObject.h
998a91487697e7cfd65faa8f98400753cfa9c059
[cpPlugins.git] / lib / cpPlugins / DataObject.h
1 #ifndef __CPPLUGINS__DATAOBJECT__H__
2 #define __CPPLUGINS__DATAOBJECT__H__
3
4 #include <cpPlugins/Object.h>
5
6 // Some forward declarations
7 class vtkProp;
8
9 namespace cpPlugins
10 {
11   // Some forward declarations
12   class ProcessObject;
13
14   /**
15    */
16   class cpPlugins_EXPORT DataObject
17     : public Object
18   {
19   public:
20     typedef DataObject                      Self;
21     typedef Object                          Superclass;
22     typedef itk::SmartPointer< Self >       Pointer;
23     typedef itk::SmartPointer< const Self > ConstPointer;
24
25   public:
26     itkNewMacro( Self );
27     itkTypeMacro( DataObject, Object );
28     cpPlugins_Id_Macro( DataObject, Object );
29
30   public:
31     ProcessObject* GetSource( );
32     const ProcessObject* GetSource( ) const;
33     void SetSource( ProcessObject* src );
34
35     void DisconnectFromPipeline( );
36
37     // VTK actors
38     vtkProp* GetVTKActor( );
39     const vtkProp* GetVTKActor( ) const;
40
41   protected:
42     DataObject( );
43     virtual ~DataObject( );
44
45     virtual void _CreateVTKActor( ) const;
46
47   private:
48     // Purposely not implemented
49     DataObject( const Self& );
50     Self& operator=( const Self& );
51
52   protected:
53     ProcessObject*   m_Source;
54     mutable vtkProp* m_Actor;
55   };
56
57 } // ecapseman
58
59 #endif // __CPPLUGINS__DATAOBJECT__H__
60
61 // eof - $RCSfile$