2 # Generated python file of Graph GraphLoop
6 GraphLoop = Graph( 'GraphLoop' )
7 GraphLoop.SetName( 'GraphLoop' )
8 GraphLoop.SetAuthor( '' )
9 GraphLoop.SetComment( '' )
10 GraphLoop.Coords( 0 , 0 )
12 # Creation of Factory Nodes
14 # Creation of Loop Nodes
16 PyInit.append( 'def Init(Index,Min,Max,Incr) : ' )
17 PyInit.append( ' if Min <= Max : ' )
18 PyInit.append( ' Index = Min ' )
19 PyInit.append( ' else : ' )
20 PyInit.append( ' Index = Max ' )
21 PyInit.append( ' return Index,Min,Max,Incr ' )
23 PyMoreInit.append( 'def More(Index,Min,Max,Incr) : ' )
24 PyMoreInit.append( ' if Index < Max : ' )
25 PyMoreInit.append( ' DoLoop = 1 ' )
26 PyMoreInit.append( ' else : ' )
27 PyMoreInit.append( ' DoLoop = 0 ' )
28 PyMoreInit.append( ' return DoLoop,Index,Min,Max,Incr ' )
30 PyNextInit.append( 'def Next(Index,Min,Max,Incr) : ' )
31 PyNextInit.append( ' Index = Index + Incr ' )
32 PyNextInit.append( ' return Index,Min,Max,Incr ' )
33 Init,EndInit = GraphLoop.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit )
34 EndInit.SetName( 'EndInit' )
35 EndInit.SetAuthor( '' )
36 EndInit.SetComment( '' )
37 EndInit.Coords( 314 , 91 )
38 Init.InPort( 'Index' , 'long' )
39 Init.InPort( 'Min' , 'long' )
40 Init.InPort( 'Max' , 'long' )
41 Init.InPort( 'Incr' , 'long' )
42 Init.OutPort( 'Index' , 'long' )
43 Init.OutPort( 'Min' , 'long' )
44 Init.OutPort( 'Max' , 'long' )
45 Init.OutPort( 'Incr' , 'long' )
46 Init.SetName( 'Init' )
49 Init.Coords( 31 , 74 )
52 InitIndex = Init.Port( 'Index' )
53 EndInitIndex = GraphLoop.Link( InitIndex , EndInit.Port( 'Index' ) )
55 InitMin = Init.Port( 'Min' )
56 EndInitMin = GraphLoop.Link( InitMin , EndInit.Port( 'Min' ) )
58 InitMax = Init.Port( 'Max' )
59 EndInitMax = GraphLoop.Link( InitMax , EndInit.Port( 'Max' ) )
61 InitIncr = Init.Port( 'Incr' )
62 EndInitIncr = GraphLoop.Link( InitIncr , EndInit.Port( 'Incr' ) )
64 # Creation of Input datas
65 InitIndex = Init.Input( 'Index' , 0)
66 InitMin = Init.Input( 'Min' , 0)
67 InitMax = Init.Input( 'Max' , 1000)
68 InitIncr = Init.Input( 'Incr' , 1)
70 # Creation of Output variables
71 EndInitIndex = EndInit.Port( 'Index' )
72 EndInitMin = EndInit.Port( 'Min' )
73 EndInitMax = EndInit.Port( 'Max' )
74 EndInitIncr = EndInit.Port( 'Incr' )
80 GraphLoop.PrintPorts()