]> SALOME platform Git repositories - modules/superv.git/blob - src/Supervision/Port_Impl.hxx
Salome HOME
NRI : Merge from V1_2.
[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 <iostream.h>
33
34 #include "CORBA.h"
35
36 #include <SALOMEconfig.h>
37 #include "SALOME_Component_i.hxx"
38 #include "SALOME_LifeCycleCORBA.hxx"
39
40 #include "Value_Impl.hxx"
41 #include "Link_Impl.hxx"
42 #include "FNode_Impl.hxx"
43
44 #include "DataFlowEditor_DataFlow.hxx"
45
46 class Port_Impl : public Value_Impl ,
47                   public POA_SUPERV::Port {
48   private:
49
50     CORBA::ORB_ptr             _Orb ;
51     PortableServer::POA_ptr    _Poa ;
52     PortableServer::ObjectId * _ContId ;
53
54     GraphEditor::DataFlow * _DataFlowEditor ;
55     GraphEditor::InNode *   _DataFlowNode ;
56     GraphBase::Port *       _DataFlowPort ;
57     bool                    _InputPort ;
58
59   public:
60     Port_Impl();
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 ,
69                bool InputPort ,
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 ,
80                bool InputPort ) ;
81 //               const char *ParameterName ) ;
82     virtual ~Port_Impl() ;
83     virtual void destroy() ;
84
85     virtual bool Input( const SUPERV::Value_ptr aValue ) ;
86     virtual bool Input( const CORBA::Any * anAny ) ;
87
88     virtual char * Name() ;
89     virtual char * Type() ;
90
91     virtual SUPERV::CNode_ptr Node() ;
92
93     virtual SUPERV::Link_ptr Link() ;
94     virtual SUPERV::ListOfLinks * Links() ;
95
96     virtual bool IsInput() ;
97     virtual bool IsLinked() ;
98     virtual bool HasInput() ;
99
100     virtual SUPERV::KindOfPort Kind() ;
101     virtual bool IsParam() ;
102     virtual bool IsGate() ;
103     virtual bool IsInLine() ;
104     virtual bool IsLoop() ;
105     virtual bool IsSwitch() ;
106     virtual bool IsEndSwitch() ;
107
108     virtual SUPERV::GraphState State() ;
109     virtual bool IsDone() ;
110
111 } ;
112
113 #endif