1 # Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
3 # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2.1 of the License.
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Lesser General Public License for more details.
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 # Generated python file of Graph GraphLoopMemory_1
26 # Graph creation of GraphLoopMemory_1
27 def DefGraphLoopMemory_1() :
28 GraphLoopMemory_1 = Graph( 'GraphLoopMemory_1' )
29 GraphLoopMemory_1.SetName( 'GraphLoopMemory_1' )
30 GraphLoopMemory_1.SetAuthor( 'JR' )
31 GraphLoopMemory_1.SetComment( 'For solving of memory leaks' )
32 GraphLoopMemory_1.Coords( 0 , 0 )
34 # Creation of Factory Nodes
36 # Creation of Loop Nodes
38 PyInit.append( 'def Init(Index,Min,Max,Incr) : ' )
39 PyInit.append( ' if Min <= Max : ' )
40 PyInit.append( ' Index = Min ' )
41 PyInit.append( ' else : ' )
42 PyInit.append( ' Index = Max ' )
43 PyInit.append( ' return Index,Min,Max,Incr ' )
45 PyMoreInit.append( 'def More(Index,Min,Max,Incr) : ' )
46 PyMoreInit.append( ' if Index < Max : ' )
47 PyMoreInit.append( ' DoLoop = 1 ' )
48 PyMoreInit.append( ' else : ' )
49 PyMoreInit.append( ' DoLoop = 0 ' )
50 PyMoreInit.append( ' return DoLoop,Index,Min,Max,Incr ' )
52 PyNextInit.append( 'def Next(Index,Min,Max,Incr) : ' )
53 PyNextInit.append( ' Index = Index + Incr ' )
54 PyNextInit.append( ' return Index,Min,Max,Incr ' )
55 Init,EndInit = GraphLoopMemory_1.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit )
56 EndInit.SetName( 'EndInit' )
57 EndInit.SetAuthor( '' )
58 EndInit.SetComment( 'Compute Node' )
59 EndInit.Coords( 366 , 262 )
61 EndInit.SetPyFunction( '' , PyEndInit )
62 IInitDoLoop = Init.GetInPort( 'DoLoop' )
63 IInitIndex = Init.InPort( 'Index' , 'long' )
64 IInitMin = Init.InPort( 'Min' , 'long' )
65 IInitMax = Init.InPort( 'Max' , 'long' )
66 IInitIncr = Init.InPort( 'Incr' , 'long' )
67 IInitGate = Init.GetInPort( 'Gate' )
68 OInitDoLoop = Init.GetOutPort( 'DoLoop' )
69 OInitIndex = Init.GetOutPort( 'Index' )
70 OInitMin = Init.GetOutPort( 'Min' )
71 OInitMax = Init.GetOutPort( 'Max' )
72 OInitIncr = Init.GetOutPort( 'Incr' )
73 IEndInitDoLoop = EndInit.GetInPort( 'DoLoop' )
74 IEndInitIndex = EndInit.GetInPort( 'Index' )
75 IEndInitMin = EndInit.GetInPort( 'Min' )
76 IEndInitMax = EndInit.GetInPort( 'Max' )
77 IEndInitIncr = EndInit.GetInPort( 'Incr' )
78 IEndInitGate = EndInit.GetInPort( 'Gate' )
79 OEndInitDoLoop = EndInit.GetOutPort( 'DoLoop' )
80 OEndInitIndex = EndInit.GetOutPort( 'Index' )
81 OEndInitMin = EndInit.GetOutPort( 'Min' )
82 OEndInitMax = EndInit.GetOutPort( 'Max' )
83 OEndInitIncr = EndInit.GetOutPort( 'Incr' )
84 OEndInitGate = EndInit.GetOutPort( 'Gate' )
85 Init.SetName( 'Init' )
87 Init.SetComment( 'Compute Node' )
88 Init.Coords( 17 , 257 )
91 LInitIndexEndInitIndex = GraphLoopMemory_1.Link( OInitIndex , IEndInitIndex )
93 LInitMinEndInitMin = GraphLoopMemory_1.Link( OInitMin , IEndInitMin )
95 LInitMaxEndInitMax = GraphLoopMemory_1.Link( OInitMax , IEndInitMax )
97 LInitIncrEndInitIncr = GraphLoopMemory_1.Link( OInitIncr , IEndInitIncr )
100 IInitIndex.Input( 0 )
102 IInitMax.Input( 100000 )
105 # Output Ports of the graph
106 #OEndInitIndex = EndInit.GetOutPort( 'Index' )
107 #OEndInitMin = EndInit.GetOutPort( 'Min' )
108 #OEndInitMax = EndInit.GetOutPort( 'Max' )
109 #OEndInitIncr = EndInit.GetOutPort( 'Incr' )
110 return GraphLoopMemory_1
113 GraphLoopMemory_1 = DefGraphLoopMemory_1()