Salome HOME
Change version name to 3.2.0b1
[modules/superv.git] / src / Supervision / Port_Impl.hxx
1 //  SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
6 //  This library is free software; you can redistribute it and/or 
7 //  modify it under the terms of the GNU Lesser General Public 
8 //  License as published by the Free Software Foundation; either 
9 //  version 2.1 of the License. 
10 // 
11 //  This library is distributed in the hope that it will be useful, 
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
14 //  Lesser General Public License for more details. 
15 // 
16 //  You should have received a copy of the GNU Lesser General Public 
17 //  License along with this library; if not, write to the Free Software 
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : Port_Impl.hxx
25 //  Author : Jean Rahuel
26 //  Module : SUPERV
27 //  $Header: 
28
29 #ifndef _PORT_IMPL_HXX_
30 #define _PORT_IMPL_HXX_
31
32 #include <sstream>
33 #include <iostream>
34
35 #include "CORBA.h"
36
37 #include <SALOMEconfig.h>
38 #include "SALOME_Component_i.hxx"
39 #include "SALOME_LifeCycleCORBA.hxx"
40
41 #include "Value_Impl.hxx"
42 #include "Link_Impl.hxx"
43 #include "FNode_Impl.hxx"
44
45 #include "DataFlowEditor_DataFlow.hxx"
46
47 class Port_Impl : public Value_Impl ,
48                   public POA_SUPERV::Port {
49   private:
50
51     CORBA::ORB_ptr             _Orb ;
52     PortableServer::POA_ptr    _Poa ;
53     PortableServer::ObjectId * _ContId ;
54
55     GraphEditor::DataFlow * _DataFlowEditor ;
56     GraphEditor::InNode *   _DataFlowNode ;
57     GraphBase::Port *       _DataFlowPort ;
58     bool                    _InputPort ;
59
60   public:
61     Port_Impl();
62     Port_Impl( CORBA::ORB_ptr orb ,
63                PortableServer::POA_ptr poa ,
64                PortableServer::ObjectId * contId , 
65                const char *instanceName ,
66                const char *interfaceName ,
67                GraphEditor::DataFlow * DataFlowEditor ,
68                GraphEditor::InNode * DataFlowNode ,
69                GraphBase::Port * DataFlowPort ,
70                bool InputPort ,
71 //               const char *ParameterName ,
72                const CORBA::Any * anAny ) ;
73     Port_Impl( CORBA::ORB_ptr orb ,
74                PortableServer::POA_ptr poa ,
75                PortableServer::ObjectId * contId , 
76                const char *instanceName ,
77                const char *interfaceName ,
78                GraphEditor::DataFlow * DataFlowEditor ,
79                GraphEditor::InNode * DataFlowNode ,
80                GraphBase::Port * DataFlowPort ,
81                bool InputPort ) ;
82 //               const char *ParameterName ) ;
83     virtual ~Port_Impl() ;
84     virtual void destroy() ;
85
86     virtual void Remove() ;
87
88     GraphEditor::DataFlow * DataFlowEditor() {
89                             return _DataFlowEditor ; } ;
90     GraphEditor::InNode * DataFlowNode() {
91                           return _DataFlowNode ; } ;
92     GraphBase::Port * DataFlowPort() {
93                       return _DataFlowPort ; } ;
94
95     virtual bool Input( const SUPERV::Value_ptr aValue ) ;
96     virtual bool Input( const CORBA::Any * anAny ) ;
97
98     virtual char * Name()  ;
99     virtual char * Type()  ;
100
101     virtual SUPERV::CNode_ptr Node()  ;
102
103     virtual SUPERV::Link_ptr Link()  ;
104     virtual SUPERV::ListOfLinks * Links()  ;
105
106     virtual bool IsInput()  ;
107     virtual bool IsLinked()  ;
108     virtual bool HasInput()  ;
109
110     virtual SUPERV::KindOfPort Kind()  ;
111     virtual void SetKind( SUPERV::KindOfPort ) ;
112
113     virtual bool IsParam()  ;
114     virtual bool IsGate()  ;
115     virtual bool IsInLine()  ;
116     virtual bool IsLoop()  ;
117     virtual bool IsSwitch()  ;
118     virtual bool IsEndSwitch()  ;
119     virtual bool IsDataStream()  ;
120
121     virtual SUPERV::GraphState State()  ;
122     virtual bool IsDone()  ;
123
124 } ;
125
126 #endif