]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Interface/ProcessObjectPort.cxx
MAC compilation issues solved... Now some tests please
[cpPlugins.git] / lib / cpPlugins / Interface / ProcessObjectPort.cxx
1 #include <cpPlugins/Interface/ProcessObjectPort.h>
2
3 // -------------------------------------------------------------------------
4 cpPlugins::Interface::ProcessObjectPort::
5 ProcessObjectPort( )
6 {
7   this->m_Data = NULL;
8 }
9
10 // -------------------------------------------------------------------------
11 cpPlugins::Interface::ProcessObjectPort::
12 ~ProcessObjectPort( )
13 {
14 }
15
16 // -------------------------------------------------------------------------
17 cpPlugins::Interface::ProcessObjectPort::
18 Self& cpPlugins::Interface::ProcessObjectPort::
19 operator=( DataObject* obj )
20 {
21   this->m_Data = obj;
22   return( *this );
23 }
24
25 // -------------------------------------------------------------------------
26 cpPlugins::Interface::ProcessObjectPort::
27 Self& cpPlugins::Interface::ProcessObjectPort::
28 operator=( const Self& other )
29 {
30   this->m_Data = other.m_Data.GetPointer( );
31   return( *this );
32 }
33
34 // -------------------------------------------------------------------------
35 bool cpPlugins::Interface::ProcessObjectPort::
36 IsValid( ) const
37 {
38   return( this->m_Data.IsNotNull( ) );
39 }
40
41 // -------------------------------------------------------------------------
42 cpPlugins::Interface::InputProcessObjectPort::
43 InputProcessObjectPort( bool required )
44   : Superclass( )
45 {
46 }
47
48 // -------------------------------------------------------------------------
49 cpPlugins::Interface::InputProcessObjectPort::
50 ~InputProcessObjectPort( )
51 {
52 }
53       
54 // -------------------------------------------------------------------------
55 cpPlugins::Interface::InputProcessObjectPort::
56 Self& cpPlugins::Interface::InputProcessObjectPort::
57 operator=( DataObject* obj )
58 {
59   this->Superclass::operator=( obj );
60   return( *this );
61 }
62
63 // -------------------------------------------------------------------------
64 cpPlugins::Interface::InputProcessObjectPort::
65 Self& cpPlugins::Interface::InputProcessObjectPort::
66 operator=( const Superclass& other )
67 {
68   this->Superclass::operator=( other );
69   auto i = dynamic_cast< const InputProcessObjectPort* >( &other );
70   if( i != NULL )
71     this->m_Required = i->m_Required;
72   return( *this );
73 }
74
75 // -------------------------------------------------------------------------
76 bool cpPlugins::Interface::InputProcessObjectPort::
77 IsRequired( ) const
78 {
79   return( this->m_Required );
80 }
81
82 // -------------------------------------------------------------------------
83 void cpPlugins::Interface::InputProcessObjectPort::
84 RequiredOn( )
85 {
86   this->SetRequired( true );
87 }
88
89 // -------------------------------------------------------------------------
90 void cpPlugins::Interface::InputProcessObjectPort::
91 RequiredOff( )
92 {
93   this->SetRequired( false );
94 }
95
96 // -------------------------------------------------------------------------
97 void cpPlugins::Interface::InputProcessObjectPort::
98 SetRequired( bool required )
99 {
100   this->m_Required = required;
101 }
102
103 // -------------------------------------------------------------------------
104 cpPlugins::Interface::OutputProcessObjectPort::
105 OutputProcessObjectPort( )
106   : Superclass( )
107 {
108 }
109
110 // -------------------------------------------------------------------------
111 cpPlugins::Interface::OutputProcessObjectPort::
112 ~OutputProcessObjectPort( )
113 {
114 }
115
116 // -------------------------------------------------------------------------
117 cpPlugins::Interface::OutputProcessObjectPort::
118 Self& cpPlugins::Interface::OutputProcessObjectPort::
119 operator=( DataObject* obj )
120 {
121   this->Superclass::operator=( obj );
122   return( *this );
123 }
124
125 // -------------------------------------------------------------------------
126 cpPlugins::Interface::OutputProcessObjectPort::
127 Self& cpPlugins::Interface::OutputProcessObjectPort::
128 operator=( const Superclass& other )
129 {
130   this->Superclass::operator=( other );
131   return( *this );
132 }
133
134 // eof - $RCSfile$