]> SALOME platform Git repositories - modules/superv.git/blob - src/GraphBase/DataFlowBase_InPort.cxx
Salome HOME
This commit was generated by cvs2git to track changes on a CVS vendor
[modules/superv.git] / src / GraphBase / DataFlowBase_InPort.cxx
1 using namespace std;
2 //=============================================================================
3 // File      : DataFlowBase_InPort.cxx
4 // Created   : 2002
5 // Author    : Jean Rahuel, CEA
6 // Project   : SALOME
7 // $Header:
8 //=============================================================================
9
10 #include "DataFlowBase_InPort.hxx"
11 #include "DataFlowBase_OutPort.hxx"
12
13 char ** _PortStateName ;
14
15 GraphBase::InPort::InPort(
16             const char *const * Name  ,
17             const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ,
18             const SUPERV::KindOfPort aKind) :
19           Port( Name , aserviceParameter ) {
20   _OutPort = NULL ;
21   _InitialOutPort = NULL ;
22   Kind( aKind ) ;
23 }
24
25 //GraphBase::InPort::~InPort() {
26 //  cout << "InPort::~InPort()" << endl ;
27 //}
28
29 bool GraphBase::InPort::IsConnected() const {
30   return ( _OutPort != NULL && !_OutPort->IsDataConnected() ) ;
31 }
32
33 bool GraphBase::InPort::IsDataConnected() const {
34   return ( _OutPort != NULL && _OutPort->IsDataConnected() ) ;
35 }
36
37 void GraphBase::InPort::StringValue(ostream & f ) const {
38   if ( _OutPort )
39     _OutPort->StringValue( f ) ;
40   else
41     f << "(undefined)" ;
42 }
43
44 ostream & operator<< (ostream &f ,const GraphBase::InPort &P) {
45   f << P.PortName() << ", " 
46     << "type : " << P.PortType() << ", " ;
47   f << "from "
48     << P.NodeName() << ", ";
49
50   return f;
51 }
52