]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Interface/DataObject.h
Widget integration (step 3/6). WARNING: IT DOES NOT COMPILE YET
[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
30     public:
31       Object* GetSource( );
32       const Object* GetSource( ) const;
33       void SetSource( Object* src );
34
35       void DisconnectPipeline( );
36
37       template< class T >
38         inline T* GetITK( );
39
40       template< class T >
41         inline const T* GetITK( ) const;
42
43       template< class T >
44         inline T* GetVTK( );
45
46       template< class T >
47         inline const T* GetVTK( ) const;
48
49     protected:
50       DataObject( );
51       virtual ~DataObject( );
52
53     private:
54       // Purposely not implemented
55       DataObject( const Self& );
56       Self& operator=( const Self& );
57
58     protected:
59       itk::Object::Pointer         m_ITKObject;
60       vtkSmartPointer< vtkObject > m_VTKObject;
61       Object::Pointer              m_Source;
62     };
63
64   } // ecapseman
65
66 } // ecapseman
67
68 #include <cpPlugins/Interface/DataObject.hxx>
69
70 #endif // __CPPLUGINS__INTERFACE__DATAOBJECT__H__
71
72 // eof - $RCSfile$