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
24 anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphEssai.xml'
25 GraphMacroNodes = Graph( anXmlFile )
27 GraphMacroNodes.PrintLinks()
29 GraphMacroNodes.SetName('GraphMacroNodes')
31 anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/SyrStruct.xml'
32 Macro_SyrStruct = GraphMacroNodes.MNode( anXmlFile )
34 Macro_SyrStruct.PrintPorts()
36 GraphMacroNodes.PrintPorts()
38 GraphMacroNodes.PrintLinks()
40 GraphMacroNodes.Print()
42 Macro_SyrStruct.Print()
44 exec GraphMacroNodes.ListNodes('GraphMacroNodes')
46 Macro_SyrStruct.Print()
48 Macro_SyrStruct.IsMacro()
49 Macro_SyrStruct.IsFlowMacro()
50 Macro_SyrStruct.IsStreamMacro()
52 SyrStruct = Macro_SyrStruct.FlowObjRef()
56 SyrStruct.PrintPorts()
58 SyrStruct.PrintLinks()
61 SyrStruct.IsExecutable()
63 exec SyrStruct.ListNodes('SyrStruct')
73 EndOffori.PrintPorts()
75 EndOffori.PrintLinks()
77 EndOfwhileEven.Print()
79 EndOfwhileEven.PrintPorts()
81 EndOfwhileEven.PrintLinks()
83 MSyrStruct = SyrStruct.FlowObjRef()
87 MSyrStruct.PrintPorts()
89 GraphMacroNodes.IsValid()
90 GraphMacroNodes.IsExecutable()
92 GraphMacroNodes.PrintPorts()
94 anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/SyrStruct.xml'
95 Macro_SyrStruct_1 = GraphMacroNodes.MNode( anXmlFile )
97 Macro_SyrStruct_1.Print()
99 Macro_SyrStruct_1.IsMacro()
100 Macro_SyrStruct_1.IsFlowMacro()
101 Macro_SyrStruct_1.IsStreamMacro()
103 SyrStruct_1 = Macro_SyrStruct_1.FlowObjRef()
107 GraphMacroNodes.IsValid()
108 GraphMacroNodes.IsExecutable()
110 GraphMacroNodes.PrintPorts()
112 MSyrStruct_1 = SyrStruct_1.FlowObjRef()
116 MSyrStruct_1.PrintPorts()
119 anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphMacroNodes.xml'
120 GraphMacroNodes.Export( anXmlFile )
125 GraphMacroNodes.Run()
127 GraphMacroNodes.DoneW()
129 GraphMacroNodes.State()
131 Macro_SyrStruct.State()
133 Macro_SyrStruct_1.State()
141 anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphMacroNodes.xml'
142 GraphMacroNodes = Graph( anXmlFile )
144 GraphMacroNodes.Name()
146 GraphMacroNodes.Export( '/tmp/GraphMacroNodes.xml' )
148 exec GraphMacroNodes.ListNodes('GraphMacroNodes')
150 GraphMacroNodes.PrintPorts()
152 GraphMacroNodes.PrintLinks()
154 Macro_SyrStruct.IsMacro()
155 Macro_SyrStruct.IsFlowMacro()
156 Macro_SyrStruct.IsStreamMacro()
158 Macro_SyrStruct.Print()
160 SyrStruct = Macro_SyrStruct.FlowObjRef()
164 SyrStruct.PrintPorts()
166 SyrStruct.PrintLinks()
168 exec SyrStruct.ListNodes('SyrStruct')
170 Macro_SyrStruct.IsMacro()
171 Macro_SyrStruct.IsFlowMacro()
172 Macro_SyrStruct.IsStreamMacro()
174 Macro_SyrStruct.IsValid()
176 Macro_SyrStruct.IsExecutable()
178 Macro_SyrStruct_1.Print()
180 SyrStruct_1 = Macro_SyrStruct_1.FlowObjRef()
184 SyrStruct_1.PrintPorts()
186 SyrStruct_1.PrintLinks()
188 exec SyrStruct_1.ListNodes('SyrStruct_1')
190 MSyrStruct = SyrStruct.FlowObjRef()
194 MSyrStruct_1 = SyrStruct_1.FlowObjRef()
198 GraphMacroNodes.Run()
200 GraphMacroNodes.DoneW()
202 GraphMacroNodes.State()
204 Macro_SyrStruct.State()
206 Macro_SyrStruct_1.State()
213 from GraphMacroNodes import *
215 GraphMacroNodes.IsExecutable()
217 GraphMacroNodes.Run()
219 exec GraphMacroNodes.ListNodes('GraphMacroNodes')
221 SyrStruct = Macro_SyrStruct.FlowObjRef()
223 SyrStruct.IsExecutable()
225 GraphMacroNodes.DoneW()
227 GraphMacroNodes.State()
229 Macro_SyrStruct.State()
231 Macro_SyrStruct_1.State()
233 SyrStruct = Macro_SyrStruct.FlowObjRef()
235 exec SyrStruct.ListNodes('SyrStruct')
243 SyrStruct_1 = Macro_SyrStruct_1.FlowObjRef()
245 exec SyrStruct_1.ListNodes('SyrStruct')
253 SyrStruct.PrintPorts()
255 Macro_SyrStruct.PrintPorts()
257 GraphMacroNodes.PrintPorts()
259 GraphMacroNodes.Run()
261 GraphMacroNodes.DoneW()
263 GraphMacroNodes.State()
265 Macro_SyrStruct.State()
267 Macro_SyrStruct_1.State()
272 SyrStruct.Export('/tmp/SubSyrStruct.xml')
275 SubSyrStruct = Graph('/tmp/SubSyrStruct.xml')
277 SubSyrStruct.IsValid()
279 SubSyrStruct.IsExecutable()
287 SubSyrStruct.PrintPorts()
295 from GraphMacroNodes import *
297 exec GraphMacroNodes.ListNodes('GraphMacroNodes')
299 SyrStruct = Macro_SyrStruct.FlowObjRef()
301 exec SyrStruct.ListNodes('SyrStruct')
303 Unused = SyrComponent.InPort('Unused','long')
305 SyrComponent.PrintPorts()
311 SyrStruct.PrintPorts()
313 Macro_SyrStruct.PrintPorts()
315 GraphMacroNodes.PrintPorts()
319 GraphMacroNodes.PrintPorts()
321 Macro_SyrStruct.PrintPorts()
323 SyrStruct.PrintPorts()
325 GraphMacroNodes.Run()
327 GraphMacroNodes.DoneW()
329 GraphMacroNodes.State()
331 Macro_SyrStruct.State()
333 Macro_SyrStruct_1.State()