Salome HOME
Merge Python 3 porting.
[modules/yacs.git] / src / yacsloader / samples / switch10.xml
1 <?xml version='1.0' encoding='iso-8859-1' ?>
2 <!--
3   Copyright (C) 2006-2016  CEA/DEN, EDF R&D
4
5   This library is free software; you can redistribute it and/or
6   modify it under the terms of the GNU Lesser General Public
7   License as published by the Free Software Foundation; either
8   version 2.1 of the License, or (at your option) any later version.
9
10   This library is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13   Lesser General Public License for more details.
14
15   You should have received a copy of the GNU Lesser General Public
16   License along with this library; if not, write to the Free Software
17   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
18
19   See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20
21 -->
22 <proc name="proc">
23    <type name="string" kind="string"/>
24    <struct name="Engines/dataref">
25       <member name="ref" type="string"/>
26    </struct>
27    <type name="bool" kind="bool"/>
28    <sequence name="boolvec" content="bool"/>
29    <type name="double" kind="double"/>
30    <sequence name="dblevec" content="double"/>
31    <objref name="file" id="file"/>
32    <type name="int" kind="int"/>
33    <sequence name="intvec" content="int"/>
34    <objref name="pyobj" id="python:obj:1.0"/>
35    <sequence name="stringvec" content="string"/>
36    <container name="DefaultContainer">
37       <property name="container_name" value="FactoryServer"/>
38       <property name="name" value="localhost"/>
39    </container>
40    <inline name="n">
41       <script><code><![CDATA[select=3]]></code></script>
42       <outport name="select" type="int"/>
43    </inline>
44    <inline name="n2">
45       <script><code><![CDATA[print(p1)]]></code></script>
46       <inport name="p1" type="double"/>
47       <outport name="p1" type="double"/>
48    </inline>
49    <switch name="b1">
50       <default>
51          <inline name="n2">
52             <script><code><![CDATA[print(p1)]]></code></script>
53             <inport name="p1" type="double"/>
54             <outport name="p1" type="double"/>
55          </inline>
56       </default>
57       <case id="1">
58          <inline name="n2">
59             <script><code><![CDATA[print(p1)]]></code></script>
60             <inport name="p1" type="double"/>
61             <outport name="p1" type="double"/>
62          </inline>
63       </case>
64       <case id="3">
65          <switch name="b" select="1">
66             <default>
67                <inline name="n2">
68                   <script><code><![CDATA[p1=20.
69 condition=p1 < 40. ]]></code></script>
70                   <outport name="p1" type="double"/>
71                   <outport name="condition" type="bool"/>
72                </inline>
73             </default>
74             <case id="1">
75                <inline name="n2">
76                   <script><code><![CDATA[print(p1)
77 p1=p1+20
78 condition=p1 < 40. ]]></code></script>
79                   <inport name="p1" type="double"/>
80                   <outport name="p1" type="double"/>
81                   <outport name="condition" type="bool"/>
82                </inline>
83             </case>
84          </switch>
85       </case>
86    </switch>
87    <control> <fromnode>n</fromnode> <tonode>b1</tonode> </control>
88    <control> <fromnode>b1</fromnode> <tonode>n2</tonode> </control>
89    <datalink control="false">
90       <fromnode>n</fromnode> <fromport>select</fromport>
91       <tonode>b1</tonode> <toport>select</toport>
92    </datalink>
93    <datalink control="false">
94       <fromnode>b1.p3_b.default_n2</fromnode> <fromport>p1</fromport>
95       <tonode>n2</tonode> <toport>p1</toport>
96    </datalink>
97    <datalink control="false">
98       <fromnode>b1.p3_b.p1_n2</fromnode> <fromport>p1</fromport>
99       <tonode>n2</tonode> <toport>p1</toport>
100    </datalink>
101    <datalink control="false">
102       <fromnode>b1.default_n2</fromnode> <fromport>p1</fromport>
103       <tonode>n2</tonode> <toport>p1</toport>
104    </datalink>
105    <datalink control="false">
106       <fromnode>b1.p1_n2</fromnode> <fromport>p1</fromport>
107       <tonode>n2</tonode> <toport>p1</toport>
108    </datalink>
109    <parameter>
110       <tonode>b1.default_n2</tonode><toport>p1</toport>
111       <value><double>67</double></value>
112    </parameter>
113    <parameter>
114       <tonode>b1.p1_n2</tonode><toport>p1</toport>
115       <value><double>23</double></value>
116    </parameter>
117    <parameter>
118       <tonode>b1.p3_b.p1_n2</tonode><toport>p1</toport>
119       <value><double>54</double></value>
120    </parameter>
121    <parameter>
122       <tonode>b1.p3_b</tonode><toport>select</toport>
123       <value><int>1</int></value>
124    </parameter>
125    <presentation name="b1" x="397" y="69" width="189" height="454" expanded="1" expx="397" expy="69" expWidth="189" expHeight="454" shownState="0"/>
126    <presentation name="b1.default_n2" x="6" y="57.5" width="158" height="63" expanded="1" expx="6" expy="57.5" expWidth="158" expHeight="63" shownState="0"/>
127    <presentation name="b1.p1_n2" x="6" y="121.5" width="158" height="63" expanded="1" expx="6" expy="121.5" expWidth="158" expHeight="63" shownState="0"/>
128    <presentation name="b1.p3_b.default_n2" x="6" y="57.5" width="158" height="90" expanded="1" expx="6" expy="57.5" expWidth="158" expHeight="90" shownState="0"/>
129    <presentation name="b1.p3_b.p1_n2" x="6" y="148" width="158" height="90" expanded="1" expx="6" expy="148" expWidth="158" expHeight="90" shownState="0"/>
130    <presentation name="n2" x="760" y="181" width="158" height="63" expanded="1" expx="760" expy="181" expWidth="158" expHeight="63" shownState="0"/>
131    <presentation name="b1.p3_b" x="17" y="208" width="168" height="242" expanded="1" expx="17" expy="208" expWidth="168" expHeight="242" shownState="0"/>
132    <presentation name="n" x="6" y="40.5" width="158" height="63" expanded="1" expx="6" expy="40.5" expWidth="158" expHeight="63" shownState="0"/>
133    <presentation name="__ROOT__" x="0" y="0" width="922" height="527" expanded="1" expx="0" expy="0" expWidth="922" expHeight="527" shownState="0"/>
134 </proc>