+bool GraphBase::EndOfSwitchNode::CheckEndSwitchInPortsLinked( string & anErrorMessage ) {
+ bool RetVal = true ;
+ bool DefaultNotLinked = false ;
+// Check that all inports of the EndSwitchNode are reachable in that branch(es)
+ int i ;
+//JR 06.07.2005 : the InGatePort must also be counted now (enhancement) ...
+// for ( i = 0 ; i < GetNodeInPortsSize()-1 ; i++ ) {
+ for ( i = 0 ; i < GetNodeInPortsSize() ; i++ ) {
+ GraphBase::InPort * anInPort = GetChangeNodeInPort( i ) ;
+ if ( !anInPort->IsDataStream() && !anInPort->BranchOfSwitchLinked() ) {
+ cdebug << Name() << "->EndOfSwitchNode::CheckEndSwitchInPortsLinked "
+ << anInPort->PortName() << " have no link in that branch"
+ << " SwitchWithGOTO() " << SwitchWithGOTO() << endl ;
+ if ( !SwitchWithGOTO() ) {
+ anErrorMessage = anErrorMessage + string( Name() ) + string( "( " ) +
+ string( anInPort->PortName() ) +
+ string( " ) has no link from that branch.\n" ) ;
+ if ( anInPort->IsGate() ) {
+ DefaultNotLinked = true ;
+ }
+ else {
+ RetVal = false ; // that InPort is not linked
+ }
+ }
+ }
+ }