Salome HOME
Update copyrights 2014.
[samples/datafiles.git] / Yacs / Schemas / bloc2.xml
1 <!--
2   Copyright (C) 2006-2014  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
23     <!-- types -->
24     <!-- inline -->
25     <!-- service -->
26
27     <inline name="node1" >
28                 <function name="f">
29                     <code>def f():</code>
30                     <code>  return "coucou node1" </code>
31                 </function>
32                 <outport name="p1" type="string"/>
33     </inline>
34     <inline name="node2" >
35                 <function name="f">
36                     <code>def f():</code>
37                     <code>  return "coucou node2" </code>
38                 </function>
39                 <outport name="p1" type="string"/>
40     </inline>
41     <bloc name="b1" >
42         <inline name="node1" >
43                 <function name="f">
44                     <code>def f():</code>
45                     <code>  return "coucou b1.node1" </code>
46                 </function>
47                 <outport name="p1" type="string"/>
48         </inline>
49         <inline name="node2" >
50                 <function name="f">
51                     <code>def f():</code>
52                     <code>  return "coucou b1.node2" </code>
53                 </function>
54                 <outport name="p1" type="string"/>
55         </inline>
56         <bloc name="b2" >
57             <inline name="node1" >
58                 <function name="f">
59                     <code>def f(p1):</code>
60                     <code>  print p1;p1=2*p1 </code>
61                     <code>  print "coucou b1.b2.node1" </code>
62                     <code>  return p1 </code>
63                 </function>
64                 <inport name="p1" type="string"/>
65                 <outport name="p1" type="string"/>
66             </inline>
67             <inline name="node2" >
68                 <function name="f">
69                     <code>def f():</code>
70                     <code>  return "coucou b1.b2.node2" </code>
71                 </function>
72                 <outport name="p1" type="string"/>
73             </inline>
74             <forloop name="loop1" nsteps="3">
75                <inline name="node1" >
76                  <function name="f">
77                     <code>def f():</code>
78                     <code>  return "coucou b1.b2.loop1.node1" </code>
79                  </function>
80                  <outport name="p1" type="string"/>
81                </inline>
82             </forloop>
83             <control> <fromnode>loop1</fromnode> <tonode>node2</tonode> </control>
84         </bloc>
85         <control> <fromnode>node1</fromnode> <tonode>b2</tonode> </control>
86         <control> <fromnode>b2</fromnode> <tonode>node2</tonode> </control>
87     </bloc>
88
89     <!--control -->
90     <control> <fromnode>b1</fromnode> <tonode>node2</tonode> </control>
91
92     <!--datalinks -->
93
94     <!--parameters -->
95     <parameter>
96         <tonode>b1.b2.node1</tonode> <toport>p1</toport>
97         <value><string>coucou</string></value>
98     </parameter>
99
100 </proc>