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