Salome HOME
Update copyrights 2014.
[modules/yacs.git] / src / yacsloader / samples / pyremote3.xml
1 <?xml version='1.0' encoding='iso-8859-1' ?>
2 <!--
3   Copyright (C) 2006-2014  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="newSchema_1">
23    <property name="DefaultStudyID" value="1"/>
24    <type name="string" kind="string"/>
25    <struct name="Engines/dataref">
26       <member name="ref" type="string"/>
27    </struct>
28    <type name="bool" kind="bool"/>
29    <sequence name="boolvec" content="bool"/>
30    <type name="double" kind="double"/>
31    <sequence name="dblevec" content="double"/>
32    <objref name="file" id="file"/>
33    <type name="int" kind="int"/>
34    <sequence name="intvec" content="int"/>
35    <objref name="pyobj" id="python:obj:1.0"/>
36    <sequence name="seqint" content="int"/>
37    <sequence name="stringvec" content="string"/>
38    <container name="DefaultContainer">
39       <property name="container_name" value="FactoryServer"/>
40       <property name="name" value="localhost"/>
41    </container>
42    <container name="container0">
43    </container>
44    <foreach name="ForEachLoop_int1" nbranch="2" type="int">
45       <remote name="PyFunction3">
46          <function name="f">
47             <code><![CDATA[import time
48
49 def f(i5):
50     print my_container
51     print "nouvelle branche avec ", i5
52     for n in xrange(15):
53       print time.time()
54       time.sleep(1)
55     
56 ]]></code>
57          </function>
58          <load container="container0"/>
59          <inport name="i5" type="int"/>
60       </remote>
61    </foreach>
62    <inline name="PyScript2">
63       <script><code><![CDATA[o4 = [1, 2]
64 ]]></code></script>
65       <outport name="o4" type="seqint"/>
66    </inline>
67    <control> <fromnode>PyScript2</fromnode> <tonode>ForEachLoop_int1</tonode> </control>
68    <datalink control="false">
69       <fromnode>ForEachLoop_int1</fromnode> <fromport>evalSamples</fromport>
70       <tonode>ForEachLoop_int1.PyFunction3</tonode> <toport>i5</toport>
71    </datalink>
72    <datalink control="false">
73       <fromnode>PyScript2</fromnode> <fromport>o4</fromport>
74       <tonode>ForEachLoop_int1</tonode> <toport>SmplsCollection</toport>
75    </datalink>
76    <parameter>
77       <tonode>ForEachLoop_int1</tonode><toport>nbBranches</toport>
78       <value><int>2</int></value>
79    </parameter>
80    <presentation name="ForEachLoop_int1" x="260.5" y="144.5" width="200.5" height="183" expanded="1" expx="260.5" expy="144.5" expWidth="200.5" expHeight="183" shownState="0"/>
81    <presentation name="ForEachLoop_int1.PyFunction3" x="38.5" y="116" width="158" height="63" expanded="1" expx="38.5" expy="116" expWidth="158" expHeight="63" shownState="0"/>
82    <presentation name="PyScript2" x="41" y="71" width="158" height="63" expanded="1" expx="41" expy="71" expWidth="158" expHeight="63" shownState="0"/>
83    <presentation name="__ROOT__" x="0" y="0" width="465" height="331.5" expanded="1" expx="0" expy="0" expWidth="465" expHeight="331.5" shownState="0"/>
84 </proc>