Salome HOME
d0250625238268a69431f651716499539136a701
[samples/datafiles.git] / Superv / Python / GraphTestMacroNodes.py
1
2 from SuperV import *
3
4 anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphEssai.xml'
5 GraphMacroNodes = Graph( anXmlFile )
6
7 GraphMacroNodes.PrintLinks()
8
9 GraphMacroNodes.SetName('GraphMacroNodes')
10
11 anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/SyrStruct.xml'
12 Macro_SyrStruct = GraphMacroNodes.MNode( anXmlFile )
13
14 Macro_SyrStruct.PrintPorts()
15
16 GraphMacroNodes.PrintPorts()
17
18 GraphMacroNodes.PrintLinks()
19
20 GraphMacroNodes.Print()
21
22 Macro_SyrStruct.Print()
23
24 exec GraphMacroNodes.ListNodes('GraphMacroNodes')
25
26 Macro_SyrStruct.Print()
27
28 Macro_SyrStruct.IsMacro()
29 Macro_SyrStruct.IsFlowMacro()
30 Macro_SyrStruct.IsStreamMacro()
31
32 SyrStruct = Macro_SyrStruct.FlowObjRef()
33
34 SyrStruct.Print()
35
36 SyrStruct.PrintPorts()
37
38 SyrStruct.PrintLinks()
39
40 SyrStruct.IsValid()
41 SyrStruct.IsExecutable()
42
43 exec SyrStruct.ListNodes('SyrStruct')
44
45 m3incr.Print()
46
47 m3incr.PrintPorts()
48
49 m3incr.PrintLinks()
50
51 EndOffori.Print()
52
53 EndOffori.PrintPorts()
54
55 EndOffori.PrintLinks()
56
57 EndOfwhileEven.Print()
58
59 EndOfwhileEven.PrintPorts()
60
61 EndOfwhileEven.PrintLinks()
62
63 MSyrStruct = SyrStruct.FlowObjRef()
64
65 MSyrStruct.Print()
66
67 MSyrStruct.PrintPorts()
68
69 GraphMacroNodes.IsValid()
70 GraphMacroNodes.IsExecutable()
71
72 GraphMacroNodes.PrintPorts()
73
74 anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/SyrStruct.xml'
75 Macro_SyrStruct_1 = GraphMacroNodes.MNode( anXmlFile )
76
77 Macro_SyrStruct_1.Print()
78
79 Macro_SyrStruct_1.IsMacro()
80 Macro_SyrStruct_1.IsFlowMacro()
81 Macro_SyrStruct_1.IsStreamMacro()
82
83 SyrStruct_1 = Macro_SyrStruct_1.FlowObjRef()
84
85 SyrStruct_1.Print()
86
87 GraphMacroNodes.IsValid()
88 GraphMacroNodes.IsExecutable()
89
90 GraphMacroNodes.PrintPorts()
91
92 MSyrStruct_1 = SyrStruct_1.FlowObjRef()
93
94 MSyrStruct_1.Print()
95
96 MSyrStruct_1.PrintPorts()
97
98
99 anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphMacroNodes.xml'
100 GraphMacroNodes.Export( anXmlFile )
101
102 SyrStruct.Name()
103 SyrStruct_1.Name()
104
105 GraphMacroNodes.Run()
106
107 GraphMacroNodes.DoneW()
108
109 GraphMacroNodes.State()
110
111 Macro_SyrStruct.State()
112
113 Macro_SyrStruct_1.State()
114
115
116
117
118
119 from SuperV import *
120
121 anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphMacroNodes.xml'
122 GraphMacroNodes = Graph( anXmlFile )
123
124 GraphMacroNodes.Name()
125
126 GraphMacroNodes.Export( '/tmp/GraphMacroNodes.xml' )
127
128 exec GraphMacroNodes.ListNodes('GraphMacroNodes')
129
130 GraphMacroNodes.PrintPorts()
131
132 GraphMacroNodes.PrintLinks()
133
134 Macro_SyrStruct.IsMacro()
135 Macro_SyrStruct.IsFlowMacro()
136 Macro_SyrStruct.IsStreamMacro()
137
138 Macro_SyrStruct.Print()
139
140 SyrStruct = Macro_SyrStruct.FlowObjRef()
141
142 SyrStruct.Print()
143
144 SyrStruct.PrintPorts()
145
146 SyrStruct.PrintLinks()
147
148 exec SyrStruct.ListNodes('SyrStruct')
149
150 Macro_SyrStruct.IsMacro()
151 Macro_SyrStruct.IsFlowMacro()
152 Macro_SyrStruct.IsStreamMacro()
153
154 Macro_SyrStruct.IsValid()
155
156 Macro_SyrStruct.IsExecutable()
157
158 Macro_SyrStruct_1.Print()
159
160 SyrStruct_1 = Macro_SyrStruct_1.FlowObjRef()
161
162 SyrStruct_1.Print()
163
164 SyrStruct_1.PrintPorts()
165
166 SyrStruct_1.PrintLinks()
167
168 exec SyrStruct_1.ListNodes('SyrStruct_1')
169
170 MSyrStruct = SyrStruct.FlowObjRef()
171
172 MSyrStruct.Print()
173
174 MSyrStruct_1 = SyrStruct_1.FlowObjRef()
175
176 MSyrStruct_1.Print()
177
178 GraphMacroNodes.Run()
179
180 GraphMacroNodes.DoneW()
181
182 GraphMacroNodes.State()
183
184 Macro_SyrStruct.State()
185
186 Macro_SyrStruct_1.State()
187
188
189
190
191 from SuperV import *
192
193 from GraphMacroNodes import *
194
195 GraphMacroNodes.IsExecutable()
196
197 GraphMacroNodes.Run()
198
199 exec GraphMacroNodes.ListNodes('GraphMacroNodes')
200
201 SyrStruct = Macro_SyrStruct.FlowObjRef()
202
203 SyrStruct.IsExecutable()
204
205 GraphMacroNodes.DoneW()
206
207 GraphMacroNodes.State()
208
209 Macro_SyrStruct.State()
210
211 Macro_SyrStruct_1.State()
212
213 SyrStruct = Macro_SyrStruct.FlowObjRef()
214
215 exec SyrStruct.ListNodes('SyrStruct')
216
217 EndOfforN.State()
218
219 SyrStruct.DoneW()
220
221 SyrStruct.State()
222
223 SyrStruct_1 = Macro_SyrStruct_1.FlowObjRef()
224
225 exec SyrStruct_1.ListNodes('SyrStruct')
226
227 EndOfforN.State()
228
229 SyrStruct_1.DoneW()
230
231 SyrStruct_1.State()
232
233 SyrStruct.PrintPorts()
234
235 Macro_SyrStruct.PrintPorts()
236
237 GraphMacroNodes.PrintPorts()
238
239 GraphMacroNodes.Run()
240
241 GraphMacroNodes.DoneW()
242
243 GraphMacroNodes.State()
244
245 Macro_SyrStruct.State()
246
247 Macro_SyrStruct_1.State()
248
249
250
251
252 SyrStruct.Export('/tmp/SubSyrStruct.xml')
253
254
255 SubSyrStruct = Graph('/tmp/SubSyrStruct.xml')
256
257 SubSyrStruct.IsValid()
258
259 SubSyrStruct.IsExecutable()
260
261 SubSyrStruct.Run()
262
263 SubSyrStruct.DoneW()
264
265 SubSyrStruct.State()
266
267 SubSyrStruct.PrintPorts()
268
269
270
271
272
273 from SuperV import *
274
275 from GraphMacroNodes import *
276
277 exec GraphMacroNodes.ListNodes('GraphMacroNodes')
278
279 SyrStruct = Macro_SyrStruct.FlowObjRef()
280
281 exec SyrStruct.ListNodes('SyrStruct')
282
283 Unused = SyrComponent.InPort('Unused','long')
284
285 SyrComponent.PrintPorts()
286
287 SyrComponent.Print()
288
289 SyrStruct.IsValid()
290
291 SyrStruct.PrintPorts()
292
293 Macro_SyrStruct.PrintPorts()
294
295 GraphMacroNodes.PrintPorts()
296
297 Unused.Destroy()
298
299 GraphMacroNodes.PrintPorts()
300
301 Macro_SyrStruct.PrintPorts()
302
303 SyrStruct.PrintPorts()
304
305 GraphMacroNodes.Run()
306
307 GraphMacroNodes.DoneW()
308
309 GraphMacroNodes.State()
310
311 Macro_SyrStruct.State()
312
313 Macro_SyrStruct_1.State()