]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Interface/DataObject.h
Widget integration (step 5/6): generic widget controller finished and tested on linux...
[cpPlugins.git] / lib / cpPlugins / Interface / DataObject.h
1 #ifndef __CPPLUGINS__INTERFACE__DATAOBJECT__H__
2 #define __CPPLUGINS__INTERFACE__DATAOBJECT__H__
3
4 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
5 #include <cpPlugins/Interface/Object.h>
6
7 #include <itkObject.h>
8
9 #include <vtkSmartPointer.h>
10 #include <vtkObject.h>
11
12 namespace cpPlugins
13 {
14   namespace Interface
15   {
16     /**
17      */
18     class cpPlugins_Interface_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       itkTypeMacro( DataObject, Object );
29       cpPlugins_Id_Macro(
30         cpPlugins::Interface::DataObject, "BasicObject"
31         );
32
33     public:
34       Object* GetSource( );
35       const Object* GetSource( ) const;
36       void SetSource( Object* src );
37
38       void DisconnectPipeline( );
39
40       template< class T >
41         inline T* GetITK( );
42
43       template< class T >
44         inline const T* GetITK( ) const;
45
46       template< class T >
47         inline T* GetVTK( );
48
49       template< class T >
50         inline const T* GetVTK( ) const;
51
52     protected:
53       DataObject( );
54       virtual ~DataObject( );
55
56     private:
57       // Purposely not implemented
58       DataObject( const Self& );
59       Self& operator=( const Self& );
60
61     protected:
62       itk::Object::Pointer         m_ITKObject;
63       vtkSmartPointer< vtkObject > m_VTKObject;
64       Object::Pointer              m_Source;
65     };
66
67   } // ecapseman
68
69 } // ecapseman
70
71 #include <cpPlugins/Interface/DataObject.hxx>
72
73 #endif // __CPPLUGINS__INTERFACE__DATAOBJECT__H__
74
75 // eof - $RCSfile$