1 # Copyright (C) 2007-2014 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, or (at your option) any later version.
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
23 # Generated python file of Graph aNewDataFlow
27 aNewDataFlow = Graph( 'aNewDataFlow' )
28 aNewDataFlow.SetName( 'aNewDataFlow' )
29 aNewDataFlow.SetAuthor( '' )
30 aNewDataFlow.SetComment( '' )
31 aNewDataFlow.Coords( 0 , 0 )
33 # Creation of Factory Nodes
35 # Creation of InLine Nodes
37 PyFunc.append( 'def Func( A ): ' )
38 PyFunc.append( ' import batchmode_visu ' )
39 PyFunc.append( ' batchmode_visu.myVisu.CreateTestView() ' )
40 PyFunc.append( ' batchmode_visu.myVisu.ShowTestObject() ' )
41 PyFunc.append( ' return A ' )
42 Func = aNewDataFlow.INode( 'Func' , PyFunc )
43 Func.SetName( 'Func' )
45 Func.SetComment( 'Compute Node' )
46 Func.Coords( 375 , 162 )
47 Func.InPort( 'A' , 'int' )
48 Func.OutPort( 'B' , 'int' )
50 # Creation of Loop Nodes
52 PyInit.append( 'def Init( A ): ' )
53 PyInit.append( ' return A ' )
55 PyMoreInit.append( 'def More( A ): ' )
56 PyMoreInit.append( ' if A < 10: ' )
57 PyMoreInit.append( ' return 1,A ' )
58 PyMoreInit.append( ' return 0,A ' )
60 PyNextInit.append( 'def Next( A ): ' )
61 PyNextInit.append( ' return (A + 1) ' )
62 Init,EndInit = aNewDataFlow.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit )
63 EndInit.SetName( 'EndInit' )
64 EndInit.SetAuthor( '' )
65 EndInit.SetComment( '' )
66 EndInit.Coords( 740 , 168 )
68 EndInit.SetPyFunction( 'EndInit' , PyEndInit )
69 Init.SetName( 'Init' )
72 Init.Coords( 118 , 160 )
73 Init.InPort( 'A' , 'int' )
74 Init.OutPort( 'A' , 'int' )
77 InitA = Init.Port( 'A' )
78 FuncA = aNewDataFlow.Link( InitA , Func.Port( 'A' ) )
80 FuncB = Func.Port( 'B' )
81 EndInitA = aNewDataFlow.Link( FuncB , EndInit.Port( 'A' ) )
83 # Creation of Input datas
84 InitA = Init.Input( 'A' , 0)
86 # Creation of Output variables
87 EndInitA = EndInit.Port( 'A' )