Salome HOME
Fix for "23669: [CEA 13186] YACS xml scheme files with calls to print function need...
[samples/datafiles.git] / Yacs / Schemas / switch9.xml
1 <!--
2   Copyright (C) 2006-2015  CEA/DEN, EDF R&D
3
4   This library is free software; you can redistribute it and/or
5   modify it under the terms of the GNU Lesser General Public
6   License as published by the Free Software Foundation; either
7   version 2.1 of the License, or (at your option) any later version.
8
9   This library is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12   Lesser General Public License for more details.
13
14   You should have received a copy of the GNU Lesser General Public
15   License along with this library; if not, write to the Free Software
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17
18   See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19
20 -->
21 <proc>
22     <!--types -->
23     <!--nodes -->
24     <inline name="n" >
25         <script>
26             <code>select=3</code>
27         </script>
28         <outport name="select" type="int"/>
29     </inline>
30     <inline name="n2" >
31         <script>
32             <code>print(p1)</code>
33         </script>
34         <inport name="p1" type="double"/>
35         <outport name="p1" type="double"/>
36     </inline>
37     <switch name="b1">
38       <case id="1">
39         <inline name="n2" >
40           <script><code>print(p1)</code></script>
41           <inport name="p1" type="double"/>
42           <outport name="p1" type="double"/>
43         </inline>
44       </case>
45       <case id="3">
46         <switch name="b" select="1">
47           <case id="1">
48             <inline name="n2" >
49               <script>
50                   <code>print(p1)</code>
51                   <code>p1=p1+20</code>
52                   <code><![CDATA[condition=p1 < 40.]]> </code>
53               </script>
54               <inport name="p1" type="double"/>
55               <outport name="p1" type="double"/>
56               <outport name="condition" type="bool"/>
57             </inline>
58           </case>
59           <default>
60             <inline name="n2" >
61               <script>
62                   <code>p1=20.</code>
63                   <code><![CDATA[condition=p1 < 40.]]> </code>
64               </script>
65               <outport name="p1" type="double"/>
66               <outport name="condition" type="bool"/>
67             </inline>
68           </default>
69         </switch>
70       </case>
71       <default>
72         <inline name="n2" >
73           <script><code>print(p1)</code></script>
74           <inport name="p1" type="double"/>
75           <outport name="p1" type="double"/>
76         </inline>
77       </default>
78     </switch>
79     <!--control links -->
80     <control> <fromnode>n</fromnode> <tonode>b1</tonode> </control>
81     <control> <fromnode>b1</fromnode> <tonode>n2</tonode> </control>
82     <!--data links -->
83     <datalink> <fromnode>n</fromnode><fromport>select</fromport>
84                <tonode>b1</tonode> <toport>select</toport> </datalink>
85     <datalink> <fromnode>b1.p1_n2</fromnode><fromport>p1</fromport>
86                <tonode>n2</tonode> <toport>p1</toport> </datalink>
87     <datalink> <fromnode>b1.p3_b.p1_n2</fromnode><fromport>p1</fromport>
88                <tonode>n2</tonode> <toport>p1</toport> </datalink>
89     <datalink> <fromnode>b1.default_n2</fromnode><fromport>p1</fromport>
90                <tonode>n2</tonode> <toport>p1</toport> </datalink>
91     <!--parameters -->
92     <parameter>
93         <tonode>b1.p1_n2</tonode> <toport>p1</toport>
94         <value><double>23</double> </value>
95     </parameter>
96     <parameter>
97         <tonode>b1.p3_b.p1_n2</tonode> <toport>p1</toport>
98         <value><double>54</double> </value>
99     </parameter>
100     <parameter>
101         <tonode>b1.default_n2</tonode> <toport>p1</toport>
102         <value><double>67</double> </value>
103     </parameter>
104
105 </proc>