1 // SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
3 // Copyright (C) 2003 CEA/DEN, EDF R&D
7 // File : DataFlowBase_EndOfSwitchNode.hxx
8 // Author : Jean Rahuel, CEA
12 #ifndef _DATAFLOWBASE_ENDOFSWITCHNODE_HXX
13 #define _DATAFLOWBASE_ENDOFSWITCHNODE_HXX
15 #include "DataFlowBase_GOTONode.hxx"
19 class EndOfSwitchNode : public GOTONode {
23 int _EndSwitchInPortLinkedNumber ; // For Check from Branches to EndOfSwitch links
24 bool _SwitchWithGOTO ;
29 EndOfSwitchNode( CORBA::ORB_ptr ORB ,
30 SALOME_NamingService* ptrNamingService ,
31 const char * FuncName ,
32 const SUPERV::ListOfStrings & aPythonFunction ,
33 const char *NodeName ,
34 const SUPERV::KindOfNode akind ,
35 const SUPERV::SDate NodeFirstCreation ,
36 const SUPERV::SDate NodeLastModification ,
37 const char * NodeEditorRelease ,
38 const char * NodeAuthor ,
39 const char * NodeComment ,
40 const bool GeneratedName ,
43 int * Graph_prof_debug = NULL ,
44 ofstream * Graph_fdebug = NULL ) ;
45 virtual ~EndOfSwitchNode() ;
47 void InitEndSwitchInPortLinked() { // without StreamInPorts and Default
48 _EndSwitchInPortLinkedNumber = GetNodeInPortsSize() - DataStreamInPortsNumber() - 1 ;
49 _SwitchWithGOTO = false ;
51 for ( i = 0 ; i < GetNodeInPortsSize()-1 ; i++ ) {
52 GetChangeNodeInPort( i )->BranchOfSwitchLinked( false ) ;
54 bool DecrEndSwitchInPortLinked( GraphBase::InPort * anInPort ) ;
55 void SetSwitchWithGOTO() {
56 _SwitchWithGOTO = true ; } ;
57 bool SwitchWithGOTO() {
58 return _SwitchWithGOTO ; } ;
59 bool CheckEndSwitchInPortsLinked() ;