Salome HOME
*** empty log message ***
authorrahuel <rahuel@opencascade.com>
Wed, 7 Sep 2005 07:00:56 +0000 (07:00 +0000)
committerrahuel <rahuel@opencascade.com>
Wed, 7 Sep 2005 07:00:56 +0000 (07:00 +0000)
examples/GraphEditGraphSwitchs.py
examples/GraphSwitchs.py

index 9dff962f47d87284e2aef6ef539b48945d897df9..9894daeb03c868160d7b1332f1a869b8fa3a664b 100644 (file)
@@ -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')
 
index ceeeb175b66eac78d99e3209fb1595ee6e6064ae..25503cc9dd4e4cd30abfa599a0afa2723b196fa2 100755 (executable)
@@ -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()