1 // SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : Port_Impl.hxx
25 // Author : Jean Rahuel
29 #ifndef _PORT_IMPL_HXX_
30 #define _PORT_IMPL_HXX_
37 #include <SALOMEconfig.h>
38 #include "SALOME_Component_i.hxx"
39 #include "SALOME_LifeCycleCORBA.hxx"
41 #include "Value_Impl.hxx"
42 #include "Link_Impl.hxx"
43 #include "FNode_Impl.hxx"
45 #include "DataFlowEditor_DataFlow.hxx"
47 class Port_Impl : public Value_Impl ,
48 public POA_SUPERV::Port {
52 PortableServer::POA_ptr _Poa ;
53 PortableServer::ObjectId * _ContId ;
55 GraphEditor::DataFlow * _DataFlowEditor ;
56 GraphEditor::InNode * _DataFlowNode ;
57 GraphBase::Port * _DataFlowPort ;
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 ,
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 ,
82 // const char *ParameterName ) ;
83 virtual ~Port_Impl() ;
84 virtual void destroy() ;
86 virtual void Remove() ;
88 GraphEditor::DataFlow * DataFlowEditor() {
89 return _DataFlowEditor ; } ;
90 GraphEditor::InNode * DataFlowNode() {
91 return _DataFlowNode ; } ;
92 GraphBase::Port * DataFlowPort() {
93 return _DataFlowPort ; } ;
95 virtual bool Input( const SUPERV::Value_ptr aValue ) ;
96 virtual bool Input( const CORBA::Any * anAny ) ;
98 virtual char * Name() ;
99 virtual char * Type() ;
101 virtual SUPERV::CNode_ptr Node() ;
103 virtual SUPERV::Link_ptr Link() ;
104 virtual SUPERV::ListOfLinks * Links() ;
106 virtual bool IsInput() ;
107 virtual bool IsLinked() ;
108 virtual bool HasInput() ;
110 virtual SUPERV::KindOfPort Kind() ;
111 virtual void SetKind( SUPERV::KindOfPort ) ;
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() ;
121 virtual SUPERV::GraphState State() ;
122 virtual bool IsDone() ;