Salome HOME
a4d751d7eadc1bd227f3de3d361299e439fae499
[samples/datafiles.git] / Superv / Python / GraphGOTOAddMemory.py
1 #  Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 #  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 #
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.
10 #
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.
15 #
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
19 #
20 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #
22 # Generated python file of Graph GraphGOTOAddMemory
23 #
24 from SuperV import *
25
26 # Graph creation of GraphGOTOAddMemory
27 def DefGraphGOTOAddMemory() :
28     GraphGOTOAddMemory = Graph( 'GraphGOTOAddMemory' )
29     GraphGOTOAddMemory.SetName( 'GraphGOTOAddMemory' )
30     GraphGOTOAddMemory.SetAuthor( 'JR' )
31     GraphGOTOAddMemory.SetComment( 'To study memory leaks' )
32     GraphGOTOAddMemory.Coords( 0 , 0 )
33     
34     # Creation of Factory Nodes
35     
36     AddWithoutSleep = GraphGOTOAddMemory.FNode( 'AddComponent' , 'AddComponent' , 'AddWithoutSleep' )
37     AddWithoutSleep.SetName( 'AddWithoutSleep' )
38     AddWithoutSleep.SetAuthor( '' )
39     AddWithoutSleep.SetContainer( 'localhost/FactoryServer' )
40     AddWithoutSleep.SetComment( 'AddWithoutSleep from AddComponent' )
41     AddWithoutSleep.Coords( 297 , 138 )
42     IAddWithoutSleepx = AddWithoutSleep.GetInPort( 'x' )
43     IAddWithoutSleepy = AddWithoutSleep.GetInPort( 'y' )
44     IAddWithoutSleepGate = AddWithoutSleep.GetInPort( 'Gate' )
45     OAddWithoutSleepFuncValue = AddWithoutSleep.GetOutPort( 'FuncValue' )
46     OAddWithoutSleepz = AddWithoutSleep.GetOutPort( 'z' )
47     OAddWithoutSleepGate = AddWithoutSleep.GetOutPort( 'Gate' )
48     
49     # Creation of InLine Nodes
50     PyInLine = []
51     InLine = GraphGOTOAddMemory.INode( '' , PyInLine )
52     InLine.SetName( 'InLine' )
53     InLine.SetAuthor( '' )
54     InLine.SetComment( 'Compute Node' )
55     InLine.Coords( 74 , 178 )
56     IInLineGate = InLine.GetInPort( 'Gate' )
57     OInLineGate = InLine.GetOutPort( 'Gate' )
58     
59     # Creation of GOTO Nodes
60     PyGoTo = []
61     GoTo = GraphGOTOAddMemory.GNode( '' , PyGoTo , 'InLine' )
62     GoTo.SetName( 'GoTo' )
63     GoTo.SetAuthor( '' )
64     GoTo.SetComment( 'Compute Node' )
65     GoTo.Coords( 533 , 218 )
66     IGoToGate = GoTo.GetInPort( 'Gate' )
67     OGoToGate = GoTo.GetOutPort( 'Gate' )
68     
69     # Creation of Links
70     LInLineGateAddWithoutSleepGate = GraphGOTOAddMemory.Link( OInLineGate , IAddWithoutSleepGate )
71     
72     LGoToGateInLineGate = GraphGOTOAddMemory.Link( OGoToGate , IInLineGate )
73     LGoToGateInLineGate.AddCoord( 1 , 69 , 420 )
74     LGoToGateInLineGate.AddCoord( 2 , 700 , 420 )
75     
76     LAddWithoutSleepGateGoToGate = GraphGOTOAddMemory.Link( OAddWithoutSleepGate , IGoToGate )
77     
78     # Input datas
79     IAddWithoutSleepx.Input( 1 )
80     IAddWithoutSleepy.Input( 2 )
81     
82     # Output Ports of the graph
83     #OAddWithoutSleepFuncValue = AddWithoutSleep.GetOutPort( 'FuncValue' )
84     #OAddWithoutSleepz = AddWithoutSleep.GetOutPort( 'z' )
85     return GraphGOTOAddMemory
86
87
88 GraphGOTOAddMemory = DefGraphGOTOAddMemory()
89
90 GraphGOTOAddMemory.Run()
91 GraphGOTOAddMemory.DoneW()
92 GraphGOTOAddMemory.State()
93 GraphGOTOAddMemory.PrintPorts()