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 aNewDataFlow
26 aNewDataFlow = Graph( 'aNewDataFlow' )
27 aNewDataFlow.SetName( 'aNewDataFlow' )
28 aNewDataFlow.SetAuthor( '' )
29 aNewDataFlow.SetComment( '' )
30 aNewDataFlow.Coords( 0 , 0 )
32 # Creation of Factory Nodes
34 # Creation of InLine Nodes
36 PyFunc.append( 'def Func( A ): ' )
37 PyFunc.append( ' import batchmode_visu ' )
38 PyFunc.append( ' batchmode_visu.myVisu.CreateTestView() ' )
39 PyFunc.append( ' batchmode_visu.myVisu.ShowTestObject() ' )
40 PyFunc.append( ' return A ' )
41 Func = aNewDataFlow.INode( 'Func' , PyFunc )
42 Func.SetName( 'Func' )
44 Func.SetComment( 'Compute Node' )
45 Func.Coords( 375 , 162 )
46 Func.InPort( 'A' , 'int' )
47 Func.OutPort( 'B' , 'int' )
49 # Creation of Loop Nodes
51 PyInit.append( 'def Init( A ): ' )
52 PyInit.append( ' return A ' )
54 PyMoreInit.append( 'def More( A ): ' )
55 PyMoreInit.append( ' if A < 10: ' )
56 PyMoreInit.append( ' return 1,A ' )
57 PyMoreInit.append( ' return 0,A ' )
59 PyNextInit.append( 'def Next( A ): ' )
60 PyNextInit.append( ' return (A + 1) ' )
61 Init,EndInit = aNewDataFlow.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit )
62 EndInit.SetName( 'EndInit' )
63 EndInit.SetAuthor( '' )
64 EndInit.SetComment( '' )
65 EndInit.Coords( 740 , 168 )
67 EndInit.SetPyFunction( 'EndInit' , PyEndInit )
68 Init.SetName( 'Init' )
71 Init.Coords( 118 , 160 )
72 Init.InPort( 'A' , 'int' )
73 Init.OutPort( 'A' , 'int' )
76 InitA = Init.Port( 'A' )
77 FuncA = aNewDataFlow.Link( InitA , Func.Port( 'A' ) )
79 FuncB = Func.Port( 'B' )
80 EndInitA = aNewDataFlow.Link( FuncB , EndInit.Port( 'A' ) )
82 # Creation of Input datas
83 InitA = Init.Input( 'A' , 0)
85 # Creation of Output variables
86 EndInitA = EndInit.Port( 'A' )