Salome HOME
740f04ef3cc03937884179b069bb84a33b581b8e
[samples/datafiles.git] / Superv / Graphs / GraphLoopDoWhile.xml
1 <!DOCTYPE SuperGraph>
2 <!--
3   Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
4
5   Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
6   CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
7
8   This library is free software; you can redistribute it and/or
9   modify it under the terms of the GNU Lesser General Public
10   License as published by the Free Software Foundation; either
11   version 2.1 of the License.
12
13   This library is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16   Lesser General Public License for more details.
17
18   You should have received a copy of the GNU Lesser General Public
19   License along with this library; if not, write to the Free Software
20   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21
22   See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23
24 -->
25 <supergraph>
26 <dataflow>
27 <info-list>
28 <node>
29 <component-name>?</component-name>
30     <interface-name>?</interface-name>
31     <node-name>GraphLoopDoWhile</node-name>
32     <kind>1</kind>
33     <coupled-node>?</coupled-node>
34     <service>
35 <service-name>GraphLoopDoWhile</service-name>
36      <inParameter-list>
37 <inParameter>
38 <inParameter-type>long</inParameter-type>
39        <inParameter-name>Loop__Index</inParameter-name>      </inParameter>
40       <inParameter>
41 <inParameter-type>long</inParameter-type>
42        <inParameter-name>Loop__Max</inParameter-name>      </inParameter>     </inParameter-list>
43      <outParameter-list>
44 <outParameter>
45 <outParameter-type>long</outParameter-type>
46        <outParameter-name>EndLoop__Index</outParameter-name>      </outParameter>
47       <outParameter>
48 <outParameter-type>long</outParameter-type>
49        <outParameter-name>EndLoop__Max</outParameter-name>      </outParameter>     </outParameter-list>    </service>
50     <DataStream-list/>
51     <PyFunction-list/>
52     <creation-date>16/12/2004 - 15:39:50</creation-date>
53     <lastmodification-date>16/12/2004 - 18:44:10</lastmodification-date>
54     <editor-release>2.0</editor-release>
55     <author>JR</author>
56     <container>?</container>
57     <comment>?</comment>
58     <x-position>0</x-position>
59     <y-position>0</y-position>   </node>  </info-list>
60   <node-list>
61 <node>
62 <component-name>?</component-name>
63     <interface-name>?</interface-name>
64     <node-name>Loop</node-name>
65     <kind>4</kind>
66     <coupled-node>EndLoop</coupled-node>
67     <service>
68 <service-name>Loop</service-name>
69      <inParameter-list>
70 <inParameter>
71 <inParameter-type>long</inParameter-type>
72        <inParameter-name>Index</inParameter-name>      </inParameter>
73       <inParameter>
74 <inParameter-type>long</inParameter-type>
75        <inParameter-name>Max</inParameter-name>      </inParameter>     </inParameter-list>
76      <outParameter-list>
77 <outParameter>
78 <outParameter-type>long</outParameter-type>
79        <outParameter-name>Index</outParameter-name>      </outParameter>
80       <outParameter>
81 <outParameter-type>long</outParameter-type>
82        <outParameter-name>Max</outParameter-name>      </outParameter>     </outParameter-list>    </service>
83     <DataStream-list/>
84     <PyFunction-list>
85 <PyFunction>
86 <FuncName>?</FuncName>
87       <PyFunc><![CDATA[?]]></PyFunc>     </PyFunction>
88      <PyFunction>
89 <FuncName>?</FuncName>
90       <PyFunc><![CDATA[?]]></PyFunc>     </PyFunction>
91      <PyFunction>
92 <FuncName>LoopWhileNext</FuncName>
93       <PyFunc><![CDATA[def LoopWhileNext(Index,Max) :   ]]></PyFunc>
94       <PyFunc><![CDATA[ Index = Index + 1   ]]></PyFunc>
95       <PyFunc><![CDATA[ return Index,Max   ]]></PyFunc>
96       <PyFunc><![CDATA[?]]></PyFunc>     </PyFunction>    </PyFunction-list>
97     <creation-date>16/12/2004 - 18:44:10</creation-date>
98     <lastmodification-date>16/12/2004 - 18:44:10</lastmodification-date>
99     <editor-release>2.0</editor-release>
100     <author>?</author>
101     <container>?</container>
102     <comment>Compute Node</comment>
103     <x-position>105</x-position>
104     <y-position>226</y-position>   </node>
105    <node>
106 <component-name>?</component-name>
107     <interface-name>?</interface-name>
108     <node-name>EndLoop</node-name>
109     <kind>5</kind>
110     <coupled-node>Loop</coupled-node>
111     <service>
112 <service-name>EndLoop</service-name>
113      <inParameter-list>
114 <inParameter>
115 <inParameter-type>long</inParameter-type>
116        <inParameter-name>Index</inParameter-name>      </inParameter>
117       <inParameter>
118 <inParameter-type>long</inParameter-type>
119        <inParameter-name>Max</inParameter-name>      </inParameter>     </inParameter-list>
120      <outParameter-list>
121 <outParameter>
122 <outParameter-type>long</outParameter-type>
123        <outParameter-name>Index</outParameter-name>      </outParameter>
124       <outParameter>
125 <outParameter-type>long</outParameter-type>
126        <outParameter-name>Max</outParameter-name>      </outParameter>     </outParameter-list>    </service>
127     <DataStream-list/>
128     <PyFunction-list>
129 <PyFunction>
130 <FuncName>DoWhile</FuncName>
131       <PyFunc><![CDATA[import time    ]]></PyFunc>
132       <PyFunc><![CDATA[def DoWhile(DoLoop,Index,Max) :   ]]></PyFunc>
133       <PyFunc><![CDATA[ print 'DoWhile',DoLoop,Index,Max ]]></PyFunc>
134       <PyFunc><![CDATA[ time.sleep(2)     ]]></PyFunc>
135       <PyFunc><![CDATA[ if Index == Max :     ]]></PyFunc>
136       <PyFunc><![CDATA[         DoLoop = 0     ]]></PyFunc>
137       <PyFunc><![CDATA[ else :     ]]></PyFunc>
138       <PyFunc><![CDATA[         DoLoop = 1     ]]></PyFunc>
139       <PyFunc><![CDATA[ print 'DoWhile',DoLoop,Index,Max ]]></PyFunc>
140       <PyFunc><![CDATA[ return DoLoop,Index,Max     ]]></PyFunc>     </PyFunction>    </PyFunction-list>
141     <creation-date>16/12/2004 - 18:44:10</creation-date>
142     <lastmodification-date>16/12/2004 - 18:44:10</lastmodification-date>
143     <editor-release>2.0</editor-release>
144     <author>?</author>
145     <container>?</container>
146     <comment>Compute Node</comment>
147     <x-position>414</x-position>
148     <y-position>232</y-position>   </node>  </node-list>
149   <link-list>
150 <link>
151 <fromnode-name>Loop</fromnode-name>
152     <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
153     <tonode-name>EndLoop</tonode-name>
154     <toserviceparameter-name>DoLoop</toserviceparameter-name>
155     <coord-list/>   </link>
156    <link>
157 <fromnode-name>Loop</fromnode-name>
158     <fromserviceparameter-name>Index</fromserviceparameter-name>
159     <tonode-name>EndLoop</tonode-name>
160     <toserviceparameter-name>Index</toserviceparameter-name>
161     <coord-list/>   </link>
162    <link>
163 <fromnode-name>Loop</fromnode-name>
164     <fromserviceparameter-name>Max</fromserviceparameter-name>
165     <tonode-name>EndLoop</tonode-name>
166     <toserviceparameter-name>Max</toserviceparameter-name>
167     <coord-list/>   </link>
168    <link>
169 <fromnode-name>EndLoop</fromnode-name>
170     <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
171     <tonode-name>Loop</tonode-name>
172     <toserviceparameter-name>DoLoop</toserviceparameter-name>
173     <coord-list/>   </link>  </link-list>
174   <data-list>
175 <data>
176 <fromnode-name>GraphLoopDoWhile</fromnode-name>
177     <fromserviceparameter-name>Loop__Index</fromserviceparameter-name>
178     <tonode-name>Loop</tonode-name>
179     <toserviceparameter-name>Index</toserviceparameter-name>
180     <data-value>
181 <value-type>3</value-type>
182      <value>5</value>    </data-value>
183     <coord-list/>   </data>
184    <data>
185 <fromnode-name>GraphLoopDoWhile</fromnode-name>
186     <fromserviceparameter-name>Loop__Max</fromserviceparameter-name>
187     <tonode-name>Loop</tonode-name>
188     <toserviceparameter-name>Max</toserviceparameter-name>
189     <data-value>
190 <value-type>3</value-type>
191      <value>10</value>    </data-value>
192     <coord-list/>   </data>  </data-list> </dataflow></supergraph>