From: rahuel Date: Wed, 7 Sep 2005 07:00:56 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: V3_1_0a1~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=49530cdaa9ce44739d820e3a5d3dbff8070e5807;p=modules%2Fsuperv.git *** empty log message *** --- diff --git a/examples/GraphEditGraphSwitchs.py b/examples/GraphEditGraphSwitchs.py index 9dff962..9894dae 100644 --- a/examples/GraphEditGraphSwitchs.py +++ b/examples/GraphEditGraphSwitchs.py @@ -9,21 +9,26 @@ InitLoopSwitch.destroy() GraphEditSwitchs.Export('/sal_01/salome/SalomePALHead_15_11_2004/SUPERV_SRC/examples/GraphEditGraphSwitchs_1.py') -exec InitLoop.ListPorts() +InitLoop.SetName('InitLoopSwitch') +InitLoopSwitch = InitLoop +EndOfInitLoop.SetName('EndOfInitLoopSwitch') +EndOfInitLoopSwitch = EndOfInitLoop + +exec InitLoopSwitch.ListPorts() exec Switch.ListPorts() -GraphEditSwitchs.Link( OInitLoopIndex , ISwitcha ) +GraphEditSwitchs.Link( OInitLoopSwitchIndex , ISwitcha ) -exec EndOfInitLoop.ListPorts() -IEndOfInitLoopIndex.Link().destroy() +exec EndOfInitLoopSwitch.ListPorts() +IEndOfInitLoopSwitchIndex.Link().destroy() GraphEditSwitchs.Export('/sal_01/salome/SalomePALHead_15_11_2004/SUPERV_SRC/examples/GraphEditGraphSwitchs_2.py') exec EndOfSwitch.ListPorts() -GraphEditSwitchs.Link(OEndOfSwitcha,IEndOfInitLoopIndex) +GraphEditSwitchs.Link(OEndOfSwitcha,IEndOfInitLoopSwitchIndex) exec EndSwitch.ListPorts() -GraphEditSwitchs.Link(OEndSwitchGate,IEndOfInitLoopGate) +GraphEditSwitchs.Link(OEndSwitchGate,IEndOfInitLoopSwitchGate) GraphEditSwitchs.Export('/sal_01/salome/SalomePALHead_15_11_2004/SUPERV_SRC/examples/GraphEditGraphSwitchs_3.py') diff --git a/examples/GraphSwitchs.py b/examples/GraphSwitchs.py index ceeeb17..25503cc 100755 --- a/examples/GraphSwitchs.py +++ b/examples/GraphSwitchs.py @@ -1,15 +1,15 @@ -# Generated python file of Graph GraphSwitchs_1 +# Generated python file of Graph GraphSwitchs from SuperV import * -# Graph creation of GraphSwitchs_1 -def DefGraphSwitchs_1() : - GraphSwitchs_1 = Graph( 'GraphSwitchs_1' ) - GraphSwitchs_1.SetName( 'GraphSwitchs_1' ) - GraphSwitchs_1.SetAuthor( '' ) - GraphSwitchs_1.SetComment( '' ) - GraphSwitchs_1.Coords( 0 , 0 ) +# Graph creation of GraphSwitchs +def DefGraphSwitchs() : + GraphSwitchs = Graph( 'GraphSwitchs' ) + GraphSwitchs.SetName( 'GraphSwitchs' ) + GraphSwitchs.SetAuthor( '' ) + GraphSwitchs.SetComment( '' ) + GraphSwitchs.Coords( 0 , 0 ) # Creation of Factory Nodes @@ -20,7 +20,7 @@ def DefGraphSwitchs_1() : PyIsOdd.append( ' print a,"IsOdd (GraphSwitchs)" ' ) PyIsOdd.append( ' sleep( 1 ) ' ) PyIsOdd.append( ' return a ' ) - IsOdd = GraphSwitchs_1.INode( 'IsOdd' , PyIsOdd ) + IsOdd = GraphSwitchs.INode( 'IsOdd' , PyIsOdd ) IsOdd.SetName( 'IsOdd' ) IsOdd.SetAuthor( '' ) IsOdd.SetComment( 'Python function' ) @@ -36,7 +36,7 @@ def DefGraphSwitchs_1() : PyIsOdd_1.append( ' print a,"IsOdd_1 (GraphSwitchs)" ' ) PyIsOdd_1.append( ' sleep( 1 ) ' ) PyIsOdd_1.append( ' return a ' ) - IsOdd_1 = GraphSwitchs_1.INode( 'IsOdd' , PyIsOdd_1 ) + IsOdd_1 = GraphSwitchs.INode( 'IsOdd' , PyIsOdd_1 ) IsOdd_1.SetName( 'IsOdd_1' ) IsOdd_1.SetAuthor( '' ) IsOdd_1.SetComment( 'Python function' ) @@ -61,7 +61,7 @@ def DefGraphSwitchs_1() : PyNextInitLoopSwitch.append( 'def NextLoop(Index,Min,Max) : ' ) PyNextInitLoopSwitch.append( ' Index = Index + 1 ' ) PyNextInitLoopSwitch.append( ' return Index,Min,Max ' ) - InitLoopSwitch,EndOfInitLoopSwitch = GraphSwitchs_1.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) + InitLoopSwitch,EndOfInitLoopSwitch = GraphSwitchs.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' ) EndOfInitLoopSwitch.SetAuthor( '' ) EndOfInitLoopSwitch.SetComment( 'Compute Node' ) @@ -107,7 +107,7 @@ def DefGraphSwitchs_1() : PyNextInitLoop.append( 'def NextLoop(Index,Min,Max) : ' ) PyNextInitLoop.append( ' Index = Index + 1 ' ) PyNextInitLoop.append( ' return Index,Min,Max ' ) - InitLoop,EndOfInitLoop = GraphSwitchs_1.LNode( 'InitLoop' , PyInitLoop , 'MoreLoop' , PyMoreInitLoop , 'NextLoop' , PyNextInitLoop ) + InitLoop,EndOfInitLoop = GraphSwitchs.LNode( 'InitLoop' , PyInitLoop , 'MoreLoop' , PyMoreInitLoop , 'NextLoop' , PyNextInitLoop ) EndOfInitLoop.SetName( 'EndOfInitLoop' ) EndOfInitLoop.SetAuthor( '' ) EndOfInitLoop.SetComment( 'Compute Node' ) @@ -146,7 +146,7 @@ def DefGraphSwitchs_1() : PySwitch.append( ' if ( a & 1 ) == 0 : ' ) PySwitch.append( ' sleep(1) ' ) PySwitch.append( ' return a & 1,1-(a&1),a ' ) - Switch,EndOfSwitch = GraphSwitchs_1.SNode( 'Switch' , PySwitch ) + Switch,EndOfSwitch = GraphSwitchs.SNode( 'Switch' , PySwitch ) EndOfSwitch.SetName( 'EndOfSwitch' ) EndOfSwitch.SetAuthor( '' ) EndOfSwitch.SetComment( 'Compute Node' ) @@ -174,7 +174,7 @@ def DefGraphSwitchs_1() : PySwitch_1.append( ' if ( a & 1 ) == 0 : ' ) PySwitch_1.append( ' sleep(1) ' ) PySwitch_1.append( ' return a & 1,1-(a&1),a ' ) - Switch_1,EndSwitch = GraphSwitchs_1.SNode( 'Switch' , PySwitch_1 ) + Switch_1,EndSwitch = GraphSwitchs.SNode( 'Switch' , PySwitch_1 ) EndSwitch.SetName( 'EndSwitch' ) EndSwitch.SetAuthor( '' ) EndSwitch.SetComment( 'Compute Node' ) @@ -197,47 +197,47 @@ def DefGraphSwitchs_1() : OSwitch_1Default = Switch_1.GetOutPort( 'Default' ) # Creation of Links - LIsOddaEndOfSwitcha = GraphSwitchs_1.Link( OIsOdda , IEndOfSwitcha ) + LIsOddaEndOfSwitcha = GraphSwitchs.Link( OIsOdda , IEndOfSwitcha ) LIsOddaEndOfSwitcha.AddCoord( 1 , 573 , 160 ) LIsOddaEndOfSwitcha.AddCoord( 2 , 572 , 130 ) - LInitLoopSwitchIndexSwitcha = GraphSwitchs_1.Link( OInitLoopSwitchIndex , ISwitcha ) + LInitLoopSwitchIndexSwitcha = GraphSwitchs.Link( OInitLoopSwitchIndex , ISwitcha ) - LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitchs_1.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) + LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitchs.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) - LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitchs_1.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) + LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitchs.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) - LSwitchOddIsOddGate = GraphSwitchs_1.Link( OSwitchOdd , IIsOddGate ) + LSwitchOddIsOddGate = GraphSwitchs.Link( OSwitchOdd , IIsOddGate ) - LSwitchaIsOdda = GraphSwitchs_1.Link( OSwitcha , IIsOdda ) + LSwitchaIsOdda = GraphSwitchs.Link( OSwitcha , IIsOdda ) LSwitchaIsOdda.AddCoord( 1 , 365 , 129 ) LSwitchaIsOdda.AddCoord( 2 , 365 , 222 ) - LSwitchDefaultEndOfSwitchDefault = GraphSwitchs_1.Link( OSwitchDefault , IEndOfSwitchDefault ) + LSwitchDefaultEndOfSwitchDefault = GraphSwitchs.Link( OSwitchDefault , IEndOfSwitchDefault ) LSwitchDefaultEndOfSwitchDefault.AddCoord( 1 , 572 , 194 ) LSwitchDefaultEndOfSwitchDefault.AddCoord( 2 , 571 , 257 ) - LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitchs_1.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) + LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitchs.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) - LIsOdd_1aEndSwitcha = GraphSwitchs_1.Link( OIsOdd_1a , IEndSwitcha ) + LIsOdd_1aEndSwitcha = GraphSwitchs.Link( OIsOdd_1a , IEndSwitcha ) LIsOdd_1aEndSwitcha.AddCoord( 1 , 599 , 416 ) LIsOdd_1aEndSwitcha.AddCoord( 2 , 598 , 389 ) - LInitLoopIndexSwitch_1a = GraphSwitchs_1.Link( OInitLoopIndex , ISwitch_1a ) + LInitLoopIndexSwitch_1a = GraphSwitchs.Link( OInitLoopIndex , ISwitch_1a ) - LInitLoopMinEndOfInitLoopMin = GraphSwitchs_1.Link( OInitLoopMin , IEndOfInitLoopMin ) + LInitLoopMinEndOfInitLoopMin = GraphSwitchs.Link( OInitLoopMin , IEndOfInitLoopMin ) - LInitLoopMaxEndOfInitLoopMax = GraphSwitchs_1.Link( OInitLoopMax , IEndOfInitLoopMax ) + LInitLoopMaxEndOfInitLoopMax = GraphSwitchs.Link( OInitLoopMax , IEndOfInitLoopMax ) - LSwitch_1OddIsOdd_1Gate = GraphSwitchs_1.Link( OSwitch_1Odd , IIsOdd_1Gate ) + LSwitch_1OddIsOdd_1Gate = GraphSwitchs.Link( OSwitch_1Odd , IIsOdd_1Gate ) - LSwitch_1EvenEndSwitchDefault = GraphSwitchs_1.Link( OSwitch_1Even , IEndSwitchDefault ) + LSwitch_1EvenEndSwitchDefault = GraphSwitchs.Link( OSwitch_1Even , IEndSwitchDefault ) - LSwitch_1aIsOdd_1a = GraphSwitchs_1.Link( OSwitch_1a , IIsOdd_1a ) + LSwitch_1aIsOdd_1a = GraphSwitchs.Link( OSwitch_1a , IIsOdd_1a ) LSwitch_1aIsOdd_1a.AddCoord( 1 , 379 , 387 ) LSwitch_1aIsOdd_1a.AddCoord( 2 , 378 , 481 ) - LEndSwitchaEndOfInitLoopIndex = GraphSwitchs_1.Link( OEndSwitcha , IEndOfInitLoopIndex ) + LEndSwitchaEndOfInitLoopIndex = GraphSwitchs.Link( OEndSwitcha , IEndOfInitLoopIndex ) # Input datas IInitLoopSwitchIndex.Input( 0 ) @@ -255,7 +255,7 @@ def DefGraphSwitchs_1() : #OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' ) #OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' ) #OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' ) - return GraphSwitchs_1 + return GraphSwitchs -GraphSwitchs_1 = DefGraphSwitchs_1() +GraphSwitchs = DefGraphSwitchs()