X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGraphBase%2FDataFlowBase_InPort.hxx;h=89217ab92de84f71768599827720291c1d53288c;hb=e4d6874f90bf74b83f454d8b502018cec08270af;hp=51224a345e966ad6d18bd0966b7e0d3ea0adeed8;hpb=bae06cd3bdae2ac2acb878e96689b2ea283aad23;p=modules%2Fsuperv.git diff --git a/src/GraphBase/DataFlowBase_InPort.hxx b/src/GraphBase/DataFlowBase_InPort.hxx index 51224a3..89217ab 100644 --- a/src/GraphBase/DataFlowBase_InPort.hxx +++ b/src/GraphBase/DataFlowBase_InPort.hxx @@ -39,9 +39,10 @@ namespace GraphBase { private: - SUPERV::GraphState _State ; + SUPERV::GraphState _PortState ; OutPort * _OutPort ; OutPort * _InitialOutPort ; + bool _BranchOfSwitchLinked ; // For Check from Branches to EndOfSwitch links public: @@ -58,31 +59,32 @@ namespace GraphBase { cdebug << "GraphBase::InPort::destroy " << PortName() << " " << NodeName() << endl ; } ; - void State( SUPERV::GraphState aState ) { + void PortState( SUPERV::GraphState aPortState ) { // cdebug << pthread_self() << " " << PortName() << " from " // << NodeName() << " SUPERV::GraphState " << _State << " " -// << " --> " << aState << " _EndSwitchPort " +// << " --> " << aPortState << " _EndSwitchPort " // << IsEndSwitch() << endl ; - _State = aState ; } ; - SUPERV::GraphState State() { return _State ; } ; + _PortState = aPortState ; } ; + SUPERV::GraphState PortState() { return _PortState ; } ; OutPort * GetOutPort() { return _OutPort ; } ; OutPort * GetOutPort() const { return _OutPort ; } ; - bool IsConnected() const ; + const StatusOfPort PortStatus() const ; + + bool IsNotConnected() const ; +// bool IsConnected() const ; + bool IsPortConnected() const ; bool IsDataConnected() const ; + bool IsExternConnected() const ; + bool AddOutPort( OutPort * anOutPort ) { if ( _OutPort ) return false ; _OutPort = anOutPort ; return true ; } ; - bool ChangeOutPort( OutPort * anOutPort ) { - if ( _InitialOutPort == NULL ) { - _InitialOutPort = _OutPort ; - } - _OutPort = anOutPort ; - return true ; } ; + bool ChangeOutPort( OutPort * anOutPort ) ; bool InitialOutPort() { if ( _InitialOutPort ) { _OutPort = _InitialOutPort ; @@ -90,11 +92,16 @@ namespace GraphBase { return true ; } return false ; } ; - bool RemoveOutPort() { - if ( _OutPort == NULL ) - return false ; - _OutPort = NULL ; - return RemoveCoords() ; } ; + bool RemoveOutPort() ; + + bool BranchOfSwitchLinked( bool aInPortLinked ) { + if ( aInPortLinked && _BranchOfSwitchLinked ) { + return false ; // Already setted + } + _BranchOfSwitchLinked = aInPortLinked ; + return true ; } ; + bool BranchOfSwitchLinked() { + return _BranchOfSwitchLinked ; } ; void StringValue(ostream & f ) const ; @@ -104,4 +111,6 @@ namespace GraphBase { ostream & operator<< (ostream &,const GraphBase::InPort &); +ostream & operator<< (ostream &,const SUPERV::GraphState &); + #endif