--- /dev/null
+A C++ component dynamically loadable
+=========================================
+
+To build this example, modify the components.py file
+to take into account your configuration.
+
+1- your prerequisite file
+2- your KERNEL_ROOT_DIR
+3- your PaCO++ installed
+
+Then set the environment (including PYTHONPATH for YACGEN, ../.. from here and execute components.py ::
+
+ source <your prerequisite file>
+ python components.py
+
+You should get a SALOME module in source form (cppcompos_SRC), its installation (install) and
+a SALOME application (appli) composed of modules KERNEL, GUI, YACS and cppcompos.
+
+To run a coupling:
+
+ 1. start SALOME in background : ./appli/runAppli -t
+ 2. start a SALOME session : ./appli/runSession
+ 3. start YACS coupler with coupling file : driver coupling.xml
+ 4. examine output files in /tmp
+ 5. shutdown SALOME : shutdowSalome.py
+ 6. exit session : CTRL-D (or exit)
--- /dev/null
+import os
+from module_generator import Generator,Module,Service,PACOComponent
+
+context={'update':1,
+ "prerequisites":"/home/aribes/Dev/Scripts_env/prerequis.sh",
+ "kernel":"/home/aribes/Dev/Install/SALOME/KERNEL_INSTALL-RIBES",
+ "paco":"/home/aribes/Dev/Install/PaCO++_install"
+ }
+
+cwd=os.getcwd()
+
+body="""
+c = a + b;
+"""
+
+c1=PACOComponent("paco1",
+ "dummy",
+ services=[
+ Service("run",inport=[("a","double"),("b","double")],
+ outport=[("c","double")],
+ body=body,
+ impl_type="parallel"
+ ),
+ ],
+ )
+
+
+g=Generator(Module("pacocompos",components=[c1],prefix="./install"),context)
+g.generate()
+g.bootstrap()
+g.configure()
+g.make()
+g.install()
+g.make_appli("appli",
+ restrict=["KERNEL","GUI","YACS"],
+ altmodules={"GUI":"/home/aribes/Dev/Install/SALOME/GUI_INSTALL",
+ "YACS":"/home/aribes/Dev/Install/SALOME/YACS_INSTALL"})
+
--- /dev/null
+<?xml version='1.0'?>
+<proc>
+ <type name="bool" kind="bool"/>
+ <type name="double" kind="double"/>
+ <objref name="file" id="file"/>
+ <type name="int" kind="int"/>
+ <type name="string" kind="string"/>
+ <container name="DefaultContainer">
+ <property name="container_name" value="FactoryServer"/>
+ <property name="hostname" value="localhost"/>
+ </container>
+ <container name="DummyContainer">
+ <property name="nb_component_nodes" value="1"/>
+ <property name="parallelLib" value="Dummy"/>
+ </container>
+ <service name="run0">
+ <component>paco1</component>
+ <load container="DummyContainer"/>
+ <method>run</method>
+ <inport name="a" type="double"/>
+ <inport name="b" type="double"/>
+ <outport name="c" type="double"/>
+ </service>
+ <parameter>
+ <tonode>run0</tonode><toport>a</toport>
+ <value><double>5</double></value>
+ </parameter>
+ <parameter>
+ <tonode>run0</tonode><toport>b</toport>
+ <value><double>4</double></value>
+ </parameter>
+ <presentation name="run0" x="9" y="80.5" width="227.5" height="139"/>
+ <presentation name="__ROOT__" x="0" y="0" width="246" height="228.5"/>
+</proc>