]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/BaseObjects/DataObject.h
a09ccdf9ba7a678f87598491cde7055a5b8ce128
[cpPlugins.git] / lib / cpPlugins / BaseObjects / DataObject.h
1 #ifndef __cpPlugins__BaseObjects__DataObject__h__
2 #define __cpPlugins__BaseObjects__DataObject__h__
3
4 #include <cpPlugins/BaseObjects/Object.h>
5
6 namespace cpPlugins
7 {
8   namespace BaseObjects
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       virtual bool IsCompatible( const Self* other ) const;
31
32       ProcessObject* GetSource( );
33       const ProcessObject* GetSource( ) const;
34       void SetSource( ProcessObject* src );
35
36       void DisconnectFromPipeline( );
37
38     protected:
39       DataObject( );
40       virtual ~DataObject( );
41
42       template< class _TType >
43         inline bool _DisconnectVTK( );
44
45     private:
46       // Purposely not implemented
47       DataObject( const Self& );
48       Self& operator=( const Self& );
49
50     protected:
51       ProcessObject* m_Source;
52     };
53
54   } // ecapseman
55
56 } // ecapseman
57
58 #endif // __cpPlugins__BaseObjects__DataObject__h__
59
60 // eof - $RCSfile$