1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl
23 // File : Port_Impl.hxx
24 // Author : Jean Rahuel
28 #ifndef _PORT_IMPL_HXX_
29 #define _PORT_IMPL_HXX_
36 #include <SALOMEconfig.h>
37 #include "SALOME_Component_i.hxx"
38 #include "SALOME_LifeCycleCORBA.hxx"
40 #include "Value_Impl.hxx"
41 #include "Link_Impl.hxx"
42 #include "FNode_Impl.hxx"
44 #include "DataFlowEditor_DataFlow.hxx"
46 class Port_Impl : public Value_Impl ,
47 public POA_SUPERV::Port {
51 PortableServer::POA_ptr _Poa ;
52 PortableServer::ObjectId * _ContId ;
54 GraphEditor::DataFlow * _DataFlowEditor ;
55 GraphEditor::InNode * _DataFlowNode ;
56 GraphBase::Port * _DataFlowPort ;
61 Port_Impl( CORBA::ORB_ptr orb ,
62 PortableServer::POA_ptr poa ,
63 PortableServer::ObjectId * contId ,
64 const char *instanceName ,
65 const char *interfaceName ,
66 GraphEditor::DataFlow * DataFlowEditor ,
67 GraphEditor::InNode * DataFlowNode ,
68 GraphBase::Port * DataFlowPort ,
70 // const char *ParameterName ,
71 const CORBA::Any * anAny ) ;
72 Port_Impl( CORBA::ORB_ptr orb ,
73 PortableServer::POA_ptr poa ,
74 PortableServer::ObjectId * contId ,
75 const char *instanceName ,
76 const char *interfaceName ,
77 GraphEditor::DataFlow * DataFlowEditor ,
78 GraphEditor::InNode * DataFlowNode ,
79 GraphBase::Port * DataFlowPort ,
81 // const char *ParameterName ) ;
82 virtual ~Port_Impl() ;
83 virtual void destroy() ;
85 virtual void Remove() ;
87 GraphEditor::DataFlow * DataFlowEditor() {
88 return _DataFlowEditor ; } ;
89 GraphEditor::InNode * DataFlowNode() {
90 return _DataFlowNode ; } ;
91 GraphBase::Port * DataFlowPort() {
92 return _DataFlowPort ; } ;
94 virtual bool Input( const SUPERV::Value_ptr aValue ) ;
95 virtual bool Input( const CORBA::Any * anAny ) ;
97 virtual char * Name() ;
98 virtual char * Type() ;
100 virtual SUPERV::CNode_ptr Node() ;
102 virtual SUPERV::Link_ptr Link() ;
103 virtual SUPERV::ListOfLinks * Links() ;
105 virtual bool IsInput() ;
106 virtual bool IsLinked() ;
107 virtual bool HasInput() ;
109 virtual SUPERV::KindOfPort Kind() ;
110 virtual void SetKind( SUPERV::KindOfPort ) ;
112 virtual bool IsParam() ;
113 virtual bool IsGate() ;
114 virtual bool IsInLine() ;
115 virtual bool IsLoop() ;
116 virtual bool IsSwitch() ;
117 virtual bool IsEndSwitch() ;
118 virtual bool IsDataStream() ;
120 virtual SUPERV::GraphState State() ;
121 virtual bool IsDone() ;