// delete [] _Comment;
}
+bool GraphBase::EndOfSwitchNode::DecrEndSwitchInPortLinked( GraphBase::InPort * anInPort ) {
+ bool RetVal = true ;
+// if ( !anInPort->BranchOfSwitchLinked() ) {
+ RetVal = anInPort->BranchOfSwitchLinked( true ) ;
+//JR 16.02.2005 : except for DefaultPort
+ if ( !anInPort->IsGate() ) {
+ _EndSwitchInPortLinkedNumber -= 1 ;
+ }
+ cdebug << Name()
+ << "->EndOfSwitchNode::DecrEndSwitchInPortLinked EndSwitchInPortLinkedNumber "
+ << _EndSwitchInPortLinkedNumber << " InPort '" << anInPort->PortName() << "' of "
+ << anInPort->NodeName() << " RetVal " << RetVal << endl ;
+// }
+// else {
+// cdebug << "EndOfSwitchNode::DecrEndSwitchInPortLinked EndSwitchInPortLinkedNumber "
+// << _EndSwitchInPortLinkedNumber << " InPort " << anInPort->PortName()
+// << " already done RetVal " << RetVal << endl ;
+// }
+ return RetVal ;
+}
+
+bool GraphBase::EndOfSwitchNode::CheckEndSwitchInPortsLinked() {
+// Check that all inports of the EndSwitchNode will have a value only once
+ if ( _EndSwitchInPortLinkedNumber != 0 ) {
+ cdebug << Name()
+ << "->EndOfSwitchNode::CheckEndSwitchInPortsLinked EndSwitchInPortLinkedNumber "
+ << _EndSwitchInPortLinkedNumber << endl ;
+ if ( !SwitchWithGOTO() ) {
+ return false ; // Some InPort is not linked
+ }
+ }
+// Check that all inports of the EndSwitchNode are reachable in that branch(es)
+ int i ;
+ for ( i = 0 ; i < GetNodeInPortsSize()-1 ; i++ ) {
+ if ( !GetChangeNodeInPort( i )->IsDataStream() &&
+ !GetChangeNodeInPort( i )->BranchOfSwitchLinked() ) {
+ cdebug << Name() << "->EndOfSwitchNode::CheckEndSwitchInPortsLinked "
+ << GetNodeInPort( i )->PortName() << " have no link in that branch"
+ << endl ;
+ if ( !SwitchWithGOTO() ) {
+ return false ; // that InPort is not linked
+ }
+ }
+ }
+ return true ; // Ok : all InPorts are linked
+}