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