]> SALOME platform Git repositories - tools/yacsgen.git/commitdiff
Salome HOME
Merge from V5_1_main 14/05/2010
authorvsr <vsr@opencascade.com>
Fri, 14 May 2010 15:56:44 +0000 (15:56 +0000)
committervsr <vsr@opencascade.com>
Fri, 14 May 2010 15:56:44 +0000 (15:56 +0000)
68 files changed:
Examples/ast1/Makefile [new file with mode: 0644]
Examples/ast1/components.py
Examples/ast1/fcompo/Makefile
Examples/ast1/fcompo/compo.f
Examples/ast1/myaster/Makefile
Examples/ast1/myaster/make_cata
Examples/ast2/Makefile [new file with mode: 0644]
Examples/ast2/components.py
Examples/ast2/exeaster
Examples/ast2/fcompo/Makefile
Examples/ast2/fcompo/compo.f
Examples/ast2/myaster/Makefile
Examples/ast2/myaster/config.txt
Examples/ast2/myaster/make_exec
Examples/calcium1/Makefile [new file with mode: 0644]
Examples/calcium1/code1.f [new file with mode: 0644]
Examples/calcium1/components.py [new file with mode: 0644]
Examples/calcium1/coupling.xml [new file with mode: 0644]
Examples/calcium2/Makefile [new file with mode: 0644]
Examples/calcium2/code1.f [new file with mode: 0644]
Examples/calcium2/components.py [new file with mode: 0644]
Examples/calcium2/coupling.xml [new file with mode: 0644]
Examples/context.py
Examples/cpp1/Makefile [new file with mode: 0644]
Examples/cpp1/components.py
Examples/cpp2/Makefile
Examples/cpp2/components.py
Examples/cpp2/prog.cxx
Examples/fort1/Makefile
Examples/fort1/bidul.f
Examples/fort1/code1.f
Examples/fort1/code2.f
Examples/fort1/components.py
Examples/fort2/Makefile
Examples/fort2/code1.f
Examples/fort2/code2.f
Examples/fort2/components.py
Examples/makefile.inc
Examples/paco1/Makefile [new file with mode: 0644]
Examples/paco1/components.py
Examples/paco2/Makefile [new file with mode: 0644]
Examples/paco2/components.py
Examples/paco3/Makefile [new file with mode: 0644]
Examples/paco3/components.py
Examples/pacocontext.py [new file with mode: 0644]
Examples/pyth1/Makefile [new file with mode: 0644]
Examples/pyth1/bidul.py
Examples/pyth1/components.py
Examples/pyth2/Makefile [new file with mode: 0644]
Examples/pyth2/components.py
MANIFEST.in
module_generator/__init__.py
module_generator/astcompo.py
module_generator/aster_tmpl.py
module_generator/cata_tmpl.py
module_generator/compat.py
module_generator/cpp_tmpl.py
module_generator/cppcompo.py
module_generator/fcompo.py
module_generator/gener.py
module_generator/mod_tmpl.py
module_generator/paco_tmpl.py
module_generator/pacocompo.py
module_generator/pycompo.py
module_generator/pyth_tmpl.py
module_generator/salomemodules.py [new file with mode: 0644]
module_generator/yacstypes.py [new file with mode: 0644]
setup.py

diff --git a/Examples/ast1/Makefile b/Examples/ast1/Makefile
new file mode 100644 (file)
index 0000000..32f8cbe
--- /dev/null
@@ -0,0 +1,21 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+clean:
+       rm -rf *.o *.so *.pyc astmod_SRC astmod_SRC.bak appli appli.bak install install.bak traceExec_proc
index beb099eaaad7a562b181187d4aea81a1a04875d7..2243a4b9c8f6574be98353166575136f9350a18d 100644 (file)
@@ -1,3 +1,22 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 """
  Example with one Code_Aster component and one fortran component
 """
@@ -50,4 +69,4 @@ g.bootstrap()
 g.configure()
 g.make()
 g.install()
-g.make_appli(appli_dir,restrict=["KERNEL","GUI","YACS"])
+g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR, "YACS":YACS_ROOT_DIR})
index 525e29974ce7601a23d9df397f9b08e613acf94f..6835e82142a099ef7d5a71a29c1ce40bd909173c 100644 (file)
@@ -1,6 +1,23 @@
-include ../../makefile.inc
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
-FC=gfortran
+include ../../makefile.inc
 
 KERNEL_LIBS= -L$(KERNEL_ROOT_DIR)/lib/salome -lCalciumC -lSalomeDSCSuperv -lSalomeDSCContainer -lSalomeDatastream -lSalomeDSCSupervBasic
 
index 7abff52395a1c576fa4617d96d86f9c092738518..6480631f5ec6d7f7b3f6dceeb86a36a0e9ce6466 100644 (file)
@@ -1,3 +1,22 @@
+C  Copyright (C) 2009-2010  EDF R&D
+C
+C  This library is free software; you can redistribute it and/or
+C  modify it under the terms of the GNU Lesser General Public
+C  License as published by the Free Software Foundation; either
+C  version 2.1 of the License.
+C
+C  This library is distributed in the hope that it will be useful,
+C  but WITHOUT ANY WARRANTY; without even the implied warranty of
+C  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+C  Lesser General Public License for more details.
+C
+C  You should have received a copy of the GNU Lesser General Public
+C  License along with this library; if not, write to the Free Software
+C  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+C
+C  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+C
+
        SUBROUTINE S1(compo,A,B,C,D,E,F)
        include 'calcium.hf'
        integer compo
index f9c39228a60aab0c25936358b60199a907ffe460..13292fc70dbd6d8d9ec3dd404e5524f8d232b42d 100644 (file)
@@ -1,3 +1,22 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 include ../../makefile.inc
 
 ASTER_INSTALL=$(ASTER_ROOT)/$(ASTER_VERSION)
@@ -45,4 +64,4 @@ op0181.o:src/op0181.f
 astermodule.so: $(OBJETS)
        $(LD) -shared -o $@ $(OBJETS) $(KERNEL_LIBS) $(ASTER_LIBS)
 clean:
-       rm -rf *.o *.so bibpyt commande/cata.py*
+       rm -rf *.o *.so bibpyt commande/cata.py* make-cmd commande
index 0846dbf004e5aee81256f3c646674bd395c436e2..8d82dbc2385040479a8ec008002b5e944084b541 100755 (executable)
@@ -1,4 +1,23 @@
 #!/bin/sh
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 cat >make-cmd << END
 P debug nodebug
 P mode interactif
diff --git a/Examples/ast2/Makefile b/Examples/ast2/Makefile
new file mode 100644 (file)
index 0000000..52504ce
--- /dev/null
@@ -0,0 +1,21 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+clean:
+       rm -rf *.o *.so *.pyc astmod_SRC astmod_SRC.bak appli appli.bak install install.bak traceExec_proc caster_inst_1 cfort_inst_1 monfichier
index 889d9feb338a7857bb8fc5e6fdfcd2503a3fbe76..68fc30fffa95400e06030e50adc36768539c6734 100644 (file)
@@ -1,3 +1,22 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 """
  Example with one Code_Aster component and one fortran component
 """
@@ -53,4 +72,4 @@ g.bootstrap()
 g.configure()
 g.make()
 g.install()
-g.make_appli(appli_dir,restrict=["KERNEL","GUI","YACS"])
+g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR, "YACS":YACS_ROOT_DIR})
index 1d352796d6e23efa841df9bb8bebe1d8c7fa113e..ed02ec751b6fc48146001d8d88fb6ec026ae94e7 100755 (executable)
@@ -1,10 +1,29 @@
+#!/bin/sh
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
 cat > temp.comm << END
 END
 
 cat > temp.export << END
 P actions make_etude
-P version STA10.0
+P version STA10.1
 P nomjob salome
 P ncpus 1
 A memjeveux 4.000000
@@ -28,5 +47,5 @@ F resu $PWD/resu R 8
 F erre $PWD/erre R 9
 END
 
-/local/cchris/Aster/V10/Install/ASTK/ASTK_SERV/bin/as_run temp.export
+/local/cchris/Aster/V10.1/aster/ASTK/ASTK_SERV/bin/as_run temp.export
 
index 36e79c16e04fa89f7904f6d9d9274192ab579576..a28228b427fd697310f6cb0796deb81b1081c000 100644 (file)
@@ -1,8 +1,24 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
 include ../../makefile.inc
 
-FC=gfortran
-
 all:prog
 prog:compo.o
        $(FC) -o prog compo.o -L../install/lib/salome -lcfortExelib
index a4423e47e3c956b540d8ea51a6f87b4d4e8989d4..6aa7721ecba1025d7130fb3771ba4acdcc53f5bc 100644 (file)
@@ -1,3 +1,22 @@
+C  Copyright (C) 2009-2010  EDF R&D
+C
+C  This library is free software; you can redistribute it and/or
+C  modify it under the terms of the GNU Lesser General Public
+C  License as published by the Free Software Foundation; either
+C  version 2.1 of the License.
+C
+C  This library is distributed in the hope that it will be useful,
+C  but WITHOUT ANY WARRANTY; without even the implied warranty of
+C  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+C  Lesser General Public License for more details.
+C
+C  You should have received a copy of the GNU Lesser General Public
+C  License along with this library; if not, write to the Free Software
+C  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+C
+C  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+C
+
        PROGRAM P
        CALL YACSINIT()
        END
index dc8cb892181781fe227af2f30a30805355198284..7ff9da7abcdad0cbdcac99bc04927c0ca56aa145 100644 (file)
@@ -1,3 +1,21 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
 include ../../makefile.inc
 
index d1724771c90d89fef551dfbb496c89f036fc925c..27aac3ae6246a613fcbdcd6cd6b074819333d3cd 100644 (file)
@@ -1,3 +1,21 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 # Configuration file
 # $Id$
 # $Name$
 #
 ID_PERF        | id      | -     | claui2c6
 #
-ENV_SH         | env     | -     | /local/cchris/Aster/V10/Install/STA10.0/profile.sh
+ENV_SH         | env     | -     | /local/cchris/Aster/V10.1/aster/STA10.1/profile.sh
 #
 LIB            | ar      | ?     | /usr/bin/ar -rv
 #
-BIBL           | python  | 2.4   | -lpython2.5
-BIBL           | med     | 2.3.5 | -Wl,-R -Wl,/local/cchris/pkg/med235/install/lib -L/local/cchris/pkg/med235/install/lib -lmed
-BIBL           | hdf5    | 1.6.5 | -lhdf5
+BIBL           | python  | 2.4   | -L/usr/lib -L/usr/lib/python2.5/config -lpython2.5
+BIBL           | med     | 2.3.5 | -L/local/cchris/Aster/V10.1/aster/public/med-2.3.6/lib -lmed
+BIBL           | hdf5    | 1.6.5 | -L/usr/lib -lhdf5
 BIBL           | zmat    | 8.4   | 
-BIBL           | mumps   | ?     | /local/cchris/Aster/V10/Install/public/mumps-4.7.3/lib/libdmumps.a /local/cchris/Aster/V10/Install/public/mumps-4.7.3/lib/libzmumps.a /local/cchris/Aster/V10/Install/public/mumps-4.7.3/lib/libpord.a /local/cchris/Aster/V10/Install/public/mumps-4.7.3/libseq/libmpiseq.a
+BIBL           | mumps   | ?     | /local/cchris/Aster/V10.1/aster/public/mumps-4.8.4/lib/libdmumps.a /local/cchris/Aster/V10.1/aster/public/mumps-4.8.4/lib/libzmumps.a /local/cchris/Aster/V10.1/aster/public/mumps-4.8.4/lib/libsmumps.a /local/cchris/Aster/V10.1/aster/public/mumps-4.8.4/lib/libcmumps.a /local/cchris/Aster/V10.1/aster/public/mumps-4.8.4/lib/libmumps_common.a /local/cchris/Aster/V10.1/aster/public/mumps-4.8.4/lib/libpord.a /local/cchris/Aster/V10.1/aster/public/mumps-4.8.4/lib/libmpiseq.a -L/local/cchris/Aster/V10.1/aster/public/metis-4.0/lib -lmetis
 BIBL           | scotch  | 4.0   | 
-BIBL           | math    | ?     | /usr/lib/liblapack.a /usr/lib/libblas.a /usr/lib/gcc/x86_64-linux-gnu/4.3/libgfortran.a /usr/lib/gcc/x86_64-linux-gnu/4.3/libgfortran.a
+BIBL           | math    | ?     | -L/usr/lib -llapack -L/usr/lib -lblas -L/usr/lib/gcc/x86_64-linux-gnu/4.3 -lgfortran
 BIBL           | mpi     | 2     | 
 BIBL           | c++     | ?     | -L/usr/lib/gcc/x86_64-linux-gnu/4.3 -lstdc++ -lsupc++
 BIBL           | sys     | ?     | -Wl,--allow-multiple-definition -Wl,--export-dynamic -lieee -ldl -lpthread -lutil -lm -lz
@@ -63,24 +81,23 @@ LINK           | link    | ?     | /usr/bin/gfortran
 OPTL           | link    | ?     |  -fopenmp
 #
 CC             | cc      | ?     | /usr/bin/gcc
-OPTC_D         | cc      | ?     | -c -g  -fno-stack-protector
-OPTC_O         | cc      | ?     | -c -O2 -fno-stack-protector
-INCL           | include | ?     | -I/local/cchris/Aster/V10/Install/STA10.0/bibc/include -I/usr/include/python2.5 -I/local/cchris/Aster/V10/Install/public/hdf5-1.6.5/include
+OPTC_D         | cc      | ?     | -c -g  -fno-stack-protector -fPIC
+OPTC_O         | cc      | ?     | -c -O2 -fno-stack-protector -fPIC
+INCL           | include | ?     | -I/local/cchris/Aster/V10.1/aster/STA10.1/bibc/include -I/usr/include/python2.5
 #
 F77            | f77     | ?     | /usr/bin/gfortran
-OPTF_D         | f77     | ?     | -c -g  -fopenmp  -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8
-OPTF_O         | f77     | ?     | -c -O2 -fopenmp  -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8
+OPTF_D         | f77     | ?     | -c -g  -fopenmp -fPIC  -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8
+OPTF_O         | f77     | ?     | -c -O2 -fopenmp -fPIC  -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8
 INCLF          | include | ?     | -I/local/cchris/Salome/Install/KERNEL_V5/include/salome
 #
 F90            | f90     | ?     | /usr/bin/gfortran
-OPTF90_D       | f90     | ?     | -c -g  -ffixed-line-length-0 -x f77-cpp-input  -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8
-OPTF90_O       | f90     | ?     | -c -O2 -ffixed-line-length-0 -x f77-cpp-input  -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8
-INCLF90        | include | ?     |  -I/local/cchris/Aster/V10/Install/STA10.0/bibf90/include_mumps-4.7.3
+OPTF90_D       | f90     | ?     | -c -g  -ffixed-line-length-0 -x f77-cpp-input -fPIC  -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8
+OPTF90_O       | f90     | ?     | -c -O2 -ffixed-line-length-0 -x f77-cpp-input -fPIC  -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8
+INCLF90        | include | ?     |  -I/local/cchris/Aster/V10.1/aster/STA10.1/bibf90/include_mumps-4.8.4
 #
 G77_AGLA       | g77     | ?     | unused
 #
 SRCFOR         | src     | 11-04 | bibfor
-#Comment following line if you have no f90 compiler
 SRCF90         | src     | 11-04 | bibf90
 SRCFERM        | src     | 11-04 | fermetur
 SRCC           | src     | 11-04 | bibc
@@ -113,9 +130,9 @@ ARGEXE         | exec    | 03-02 | -eficas_path ./Python
 MAKE_SURCH_OFFI | build  | 11-04 | Lecture_Cata_Ele/make_surch_offi.py
 MAKE_CAPY_OFFI  | build  | 11-04 | Lecture_Cata_Ele/make_capy_offi.py
 #
-REPOUT         | exec    | 11-04 | /local/cchris/Aster/V10/Install/outils
-REPMAT         | exec    | 02-05 | /local/cchris/Aster/V10/Install/STA10.0/materiau
-REPDEX         | exec    | 02-05 | /local/cchris/Aster/V10/Install/STA10.0/datg
+REPOUT         | exec    | 11-04 | /local/cchris/Aster/V10.1/aster/outils
+REPMAT         | exec    | 02-05 | /local/cchris/Aster/V10.1/aster/STA10.1/materiau
+REPDEX         | exec    | 02-05 | /local/cchris/Aster/V10.1/aster/STA10.1/datg
 #
 SUPERV         | exec    | 03-02 | Accas
 SUPERV         | exec    | 03-02 | Build
index 6dcc041b40f067ba78c4005dd844e49aef7cf722..45117e9d91951df10fbe33e895c69c8a7e6cc516 100755 (executable)
@@ -1,4 +1,22 @@
 #!/bin/sh
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
 cat >make-exe << END
 P actions make_exec
diff --git a/Examples/calcium1/Makefile b/Examples/calcium1/Makefile
new file mode 100644 (file)
index 0000000..c490fb9
--- /dev/null
@@ -0,0 +1,30 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+include ../makefile.inc
+
+all:libcode1.so
+
+libcode1.so:code1.o
+         $(FC) -shared -fPIC -o libcode1.so code1.o
+code1.o:code1.f
+         $(FC) -c code1.f -fPIC -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions
+
+clean:
+       rm -rf *.o *.so install install.bak traceExec_proc appli appli.bak pycompos_SRC pycompos_SRC.bak
diff --git a/Examples/calcium1/code1.f b/Examples/calcium1/code1.f
new file mode 100644 (file)
index 0000000..d6b7546
--- /dev/null
@@ -0,0 +1,268 @@
+C  Copyright (C) 2009-2010  EDF R&D
+C
+C  This library is free software; you can redistribute it and/or
+C  modify it under the terms of the GNU Lesser General Public
+C  License as published by the Free Software Foundation; either
+C  version 2.1 of the License.
+C
+C  This library is distributed in the hope that it will be useful,
+C  but WITHOUT ANY WARRANTY; without even the implied warranty of
+C  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+C  Lesser General Public License for more details.
+C
+C  You should have received a copy of the GNU Lesser General Public
+C  License along with this library; if not, write to the Free Software
+C  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+C
+C  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+C
+
+       SUBROUTINE SERV1(compo,a,b,c)
+       include 'calcium.hf'
+       integer compo(2)
+       integer i, nval, info, z(10), l
+       integer*8 lz(10)
+       integer*4 z4(10),lo(10)
+
+       real*8 dd(10),a,b,c,ti,tf,t
+       real*4 u(20)
+       real*4 tti,ttf,tt
+       character*10 s(3)
+       character*20 rs(3)
+       character*64 instance
+
+       write(6,*)a,b
+       call cpcd(compo,instance,info)
+       write(6,*)"instance name=",instance
+
+C  write
+       tt=0.
+       t=0.
+       dd(1)=125.45
+       dd(2)=8.8
+       i=1
+       l=10
+       CALL cpedb(compo,CP_ITERATION,t,i,'ba',l,dd,info)
+       CALL cpedb(compo,CP_ITERATION,t,2,'ba',l,dd,info)
+       CALL cpedb(compo,CP_ITERATION,t,3,'ba',l,dd,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       s(1)="titi"
+       s(2)="tututu"
+       s(3)="tatatata"
+       write(6,*)'s=',s
+       l=3
+       CALL cpech(compo,CP_ITERATION,tt,i,'bb',l,s,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       z(1)=1
+       z(2)=8
+       z(3)=0
+       write(6,*)'z=',z(1)
+       write(6,*)'z=',z(2)
+       write(6,*)'z=',z(3)
+       l=10
+       CALL cpeen(compo,CP_ITERATION,tt,i,'bc',l,z,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       u(1)=1
+       u(2)=8
+       u(3)=4
+       u(4)=4
+       u(5)=5
+       u(6)=5
+       write(6,*)'u=',u(1)
+       write(6,*)'u=',u(2)
+       write(6,*)'u=',u(3)
+       write(6,*)'u=',u(4)
+       write(6,*)'u=',u(5)
+       write(6,*)'u=',u(6)
+       CALL cpecp(compo,CP_ITERATION,tt,i,'bd',l,u,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       u(1)=1.1
+       u(2)=8.8
+       u(3)=4.4
+       write(6,*)'u=',u(1)
+       write(6,*)'u=',u(2)
+       write(6,*)'u=',u(3)
+       CALL cpere(compo,CP_ITERATION,tt,i,'be',l,u,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       lo(1)=1
+       lo(2)=0
+       lo(3)=1
+       write(6,*)'lo=',lo(1)
+       write(6,*)'lo=',lo(2)
+       write(6,*)'lo=',lo(3)
+       CALL cpelo(compo,CP_ITERATION,tt,i,'bf',l,lo,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       lz(1)=11
+       lz(2)=22
+       lz(3)=33
+       write(6,*)'lz=',lz(1)
+       write(6,*)'lz=',lz(2)
+       write(6,*)'lz=',lz(3)
+       CALL cpeln(compo,CP_ITERATION,tt,i,'bg',l,lz,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       z4(1)=1
+       z4(2)=8
+       z4(3)=0
+       write(6,*)'z4=',z4(1)
+       write(6,*)'z4=',z4(2)
+       write(6,*)'z4=',z4(3)
+       CALL cpein(compo,CP_ITERATION,tt,i,'bh',l,z4,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       lz(1)=11
+       lz(2)=22
+       lz(3)=2**30
+       lz(3)=2**20*lz(3)
+       write(6,*)'lz=',lz(1)
+       write(6,*)'lz=',lz(2)
+       write(6,*)'lz=',lz(3)
+       CALL cpelg(compo,CP_ITERATION,tt,i,'bi',l,lz,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+C  read 
+       ti=0.
+       tf=1.
+       i=1
+       dd(1)=0.
+       dd(2)=0.
+       dd(3)=0.
+       l=3
+       CALL cpldb(compo,CP_ITERATION,ti,tf,i,'aa',l,nval,dd,info)
+       write(6,*)'info=',info
+       write(6,*)'dd=',dd(1)
+       write(6,*)'dd=',dd(2)
+       write(6,*)'dd=',dd(3)
+       write(6,*)'nval=',nval
+       call flush(6)
+
+       tti=0.
+       ttf=1.
+       i=1
+       CALL cplch(compo,CP_ITERATION,tti,ttf,i,'ab',l,nval,rs,info)
+       write(6,*)'info=',info
+       write(6,*)'rs=',rs
+       write(6,*)'nval=',nval
+       call flush(6)
+
+       z(1)=0
+       z(2)=0
+       z(3)=0
+       CALL cplen(compo,CP_ITERATION,tti,ttf,i,'ac',l,nval,z,info)
+       write(6,*)'info=',info
+       write(6,*)'nval=',nval
+       write(6,*)'z=',z(1)
+       write(6,*)'z=',z(2)
+       write(6,*)'z=',z(3)
+       call flush(6)
+
+       u(1)=0
+       u(2)=0
+       u(3)=0
+       u(4)=0
+       u(5)=0
+       u(6)=0
+       CALL cplcp(compo,CP_ITERATION,tti,ttf,i,'ad',l,nval,u,info)
+       write(6,*)'info=',info
+       write(6,*)'nval=',nval
+       write(6,*)'u=',u(1)
+       write(6,*)'u=',u(2)
+       write(6,*)'u=',u(3)
+       write(6,*)'u=',u(4)
+       write(6,*)'u=',u(5)
+       write(6,*)'u=',u(6)
+       call flush(6)
+
+       u(1)=0
+       u(2)=0
+       u(3)=0
+       CALL cplre(compo,CP_ITERATION,tti,ttf,i,'ae',l,nval,u,info)
+       write(6,*)'info=',info
+       write(6,*)'nval=',nval
+       write(6,*)'u=',u(1)
+       write(6,*)'u=',u(2)
+       write(6,*)'u=',u(3)
+       call flush(6)
+
+       lo(1)=0
+       lo(2)=0
+       lo(3)=0
+       CALL cpllo(compo,CP_ITERATION,tti,ttf,i,'af',l,nval,lo,info)
+       write(6,*)'info=',info
+       write(6,*)'nval=',nval
+       write(6,*)'lo=',lo(1)
+       write(6,*)'lo=',lo(2)
+       write(6,*)'lo=',lo(3)
+       call flush(6)
+
+       lz(1)=0
+       lz(2)=0
+       lz(3)=0
+       CALL cplln(compo,CP_ITERATION,tti,ttf,i,'ag',l,nval,lz,info)
+       write(6,*)'info=',info
+       write(6,*)'nval=',nval
+       write(6,*)'lz=',lz(1)
+       write(6,*)'lz=',lz(2)
+       write(6,*)'lz=',lz(3)
+       call flush(6)
+
+       z4(1)=0
+       z4(2)=0
+       z4(3)=0
+       CALL cplin(compo,CP_ITERATION,tti,ttf,i,'ah',l,nval,z4,info)
+       write(6,*)'info=',info
+       write(6,*)'nval=',nval
+       write(6,*)'z4=',z4(1)
+       write(6,*)'z4=',z4(2)
+       write(6,*)'z4=',z4(3)
+       call flush(6)
+
+       lz(1)=0
+       lz(2)=0
+       lz(3)=0
+       CALL cpllg(compo,CP_ITERATION,tti,ttf,i,'ai',l,nval,lz,info)
+       write(6,*)'info=',info
+       write(6,*)'nval=',nval
+       write(6,*)'lz=',lz(1)
+       write(6,*)'lz=',lz(2)
+       write(6,*)'lz=',lz(3)
+       call flush(6)
+
+       call cpfini(compo,'aa',1,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       i=1
+       l=3
+       CALL cpldb(compo,CP_ITERATION,ti,tf,i,'aa',l,nval,dd,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       call cpeffi(compo,'aa',3,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       i=3
+       l=3
+       CALL cpldb(compo,CP_ITERATION,ti,tf,i,'aa',l,nval,dd,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       c=a+b
+       return 
+       end
diff --git a/Examples/calcium1/components.py b/Examples/calcium1/components.py
new file mode 100644 (file)
index 0000000..85e08c0
--- /dev/null
@@ -0,0 +1,459 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+import os
+from module_generator import Generator,Module,Service,PYComponent,CPPComponent,F77Component
+
+#import context from ..
+execfile("../context.py")
+
+# C++ component
+
+body="""
+std::cerr << "a: " << a << std::endl;
+std::cerr << "b: " << b << std::endl;
+int info;
+double t1,t2;
+float tt1,tt2;
+int i=1;
+int mval;
+double val[10],rval[10];
+int ival[10],rival[10];
+long lval[10],rlval[10];
+float cval[20],rcval[20];
+char* sval[]={"coucou","bonjour","salut"};
+char* rsval[3];
+char mystring1[10];
+char mystring2[10];
+char mystring3[10];
+rsval[0]=mystring1;
+rsval[1]=mystring2;
+rsval[2]=mystring3;
+
+val[0]=3.2;
+val[1]=5.2;
+val[2]=9.8;
+std::cerr << "val: " << val[0] << std::endl;
+std::cerr << "val: " << val[1] << std::endl;
+std::cerr << "val: " << val[2] << std::endl;
+cp_edb(component,CP_ITERATION,0.,1,(char*)"ba",10,val);
+cp_edb(component,CP_ITERATION,0.,2,(char*)"ba",10,val);
+cp_edb(component,CP_ITERATION,0.,3,(char*)"ba",10,val);
+
+std::cerr << "sval: " << sval[0] << std::endl;
+std::cerr << "sval: " << sval[1] << std::endl;
+std::cerr << "sval: " << sval[2] << std::endl;
+cp_ech(component,CP_ITERATION,0.,1,(char*)"bb",3,sval,6);
+
+ival[0]=1;
+ival[1]=2;
+ival[2]=3;
+std::cerr << "ival: " << ival[0] << std::endl;
+std::cerr << "ival: " << ival[1] << std::endl;
+std::cerr << "ival: " << ival[2] << std::endl;
+cp_een(component,CP_ITERATION,0.,1,(char*)"bc",10,ival);
+
+cval[0]=1;
+cval[1]=2;
+cval[2]=3;
+cval[3]=4.5;
+cval[4]=5.6;
+cval[5]=7.8;
+std::cerr << "cval: " << cval[0] << std::endl;
+std::cerr << "cval: " << cval[1] << std::endl;
+std::cerr << "cval: " << cval[2] << std::endl;
+std::cerr << "cval: " << cval[3] << std::endl;
+std::cerr << "cval: " << cval[4] << std::endl;
+std::cerr << "cval: " << cval[5] << std::endl;
+cp_ecp(component,CP_ITERATION,0.,1,(char*)"bd",10,cval);
+
+cval[0]=1.1;
+cval[1]=2.2;
+cval[2]=3.3;
+std::cerr << "cval: " << cval[0] << std::endl;
+std::cerr << "cval: " << cval[1] << std::endl;
+std::cerr << "cval: " << cval[2] << std::endl;
+cp_ere(component,CP_ITERATION,0.,1,(char*)"be",10,cval);
+
+ival[0]=1;
+ival[1]=0;
+ival[2]=1;
+std::cerr << "ival: " << ival[0] << std::endl;
+std::cerr << "ival: " << ival[1] << std::endl;
+std::cerr << "ival: " << ival[2] << std::endl;
+cp_elo(component,CP_ITERATION,0.,1,(char*)"bf",10,ival);
+
+lval[0]=1;
+lval[1]=2;
+lval[2]=3;
+std::cerr << "lval: " << lval[0] << std::endl;
+std::cerr << "lval: " << lval[1] << std::endl;
+std::cerr << "lval: " << lval[2] << std::endl;
+cp_eln(component,CP_ITERATION,0.,1,(char*)"bg",10,lval);
+
+ival[0]=1;
+ival[1]=2;
+ival[2]=3;
+std::cerr << "ival: " << ival[0] << std::endl;
+std::cerr << "ival: " << ival[1] << std::endl;
+std::cerr << "ival: " << ival[2] << std::endl;
+cp_een(component,CP_ITERATION,0.,1,(char*)"bh",10,ival);
+
+lval[0]=1;
+lval[1]=2;
+lval[2]=3;
+std::cerr << "lval: " << lval[0] << std::endl;
+std::cerr << "lval: " << lval[1] << std::endl;
+std::cerr << "lval: " << lval[2] << std::endl;
+cp_elg(component,CP_ITERATION,0.,1,(char*)"bi",10,lval);
+
+/* read */
+info=cp_ldb(component,CP_ITERATION,&t1,&t2,&i,(char*)"aa",3,&mval,rval);
+std::cerr << "info: " << info << std::endl;
+std::cerr << "rval: " << rval[0] << std::endl;
+std::cerr << "rval: " << rval[1] << std::endl;
+std::cerr << "rval: " << rval[2] << std::endl;
+
+info=cp_lch(component,CP_ITERATION,&tt1,&tt2,&i,(char*)"ab",3,&mval,rsval,7);
+std::cerr << "info: " << info << std::endl;
+std::cerr << "rsval: " << rsval[0] << std::endl;
+std::cerr << "rsval: " << rsval[1] << std::endl;
+std::cerr << "rsval: " << rsval[2] << std::endl;
+
+info=cp_len(component,CP_ITERATION,&tt1,&tt2,&i,(char*)"ac",3,&mval,rival);
+std::cerr << "info: " << info << std::endl;
+std::cerr << "rival: " << rival[0] << std::endl;
+std::cerr << "rival: " << rival[1] << std::endl;
+std::cerr << "rival: " << rival[2] << std::endl;
+
+info=cp_lcp(component,CP_ITERATION,&tt1,&tt2,&i,(char*)"ad",3,&mval,rcval);
+std::cerr << "info: " << info << std::endl;
+std::cerr << "rcval: " << rcval[0] << std::endl;
+std::cerr << "rcval: " << rcval[1] << std::endl;
+std::cerr << "rcval: " << rcval[2] << std::endl;
+std::cerr << "rcval: " << rcval[3] << std::endl;
+std::cerr << "rcval: " << rcval[4] << std::endl;
+std::cerr << "rcval: " << rcval[5] << std::endl;
+
+rcval[0]=0.;
+rcval[1]=0.;
+rcval[2]=0.;
+info=cp_lre(component,CP_ITERATION,&tt1,&tt2,&i,(char*)"ae",3,&mval,rcval);
+std::cerr << "info: " << info << std::endl;
+std::cerr << "rcval: " << rcval[0] << std::endl;
+std::cerr << "rcval: " << rcval[1] << std::endl;
+std::cerr << "rcval: " << rcval[2] << std::endl;
+
+rival[0]=0;
+rival[1]=0;
+rival[2]=0;
+i=1;
+info=cp_llo(component,CP_ITERATION,&tt1,&tt2,&i,(char*)"af",3,&mval,rival);
+std::cerr << "info: " << info << std::endl;
+std::cerr << "rival: " << rival[0] << std::endl;
+std::cerr << "rival: " << rival[1] << std::endl;
+std::cerr << "rival: " << rival[2] << std::endl;
+
+info=cp_lln(component,CP_ITERATION,&tt1,&tt2,&i,(char*)"ag",3,&mval,rlval);
+std::cerr << "info: " << info << std::endl;
+std::cerr << "rlval: " << rlval[0] << std::endl;
+std::cerr << "rlval: " << rlval[1] << std::endl;
+std::cerr << "rlval: " << rlval[2] << std::endl;
+
+rival[0]=0;
+rival[1]=0;
+rival[2]=0;
+i=1;
+info=cp_len(component,CP_ITERATION,&tt1,&tt2,&i,(char*)"ah",3,&mval,rival);
+std::cerr << "info: " << info << std::endl;
+std::cerr << "rival: " << rival[0] << std::endl;
+std::cerr << "rival: " << rival[1] << std::endl;
+std::cerr << "rival: " << rival[2] << std::endl;
+
+info=cp_llg(component,CP_ITERATION,&tt1,&tt2,&i,(char*)"ai",3,&mval,rlval);
+std::cerr << "info: " << info << std::endl;
+std::cerr << "rlval: " << rlval[0] << std::endl;
+std::cerr << "rlval: " << rlval[1] << std::endl;
+std::cerr << "rlval: " << rlval[2] << std::endl;
+
+info=cp_fini(component,(char*)"aa",1);
+std::cerr << "info: " << info << std::endl;
+
+info=cp_effi(component,(char*)"aa",3);
+std::cerr << "info: " << info << std::endl;
+
+c=2*rval[0];
+std::cerr << "c: " << c << std::endl;
+"""
+c1=CPPComponent("compo1",services=[
+          Service("s1",inport=[("a","double"),("b","double")],
+                       outport=[("c","double")],
+                       instream=[("aa","CALCIUM_double","I"),
+                                 ("ab","CALCIUM_string","I"),
+                                 ("ac","CALCIUM_integer","I"),
+                                 ("ad","CALCIUM_complex","I"),
+                                 ("ae","CALCIUM_real","I"),
+                                 ("af","CALCIUM_logical","I"),
+                                 ("ag","CALCIUM_long","I"),
+                                 ("ah","CALCIUM_integer","I"),
+                                 ("ai","CALCIUM_integer","I"),
+                                ],
+                       outstream=[("ba","CALCIUM_double","I"),
+                                  ("bb","CALCIUM_string","I"),
+                                  ("bc","CALCIUM_integer","I"),
+                                  ("bd","CALCIUM_complex","I"),
+                                  ("be","CALCIUM_real","I"),
+                                  ("bf","CALCIUM_logical","I"),
+                                  ("bg","CALCIUM_long","I"),
+                                  ("bh","CALCIUM_integer","I"),
+                                  ("bi","CALCIUM_integer","I"),
+                                 ],
+                       defs="//def1",body=body,
+                 ),
+          ],
+         )
+
+# python component
+
+defs="""
+"""
+
+body="""
+#b1
+info,name= calcium.cp_cd(component)
+print "name=",name
+print "info=",info
+dep=calcium.CP_ITERATION
+
+#double
+val=numpy.zeros(10,'d')
+val[0]=7.7
+val[5]=a*b
+nval=10
+print "--------> Appel calcium.cp_edb",val
+info=calcium.cp_edb(component, dep, 0., 1, "ba", nval,val)
+info=calcium.cp_edb(component, dep, 0., 2, "ba", nval,val)
+info=calcium.cp_edb(component, dep, 0., 3, "ba", nval,val)
+
+#string
+val=numpy.array(["coucouc ","bonjour ","salut "])
+val=calcium.stringArray(3,8)
+val[0]="coucouc"
+val[1]="bonjour"
+val[2]="salut"
+print "--------> Appel calcium.cp_ech",val
+info=calcium.cp_ech(component, dep, 0., 1, "bb", 3,val)
+
+#int
+val=numpy.zeros(10,'i')
+val[0]=1
+val[1]=3
+print "--------> Appel calcium.cp_een",val
+info=calcium.cp_een(component, dep, 0., 1, "bc", 3,val)
+
+val=numpy.zeros(10,'F')
+val[0]=1+2j
+val[1]=3+2j
+print "--------> Appel calcium.cp_ecp",val
+info=calcium.cp_ecp(component, dep, 0., 1, "bd", 3,val)
+
+val=numpy.zeros(10,'f')
+val[0]=1.3
+val[1]=3.2
+print "--------> Appel calcium.cp_ere",val
+info=calcium.cp_ere(component, dep, 0., 1, "be", 3,val)
+
+val=numpy.zeros(10,'i')
+val[0]=True
+val[1]=False
+val[2]=False
+print "--------> Appel calcium.cp_elo",val
+info=calcium.cp_elo(component, dep, 0., 1, "bf", 3,val)
+
+val=numpy.zeros(10,'l')
+val[0]=1
+val[1]=3
+val[2]=333
+print "--------> Appel calcium.cp_eln",val
+info=calcium.cp_eln(component, dep, 0., 1, "bg", 3,val)
+
+val=numpy.zeros(10,'i')
+val[0]=1
+val[1]=3
+val[2]=4
+print "--------> Appel calcium.cp_een",val
+info=calcium.cp_een(component, dep, 0., 1, "bh", 3,val)
+
+val=numpy.zeros(10,'l')
+val[0]=1
+val[1]=3
+val[2]=333
+print "--------> Appel calcium.cp_elg",val
+info=calcium.cp_elg(component, dep, 0., 1, "bi", 3,val)
+print "info=",info
+
+#read
+val=numpy.zeros(10,'d')
+print "--------> Appel calcium.cp_ldb"
+info,tt,ii,mval=calcium.cp_ldb(component, dep, 0.,1., 1, "aa", 3,val)
+print mval,val
+
+val=numpy.array(["","","",], dtype='S13')
+print "--------> Appel calcium.cp_lch"
+info,tt,ii,mval=calcium.cp_lch(component, dep, 0.,1., 1, "ab", 3,val)
+print mval,val
+print val.dtype
+
+val=numpy.array(["            ","  ","  ",], dtype='S13')
+print "--------> Appel calcium.cp_lch"
+info,tt,ii,mval=calcium.cp_lch(component, dep, 0.,1., 1, "ab", 3,val)
+print mval,val
+print val.dtype
+
+val=calcium.stringArray(3,8)
+print "--------> Appel calcium.cp_lch"
+info,tt,ii,mval=calcium.cp_lch(component, dep, 0.,1., 1, "ab", 3,val)
+print mval,val
+print val[0]
+print val[1]
+print val[2]
+
+val=numpy.zeros(10,'i')
+print "--------> Appel calcium.cp_len"
+info,tt,ii,mval=calcium.cp_len(component, dep, 0.,1., 1, "ac", 3,val)
+print mval,val
+
+val=numpy.zeros(10,'F')
+print "--------> Appel calcium.cp_lcp"
+info,tt,ii,mval=calcium.cp_lcp(component, dep, 0.,1., 1, "ad", 3,val)
+print mval,val
+
+val=numpy.zeros(10,'f')
+print "--------> Appel calcium.cp_lre"
+info,tt,ii,mval=calcium.cp_lre(component, dep, 0.,1., 1, "ae", 3,val)
+print mval,val
+
+val=numpy.zeros(10,'i')
+print "--------> Appel calcium.cp_llo"
+info,tt,ii,mval=calcium.cp_llo(component, dep, 0.,1., 1, "af", 3,val)
+print mval,val
+
+val=numpy.zeros(10,'l')
+print "--------> Appel calcium.cp_lln"
+info,tt,ii,mval=calcium.cp_lln(component, dep, 0.,1., 1, "ag", 3,val)
+print mval,val
+
+val=numpy.zeros(10,'i')
+print "--------> Appel calcium.cp_len"
+info,tt,ii,mval=calcium.cp_len(component, dep, 0.,1., 1, "ah", 3,val)
+print mval,val
+
+val=numpy.zeros(10,'l')
+print "--------> Appel calcium.cp_llg"
+info,tt,ii,mval=calcium.cp_llg(component, dep, 0.,1., 1, "ai", 3,val)
+print "info=",info
+print mval,val
+
+info=calcium.cp_fini(component,"aa",1)
+print "info=",info
+
+info=calcium.cp_effi(component,"aa",3)
+print "info=",info
+
+import time
+time.sleep(15)
+
+c=a+b
+d=a-b
+err=calcium.cp_fin(component,calcium.CP_ARRET)
+print "err=",err
+"""
+c2=PYComponent("compo2",services=[
+          Service("s1",inport=[("a","double"),("b","double")],
+                       outport=[("c","double"),("d","double")],
+                       instream=[("aa","CALCIUM_double","I"),
+                                 ("ab","CALCIUM_string","I"),
+                                 ("ac","CALCIUM_integer","I"),
+                                 ("ad","CALCIUM_complex","I"),
+                                 ("ae","CALCIUM_real","I"),
+                                 ("af","CALCIUM_logical","I"),
+                                 ("ag","CALCIUM_long","I"),
+                                 ("ah","CALCIUM_integer","I"),
+                                 ("ai","CALCIUM_integer","I"),
+                                ],
+                       outstream=[("ba","CALCIUM_double","I"),
+                                  ("bb","CALCIUM_string","I"),
+                                  ("bc","CALCIUM_integer","I"),
+                                  ("bd","CALCIUM_complex","I"),
+                                  ("be","CALCIUM_real","I"),
+                                  ("bf","CALCIUM_logical","I"),
+                                  ("bg","CALCIUM_long","I"),
+                                  ("bh","CALCIUM_integer","I"),
+                                  ("bi","CALCIUM_integer","I"),
+                                 ],
+                       defs=defs,body=body,
+                 ),
+             ],
+         )
+
+#fortran component
+
+cwd=os.getcwd()
+
+c3=F77Component("fcode1", 
+                services=[
+                          Service("serv1",
+                                  inport=[("a","double"),("b","double")],
+                                  outport=[("c","double")],
+                                  instream=[("aa","CALCIUM_double","I"),
+                                            ("ab","CALCIUM_string","I"),
+                                            ("ac","CALCIUM_integer","I"),
+                                            ("ad","CALCIUM_complex","I"),
+                                            ("ae","CALCIUM_real","I"),
+                                            ("af","CALCIUM_logical","I"),
+                                            ("ag","CALCIUM_long","I"),
+                                            ("ah","CALCIUM_integer","I"),
+                                            ("ai","CALCIUM_integer","I"),
+                                           ],
+                                  outstream=[("ba","CALCIUM_double","I"),
+                                             ("bb","CALCIUM_string","I"),
+                                             ("bc","CALCIUM_integer","I"),
+                                             ("bd","CALCIUM_complex","I"),
+                                             ("be","CALCIUM_real","I"),
+                                             ("bf","CALCIUM_logical","I"),
+                                             ("bg","CALCIUM_long","I"),
+                                             ("bh","CALCIUM_integer","I"),
+                                             ("bi","CALCIUM_integer","I"),
+                                            ],
+                                 ),
+                         ],
+                libs="-L%s -lcode1" % cwd,
+                rlibs="-Wl,--rpath -Wl,%s" % cwd,
+               )
+
+g=Generator(Module("pycompos",components=[c1,c2,c3],prefix="./install",layout="multidir"),context)
+g.generate()
+g.bootstrap()
+g.configure()
+g.make()
+g.install()
+g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR, "YACS":YACS_ROOT_DIR})
+
+
+
diff --git a/Examples/calcium1/coupling.xml b/Examples/calcium1/coupling.xml
new file mode 100644 (file)
index 0000000..8d6075a
--- /dev/null
@@ -0,0 +1,241 @@
+
+<proc>
+
+<!-- types -->
+
+<container name="A">
+</container>
+
+<container name="B">
+</container>
+
+<container name="C">
+</container>
+
+<service name="node1" >
+  <component>compo1</component>
+  <method>s1</method>
+  <load container="A"/>
+  <inport name="a" type="double"/>
+  <inport name="b" type="double"/>
+  <outport name="c" type="double"/>
+  <instream name="aa" type="CALCIUM_double"/>
+  <instream name="ab" type="CALCIUM_string"/>
+  <instream name="ac" type="CALCIUM_integer"/>
+  <instream name="ad" type="CALCIUM_complex"/>
+  <instream name="ae" type="CALCIUM_real"/>
+  <instream name="af" type="CALCIUM_logical"/>
+  <instream name="ag" type="CALCIUM_long"/>
+  <instream name="ah" type="CALCIUM_integer"/>
+  <instream name="ai" type="CALCIUM_integer"/>
+  <outstream name="ba" type="CALCIUM_double"/>
+  <outstream name="bb" type="CALCIUM_string"/>
+  <outstream name="bc" type="CALCIUM_integer"/>
+  <outstream name="bd" type="CALCIUM_complex"/>
+  <outstream name="be" type="CALCIUM_real"/>
+  <outstream name="bf" type="CALCIUM_logical"/>
+  <outstream name="bg" type="CALCIUM_long"/>
+  <outstream name="bh" type="CALCIUM_integer"/>
+  <outstream name="bi" type="CALCIUM_integer"/>
+</service>
+
+<service name="node2" >
+  <component>compo2</component>
+  <method>s1</method>
+  <load container="B"/>
+  <inport name="a" type="double"/>
+  <inport name="b" type="double"/>
+  <outport name="c" type="double"/>
+  <outport name="d" type="double"/>
+  <instream name="aa" type="CALCIUM_double"/>
+  <instream name="ab" type="CALCIUM_string"/>
+  <instream name="ac" type="CALCIUM_integer"/>
+  <instream name="ad" type="CALCIUM_complex"/>
+  <instream name="ae" type="CALCIUM_real"/>
+  <instream name="af" type="CALCIUM_logical"/>
+  <instream name="ag" type="CALCIUM_long"/>
+  <instream name="ah" type="CALCIUM_integer"/>
+  <instream name="ai" type="CALCIUM_integer"/>
+  <outstream name="ba" type="CALCIUM_double"/>
+  <outstream name="bb" type="CALCIUM_string"/>
+  <outstream name="bc" type="CALCIUM_integer"/>
+  <outstream name="bd" type="CALCIUM_complex"/>
+  <outstream name="be" type="CALCIUM_real"/>
+  <outstream name="bf" type="CALCIUM_logical"/>
+  <outstream name="bg" type="CALCIUM_long"/>
+  <outstream name="bh" type="CALCIUM_integer"/>
+  <outstream name="bi" type="CALCIUM_integer"/>
+</service>
+
+<service name="node3" >
+  <component>fcode1</component>
+  <method>serv1</method>
+  <load container="C"/>
+  <inport name="a" type="double"/>
+  <inport name="b" type="double"/>
+  <outport name="c" type="double"/>
+  <instream name="aa" type="CALCIUM_double"/>
+  <instream name="ab" type="CALCIUM_string"/>
+  <instream name="ac" type="CALCIUM_integer"/>
+  <instream name="ad" type="CALCIUM_complex"/>
+  <instream name="ae" type="CALCIUM_real"/>
+  <instream name="af" type="CALCIUM_logical"/>
+  <instream name="ag" type="CALCIUM_long"/>
+  <instream name="ah" type="CALCIUM_integer"/>
+  <instream name="ai" type="CALCIUM_integer"/>
+  <outstream name="ba" type="CALCIUM_double"/>
+  <outstream name="bb" type="CALCIUM_string"/>
+  <outstream name="bc" type="CALCIUM_integer"/>
+  <outstream name="bd" type="CALCIUM_complex"/>
+  <outstream name="be" type="CALCIUM_real"/>
+  <outstream name="bf" type="CALCIUM_logical"/>
+  <outstream name="bg" type="CALCIUM_long"/>
+  <outstream name="bh" type="CALCIUM_integer"/>
+  <outstream name="bi" type="CALCIUM_integer"/>
+</service>
+
+<!--datalinks -->
+<stream>
+  <fromnode>node1</fromnode><fromport>ba</fromport>
+  <tonode>node2</tonode><toport>aa</toport>
+</stream>
+<stream>
+  <fromnode>node2</fromnode><fromport>ba</fromport>
+  <tonode>node3</tonode><toport>aa</toport>
+</stream>
+<stream>
+  <fromnode>node3</fromnode><fromport>ba</fromport>
+  <tonode>node1</tonode><toport>aa</toport>
+</stream>
+
+<stream>
+  <fromnode>node1</fromnode><fromport>bb</fromport>
+  <tonode>node2</tonode><toport>ab</toport>
+</stream>
+<stream>
+  <fromnode>node2</fromnode><fromport>bb</fromport>
+  <tonode>node3</tonode><toport>ab</toport>
+</stream>
+<stream>
+  <fromnode>node3</fromnode><fromport>bb</fromport>
+  <tonode>node1</tonode><toport>ab</toport>
+</stream>
+
+<stream>
+  <fromnode>node1</fromnode><fromport>bc</fromport>
+  <tonode>node2</tonode><toport>ac</toport>
+</stream>
+<stream>
+  <fromnode>node2</fromnode><fromport>bc</fromport>
+  <tonode>node3</tonode><toport>ac</toport>
+</stream>
+<stream>
+  <fromnode>node3</fromnode><fromport>bc</fromport>
+  <tonode>node1</tonode><toport>ac</toport>
+</stream>
+
+<stream>
+  <fromnode>node1</fromnode><fromport>bd</fromport>
+  <tonode>node2</tonode><toport>ad</toport>
+</stream>
+<stream>
+  <fromnode>node2</fromnode><fromport>bd</fromport>
+  <tonode>node3</tonode><toport>ad</toport>
+</stream>
+<stream>
+  <fromnode>node3</fromnode><fromport>bd</fromport>
+  <tonode>node1</tonode><toport>ad</toport>
+</stream>
+
+<stream>
+  <fromnode>node1</fromnode><fromport>be</fromport>
+  <tonode>node2</tonode><toport>ae</toport>
+</stream>
+<stream>
+  <fromnode>node2</fromnode><fromport>be</fromport>
+  <tonode>node3</tonode><toport>ae</toport>
+</stream>
+<stream>
+  <fromnode>node3</fromnode><fromport>be</fromport>
+  <tonode>node1</tonode><toport>ae</toport>
+</stream>
+
+<stream>
+  <fromnode>node1</fromnode><fromport>bf</fromport>
+  <tonode>node2</tonode><toport>af</toport>
+</stream>
+<stream>
+  <fromnode>node2</fromnode><fromport>bf</fromport>
+  <tonode>node3</tonode><toport>af</toport>
+</stream>
+<stream>
+  <fromnode>node3</fromnode><fromport>bf</fromport>
+  <tonode>node1</tonode><toport>af</toport>
+</stream>
+
+<stream>
+  <fromnode>node1</fromnode><fromport>bg</fromport>
+  <tonode>node2</tonode><toport>ag</toport>
+</stream>
+<stream>
+  <fromnode>node2</fromnode><fromport>bg</fromport>
+  <tonode>node3</tonode><toport>ag</toport>
+</stream>
+<stream>
+  <fromnode>node3</fromnode><fromport>bg</fromport>
+  <tonode>node1</tonode><toport>ag</toport>
+</stream>
+
+<stream>
+  <fromnode>node1</fromnode><fromport>bh</fromport>
+  <tonode>node2</tonode><toport>ah</toport>
+</stream>
+<stream>
+  <fromnode>node2</fromnode><fromport>bh</fromport>
+  <tonode>node3</tonode><toport>ah</toport>
+</stream>
+<stream>
+  <fromnode>node3</fromnode><fromport>bh</fromport>
+  <tonode>node1</tonode><toport>ah</toport>
+</stream>
+
+<stream>
+  <fromnode>node1</fromnode><fromport>bi</fromport>
+  <tonode>node2</tonode><toport>ai</toport>
+</stream>
+<stream>
+  <fromnode>node2</fromnode><fromport>bi</fromport>
+  <tonode>node3</tonode><toport>ai</toport>
+</stream>
+<stream>
+  <fromnode>node3</fromnode><fromport>bi</fromport>
+  <tonode>node1</tonode><toport>ai</toport>
+</stream>
+
+<parameter>
+  <tonode>node1</tonode> <toport>a</toport>
+  <value><double>23</double> </value>
+</parameter>
+<parameter>
+  <tonode>node1</tonode> <toport>b</toport>
+  <value><double>53</double> </value>
+</parameter>
+<parameter>
+  <tonode>node2</tonode> <toport>a</toport>
+  <value><double>63</double> </value>
+</parameter>
+<parameter>
+  <tonode>node2</tonode> <toport>b</toport>
+  <value><double>73</double> </value>
+</parameter>
+<parameter>
+  <tonode>node3</tonode> <toport>a</toport>
+  <value><double>63</double> </value>
+</parameter>
+<parameter>
+  <tonode>node3</tonode> <toport>b</toport>
+  <value><double>73</double> </value>
+</parameter>
+
+</proc>
+
diff --git a/Examples/calcium2/Makefile b/Examples/calcium2/Makefile
new file mode 100644 (file)
index 0000000..c490fb9
--- /dev/null
@@ -0,0 +1,30 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+include ../makefile.inc
+
+all:libcode1.so
+
+libcode1.so:code1.o
+         $(FC) -shared -fPIC -o libcode1.so code1.o
+code1.o:code1.f
+         $(FC) -c code1.f -fPIC -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions
+
+clean:
+       rm -rf *.o *.so install install.bak traceExec_proc appli appli.bak pycompos_SRC pycompos_SRC.bak
diff --git a/Examples/calcium2/code1.f b/Examples/calcium2/code1.f
new file mode 100644 (file)
index 0000000..c7bc853
--- /dev/null
@@ -0,0 +1,272 @@
+C  Copyright (C) 2009-2010  EDF R&D
+C
+C  This library is free software; you can redistribute it and/or
+C  modify it under the terms of the GNU Lesser General Public
+C  License as published by the Free Software Foundation; either
+C  version 2.1 of the License.
+C
+C  This library is distributed in the hope that it will be useful,
+C  but WITHOUT ANY WARRANTY; without even the implied warranty of
+C  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+C  Lesser General Public License for more details.
+C
+C  You should have received a copy of the GNU Lesser General Public
+C  License along with this library; if not, write to the Free Software
+C  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+C
+C  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+C
+
+       SUBROUTINE SERV1(compo,a,b,c)
+       include 'calcium.hf'
+       integer compo(2)
+       integer i, nval, info, z(10), l
+       integer*8 lz(10)
+       integer*4 z4(10),lo(10)
+
+       real*8 dd(10),a,b,c,ti,tf,t
+       real*4 u(20)
+       real*4 tti,ttf,tt
+       character*10 s(3)
+       character*20 rs(3)
+       character*64 instance
+
+       write(6,*)a,b
+       call cpcd(compo,instance,info)
+       write(6,*)"instance name=",instance
+
+C  write
+       tt=0.
+       t=0.
+       dd(1)=125.45
+       dd(2)=8.8
+       i=1
+       l=10
+       CALL cpedb(compo,CP_TEMPS,t,i,'ba',l,dd,info)
+       t=1.
+       CALL cpedb(compo,CP_TEMPS,t,i,'ba',l,dd,info)
+       t=2.
+       CALL cpedb(compo,CP_TEMPS,t,i,'ba',l,dd,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       s(1)="titi"
+       s(2)="tututu"
+       s(3)="tatatata"
+       write(6,*)'s=',s
+       l=3
+       CALL cpech(compo,CP_TEMPS,tt,i,'bb',l,s,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       z(1)=1
+       z(2)=8
+       z(3)=0
+       write(6,*)'z=',z(1)
+       write(6,*)'z=',z(2)
+       write(6,*)'z=',z(3)
+       l=10
+       CALL cpeen(compo,CP_TEMPS,tt,i,'bc',l,z,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       u(1)=1
+       u(2)=8
+       u(3)=4
+       u(4)=4
+       u(5)=5
+       u(6)=5
+       write(6,*)'u=',u(1)
+       write(6,*)'u=',u(2)
+       write(6,*)'u=',u(3)
+       write(6,*)'u=',u(4)
+       write(6,*)'u=',u(5)
+       write(6,*)'u=',u(6)
+       CALL cpecp(compo,CP_TEMPS,tt,i,'bd',l,u,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       u(1)=1.1
+       u(2)=8.8
+       u(3)=4.4
+       write(6,*)'u=',u(1)
+       write(6,*)'u=',u(2)
+       write(6,*)'u=',u(3)
+       CALL cpere(compo,CP_TEMPS,tt,i,'be',l,u,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       lo(1)=1
+       lo(2)=0
+       lo(3)=1
+       write(6,*)'lo=',lo(1)
+       write(6,*)'lo=',lo(2)
+       write(6,*)'lo=',lo(3)
+       CALL cpelo(compo,CP_TEMPS,tt,i,'bf',l,lo,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       lz(1)=11
+       lz(2)=22
+       lz(3)=33
+       write(6,*)'lz=',lz(1)
+       write(6,*)'lz=',lz(2)
+       write(6,*)'lz=',lz(3)
+       CALL cpeln(compo,CP_TEMPS,tt,i,'bg',l,lz,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       z4(1)=1
+       z4(2)=8
+       z4(3)=0
+       write(6,*)'z4=',z4(1)
+       write(6,*)'z4=',z4(2)
+       write(6,*)'z4=',z4(3)
+       CALL cpein(compo,CP_TEMPS,tt,i,'bh',l,z4,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       lz(1)=11
+       lz(2)=22
+       lz(3)=2**30
+       lz(3)=2**20*lz(3)
+       write(6,*)'lz=',lz(1)
+       write(6,*)'lz=',lz(2)
+       write(6,*)'lz=',lz(3)
+       CALL cpelg(compo,CP_TEMPS,tt,i,'bi',l,lz,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+C  read 
+       ti=0.
+       tf=1.
+       i=1
+       dd(1)=0.
+       dd(2)=0.
+       dd(3)=0.
+       l=3
+       CALL cpldb(compo,CP_TEMPS,ti,tf,i,'aa',l,nval,dd,info)
+       write(6,*)'info=',info
+       write(6,*)'dd=',dd(1)
+       write(6,*)'dd=',dd(2)
+       write(6,*)'dd=',dd(3)
+       write(6,*)'nval=',nval
+       call flush(6)
+
+       tti=0.
+       ttf=1.
+       i=1
+       CALL cplch(compo,CP_TEMPS,tti,ttf,i,'ab',l,nval,rs,info)
+       write(6,*)'info=',info
+       write(6,*)'rs=',rs
+       write(6,*)'nval=',nval
+       call flush(6)
+
+       z(1)=0
+       z(2)=0
+       z(3)=0
+       CALL cplen(compo,CP_TEMPS,tti,ttf,i,'ac',l,nval,z,info)
+       write(6,*)'info=',info
+       write(6,*)'nval=',nval
+       write(6,*)'z=',z(1)
+       write(6,*)'z=',z(2)
+       write(6,*)'z=',z(3)
+       call flush(6)
+
+       u(1)=0
+       u(2)=0
+       u(3)=0
+       u(4)=0
+       u(5)=0
+       u(6)=0
+       CALL cplcp(compo,CP_TEMPS,tti,ttf,i,'ad',l,nval,u,info)
+       write(6,*)'info=',info
+       write(6,*)'nval=',nval
+       write(6,*)'u=',u(1)
+       write(6,*)'u=',u(2)
+       write(6,*)'u=',u(3)
+       write(6,*)'u=',u(4)
+       write(6,*)'u=',u(5)
+       write(6,*)'u=',u(6)
+       call flush(6)
+
+       u(1)=0
+       u(2)=0
+       u(3)=0
+       CALL cplre(compo,CP_TEMPS,tti,ttf,i,'ae',l,nval,u,info)
+       write(6,*)'info=',info
+       write(6,*)'nval=',nval
+       write(6,*)'u=',u(1)
+       write(6,*)'u=',u(2)
+       write(6,*)'u=',u(3)
+       call flush(6)
+
+       lo(1)=0
+       lo(2)=0
+       lo(3)=0
+       CALL cpllo(compo,CP_TEMPS,tti,ttf,i,'af',l,nval,lo,info)
+       write(6,*)'info=',info
+       write(6,*)'nval=',nval
+       write(6,*)'lo=',lo(1)
+       write(6,*)'lo=',lo(2)
+       write(6,*)'lo=',lo(3)
+       call flush(6)
+
+       lz(1)=0
+       lz(2)=0
+       lz(3)=0
+       CALL cplln(compo,CP_TEMPS,tti,ttf,i,'ag',l,nval,lz,info)
+       write(6,*)'info=',info
+       write(6,*)'nval=',nval
+       write(6,*)'lz=',lz(1)
+       write(6,*)'lz=',lz(2)
+       write(6,*)'lz=',lz(3)
+       call flush(6)
+
+       z4(1)=0
+       z4(2)=0
+       z4(3)=0
+       CALL cplin(compo,CP_TEMPS,tti,ttf,i,'ah',l,nval,z4,info)
+       write(6,*)'info=',info
+       write(6,*)'nval=',nval
+       write(6,*)'z4=',z4(1)
+       write(6,*)'z4=',z4(2)
+       write(6,*)'z4=',z4(3)
+       call flush(6)
+
+       lz(1)=0
+       lz(2)=0
+       lz(3)=0
+       CALL cpllg(compo,CP_TEMPS,tti,ttf,i,'ai',l,nval,lz,info)
+       write(6,*)'info=',info
+       write(6,*)'nval=',nval
+       write(6,*)'lz=',lz(1)
+       write(6,*)'lz=',lz(2)
+       write(6,*)'lz=',lz(3)
+       call flush(6)
+
+       call cpfint(compo,'aa',0.5,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       ti=0.
+       tf=0.
+       l=3
+       CALL cpldb(compo,CP_TEMPS,ti,tf,i,'aa',l,nval,dd,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       call cpefft(compo,'aa',1.5,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       ti=2.
+       tf=2.
+       l=3
+       CALL cpldb(compo,CP_TEMPS,ti,tf,i,'aa',l,nval,dd,info)
+       write(6,*)'info=',info
+       call flush(6)
+
+       c=a+b
+       return 
+       end
diff --git a/Examples/calcium2/components.py b/Examples/calcium2/components.py
new file mode 100644 (file)
index 0000000..e571047
--- /dev/null
@@ -0,0 +1,463 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+import os
+from module_generator import Generator,Module,Service,PYComponent,CPPComponent,F77Component
+
+#import context from ..
+execfile("../context.py")
+
+# C++ component
+
+body="""
+std::cerr << "a: " << a << std::endl;
+std::cerr << "b: " << b << std::endl;
+int info;
+double t1,t2;
+float tt1,tt2;
+int i=1;
+int mval;
+double val[10],rval[10];
+int ival[10],rival[10];
+long lval[10],rlval[10];
+float cval[20],rcval[20];
+char* sval[]={"coucou","bonjour","salut"};
+char* rsval[3];
+char mystring1[10];
+char mystring2[10];
+char mystring3[10];
+rsval[0]=mystring1;
+rsval[1]=mystring2;
+rsval[2]=mystring3;
+
+val[0]=3.2;
+val[1]=5.2;
+val[2]=9.8;
+std::cerr << "val: " << val[0] << std::endl;
+std::cerr << "val: " << val[1] << std::endl;
+std::cerr << "val: " << val[2] << std::endl;
+cp_edb(component,CP_TEMPS,0.,1,(char*)"ba",10,val);
+cp_edb(component,CP_TEMPS,1.,2,(char*)"ba",10,val);
+cp_edb(component,CP_TEMPS,2.,3,(char*)"ba",10,val);
+
+std::cerr << "sval: " << sval[0] << std::endl;
+std::cerr << "sval: " << sval[1] << std::endl;
+std::cerr << "sval: " << sval[2] << std::endl;
+cp_ech(component,CP_TEMPS,0.,1,(char*)"bb",3,sval,6);
+
+ival[0]=1;
+ival[1]=2;
+ival[2]=3;
+std::cerr << "ival: " << ival[0] << std::endl;
+std::cerr << "ival: " << ival[1] << std::endl;
+std::cerr << "ival: " << ival[2] << std::endl;
+cp_een(component,CP_TEMPS,0.,1,(char*)"bc",10,ival);
+
+cval[0]=1;
+cval[1]=2;
+cval[2]=3;
+cval[3]=4.5;
+cval[4]=5.6;
+cval[5]=7.8;
+std::cerr << "cval: " << cval[0] << std::endl;
+std::cerr << "cval: " << cval[1] << std::endl;
+std::cerr << "cval: " << cval[2] << std::endl;
+std::cerr << "cval: " << cval[3] << std::endl;
+std::cerr << "cval: " << cval[4] << std::endl;
+std::cerr << "cval: " << cval[5] << std::endl;
+cp_ecp(component,CP_TEMPS,0.,1,(char*)"bd",10,cval);
+
+cval[0]=1.1;
+cval[1]=2.2;
+cval[2]=3.3;
+std::cerr << "cval: " << cval[0] << std::endl;
+std::cerr << "cval: " << cval[1] << std::endl;
+std::cerr << "cval: " << cval[2] << std::endl;
+cp_ere(component,CP_TEMPS,0.,1,(char*)"be",10,cval);
+
+ival[0]=1;
+ival[1]=0;
+ival[2]=1;
+std::cerr << "ival: " << ival[0] << std::endl;
+std::cerr << "ival: " << ival[1] << std::endl;
+std::cerr << "ival: " << ival[2] << std::endl;
+cp_elo(component,CP_TEMPS,0.,1,(char*)"bf",10,ival);
+
+lval[0]=1;
+lval[1]=2;
+lval[2]=3;
+std::cerr << "lval: " << lval[0] << std::endl;
+std::cerr << "lval: " << lval[1] << std::endl;
+std::cerr << "lval: " << lval[2] << std::endl;
+cp_eln(component,CP_TEMPS,0.,1,(char*)"bg",10,lval);
+
+ival[0]=1;
+ival[1]=2;
+ival[2]=3;
+std::cerr << "ival: " << ival[0] << std::endl;
+std::cerr << "ival: " << ival[1] << std::endl;
+std::cerr << "ival: " << ival[2] << std::endl;
+cp_een(component,CP_TEMPS,0.,1,(char*)"bh",10,ival);
+
+lval[0]=1;
+lval[1]=2;
+lval[2]=3;
+std::cerr << "lval: " << lval[0] << std::endl;
+std::cerr << "lval: " << lval[1] << std::endl;
+std::cerr << "lval: " << lval[2] << std::endl;
+cp_elg(component,CP_TEMPS,0.,1,(char*)"bi",10,lval);
+
+/* read */
+t1=0.;
+t2=1.;
+info=cp_ldb(component,CP_TEMPS,&t1,&t2,&i,(char*)"aa",3,&mval,rval);
+std::cerr << "info: " << info << std::endl;
+std::cerr << "rval: " << rval[0] << std::endl;
+std::cerr << "rval: " << rval[1] << std::endl;
+std::cerr << "rval: " << rval[2] << std::endl;
+
+tt1=0.;
+tt2=1.;
+info=cp_lch(component,CP_TEMPS,&tt1,&tt2,&i,(char*)"ab",3,&mval,rsval,7);
+std::cerr << "info: " << info << std::endl;
+std::cerr << "rsval: " << rsval[0] << std::endl;
+std::cerr << "rsval: " << rsval[1] << std::endl;
+std::cerr << "rsval: " << rsval[2] << std::endl;
+
+info=cp_len(component,CP_TEMPS,&tt1,&tt2,&i,(char*)"ac",3,&mval,rival);
+std::cerr << "info: " << info << std::endl;
+std::cerr << "rival: " << rival[0] << std::endl;
+std::cerr << "rival: " << rival[1] << std::endl;
+std::cerr << "rival: " << rival[2] << std::endl;
+
+info=cp_lcp(component,CP_TEMPS,&tt1,&tt2,&i,(char*)"ad",3,&mval,rcval);
+std::cerr << "info: " << info << std::endl;
+std::cerr << "rcval: " << rcval[0] << std::endl;
+std::cerr << "rcval: " << rcval[1] << std::endl;
+std::cerr << "rcval: " << rcval[2] << std::endl;
+std::cerr << "rcval: " << rcval[3] << std::endl;
+std::cerr << "rcval: " << rcval[4] << std::endl;
+std::cerr << "rcval: " << rcval[5] << std::endl;
+
+rcval[0]=0.;
+rcval[1]=0.;
+rcval[2]=0.;
+info=cp_lre(component,CP_TEMPS,&tt1,&tt2,&i,(char*)"ae",3,&mval,rcval);
+std::cerr << "info: " << info << std::endl;
+std::cerr << "rcval: " << rcval[0] << std::endl;
+std::cerr << "rcval: " << rcval[1] << std::endl;
+std::cerr << "rcval: " << rcval[2] << std::endl;
+
+rival[0]=0;
+rival[1]=0;
+rival[2]=0;
+i=1;
+info=cp_llo(component,CP_TEMPS,&tt1,&tt2,&i,(char*)"af",3,&mval,rival);
+std::cerr << "info: " << info << std::endl;
+std::cerr << "rival: " << rival[0] << std::endl;
+std::cerr << "rival: " << rival[1] << std::endl;
+std::cerr << "rival: " << rival[2] << std::endl;
+
+info=cp_lln(component,CP_TEMPS,&tt1,&tt2,&i,(char*)"ag",3,&mval,rlval);
+std::cerr << "info: " << info << std::endl;
+std::cerr << "rlval: " << rlval[0] << std::endl;
+std::cerr << "rlval: " << rlval[1] << std::endl;
+std::cerr << "rlval: " << rlval[2] << std::endl;
+
+rival[0]=0;
+rival[1]=0;
+rival[2]=0;
+i=1;
+info=cp_len(component,CP_TEMPS,&tt1,&tt2,&i,(char*)"ah",3,&mval,rival);
+std::cerr << "info: " << info << std::endl;
+std::cerr << "rival: " << rival[0] << std::endl;
+std::cerr << "rival: " << rival[1] << std::endl;
+std::cerr << "rival: " << rival[2] << std::endl;
+
+info=cp_llg(component,CP_TEMPS,&tt1,&tt2,&i,(char*)"ai",3,&mval,rlval);
+std::cerr << "info: " << info << std::endl;
+std::cerr << "rlval: " << rlval[0] << std::endl;
+std::cerr << "rlval: " << rlval[1] << std::endl;
+std::cerr << "rlval: " << rlval[2] << std::endl;
+
+info=cp_fint(component,(char*)"aa",0.5);
+std::cerr << "info: " << info << std::endl;
+
+info=cp_efft(component,(char*)"aa",1.5);
+std::cerr << "info: " << info << std::endl;
+
+c=2*rval[0];
+std::cerr << "c: " << c << std::endl;
+"""
+c1=CPPComponent("compo1",services=[
+          Service("s1",inport=[("a","double"),("b","double")],
+                       outport=[("c","double")],
+                       instream=[("aa","CALCIUM_double","T"),
+                                 ("ab","CALCIUM_string","T"),
+                                 ("ac","CALCIUM_integer","T"),
+                                 ("ad","CALCIUM_complex","T"),
+                                 ("ae","CALCIUM_real","T"),
+                                 ("af","CALCIUM_logical","T"),
+                                 ("ag","CALCIUM_long","T"),
+                                 ("ah","CALCIUM_integer","T"),
+                                 ("ai","CALCIUM_integer","T"),
+                                ],
+                       outstream=[("ba","CALCIUM_double","T"),
+                                  ("bb","CALCIUM_string","T"),
+                                  ("bc","CALCIUM_integer","T"),
+                                  ("bd","CALCIUM_complex","T"),
+                                  ("be","CALCIUM_real","T"),
+                                  ("bf","CALCIUM_logical","T"),
+                                  ("bg","CALCIUM_long","T"),
+                                  ("bh","CALCIUM_integer","T"),
+                                  ("bi","CALCIUM_integer","T"),
+                                 ],
+                       defs="//def1",body=body,
+                 ),
+          ],
+         )
+
+# python component
+
+defs="""
+"""
+
+body="""
+#b1
+info,name= calcium.cp_cd(component)
+print "name=",name
+print "info=",info
+dep=calcium.CP_TEMPS
+
+#double
+val=numpy.zeros(10,'d')
+val[0]=7.7
+val[5]=a*b
+nval=10
+print "--------> Appel calcium.cp_edb",val
+info=calcium.cp_edb(component, dep, 0., 1, "ba", nval,val)
+info=calcium.cp_edb(component, dep, 1., 2, "ba", nval,val)
+info=calcium.cp_edb(component, dep, 2., 3, "ba", nval,val)
+
+#string
+val=numpy.array(["coucouc ","bonjour ","salut "])
+val=calcium.stringArray(3,8)
+val[0]="coucouc"
+val[1]="bonjour"
+val[2]="salut"
+print "--------> Appel calcium.cp_ech",val
+info=calcium.cp_ech(component, dep, 0., 1, "bb", 3,val)
+
+#int
+val=numpy.zeros(10,'i')
+val[0]=1
+val[1]=3
+print "--------> Appel calcium.cp_een",val
+info=calcium.cp_een(component, dep, 0., 1, "bc", 3,val)
+
+val=numpy.zeros(10,'F')
+val[0]=1+2j
+val[1]=3+2j
+print "--------> Appel calcium.cp_ecp",val
+info=calcium.cp_ecp(component, dep, 0., 1, "bd", 3,val)
+
+val=numpy.zeros(10,'f')
+val[0]=1.3
+val[1]=3.2
+print "--------> Appel calcium.cp_ere",val
+info=calcium.cp_ere(component, dep, 0., 1, "be", 3,val)
+
+val=numpy.zeros(10,'i')
+val[0]=True
+val[1]=False
+val[2]=False
+print "--------> Appel calcium.cp_elo",val
+info=calcium.cp_elo(component, dep, 0., 1, "bf", 3,val)
+
+val=numpy.zeros(10,'l')
+val[0]=1
+val[1]=3
+val[2]=333
+print "--------> Appel calcium.cp_eln",val
+info=calcium.cp_eln(component, dep, 0., 1, "bg", 3,val)
+
+val=numpy.zeros(10,'i')
+val[0]=1
+val[1]=3
+val[2]=4
+print "--------> Appel calcium.cp_een",val
+info=calcium.cp_een(component, dep, 0., 1, "bh", 3,val)
+
+val=numpy.zeros(10,'l')
+val[0]=1
+val[1]=3
+val[2]=333
+print "--------> Appel calcium.cp_elg",val
+info=calcium.cp_elg(component, dep, 0., 1, "bi", 3,val)
+print "info=",info
+
+#read
+val=numpy.zeros(10,'d')
+print "--------> Appel calcium.cp_ldb"
+info,tt,ii,mval=calcium.cp_ldb(component, dep, 0.,1., 1, "aa", 3,val)
+print mval,val
+
+val=numpy.array(["","","",], dtype='S13')
+print "--------> Appel calcium.cp_lch"
+info,tt,ii,mval=calcium.cp_lch(component, dep, 0.,1., 1, "ab", 3,val)
+print mval,val
+print val.dtype
+
+val=numpy.array(["            ","  ","  ",], dtype='S13')
+print "--------> Appel calcium.cp_lch"
+info,tt,ii,mval=calcium.cp_lch(component, dep, 0.,1., 1, "ab", 3,val)
+print mval,val
+print val.dtype
+
+val=calcium.stringArray(3,8)
+print "--------> Appel calcium.cp_lch"
+info,tt,ii,mval=calcium.cp_lch(component, dep, 0.,1., 1, "ab", 3,val)
+print mval,val
+print val[0]
+print val[1]
+print val[2]
+
+val=numpy.zeros(10,'i')
+print "--------> Appel calcium.cp_len"
+info,tt,ii,mval=calcium.cp_len(component, dep, 0.,1., 1, "ac", 3,val)
+print mval,val
+
+val=numpy.zeros(10,'F')
+print "--------> Appel calcium.cp_lcp"
+info,tt,ii,mval=calcium.cp_lcp(component, dep, 0.,1., 1, "ad", 3,val)
+print mval,val
+
+val=numpy.zeros(10,'f')
+print "--------> Appel calcium.cp_lre"
+info,tt,ii,mval=calcium.cp_lre(component, dep, 0.,1., 1, "ae", 3,val)
+print mval,val
+
+val=numpy.zeros(10,'i')
+print "--------> Appel calcium.cp_llo"
+info,tt,ii,mval=calcium.cp_llo(component, dep, 0.,1., 1, "af", 3,val)
+print mval,val
+
+val=numpy.zeros(10,'l')
+print "--------> Appel calcium.cp_lln"
+info,tt,ii,mval=calcium.cp_lln(component, dep, 0.,1., 1, "ag", 3,val)
+print mval,val
+
+val=numpy.zeros(10,'i')
+print "--------> Appel calcium.cp_len"
+info,tt,ii,mval=calcium.cp_len(component, dep, 0.,1., 1, "ah", 3,val)
+print mval,val
+
+val=numpy.zeros(10,'l')
+print "--------> Appel calcium.cp_llg"
+info,tt,ii,mval=calcium.cp_llg(component, dep, 0.,1., 1, "ai", 3,val)
+print "info=",info
+print mval,val
+
+info=calcium.cp_fint(component,"aa",0.5)
+print "info=",info
+
+info=calcium.cp_efft(component,"aa",1.5)
+print "info=",info
+
+import time
+time.sleep(15)
+
+c=a+b
+d=a-b
+err=calcium.cp_fin(component,calcium.CP_ARRET)
+print "err=",err
+"""
+c2=PYComponent("compo2",services=[
+          Service("s1",inport=[("a","double"),("b","double")],
+                       outport=[("c","double"),("d","double")],
+                       instream=[("aa","CALCIUM_double","T"),
+                                 ("ab","CALCIUM_string","T"),
+                                 ("ac","CALCIUM_integer","T"),
+                                 ("ad","CALCIUM_complex","T"),
+                                 ("ae","CALCIUM_real","T"),
+                                 ("af","CALCIUM_logical","T"),
+                                 ("ag","CALCIUM_long","T"),
+                                 ("ah","CALCIUM_integer","T"),
+                                 ("ai","CALCIUM_integer","T"),
+                                ],
+                       outstream=[("ba","CALCIUM_double","T"),
+                                  ("bb","CALCIUM_string","T"),
+                                  ("bc","CALCIUM_integer","T"),
+                                  ("bd","CALCIUM_complex","T"),
+                                  ("be","CALCIUM_real","T"),
+                                  ("bf","CALCIUM_logical","T"),
+                                  ("bg","CALCIUM_long","T"),
+                                  ("bh","CALCIUM_integer","T"),
+                                  ("bi","CALCIUM_integer","T"),
+                                 ],
+                       defs=defs,body=body,
+                 ),
+             ],
+         )
+
+#fortran component
+
+cwd=os.getcwd()
+
+c3=F77Component("fcode1", 
+                services=[
+                          Service("serv1",
+                                  inport=[("a","double"),("b","double")],
+                                  outport=[("c","double")],
+                                  instream=[("aa","CALCIUM_double","T"),
+                                            ("ab","CALCIUM_string","T"),
+                                            ("ac","CALCIUM_integer","T"),
+                                            ("ad","CALCIUM_complex","T"),
+                                            ("ae","CALCIUM_real","T"),
+                                            ("af","CALCIUM_logical","T"),
+                                            ("ag","CALCIUM_long","T"),
+                                            ("ah","CALCIUM_integer","T"),
+                                            ("ai","CALCIUM_integer","T"),
+                                           ],
+                                  outstream=[("ba","CALCIUM_double","T"),
+                                             ("bb","CALCIUM_string","T"),
+                                             ("bc","CALCIUM_integer","T"),
+                                             ("bd","CALCIUM_complex","T"),
+                                             ("be","CALCIUM_real","T"),
+                                             ("bf","CALCIUM_logical","T"),
+                                             ("bg","CALCIUM_long","T"),
+                                             ("bh","CALCIUM_integer","T"),
+                                             ("bi","CALCIUM_integer","T"),
+                                            ],
+                                 ),
+                         ],
+                libs="-L%s -lcode1" % cwd,
+                rlibs="-Wl,--rpath -Wl,%s" % cwd,
+               )
+
+g=Generator(Module("pycompos",components=[c1,c2,c3],prefix="./install",layout="multidir"),context)
+g.generate()
+g.bootstrap()
+g.configure()
+g.make()
+g.install()
+g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR, "YACS":YACS_ROOT_DIR})
+
+
+
diff --git a/Examples/calcium2/coupling.xml b/Examples/calcium2/coupling.xml
new file mode 100644 (file)
index 0000000..8d6075a
--- /dev/null
@@ -0,0 +1,241 @@
+
+<proc>
+
+<!-- types -->
+
+<container name="A">
+</container>
+
+<container name="B">
+</container>
+
+<container name="C">
+</container>
+
+<service name="node1" >
+  <component>compo1</component>
+  <method>s1</method>
+  <load container="A"/>
+  <inport name="a" type="double"/>
+  <inport name="b" type="double"/>
+  <outport name="c" type="double"/>
+  <instream name="aa" type="CALCIUM_double"/>
+  <instream name="ab" type="CALCIUM_string"/>
+  <instream name="ac" type="CALCIUM_integer"/>
+  <instream name="ad" type="CALCIUM_complex"/>
+  <instream name="ae" type="CALCIUM_real"/>
+  <instream name="af" type="CALCIUM_logical"/>
+  <instream name="ag" type="CALCIUM_long"/>
+  <instream name="ah" type="CALCIUM_integer"/>
+  <instream name="ai" type="CALCIUM_integer"/>
+  <outstream name="ba" type="CALCIUM_double"/>
+  <outstream name="bb" type="CALCIUM_string"/>
+  <outstream name="bc" type="CALCIUM_integer"/>
+  <outstream name="bd" type="CALCIUM_complex"/>
+  <outstream name="be" type="CALCIUM_real"/>
+  <outstream name="bf" type="CALCIUM_logical"/>
+  <outstream name="bg" type="CALCIUM_long"/>
+  <outstream name="bh" type="CALCIUM_integer"/>
+  <outstream name="bi" type="CALCIUM_integer"/>
+</service>
+
+<service name="node2" >
+  <component>compo2</component>
+  <method>s1</method>
+  <load container="B"/>
+  <inport name="a" type="double"/>
+  <inport name="b" type="double"/>
+  <outport name="c" type="double"/>
+  <outport name="d" type="double"/>
+  <instream name="aa" type="CALCIUM_double"/>
+  <instream name="ab" type="CALCIUM_string"/>
+  <instream name="ac" type="CALCIUM_integer"/>
+  <instream name="ad" type="CALCIUM_complex"/>
+  <instream name="ae" type="CALCIUM_real"/>
+  <instream name="af" type="CALCIUM_logical"/>
+  <instream name="ag" type="CALCIUM_long"/>
+  <instream name="ah" type="CALCIUM_integer"/>
+  <instream name="ai" type="CALCIUM_integer"/>
+  <outstream name="ba" type="CALCIUM_double"/>
+  <outstream name="bb" type="CALCIUM_string"/>
+  <outstream name="bc" type="CALCIUM_integer"/>
+  <outstream name="bd" type="CALCIUM_complex"/>
+  <outstream name="be" type="CALCIUM_real"/>
+  <outstream name="bf" type="CALCIUM_logical"/>
+  <outstream name="bg" type="CALCIUM_long"/>
+  <outstream name="bh" type="CALCIUM_integer"/>
+  <outstream name="bi" type="CALCIUM_integer"/>
+</service>
+
+<service name="node3" >
+  <component>fcode1</component>
+  <method>serv1</method>
+  <load container="C"/>
+  <inport name="a" type="double"/>
+  <inport name="b" type="double"/>
+  <outport name="c" type="double"/>
+  <instream name="aa" type="CALCIUM_double"/>
+  <instream name="ab" type="CALCIUM_string"/>
+  <instream name="ac" type="CALCIUM_integer"/>
+  <instream name="ad" type="CALCIUM_complex"/>
+  <instream name="ae" type="CALCIUM_real"/>
+  <instream name="af" type="CALCIUM_logical"/>
+  <instream name="ag" type="CALCIUM_long"/>
+  <instream name="ah" type="CALCIUM_integer"/>
+  <instream name="ai" type="CALCIUM_integer"/>
+  <outstream name="ba" type="CALCIUM_double"/>
+  <outstream name="bb" type="CALCIUM_string"/>
+  <outstream name="bc" type="CALCIUM_integer"/>
+  <outstream name="bd" type="CALCIUM_complex"/>
+  <outstream name="be" type="CALCIUM_real"/>
+  <outstream name="bf" type="CALCIUM_logical"/>
+  <outstream name="bg" type="CALCIUM_long"/>
+  <outstream name="bh" type="CALCIUM_integer"/>
+  <outstream name="bi" type="CALCIUM_integer"/>
+</service>
+
+<!--datalinks -->
+<stream>
+  <fromnode>node1</fromnode><fromport>ba</fromport>
+  <tonode>node2</tonode><toport>aa</toport>
+</stream>
+<stream>
+  <fromnode>node2</fromnode><fromport>ba</fromport>
+  <tonode>node3</tonode><toport>aa</toport>
+</stream>
+<stream>
+  <fromnode>node3</fromnode><fromport>ba</fromport>
+  <tonode>node1</tonode><toport>aa</toport>
+</stream>
+
+<stream>
+  <fromnode>node1</fromnode><fromport>bb</fromport>
+  <tonode>node2</tonode><toport>ab</toport>
+</stream>
+<stream>
+  <fromnode>node2</fromnode><fromport>bb</fromport>
+  <tonode>node3</tonode><toport>ab</toport>
+</stream>
+<stream>
+  <fromnode>node3</fromnode><fromport>bb</fromport>
+  <tonode>node1</tonode><toport>ab</toport>
+</stream>
+
+<stream>
+  <fromnode>node1</fromnode><fromport>bc</fromport>
+  <tonode>node2</tonode><toport>ac</toport>
+</stream>
+<stream>
+  <fromnode>node2</fromnode><fromport>bc</fromport>
+  <tonode>node3</tonode><toport>ac</toport>
+</stream>
+<stream>
+  <fromnode>node3</fromnode><fromport>bc</fromport>
+  <tonode>node1</tonode><toport>ac</toport>
+</stream>
+
+<stream>
+  <fromnode>node1</fromnode><fromport>bd</fromport>
+  <tonode>node2</tonode><toport>ad</toport>
+</stream>
+<stream>
+  <fromnode>node2</fromnode><fromport>bd</fromport>
+  <tonode>node3</tonode><toport>ad</toport>
+</stream>
+<stream>
+  <fromnode>node3</fromnode><fromport>bd</fromport>
+  <tonode>node1</tonode><toport>ad</toport>
+</stream>
+
+<stream>
+  <fromnode>node1</fromnode><fromport>be</fromport>
+  <tonode>node2</tonode><toport>ae</toport>
+</stream>
+<stream>
+  <fromnode>node2</fromnode><fromport>be</fromport>
+  <tonode>node3</tonode><toport>ae</toport>
+</stream>
+<stream>
+  <fromnode>node3</fromnode><fromport>be</fromport>
+  <tonode>node1</tonode><toport>ae</toport>
+</stream>
+
+<stream>
+  <fromnode>node1</fromnode><fromport>bf</fromport>
+  <tonode>node2</tonode><toport>af</toport>
+</stream>
+<stream>
+  <fromnode>node2</fromnode><fromport>bf</fromport>
+  <tonode>node3</tonode><toport>af</toport>
+</stream>
+<stream>
+  <fromnode>node3</fromnode><fromport>bf</fromport>
+  <tonode>node1</tonode><toport>af</toport>
+</stream>
+
+<stream>
+  <fromnode>node1</fromnode><fromport>bg</fromport>
+  <tonode>node2</tonode><toport>ag</toport>
+</stream>
+<stream>
+  <fromnode>node2</fromnode><fromport>bg</fromport>
+  <tonode>node3</tonode><toport>ag</toport>
+</stream>
+<stream>
+  <fromnode>node3</fromnode><fromport>bg</fromport>
+  <tonode>node1</tonode><toport>ag</toport>
+</stream>
+
+<stream>
+  <fromnode>node1</fromnode><fromport>bh</fromport>
+  <tonode>node2</tonode><toport>ah</toport>
+</stream>
+<stream>
+  <fromnode>node2</fromnode><fromport>bh</fromport>
+  <tonode>node3</tonode><toport>ah</toport>
+</stream>
+<stream>
+  <fromnode>node3</fromnode><fromport>bh</fromport>
+  <tonode>node1</tonode><toport>ah</toport>
+</stream>
+
+<stream>
+  <fromnode>node1</fromnode><fromport>bi</fromport>
+  <tonode>node2</tonode><toport>ai</toport>
+</stream>
+<stream>
+  <fromnode>node2</fromnode><fromport>bi</fromport>
+  <tonode>node3</tonode><toport>ai</toport>
+</stream>
+<stream>
+  <fromnode>node3</fromnode><fromport>bi</fromport>
+  <tonode>node1</tonode><toport>ai</toport>
+</stream>
+
+<parameter>
+  <tonode>node1</tonode> <toport>a</toport>
+  <value><double>23</double> </value>
+</parameter>
+<parameter>
+  <tonode>node1</tonode> <toport>b</toport>
+  <value><double>53</double> </value>
+</parameter>
+<parameter>
+  <tonode>node2</tonode> <toport>a</toport>
+  <value><double>63</double> </value>
+</parameter>
+<parameter>
+  <tonode>node2</tonode> <toport>b</toport>
+  <value><double>73</double> </value>
+</parameter>
+<parameter>
+  <tonode>node3</tonode> <toport>a</toport>
+  <value><double>63</double> </value>
+</parameter>
+<parameter>
+  <tonode>node3</tonode> <toport>b</toport>
+  <value><double>73</double> </value>
+</parameter>
+
+</proc>
+
index 3ed110fcfadf9d8ebd8e38b2fbd162ce4c4b29fe..2b4fdb567a73ae444b0ff9419d06ed54b921007e 100644 (file)
@@ -1,9 +1,38 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+import os
+
+KERNEL_ROOT_DIR=os.getenv("KERNEL_ROOT_DIR","/local/cchris/Salome/Install/KERNEL_V5")
+GUI_ROOT_DIR=os.getenv("GUI_ROOT_DIR","/local/cchris/Salome/Install/GUI_V5")
+YACS_ROOT_DIR=os.getenv("YACS_ROOT_DIR","/local/cchris/Salome/Install/YACS_V5_1_main")
 
 context={'update':1,
+         "makeflags":"",
          "prerequisites":"/local/cchris/.packages.d/envSalome5",
-         "kernel":"/local/cchris/Salome/Install/KERNEL_V5"
+         "kernel":KERNEL_ROOT_DIR,
         }
-aster_home="/local/cchris/Aster/V10/Install"
-aster_version="STA10.0"
+
+
+aster_home="/local/cchris/Aster/V10.1/aster"
+aster_version="STA10.1"
+#aster_home="/local/cchris/Aster/V10/Install"
+#aster_version="STA10.0"
 
 
diff --git a/Examples/cpp1/Makefile b/Examples/cpp1/Makefile
new file mode 100644 (file)
index 0000000..747f989
--- /dev/null
@@ -0,0 +1,21 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+clean:
+       rm -rf *.o *.so cppcompos_SRC cppcompos_SRC.bak appli appli.bak install install.bak traceExec_proc
index c3f9f62005fd96a9be9e471ac58fb96b00ab9a06..169c3768fa47c973cb18b0af4d9b6c913950e3a1 100644 (file)
@@ -1,3 +1,22 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 import os
 from module_generator import Generator,Module,Service,CPPComponent
 
@@ -39,5 +58,5 @@ g.bootstrap()
 g.configure()
 g.make()
 g.install()
-g.make_appli("appli",restrict=["KERNEL","GUI","YACS"])
+g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR, "YACS":YACS_ROOT_DIR})
 
index 9a186ed1f7addad2c3c3724ea7b77b49cbab2226..f794b7401a7f7d0ade14a6511f352f3aa61d00fb 100644 (file)
@@ -1,6 +1,25 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
+include ../makefile.inc
 
 prog:prog.cxx
        g++ -o prog prog.cxx -L./install/lib/salome -lcompo1Exelib
 clean:
-       rm -rf *.o prog install appli cppcompos_SRC  cppcompos_SRC.bak compo1_inst_1 traceExec_proc
+       rm -rf *.o prog install install.bak appli appli.bak cppcompos_SRC cppcompos_SRC.bak compo1_inst_1 traceExec_proc
index bc85669770c81a718e8fd8e61b41f71cb601c651..a2eab5070046944112d4abb046875342c499db39 100644 (file)
@@ -1,3 +1,22 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 import os
 from module_generator import Generator,Module,Service,CPPComponent
 
@@ -41,4 +60,4 @@ g.bootstrap()
 g.configure()
 g.make()
 g.install()
-g.make_appli("appli",restrict=["KERNEL","GUI","YACS"])
+g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR, "YACS":YACS_ROOT_DIR})
index 363c6974521a0069fa3979e8ddabd3b2cb5be423..bdbe9f5cb49430a8a94db3abcdaa11dc77a587ac 100644 (file)
@@ -1,3 +1,21 @@
+//  Copyright (C) 2009-2010  EDF R&D
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
 extern "C" void yacsinit();
 
index 9a4c6892a6133ae9824659fbdcfc646ab39d8b81..08682be043d0c4a9b9c4e7f99a3eba7aa40c3101 100644 (file)
@@ -1,8 +1,24 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
 include ../makefile.inc
 
-FC=gfortran
-
 all:libcode1.so libcode2.so
 libcode1.so:code1.o
          $(FC) -shared -fPIC -o libcode1.so code1.o
@@ -14,4 +30,4 @@ code2.o:code2.f
          $(FC) -c code2.f -fPIC -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions
 
 clean:
-       rm -rf *.o *.so fcompos_SRC  install fcompos_SRC.bak traceExec_proc appli appli.bak
+       rm -rf *.o *.so fcompos_SRC  install fcompos_SRC.bak traceExec_proc appli appli.bak install.bak
index 64011d9ab30c117c2fa4831ca5594eb16812637f..148c5b0aa3fe34d1ec2c7ee42a3bd1647fef49bd 100644 (file)
@@ -1,3 +1,22 @@
+C  Copyright (C) 2009-2010  EDF R&D
+C
+C  This library is free software; you can redistribute it and/or
+C  modify it under the terms of the GNU Lesser General Public
+C  License as published by the Free Software Foundation; either
+C  version 2.1 of the License.
+C
+C  This library is distributed in the hope that it will be useful,
+C  but WITHOUT ANY WARRANTY; without even the implied warranty of
+C  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+C  Lesser General Public License for more details.
+C
+C  You should have received a copy of the GNU Lesser General Public
+C  License along with this library; if not, write to the Free Software
+C  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+C
+C  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+C
+
       subroutine bidul()
       write(6,*)"coucou"
       return
index 37a4fa11d4d764c0f609d38feed30214c98bb5fe..1f04ea23c48dcc282a3fc0380bc540578052c665 100644 (file)
@@ -1,3 +1,22 @@
+C  Copyright (C) 2009-2010  EDF R&D
+C
+C  This library is free software; you can redistribute it and/or
+C  modify it under the terms of the GNU Lesser General Public
+C  License as published by the Free Software Foundation; either
+C  version 2.1 of the License.
+C
+C  This library is distributed in the hope that it will be useful,
+C  but WITHOUT ANY WARRANTY; without even the implied warranty of
+C  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+C  Lesser General Public License for more details.
+C
+C  You should have received a copy of the GNU Lesser General Public
+C  License along with this library; if not, write to the Free Software
+C  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+C
+C  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+C
+
        SUBROUTINE SERV1(compo,a,b,c)
        include 'calcium.hf'
        integer compo(2)
index d5ab3b1bc9a0fa90d00d68d1272a7332070cecc8..180e5b450ab8c86f275e43d748bfe91a67cfa019 100644 (file)
@@ -1,3 +1,22 @@
+C  Copyright (C) 2009-2010  EDF R&D
+C
+C  This library is free software; you can redistribute it and/or
+C  modify it under the terms of the GNU Lesser General Public
+C  License as published by the Free Software Foundation; either
+C  version 2.1 of the License.
+C
+C  This library is distributed in the hope that it will be useful,
+C  but WITHOUT ANY WARRANTY; without even the implied warranty of
+C  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+C  Lesser General Public License for more details.
+C
+C  You should have received a copy of the GNU Lesser General Public
+C  License along with this library; if not, write to the Free Software
+C  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+C
+C  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+C
+
        SUBROUTINE SERV1(compo,a,b,c)
        include 'calcium.hf'
        integer compo(2),nval
index 5bbd2e83f2a33d6ab740565ee03bc53ee05b6ee5..5948ed302177996b9d734ba8338b4bb8d611ca40 100644 (file)
@@ -1,3 +1,22 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 import os
 from module_generator import Generator,Module,Service,F77Component
 
@@ -24,5 +43,5 @@ g.bootstrap()
 g.configure()
 g.make()
 g.install()
-g.make_appli("appli",restrict=["KERNEL","GUI","YACS"])
+g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR, "YACS":YACS_ROOT_DIR})
 
index c4a7dd60c3a918bde46d7ce225a43423571b5aae..231472e61c209422e053df211b5f711a51909373 100644 (file)
@@ -1,8 +1,24 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
 include ../makefile.inc
 
-FC=gfortran
-
 all:prog1 prog2
 prog1:code1.o
          $(FC) -o prog1 code1.o -L./install/lib/salome -lfcode1Exelib
@@ -15,4 +31,4 @@ code2.o:code2.f
          $(FC) -c code2.f -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions 
 
 clean:
-       rm -rf *.o prog1 prog2 fcode1_inst_1  fcode2_inst_1  fcompos_SRC  install traceExec_proc
+       rm -rf *.o prog1 prog2 fcode1_inst_1  fcode2_inst_1  fcompos_SRC  install traceExec_proc install.bak fcompos_SRC.bak appli appli.bak
index ac9543a4bd9026d7bcedd0906379a66d583d3b7f..5406355fd7bc852c6e0f47aac23793c996ec28c8 100644 (file)
@@ -1,3 +1,22 @@
+C  Copyright (C) 2009-2010  EDF R&D
+C
+C  This library is free software; you can redistribute it and/or
+C  modify it under the terms of the GNU Lesser General Public
+C  License as published by the Free Software Foundation; either
+C  version 2.1 of the License.
+C
+C  This library is distributed in the hope that it will be useful,
+C  but WITHOUT ANY WARRANTY; without even the implied warranty of
+C  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+C  Lesser General Public License for more details.
+C
+C  You should have received a copy of the GNU Lesser General Public
+C  License along with this library; if not, write to the Free Software
+C  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+C
+C  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+C
+
        PROGRAM P
        CALL YACSINIT()
        END
index 1a5c65444df3b08abb45673bdc35ae5e264ebb92..93c1f636ee17ba3d37d9ba5c3960cbe19c07ac26 100644 (file)
@@ -1,3 +1,22 @@
+C  Copyright (C) 2009-2010  EDF R&D
+C
+C  This library is free software; you can redistribute it and/or
+C  modify it under the terms of the GNU Lesser General Public
+C  License as published by the Free Software Foundation; either
+C  version 2.1 of the License.
+C
+C  This library is distributed in the hope that it will be useful,
+C  but WITHOUT ANY WARRANTY; without even the implied warranty of
+C  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+C  Lesser General Public License for more details.
+C
+C  You should have received a copy of the GNU Lesser General Public
+C  License along with this library; if not, write to the Free Software
+C  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+C
+C  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+C
+
        PROGRAM P
        CALL YACSINIT()
        END
index aa01198131c3429f4bf690f271eb29549187b542..c33fa5db8a7ddd3f93d05ed8e6108821835b8e0a 100644 (file)
@@ -1,3 +1,22 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 import os
 from module_generator import Generator,Module,Service,F77Component
 
@@ -25,5 +44,5 @@ g.bootstrap()
 g.configure()
 g.make()
 g.install()
-g.make_appli("appli",restrict=["KERNEL","GUI","YACS"])
+g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR, "YACS":YACS_ROOT_DIR})
 
index a1e9eb17925bf2317c19bb22b704343cfdcbf75d..7b69741b0f1b4738852c4e6aba4c4624bf6d8d83 100644 (file)
@@ -1,5 +1,27 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
 KERNEL_ROOT_DIR=/local/cchris/Salome/Install/KERNEL_V5
 
-ASTER_ROOT=/local/cchris/Aster/V10/Install
-ASTER_VERSION=STA10.0
+ASTER_ROOT=/local/cchris/Aster/V10.1/aster
+ASTER_VERSION=STA10.1
+#ASTER_ROOT=/local/cchris/Aster/V10/Install
+#ASTER_VERSION=STA10.0
+
+FC=gfortran
diff --git a/Examples/paco1/Makefile b/Examples/paco1/Makefile
new file mode 100644 (file)
index 0000000..ae6ef33
--- /dev/null
@@ -0,0 +1,21 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+clean:
+       rm -rf *.o *.so *.pyc pacocompos_SRC pacocompos_SRC.bak appli appli.bak install install.bak traceExec_proc
index 599d719001499d1392838f54a64a17686438be45..430dba3ce7bc3d22006bc0410e03cd06ef7618b1 100644 (file)
@@ -1,11 +1,27 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 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"
-        }
+#import context from ..
+execfile("../pacocontext.py")
 
 cwd=os.getcwd()
 
@@ -31,8 +47,5 @@ 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"})
+g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR, "YACS":YACS_ROOT_DIR})
 
diff --git a/Examples/paco2/Makefile b/Examples/paco2/Makefile
new file mode 100644 (file)
index 0000000..ae6ef33
--- /dev/null
@@ -0,0 +1,21 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+clean:
+       rm -rf *.o *.so *.pyc pacocompos_SRC pacocompos_SRC.bak appli appli.bak install install.bak traceExec_proc
index c5eb466d7ee93b321a54e40523bd0ad84c444908..f152d96259fb27a3e363c75e46e6f7628b383f50 100644 (file)
@@ -1,12 +1,27 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 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",
-         "mpi":"/usr/lib/openmpi"
-        }
+#import context from ..
+execfile("../pacocontext.py")
 
 cwd=os.getcwd()
 
@@ -32,8 +47,5 @@ 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"})
+g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR, "YACS":YACS_ROOT_DIR})
 
diff --git a/Examples/paco3/Makefile b/Examples/paco3/Makefile
new file mode 100644 (file)
index 0000000..0356080
--- /dev/null
@@ -0,0 +1,21 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+clean:
+       rm -rf *.o *.so *.pyc DSC_PARALLEL_PARAM_SRC DSC_PARALLEL_PARAM_SRC.bak appli appli.bak install install.bak traceExec_proc
index 759679aa726c8978d26e68df07d52220f3e930c7..5ec5ec15f355e99bdf1ce5c47bfcaadb7db3e328 100644 (file)
@@ -1,14 +1,28 @@
 # -*- coding: utf-8 *-
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 import os
 from module_generator import Generator,Module,Service,PACOComponent
 
-context={'update':1,
-         "makeflags":"-j2",
-         "prerequisites":"/home/aribes/Dev/Scripts_env/prerequis.sh",
-         "kernel":"/home/aribes/Dev/Install/SALOME/KERNEL_INSTALL-RIBES",
-         "paco":"/home/aribes/Dev/Install/PaCO++_install",
-         "mpi":"/usr/lib/openmpi"
-        }
+#import context from ..
+execfile("../pacocontext.py")
 
 cwd=os.getcwd()
 
@@ -78,8 +92,5 @@ 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"})
+g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR, "YACS":YACS_ROOT_DIR})
 
diff --git a/Examples/pacocontext.py b/Examples/pacocontext.py
new file mode 100644 (file)
index 0000000..6e3dd18
--- /dev/null
@@ -0,0 +1,40 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+import os
+
+KERNEL_ROOT_DIR=os.getenv("KERNEL_ROOT_DIR","/local/cchris/Salome/Install/KERNEL_V5")
+GUI_ROOT_DIR=os.getenv("GUI_ROOT_DIR","/local/cchris/Salome/Install/GUI_V5")
+YACS_ROOT_DIR=os.getenv("YACS_ROOT_DIR","/local/cchris/Salome/Install/YACS_V5_1_main")
+
+context={'update':1,
+         "makeflags":"",
+         "prerequisites":"/local/cchris/.packages.d/envSalome5",
+         "kernel":KERNEL_ROOT_DIR,
+         "paco":"/local/cchris/pkg/paco/install",
+         "mpi":"/usr/lib/openmpi",
+        }
+
+
+aster_home="/local/cchris/Aster/V10.1/aster"
+aster_version="STA10.1"
+#aster_home="/local/cchris/Aster/V10/Install"
+#aster_version="STA10.0"
+
+
diff --git a/Examples/pyth1/Makefile b/Examples/pyth1/Makefile
new file mode 100644 (file)
index 0000000..6b389cf
--- /dev/null
@@ -0,0 +1,21 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+clean:
+       rm -rf *.o *.so *.pyc pycompos_SRC pycompos_SRC.bak appli appli.bak install install.bak traceExec_proc
index f6228828c21377d0dc99ed8d5ca89ad08be90725..4839a6705105b1f6a19f798b9ca3044cebd0b475 100644 (file)
@@ -1,2 +1,21 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 def f():
   print "coucou"
index f7c308394d67d6ae1162d0f3fb47a6aee72db651..b7e2ee83da6d39e0769f95c74f36272e22e31bc1 100644 (file)
@@ -1,3 +1,22 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 import os
 from module_generator import Generator,Module,Service,PYComponent
 
@@ -44,6 +63,6 @@ g.bootstrap()
 g.configure()
 g.make()
 g.install()
-g.make_appli("appli",restrict=["KERNEL","GUI","YACS"])
+g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR, "YACS":YACS_ROOT_DIR})
 
 
diff --git a/Examples/pyth2/Makefile b/Examples/pyth2/Makefile
new file mode 100644 (file)
index 0000000..85192fc
--- /dev/null
@@ -0,0 +1,21 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+clean:
+       rm -rf *.o *.so *.pyc pycompos_SRC pycompos_SRC.bak appli appli.bak install install.bak traceExec_proc compo2_inst_1
index 56cbb18d2d27f273a28ad5b0577f5c2d1ad50c45..bc8ef0326eb13c3a780f0c253bab366842ec67de 100644 (file)
@@ -1,3 +1,22 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 import os
 from module_generator import Generator,Module,Service,PYComponent
 
@@ -40,5 +59,5 @@ g.bootstrap()
 g.configure()
 g.make()
 g.install()
-g.make_appli("appli",restrict=["KERNEL","GUI","YACS"])
+g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR, "YACS":YACS_ROOT_DIR})
 
index 3f6bec41738227e160e0d720ad82ad97703a12da..381adcbc7c32ec7f99dab10aad786fd12a63fff1 100644 (file)
@@ -1,3 +1,22 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 include Examples/context.py
 include Examples/makefile.inc
 include Examples/*/*.f
index e25bec1047af6681a605baae9275deb9dc1d428c..585afa1efb979b253b516700773ceeb6b610472a 100644 (file)
@@ -1,7 +1,26 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 """
-  Pacakge to generate SALOME modules with components
+  Package to generate SALOME modules with components
   implemented in C++, Fortran or Python
-  that can use datastream ports 
+  that can use datastream ports
 """
 from gener import Module, Service, Generator
 from fcompo import F77Component
index f4f1efbd9dee962bbd78e9ad9f5f1f2bea989897..f124fbbaea8471e5faebb06dcff045afc00041bb 100644 (file)
@@ -1,3 +1,22 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 """
   This module defines the ASTERComponent class for ASTER component generation
   An ASTER component comes in 3 flavors :
@@ -10,6 +29,7 @@ import re, os, sys
 from gener import Component, Invalid, makedirs
 
 from pyth_tmpl import pyinitEXEService, pyinitCEXEService, pyinitService
+import aster_tmpl
 from aster_tmpl import asterCEXEService, asterEXEService
 from aster_tmpl import asterService, asterEXECompo, asterCEXECompo, asterCompo
 from aster_tmpl import comm, make_etude, cexe, exeaster
@@ -62,6 +82,16 @@ class ASTERComponent(Component):
     filename = "%s.py" % self.name
     #on suppose que les composants ASTER sont homogenes (utilisent meme install)
     gen.aster = self.aster_dir
+
+    #get ASTER version
+    f = os.path.join(self.aster_dir, "bibpyt", 'Accas', 'properties.py')
+    self.version=(0,0,0)
+    if os.path.isfile(f):
+      mydict = {}
+      execfile(f, mydict)
+      v,r,p = mydict['version'].split('.')
+      self.version=(int(v),int(r),int(p))
+
     if self.kind == "lib":
       return {"Makefile.am":gen.makeMakefile(self.getMakefileItems(gen)),
               filename:self.makeaster(gen)}
@@ -99,15 +129,20 @@ class ASTERComponent(Component):
 
   def makeexepath(self, gen):
     """standalone component: generate files for calculation code"""
-    #patch to E_SUPERV.py
+
+    #copy and patch E_SUPERV.py
     fil = open(os.path.join(self.aster_dir, "bibpyt", "Execution", "E_SUPERV.py"))
     esuperv = fil.read()
     fil.close()
-    esuperv = re.sub("def Execute\(self\)", "def Execute(self, params)", esuperv)
-    esuperv = re.sub("j=self.JdC", "self.jdc=j=self.JdC", esuperv)
-    esuperv = re.sub("\*\*args", "context_ini=params, **args", esuperv)
-    esuperv = re.sub("def main\(self\)", "def main(self,params={})", esuperv)
-    esuperv = re.sub("return self.Execute\(\)", "return self.Execute(params)", esuperv)
+
+    if self.version < (10,1,2):
+      #patch to E_SUPERV.py
+      esuperv = re.sub("def Execute\(self\)", "def Execute(self, params)", esuperv)
+      esuperv = re.sub("j=self.JdC", "self.jdc=j=self.JdC", esuperv)
+      esuperv = re.sub("\*\*args", "context_ini=params, **args", esuperv)
+      esuperv = re.sub("def main\(self\)", "def main(self,params={})", esuperv)
+      esuperv = re.sub("return self.Execute\(\)", "return self.Execute(params)", esuperv)
+
     #use a specific main program (modification of config.txt file)
     fil = open(os.path.join(self.aster_dir, "config.txt"))
     config = fil.read()
@@ -128,15 +163,20 @@ class ASTERComponent(Component):
 
   def makecexepath(self, gen):
     """specific container: generate files"""
-    #patch to E_SUPERV.py
+
+    #copy and patch E_SUPERV.py
     fil = open(os.path.join(self.aster_dir, "bibpyt", "Execution", "E_SUPERV.py"))
     esuperv = fil.read()
     fil.close()
-    esuperv = re.sub("def Execute\(self\)", "def Execute(self, params)", esuperv)
-    esuperv = re.sub("j=self.JdC", "self.jdc=j=self.JdC", esuperv)
-    esuperv = re.sub("\*\*args", "context_ini=params, **args", esuperv)
-    esuperv = re.sub("def main\(self\)", "def main(self,params={})", esuperv)
-    esuperv = re.sub("return self.Execute\(\)", "return self.Execute(params)", esuperv)
+
+    if self.version < (10,1,2):
+      #patch to E_SUPERV.py
+      esuperv = re.sub("def Execute\(self\)", "def Execute(self, params)", esuperv)
+      esuperv = re.sub("j=self.JdC", "self.jdc=j=self.JdC", esuperv)
+      esuperv = re.sub("\*\*args", "context_ini=params, **args", esuperv)
+      esuperv = re.sub("def main\(self\)", "def main(self,params={})", esuperv)
+      esuperv = re.sub("return self.Execute\(\)", "return self.Execute(params)", esuperv)
+
 
     #use a specific main program
     fil = open(os.path.join(self.aster_dir, "config.txt"))
@@ -207,6 +247,7 @@ class ASTERComponent(Component):
                                          instream=instream, outstream=outstream)
       services.append(service)
       inits.append(init)
+
     return asterEXECompo.substitute(component=self.name, module=gen.module.name,
                                     servicesdef="\n".join(defs), 
                                     servicesimpl="\n".join(services), 
@@ -266,12 +307,14 @@ class ASTERComponent(Component):
                                           outstream=outstream)
       services.append(service)
       inits.append(init)
+
     return asterCEXECompo.substitute(component=self.name, 
                                      module=gen.module.name,
                                      servicesdef="\n".join(defs), 
                                      servicesimpl="\n".join(services), 
                                      initservice='\n'.join(inits),
                                      aster_dir=self.aster_dir)
+
   def getImpl(self):
     if self.kind == "cexe":
       return "CEXE", self.name+".exe"
index 9df3e478a825ba396fe4266f616dc7f6e89ee57d..b871375b4adb34a5f7dc37be0dc0aa8c9103aa8d 100644 (file)
@@ -1,3 +1,21 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
 try:
  from string import Template
index 8b714d4af2c366783b87ed8414ce723cc228ecfc..e0258f5cd0cfad310092222db044400e1fd88ba2 100644 (file)
@@ -1,3 +1,22 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 try:
   from string import Template
 except:
@@ -13,6 +32,8 @@ idl="""
 #include "SALOME_Exception.idl"
 #include "SALOME_PACOExtension.idl"
 
+${idldefs}
+
 module ${module}
 {
 typedef sequence<string> stringvec;
@@ -82,8 +103,8 @@ salomepython_DATA = ${module}_idl.py ${PACO_salomepython_DATA}
 lib${module}_la_SOURCES      =
 nodist_lib${module}_la_SOURCES = ${module}SK.cc
 nodist_salomeinclude_HEADERS= ${module}.hh ${PACO_SALOMEINCLUDE_HEADERS}
-lib${module}_la_CXXFLAGS     = -I.  $$(KERNEL_INCLUDES)
-lib${module}_la_LIBADD     = $$(KERNEL_LIBS)
+lib${module}_la_CXXFLAGS     = -I.  $$(SALOME_INCLUDES)
+lib${module}_la_LIBADD     = $$(SALOME_IDL_LIBS)
 ##########################################################
 %SK.cc %.hh : %.idl
 \t$$(OMNIORB_IDL) -bcxx $$(IDLCXXFLAGS) $$(OMNIORB_IDLCXXFLAGS) $$(IDL_INCLUDES) $$<
index f4c5bf9c9fcf226efc4c6d524c4a12f6b7d3f4d4..672b33dde2d5475b32b0cc5fb9b36464669d7023 100644 (file)
-#!/usr/bin/env python\r
-#coding: iso-8859-15\r
-#\r
-# Copyright (C) 2005  Gaëtan Lehmann <gaetan.lehmann@jouy.inra.fr>\r
-#\r
-# this file is part of uptodate\r
-#\r
-# This program is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU General Public License\r
-# as published by the Free Software Foundation; either version 2\r
-# of the License, or (at your option) any later version.\r
-#\r
-# This program is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-# GNU General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU General Public License\r
-# along with this program; if not, write to the Free Software\r
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\r
-#\r
-\r
-# this module sets python 2.3 compatibility\r
-\r
-\r
-# python 2.4 now have set in __builtin__ module\r
-\r
-import sets\r
-set = sets.Set\r
-del sets\r
-\r
-# python 2.4 enhance sort method in list object with key and reverse parameters, and introduced sorted function which do the same as sort but on a copied list\r
-# as it's far more difficult to modify sort method, we implement a sorted fuction for python 2.3\r
-\r
-def sorted(iterable, cmp=None, key=None, reverse=False) :\r
-       i = list(iterable)\r
-       if key :\r
-               d = {}\r
-               for v in iterable :\r
-                       k = key(v)\r
-                       if not d.has_key(k) :\r
-                               d[k] = []\r
-                       d[k].append(v)\r
-               keys = d.keys()\r
-               keys.sort(cmp)\r
-               i = []\r
-               for k in keys :\r
-                       i += d[k]\r
-       else :\r
-               i.sort(cmp)\r
-       if reverse :\r
-               i.reverse()\r
-       return i\r
-       \r
-# string.Template allow us to create templated command without problem : \r
-# configparser use standard substitution, so an error in template can make the config file invalid. With the new template, we avoid this problem\r
-# thoses classes are stollen from python 2.4 string module\r
-import re\r
-class _TemplateMetaclass(type):\r
-       pattern = r"""\r
-       %(delim)s(?:\r
-       (?P<escaped>%(delim)s) |   # Escape sequence of two delimiters\r
-       (?P<named>%(id)s)      |   # delimiter and a Python identifier\r
-       {(?P<braced>%(id)s)}   |   # delimiter and a braced identifier\r
-       (?P<invalid>)              # Other ill-formed delimiter exprs\r
-       )\r
-       """\r
-       \r
-       def __init__(cls, name, bases, dct):\r
-               super(_TemplateMetaclass, cls).__init__(name, bases, dct)\r
-               if 'pattern' in dct:\r
-                       pattern = cls.pattern\r
-               else:\r
-                       pattern = _TemplateMetaclass.pattern % {\r
-                               'delim' : re.escape(cls.delimiter),\r
-                               'id'    : cls.idpattern,\r
-                               }\r
-               cls.pattern = re.compile(pattern, re.IGNORECASE | re.VERBOSE)\r
-\r
-\r
-class Template:\r
-       """A string class for supporting $-substitutions."""\r
-       __metaclass__ = _TemplateMetaclass\r
-       \r
-       delimiter = '$'\r
-       idpattern = r'[_a-z][_a-z0-9]*'\r
-       \r
-       def __init__(self, template):\r
-               self.template = template\r
-       \r
-       # Search for $$, $identifier, ${identifier}, and any bare $'s\r
-       \r
-       def _invalid(self, mo):\r
-               i = mo.start('invalid')\r
-               lines = self.template[:i].splitlines(True)\r
-               if not lines:\r
-                       colno = 1\r
-                       lineno = 1\r
-               else:\r
-                       colno = i - len(''.join(lines[:-1]))\r
-                       lineno = len(lines)\r
-               raise ValueError('Invalid placeholder in string: line %d, col %d' %\r
-                               (lineno, colno))\r
-       \r
-       def substitute(self, *args, **kws):\r
-               if len(args) > 1:\r
-                       raise TypeError('Too many positional arguments')\r
-               if not args:\r
-                       mapping = kws\r
-               elif kws:\r
-                       mapping = _multimap(kws, args[0])\r
-               else:\r
-                       mapping = args[0]\r
-               # Helper function for .sub()\r
-               def convert(mo):\r
-                       # Check the most common path first.\r
-                       named = mo.group('named') or mo.group('braced')\r
-                       if named is not None:\r
-                               val = mapping[named]\r
-                               # We use this idiom instead of str() because the latter will\r
-                               # fail if val is a Unicode containing non-ASCII characters.\r
-                               return '%s' % val\r
-                       if mo.group('escaped') is not None:\r
-                               return self.delimiter\r
-                       if mo.group('invalid') is not None:\r
-                               self._invalid(mo)\r
-                       raise ValueError('Unrecognized named group in pattern',\r
-                                       self.pattern)\r
-               return self.pattern.sub(convert, self.template)\r
-       \r
-       def safe_substitute(self, *args, **kws):\r
-               if len(args) > 1:\r
-                       raise TypeError('Too many positional arguments')\r
-               if not args:\r
-                       mapping = kws\r
-               elif kws:\r
-                       mapping = _multimap(kws, args[0])\r
-               else:\r
-                       mapping = args[0]\r
-               # Helper function for .sub()\r
-               def convert(mo):\r
-                       named = mo.group('named')\r
-                       if named is not None:\r
-                               try:\r
-                                       # We use this idiom instead of str() because the latter\r
-                                       # will fail if val is a Unicode containing non-ASCII\r
-                                       return '%s' % mapping[named]\r
-                               except KeyError:\r
-                                       return self.delimiter + named\r
-                       braced = mo.group('braced')\r
-                       if braced is not None:\r
-                               try:\r
-                                       return '%s' % mapping[braced]\r
-                               except KeyError:\r
-                                       return self.delimiter + '{' + braced + '}'\r
-                       if mo.group('escaped') is not None:\r
-                               return self.delimiter\r
-                       if mo.group('invalid') is not None:\r
-                               return self.delimiter\r
-                       raise ValueError('Unrecognized named group in pattern',\r
-                                       self.pattern)\r
-               return self.pattern.sub(convert, self.template)\r
+#!/usr/bin/env python
+#coding: iso-8859-15
+#
+# Copyright (C) 2005  Gaëtan Lehmann <gaetan.lehmann@jouy.inra.fr>
+#
+# this file is part of uptodate
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+
+# this module sets python 2.3 compatibility
+
+
+# python 2.4 now have set in __builtin__ module
+
+import sets
+set = sets.Set
+del sets
+
+# python 2.4 enhance sort method in list object with key and reverse parameters, and introduced sorted function which do the same as sort but on a copied list
+# as it's far more difficult to modify sort method, we implement a sorted fuction for python 2.3
+
+def sorted(iterable, cmp=None, key=None, reverse=False) :
+       i = list(iterable)
+       if key :
+               d = {}
+               for v in iterable :
+                       k = key(v)
+                       if not d.has_key(k) :
+                               d[k] = []
+                       d[k].append(v)
+               keys = d.keys()
+               keys.sort(cmp)
+               i = []
+               for k in keys :
+                       i += d[k]
+       else :
+               i.sort(cmp)
+       if reverse :
+               i.reverse()
+       return i
+       
+# string.Template allow us to create templated command without problem : 
+# configparser use standard substitution, so an error in template can make the config file invalid. With the new template, we avoid this problem
+# thoses classes are stollen from python 2.4 string module
+import re
+class _TemplateMetaclass(type):
+       pattern = r"""
+       %(delim)s(?:
+       (?P<escaped>%(delim)s) |   # Escape sequence of two delimiters
+       (?P<named>%(id)s)      |   # delimiter and a Python identifier
+       {(?P<braced>%(id)s)}   |   # delimiter and a braced identifier
+       (?P<invalid>)              # Other ill-formed delimiter exprs
+       )
+       """
+       
+       def __init__(cls, name, bases, dct):
+               super(_TemplateMetaclass, cls).__init__(name, bases, dct)
+               if 'pattern' in dct:
+                       pattern = cls.pattern
+               else:
+                       pattern = _TemplateMetaclass.pattern % {
+                               'delim' : re.escape(cls.delimiter),
+                               'id'    : cls.idpattern,
+                               }
+               cls.pattern = re.compile(pattern, re.IGNORECASE | re.VERBOSE)
+
+
+class Template:
+       """A string class for supporting $-substitutions."""
+       __metaclass__ = _TemplateMetaclass
+       
+       delimiter = '$'
+       idpattern = r'[_a-z][_a-z0-9]*'
+       
+       def __init__(self, template):
+               self.template = template
+       
+       # Search for $$, $identifier, ${identifier}, and any bare $'s
+       
+       def _invalid(self, mo):
+               i = mo.start('invalid')
+               lines = self.template[:i].splitlines(True)
+               if not lines:
+                       colno = 1
+                       lineno = 1
+               else:
+                       colno = i - len(''.join(lines[:-1]))
+                       lineno = len(lines)
+               raise ValueError('Invalid placeholder in string: line %d, col %d' %
+                               (lineno, colno))
+       
+       def substitute(self, *args, **kws):
+               if len(args) > 1:
+                       raise TypeError('Too many positional arguments')
+               if not args:
+                       mapping = kws
+               elif kws:
+                       mapping = _multimap(kws, args[0])
+               else:
+                       mapping = args[0]
+               # Helper function for .sub()
+               def convert(mo):
+                       # Check the most common path first.
+                       named = mo.group('named') or mo.group('braced')
+                       if named is not None:
+                               val = mapping[named]
+                               # We use this idiom instead of str() because the latter will
+                               # fail if val is a Unicode containing non-ASCII characters.
+                               return '%s' % val
+                       if mo.group('escaped') is not None:
+                               return self.delimiter
+                       if mo.group('invalid') is not None:
+                               self._invalid(mo)
+                       raise ValueError('Unrecognized named group in pattern',
+                                       self.pattern)
+               return self.pattern.sub(convert, self.template)
+       
+       def safe_substitute(self, *args, **kws):
+               if len(args) > 1:
+                       raise TypeError('Too many positional arguments')
+               if not args:
+                       mapping = kws
+               elif kws:
+                       mapping = _multimap(kws, args[0])
+               else:
+                       mapping = args[0]
+               # Helper function for .sub()
+               def convert(mo):
+                       named = mo.group('named')
+                       if named is not None:
+                               try:
+                                       # We use this idiom instead of str() because the latter
+                                       # will fail if val is a Unicode containing non-ASCII
+                                       return '%s' % mapping[named]
+                               except KeyError:
+                                       return self.delimiter + named
+                       braced = mo.group('braced')
+                       if braced is not None:
+                               try:
+                                       return '%s' % mapping[braced]
+                               except KeyError:
+                                       return self.delimiter + '{' + braced + '}'
+                       if mo.group('escaped') is not None:
+                               return self.delimiter
+                       if mo.group('invalid') is not None:
+                               return self.delimiter
+                       raise ValueError('Unrecognized named group in pattern',
+                                       self.pattern)
+               return self.pattern.sub(convert, self.template)
index f56472851fbc232416e81cfcf122e6316cdc2ca2..4979bfadd53884bb932802996a9392109d82dfbe 100644 (file)
@@ -1,3 +1,22 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 try:
   from string import Template
 except:
@@ -253,7 +272,11 @@ hxxCompo="""
 #include "Superv_Component_i.hxx"
 #include "${module}.hh"
 
-class ${component}_i:
+//COMPODEFS
+${compodefs}
+//ENDDEF
+
+class ${component}_i: ${inheritedclass}
   public virtual POA_${module}::${component},
   public virtual Superv_Component_i
 {
@@ -377,9 +400,9 @@ exeCPP=Template(exeCPP)
 compoMakefile="""
 lib${component}Engine_la_SOURCES      = ${component}.cxx ${sources}
 nodist_lib${component}Engine_la_SOURCES =
-lib${component}Engine_la_CXXFLAGS = -I$$(top_builddir)/idl  $$(KERNEL_INCLUDES) ${includes}
-lib${component}Engine_la_FFLAGS = $$(KERNEL_INCLUDES) -fexceptions ${includes}
-lib${component}Engine_la_LIBADD   = -L$$(top_builddir)/idl -l${module} $$(FLIBS) ${libs}
+lib${component}Engine_la_CXXFLAGS = -I$$(top_builddir)/idl  $$(SALOME_INCLUDES) ${includes}
+lib${component}Engine_la_FFLAGS = $$(SALOME_INCLUDES) -fexceptions ${includes}
+lib${component}Engine_la_LIBADD   = ${libs} -L$$(top_builddir)/idl -l${module} $${SALOME_LIBS} $$(FLIBS)
 lib${component}Engine_la_LDFLAGS = ${rlibs}
 """
 compoMakefile=Template(compoMakefile)
@@ -387,9 +410,9 @@ compoMakefile=Template(compoMakefile)
 compoEXEMakefile="""
 lib${component}Exelib_la_SOURCES      = ${component}.cxx
 nodist_lib${component}Exelib_la_SOURCES =
-lib${component}Exelib_la_CXXFLAGS = -I$$(top_builddir)/idl  $$(KERNEL_INCLUDES) ${includes}
-lib${component}Exelib_la_FFLAGS = $$(KERNEL_INCLUDES) -fexceptions ${includes}
-lib${component}Exelib_la_LIBADD   = -L$$(top_builddir)/idl -l${module} $$(FLIBS) ${libs}
+lib${component}Exelib_la_CXXFLAGS = -I$$(top_builddir)/idl  $$(SALOME_INCLUDES) ${includes}
+lib${component}Exelib_la_FFLAGS = $$(SALOME_INCLUDES) -fexceptions ${includes}
+lib${component}Exelib_la_LIBADD   = ${libs} -L$$(top_builddir)/idl -l${module} $${SALOME_LIBS} $$(FLIBS)
 lib${component}Exelib_la_LDFLAGS = ${rlibs}
 """
 compoEXEMakefile=Template(compoEXEMakefile)
index adc8977dce830681878f00a8b4cf255c4b0027ae..eb6edea20e9ac5737793aa317b23a6c6100d7572 100644 (file)
@@ -1,3 +1,22 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 """
   Module that defines CPPComponent for SALOME components implemented in C++
 """
@@ -9,11 +28,13 @@ from cpp_tmpl import exeCPP, compoEXEMakefile, compoMakefile
 
 class CPPComponent(Component):
   def __init__(self, name, services=None, libs="", rlibs="", includes="",
-                     kind="lib", exe_path=None, sources=None):
+                     kind="lib", exe_path=None, sources=None, inheritedclass="",
+                     compodefs=""):
     self.exe_path = exe_path
     Component.__init__(self, name, services, impl="CPP", libs=libs,
                              rlibs=rlibs, includes=includes, kind=kind,
-                             sources=sources)
+                             sources=sources,inheritedclass=inheritedclass,
+                             compodefs=compodefs)
 
   def validate(self):
     """ validate component definition parameters"""
@@ -50,7 +71,7 @@ class CPPComponent(Component):
     makefileItems={"header":"""
 include $(top_srcdir)/adm_local/make_common_starter.am
 
-AM_CFLAGS=$(KERNEL_INCLUDES) -fexceptions
+AM_CFLAGS=$(SALOME_INCLUDES) -fexceptions
 """}
     if self.kind == "lib":
       makefileItems["lib_LTLIBRARIES"]=["lib"+self.name+"Engine.la"]
@@ -81,8 +102,14 @@ AM_CFLAGS=$(KERNEL_INCLUDES) -fexceptions
       service = service+gen.makeArgs(serv)+");"
       services.append(service)
     servicesdef = "\n".join(services)
+
+    inheritedclass=self.inheritedclass
+    if self.inheritedclass:
+      inheritedclass= " public virtual " + self.inheritedclass + ","
+
     return hxxCompo.substitute(component=self.name, module=gen.module.name,
-                               servicesdef=servicesdef)
+                               servicesdef=servicesdef, inheritedclass=inheritedclass,
+                               compodefs=self.compodefs)
 
   def makecxx(self, gen, exe=0):
     """return a string that is the content of .cxx file
index bb484ebb89492266a30cfa8643a329084bc3eb66..55d2bafbe9feeccc53e3a387e17ad08ee6843025 100644 (file)
@@ -1,3 +1,21 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
 from gener import Component
 from cppcompo import CPPComponent
@@ -21,7 +39,9 @@ class F77Component(CPPComponent):
     """generate definitions (defs attribute of services) et bodys (body attribute of services)"""
     for serv in self.services:
       #defs generation
-      params = ["void *compo"]
+      params=[]
+      if serv.instream or serv.outstream:
+        params = ["void *compo"]
       strparams = []
       for name, typ in serv.inport:
         if typ == "file":continue #files are not passed through service interface
@@ -41,7 +61,9 @@ class F77Component(CPPComponent):
       serv.defs = serv.defs+'\nextern "C" void F_FUNC(%s,%s)(%s);' % (serv.name.lower(), serv.name.upper(), args)
 
       #body generation
-      params = ["&component"]
+      params=[]
+      if serv.instream or serv.outstream:
+        params = ["&component"]
       strparams = []
       strallocs = []
       #length allocated for out string
index 7f39254b221226606a83af8c6aab7b7a7ba673e9..704f2f0a9233b78c16b8e9212f5648061908c942 100644 (file)
@@ -1,3 +1,22 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 import os, shutil, glob, socket
 import traceback
 
@@ -22,56 +41,19 @@ from cata_tmpl import cataOutStream, cataInStream, cataOutparam, cataInparam
 from cata_tmpl import cataOutParallelStream, cataInParallelStream
 from cata_tmpl import cataService, cataCompo
 from aster_tmpl import check_aster
-
-corbaTypes = {"double":"CORBA::Double", "long":"CORBA::Long",
-              "string":"const char*", "dblevec":"const %s::dblevec&",
-              "stringvec":"const %s::stringvec&", "intvec":"const %s::intvec&",
-              "dataref":"const Engines::dataref&","file":None
-             }
-
-corbaOutTypes = {"double":"CORBA::Double&", "long":"CORBA::Long&",
-                 "string":"CORBA::String_out", "dblevec":"%s::dblevec_out",
-                 "stringvec":"%s::stringvec_out", "intvec":"%s::intvec_out",
-                 "dataref":"Engines::dataref_out","file":None
-                }
-
-def corba_in_type(typ, module):
-  if typ in ("dblevec", "intvec", "stringvec"):
-    return corbaTypes[typ] % module
-  else:
-    return corbaTypes[typ]
-
-def corba_out_type(typ, module):
-  if typ in ("dblevec", "intvec", "stringvec"):
-    return corbaOutTypes[typ] % module
-  else:
-    return corbaOutTypes[typ]
-
-calciumTypes = {"CALCIUM_double":"CALCIUM_double", 
-                "CALCIUM_integer":"CALCIUM_integer", 
-                "CALCIUM_real":"CALCIUM_real",
-                "CALCIUM_string":"CALCIUM_string", 
-                "CALCIUM_complex":"CALCIUM_complex", 
-                "CALCIUM_logical":"CALCIUM_logical",
-               } 
-
-DatastreamParallelTypes = {"Param_Double_Port":"Param_Double_Port"}
-
-ValidImpl = ("CPP", "PY", "F77", "ASTER", "PACO")
-ValidImplTypes = ("sequential", "parallel")
-ValidTypes = corbaTypes.keys()
-ValidStreamTypes = calciumTypes.keys()
-ValidParallelStreamTypes = DatastreamParallelTypes.keys()
-ValidDependencies = ("I", "T")
-PyValidTypes = ValidTypes+["pyobj"]
+from salomemodules import salome_modules
+from yacstypes import corbaTypes, corbaOutTypes, moduleTypes, idlTypes, corba_in_type, corba_out_type
+from yacstypes import ValidTypes, PyValidTypes, calciumTypes, DatastreamParallelTypes
+from yacstypes import ValidImpl, ValidImplTypes, ValidStreamTypes, ValidParallelStreamTypes, ValidDependencies
 
 def makedirs(namedir):
+  """Create a new directory named namedir. If a directory already exists copy it to namedir.bak"""
   if os.path.exists(namedir):
     dirbak = namedir+".bak"
     if os.path.exists(dirbak):
       shutil.rmtree(dirbak)
     os.rename(namedir, dirbak)
-    os.listdir(dirbak) #sert seulement a mettre a jour le systeme de fichier sur certaines machines
+    os.listdir(dirbak) #needed to update filesystem on special machines (cluster with NFS, for example)
   os.makedirs(namedir)
 
 class Module(object):
@@ -91,7 +73,7 @@ class Module(object):
   def validate(self):
     # Test Module name, canot have a "-" in the name
     if self.name.find("-") != -1:
-      raise Invalid("Module name %s is not valid, remove caracter - in the module name" % self.name)
+      raise Invalid("Module name %s is not valid, remove character - in the module name" % self.name)
     lcompo = set()
     for compo in self.components:
       if compo.name in lcompo:
@@ -100,8 +82,9 @@ class Module(object):
       compo.validate()
 
 class Component(object):
-  def __init__(self, name, services=None, impl="PY", libs="", rlibs="", 
-                     includes="", kind="lib", sources=None):
+  def __init__(self, name, services=None, impl="PY", libs="", rlibs="",
+                     includes="", kind="lib", sources=None,
+                     inheritedclass="",compodefs=""):
     self.name = name
     self.impl = impl
     self.kind = kind
@@ -110,6 +93,8 @@ class Component(object):
     self.rlibs = rlibs
     self.includes = includes
     self.sources = sources or []
+    self.inheritedclass=inheritedclass
+    self.compodefs=compodefs
 
   def validate(self):
     if self.impl not in ValidImpl:
@@ -257,7 +242,7 @@ class Generator(object):
     makefile = "SUBDIRS="
     makefileItems={"header":"""
 include $(top_srcdir)/adm_local/make_common_starter.am
-AM_CFLAGS=$$(KERNEL_INCLUDES) -fexceptions
+AM_CFLAGS=$$(SALOME_INCLUDES) -fexceptions
 """,
                    "salomepython_PYTHON":[],
                    "dist_salomescript_SCRIPTS":[],
@@ -267,13 +252,31 @@ AM_CFLAGS=$$(KERNEL_INCLUDES) -fexceptions
                    "body":"",
                   }
 
+    #get the list of SALOME modules used and put it in used_modules attribute
+    def get_dependent_modules(mod,modules):
+      modules[mod]=1
+      if not salome_modules[mod].has_key("depends"):return
+      for m in salome_modules[mod]["depends"]:
+        if modules.has_key(m):continue
+        get_dependent_modules(m,modules)
+
+    modules = {}
+    for compo in module.components:
+      for serv in compo.services:
+        for name, typ in serv.inport + serv.outport:
+          mod = moduleTypes[typ]
+          if mod:
+            get_dependent_modules(mod,modules)
+
+    self.used_modules = modules.keys()
+
     for compo in module.components:
       #for components files
       fdict=compo.makeCompo(self)
       if self.module.layout=="multidir":
         srcs[compo.name] = fdict
         #for src/Makefile.am
-        makefile = makefile+" "+compo.name
+        makefile = makefile + " " + compo.name
       else:
         srcs.update(fdict)
         #for src/Makefile.am
@@ -285,7 +288,7 @@ AM_CFLAGS=$$(KERNEL_INCLUDES) -fexceptions
         makefileItems["salomeinclude_HEADERS"]=makefileItems["salomeinclude_HEADERS"]+mdict.get("salomeinclude_HEADERS",[])
         makefileItems["body"]=makefileItems["body"]+mdict.get("body","")+'\n'
 
-    if self.module.layout=="multidir":
+    if self.module.layout == "multidir":
       srcs["Makefile.am"] = makefile+'\n'
     else:
       srcs["Makefile.am"] = self.makeMakefile(makefileItems)
@@ -293,14 +296,24 @@ AM_CFLAGS=$$(KERNEL_INCLUDES) -fexceptions
     #for catalog files
     catalogfile = "%sCatalog.xml" % module.name
 
+    #add makefile definitions to make_common_starter.am
+    common_starter = makecommon
+    for mod in self.used_modules:
+      common_starter = common_starter + salome_modules[mod]["makefiledefs"] + '\n'
+
     self.makeFiles({"autogen.sh":autogen,
                     "Makefile.am":mainMakefile,
                     "README":"", "NEWS":"", "AUTHORS":"", "ChangeLog":"",
                     "src":srcs,
                     "resources":{"Makefile.am":resMakefile.substitute(module=module.name), catalogfile:self.makeCatalog()},
-                    "adm_local":{"make_common_starter.am":makecommon, "check_aster.m4":check_aster},
+                    "adm_local":{"make_common_starter.am": common_starter, "check_aster.m4":check_aster},
                     }, namedir)
 
+    #add checks for modules in configure.ac
+    configure_modules=""
+    for mod in self.used_modules:
+      configure_modules = configure_modules + salome_modules[mod]["configdefs"] + '\n'
+
     #for configure.ac
     configure_makefiles = []
     if self.module.layout=="multidir":
@@ -319,20 +332,22 @@ AM_CFLAGS=$$(KERNEL_INCLUDES) -fexceptions
 
       self.makeFiles({"configure.ac":configure.substitute(module=module.name.lower(),
                                                           makefiles='\n'.join(configure_makefiles),
-                                                          paco_configure=paco_configure),
-                      "idl":{"Makefile.am":idlMakefile.substitute(module=module.name, 
+                                                          paco_configure=paco_configure,
+                                                          modules=configure_modules),
+                      "idl":{"Makefile.am":idlMakefile.substitute(module=module.name,
                                                                   PACO_BUILT_SOURCES=PACO_BUILT_SOURCES,
                                                                   PACO_SALOMEINCLUDE_HEADERS=PACO_SALOMEINCLUDE_HEADERS,
                                                                   PACO_INCLUDES=PACO_INCLUDES,
                                                                   PACO_salomepython_DATA=PACO_salomepython_DATA,
-                                                                  PACO_salomeidl_DATA=PACO_salomeidl_DATA), 
-                             idlfile:self.makeidl(),
-                             xmlfile:self.makexml()},
+                                                                  PACO_salomeidl_DATA=PACO_salomeidl_DATA),
+                      idlfile:self.makeidl(),
+                      xmlfile:self.makexml()},
                       }, namedir)
     else :
-      self.makeFiles({"configure.ac":configure.substitute(module=module.name.lower(), 
+      self.makeFiles({"configure.ac":configure.substitute(module=module.name.lower(),
                                                           makefiles='\n'.join(configure_makefiles),
-                                                          paco_configure=""),
+                                                          paco_configure="",
+                                                          modules=configure_modules),
                       "idl":{"Makefile.am":idlMakefile.substitute(module=module.name,
                                                                   PACO_BUILT_SOURCES="",
                                                                   PACO_SALOMEINCLUDE_HEADERS="",
@@ -432,10 +447,10 @@ AM_CFLAGS=$$(KERNEL_INCLUDES) -fexceptions
           params = []
           for name, typ in serv.inport:
             if typ == "file":continue #files are not passed through IDL interface
-            params.append("in %s %s" % (typ, name))
+            params.append("in %s %s" % (idlTypes[typ], name))
           for name, typ in serv.outport:
             if typ == "file":continue #files are not passed through IDL interface
-            params.append("out %s %s" % (typ, name))
+            params.append("out %s %s" % (idlTypes[typ], name))
           service = "    void %s(" % serv.name
           service = service+",".join(params)+");"
           services.append(service)
@@ -448,17 +463,27 @@ AM_CFLAGS=$$(KERNEL_INCLUDES) -fexceptions
             if typ == "file":continue #files are not passed through IDL interface
             if compo.impl in ("PY", "ASTER") and typ == "pyobj":
               typ = "Engines::fileBlock"
+            else:
+              typ=idlTypes[typ]
             params.append("in %s %s" % (typ, name))
           for name, typ in serv.outport:
             if typ == "file":continue #files are not passed through IDL interface
             if compo.impl in ("PY", "ASTER") and typ == "pyobj":
               typ = "Engines::fileBlock"
+            else:
+              typ=idlTypes[typ]
             params.append("out %s %s" % (typ, name))
           service = "    void %s(" % serv.name
           service = service+",".join(params)+") raises (SALOME::SALOME_Exception);"
           services.append(service)
         interfaces.append(interface.substitute(component=compo.name, services="\n".join(services)))
-    return idl.substitute(module=self.module.name, interfaces='\n'.join(interfaces))
+
+    #build idl includes for SALOME modules
+    idldefs=""
+    for mod in self.used_modules:
+      idldefs = idldefs + salome_modules[mod]["idldefs"]
+
+    return idl.substitute(module=self.module.name, interfaces='\n'.join(interfaces),idldefs=idldefs)
 
   # For PaCO++
   def makexml(self):
@@ -543,7 +568,7 @@ AM_CFLAGS=$$(KERNEL_INCLUDES) -fexceptions
     if ier != 0:
       raise Invalid("install has ended in error")
 
-  def make_appli(self, appliname, restrict=None, altmodules=None):
+  def make_appli(self, appliname, restrict=None, altmodules=None, resources=""):
     """generate SALOME application"""
     makedirs(appliname)
 
@@ -598,8 +623,15 @@ AM_CFLAGS=$$(KERNEL_INCLUDES) -fexceptions
     if not os.path.exists(prerequisites):
       raise Invalid("Can not create an application : prerequisites file not defined or does not exist")
 
+    #add resources catalog if it exists
+    resources_spec=""
+    if os.path.isfile(resources):
+      resources_spec='<resources path="%s" />' % os.path.abspath(resources)
+
     #create config_appli.xml file
-    appli = application.substitute(prerequisites=prerequisites, modules="\n".join(modules))
+    appli = application.substitute(prerequisites=prerequisites,
+                                   modules="\n".join(modules),
+                                   resources=resources_spec)
     fil = open(os.path.join(appliname, "config_appli.xml"), 'w')
     fil.write(appli)
     fil.close()
index cc6f16cb53cd061f95878b996de8cc6be5ed6e44..61f41e3432bf53c4dbb55fe93dae7976fb359d4a 100644 (file)
@@ -1,3 +1,22 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 try:
   from string import Template
 except:
@@ -6,6 +25,7 @@ except:
 application="""
 <application>
 <prerequisites path="${prerequisites}"/>
+${resources}
 <modules>
 ${modules}
 </modules>
@@ -43,6 +63,9 @@ if test "x$$Kernel_ok" = "xno"; then
   AC_MSG_ERROR([You must define a correct KERNEL_ROOT_DIR or use the --with-kernel= configure option !])
 fi
 
+dnl Check Salome modules Install
+${modules}
+
 AC_PROG_LIBTOOL
 AC_PROG_CC
 AC_PROG_CXX
@@ -143,6 +166,10 @@ IDL_INCLUDES = -I$(KERNEL_ROOT_DIR)/idl/salome
 KERNEL_LIBS= -L$(KERNEL_ROOT_DIR)/lib/salome -lSalomeContainer -lOpUtil -lSalomeDSCContainer -lSalomeDSCSuperv -lSalomeDatastream -lSalomeDSCSupervBasic -lCalciumC
 KERNEL_INCLUDES= -I$(KERNEL_ROOT_DIR)/include/salome $(OMNIORB_INCLUDES) $(BOOST_CPPFLAGS)
 
+SALOME_LIBS= ${KERNEL_LIBS}
+SALOME_IDL_LIBS= -L$(KERNEL_ROOT_DIR)/lib/salome -lSalomeIDLKernel
+SALOME_INCLUDES= ${KERNEL_INCLUDES}
+
 """
 
 resMakefile="""
index b8312c2cde756a7e1d464f068fde1db2828fd8d9..72692caa1c642b6c0d48fc31e3b8afe2e331a48a 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 *-
-#  Copyright (C) 2009 - EDF R&D
+#  Copyright (C) 2009-2010  EDF R&D
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -16,6 +16,9 @@
 #  License along with this library; if not, write to the Free Software
 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 #  Author : Andre RIBES (EDF R&D)
 
 try:
@@ -36,8 +39,8 @@ AM_CFLAGS=$$(KERNEL_INCLUDES) $$(PACO_INCLUDES) -fexceptions
 lib_LTLIBRARIES = lib${component}Engine.la
 lib${component}Engine_la_SOURCES      = ${component}.cxx ${sources}
 nodist_lib${component}Engine_la_SOURCES =
-lib${component}Engine_la_CXXFLAGS = -I$$(top_builddir)/idl $$(KERNEL_INCLUDES) $$(PACO_INCLUDES) $$(MPI_INCLUDES) ${includes}
-lib${component}Engine_la_LIBADD   = -L$$(top_builddir)/idl -l${module} @KERNEL_ROOT_DIR@/lib/salome/libSalomeParallelDSCContainer.la @PACOPATH@/lib/libPaCO_direct_comScheduling.la $$(FLIBS) ${libs} $$(PACO_LIBS)
+lib${component}Engine_la_CXXFLAGS = -I$$(top_builddir)/idl $$(SALOME_INCLUDES) $$(PACO_INCLUDES) $$(MPI_INCLUDES) ${includes}
+lib${component}Engine_la_LIBADD   = -L$$(top_builddir)/idl -l${module} @KERNEL_ROOT_DIR@/lib/salome/libSalomeParallelDSCContainer.la @PACOPATH@/lib/libPaCO_direct_comScheduling.la $$(FLIBS) ${libs} $$(PACO_LIBS) $$(SALOME_LIBS)
 lib${component}Engine_la_LDFLAGS = ${rlibs}
 salomeinclude_HEADERS = ${component}.hxx
 """
index f16b2a34fabd083ff9c2b4d6a97e0644617e0a1c..8b60d6ac17dd946b9caef008b75c1d366c0d5517 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 *-
-#  Copyright (C) 2009 - EDF R&D
+#  Copyright (C) 2009-2010  EDF R&D
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -16,6 +16,9 @@
 #  License along with this library; if not, write to the Free Software
 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 #  Author : Andre RIBES (EDF R&D)
 
 """
index 2b711613d913bee08c0461aa8015814d2e3bd86a..411c936cf9111ba4c3a84d450109f943f9119001 100644 (file)
@@ -1,3 +1,22 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 """
   Module that defines PYComponent for SALOME components implemented in Python
 """
@@ -17,11 +36,12 @@ def indent(text, prefix='    '):
 
 class PYComponent(Component):
   def __init__(self, name, services=None, python_path=None, kind="lib",
-                     sources=None):
+                     sources=None, inheritedclass="", compodefs=""):
     """initialise component attributes"""
     self.python_path = python_path or []
     Component.__init__(self, name, services, impl="PY", kind=kind,
-                             sources=sources)
+                             sources=sources, inheritedclass=inheritedclass,
+                             compodefs=compodefs)
 
   def validate(self):
     """validate component attributes"""
@@ -103,10 +123,20 @@ class PYComponent(Component):
       inits.append(init)
 
     python_path = ",".join([repr(p) for p in self.python_path])
+
+    inheritedclass=self.inheritedclass
+    callconstructor=""
+    if self.inheritedclass:
+      inheritedclass= self.inheritedclass + ","
+      callconstructor="""
+    if hasattr(%s,"__init__"):
+      %s.__init__(self)""" % (self.inheritedclass,self.inheritedclass)
+
     return pyCompo.substitute(component=self.name, module=gen.module.name,
-                              servicesdef="\n".join(defs), servicesimpl="\n".join(services), 
+                              servicesdef="\n".join(defs), servicesimpl="\n".join(services),
                               initservice='\n'.join(inits),
-                              python_path=python_path)
+                              python_path=python_path,inheritedclass=inheritedclass,
+                              compodefs=self.compodefs, callconstructor=callconstructor)
 
   def makepyexe(self, gen):
     """generate standalone component source (python executable)"""
@@ -158,11 +188,19 @@ class PYComponent(Component):
       inits.append(init)
 
     python_path = ",".join([repr(p) for p in self.python_path])
-    return pyCompoEXE.substitute(component=self.name, module=gen.module.name,
-                                 servicesdef="\n".join(defs), 
-                                 servicesimpl="\n".join(services),
-                                 initservice='\n'.join(inits), 
-                                 python_path=python_path)
 
+    inheritedclass=self.inheritedclass
+    callconstructor=""
+    if self.inheritedclass:
+      inheritedclass= self.inheritedclass + ","
+      callconstructor="""
+    if hasattr(%s,"__init__"):
+      %s.__init__(self)""" % (self.inheritedclass,self.inheritedclass)
 
+    return pyCompoEXE.substitute(component=self.name, module=gen.module.name,
+                                 servicesdef="\n".join(defs),
+                                 servicesimpl="\n".join(services),
+                                 initservice='\n'.join(inits),
+                                 python_path=python_path,inheritedclass=inheritedclass,
+                                 compodefs=self.compodefs, callconstructor=callconstructor)
 
index ad4eb4fbd9492a0a33f83c72af6895201b94d05f..4996d6d4031af3c145af5cd7ba6228fa6b3b5bd8 100644 (file)
@@ -1,3 +1,22 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 try:
   from string import Template
 except:
@@ -18,11 +37,15 @@ try:
 except:
   numpy=None
 
+#COMPODEFS
+${compodefs}
+#ENDDEF
+
 #DEFS
 ${servicesdef}
 #ENDDEF
 
-class ${component}(${module}__POA.${component},dsccalcium.PyDSCComponent):
+class ${component}(${inheritedclass} ${module}__POA.${component},dsccalcium.PyDSCComponent):
   '''
      To be identified as a SALOME component this Python class
      must have the same name as the component, inherit omniorb
@@ -31,6 +54,7 @@ class ${component}(${module}__POA.${component},dsccalcium.PyDSCComponent):
   '''
   def __init__ ( self, orb, poa, contID, containerName, instanceName, interfaceName ):
     dsccalcium.PyDSCComponent.__init__(self, orb, poa,contID,containerName,instanceName,interfaceName)
+${callconstructor}
 
   def init_service(self,service):
 ${initservice}
diff --git a/module_generator/salomemodules.py b/module_generator/salomemodules.py
new file mode 100644 (file)
index 0000000..c296765
--- /dev/null
@@ -0,0 +1,126 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#######################################################################
+#         SALOME modules                                              #
+#######################################################################
+salome_modules={}
+
+#module GEOM
+idldefs="""
+#include "GEOM_Gen.idl"
+"""
+makefiledefs="""
+#module GEOM
+GEOM_IDL_INCLUDES = -I$(GEOM_ROOT_DIR)/idl/salome
+GEOM_INCLUDES= -I$(GEOM_ROOT_DIR)/include/salome
+GEOM_IDL_LIBS= -L$(GEOM_ROOT_DIR)/lib/salome -lSalomeIDLGEOM
+GEOM_LIBS= -L$(GEOM_ROOT_DIR)/lib/salome
+SALOME_LIBS += ${GEOM_LIBS}
+SALOME_IDL_LIBS += ${GEOM_IDL_LIBS}
+SALOME_INCLUDES += ${GEOM_INCLUDES}
+IDL_INCLUDES += ${GEOM_IDL_INCLUDES}
+"""
+configdefs="""
+if test "x${GEOM_ROOT_DIR}" != "x" && test -d ${GEOM_ROOT_DIR} ; then
+  AC_MSG_RESULT(Using GEOM installation in ${GEOM_ROOT_DIR})
+else
+  AC_MSG_ERROR([Cannot find module GEOM. Have you set GEOM_ROOT_DIR ?],1)
+fi
+"""
+
+salome_modules["GEOM"]={"idldefs" : idldefs, "makefiledefs" : makefiledefs, "configdefs" : configdefs}
+
+#module MED
+idldefs="""
+#include "MED_Gen.idl"
+#include "MED.idl"
+"""
+makefiledefs="""
+#module MED
+MED_IDL_INCLUDES = -I$(MED_ROOT_DIR)/idl/salome
+MED_INCLUDES= -I$(MED_ROOT_DIR)/include/salome
+MED_IDL_LIBS= -L$(MED_ROOT_DIR)/lib/salome -lSalomeIDLMED
+MED_LIBS= -L$(MED_ROOT_DIR)/lib/salome
+SALOME_LIBS += ${MED_LIBS}
+SALOME_IDL_LIBS += ${MED_IDL_LIBS}
+SALOME_INCLUDES += ${MED_INCLUDES}
+IDL_INCLUDES += ${MED_IDL_INCLUDES}
+"""
+configdefs="""
+if test "x${MED_ROOT_DIR}" != "x" && test -d ${MED_ROOT_DIR} ; then
+  AC_MSG_RESULT(Using MED installation in ${MED_ROOT_DIR})
+else
+  AC_MSG_ERROR([Cannot find module MED. Have you set MED_ROOT_DIR ?],1)
+fi
+"""
+
+salome_modules["MED"]={"idldefs" : idldefs, "makefiledefs" : makefiledefs, "configdefs" : configdefs}
+
+#module SMESH
+idldefs="""
+#include "SMESH_Gen.idl"
+#include "SMESH_Mesh.idl"
+"""
+makefiledefs="""
+#module SMESH
+SMESH_IDL_INCLUDES = -I$(SMESH_ROOT_DIR)/idl/salome
+SMESH_INCLUDES= -I$(SMESH_ROOT_DIR)/include/salome
+SMESH_IDL_LIBS= -L$(SMESH_ROOT_DIR)/lib/salome -lSalomeIDLSMESH
+SMESH_LIBS= -L$(SMESH_ROOT_DIR)/lib/salome
+SALOME_LIBS += ${SMESH_LIBS}
+SALOME_IDL_LIBS += ${SMESH_IDL_LIBS}
+SALOME_INCLUDES += ${SMESH_INCLUDES}
+IDL_INCLUDES += ${SMESH_IDL_INCLUDES}
+"""
+configdefs="""
+if test "x${SMESH_ROOT_DIR}" != "x" && test -d ${SMESH_ROOT_DIR} ; then
+  AC_MSG_RESULT(Using SMESH installation in ${SMESH_ROOT_DIR})
+else
+  AC_MSG_ERROR([Cannot find module SMESH. Have you set SMESH_ROOT_DIR ?],1)
+fi
+"""
+
+salome_modules["SMESH"]={"idldefs" : idldefs, "makefiledefs" : makefiledefs, "configdefs" : configdefs,
+                         "depends":["GEOM","MED"]}
+
+#module VISU
+idldefs="""
+#include "VISU_Gen.idl"
+"""
+makefiledefs="""
+#module VISU
+VISU_IDL_INCLUDES = -I$(VISU_ROOT_DIR)/idl/salome
+VISU_INCLUDES= -I$(VISU_ROOT_DIR)/include/salome
+VISU_IDL_LIBS= -L$(VISU_ROOT_DIR)/lib/salome -lSalomeIDLVISU
+VISU_LIBS= -L$(VISU_ROOT_DIR)/lib/salome
+SALOME_LIBS += ${VISU_LIBS}
+SALOME_IDL_LIBS += ${VISU_IDL_LIBS}
+SALOME_INCLUDES += ${VISU_INCLUDES}
+IDL_INCLUDES += ${VISU_IDL_INCLUDES}
+"""
+configdefs="""
+if test "x${VISU_ROOT_DIR}" != "x" && test -d ${VISU_ROOT_DIR} ; then
+  AC_MSG_RESULT(Using VISU installation in ${VISU_ROOT_DIR})
+else
+  AC_MSG_ERROR([Cannot find module VISU. Have you set VISU_ROOT_DIR ?],1)
+fi
+"""
+
+salome_modules["VISU"]={"idldefs" : idldefs, "makefiledefs" : makefiledefs, "configdefs" : configdefs}
diff --git a/module_generator/yacstypes.py b/module_generator/yacstypes.py
new file mode 100644 (file)
index 0000000..125254e
--- /dev/null
@@ -0,0 +1,100 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+###########################################################
+#             Types definitions                           #
+###########################################################
+corbaTypes = {"double":"CORBA::Double", "long":"CORBA::Long",
+              "string":"const char*", "dblevec":"const %s::dblevec&",
+              "stringvec":"const %s::stringvec&", "intvec":"const %s::intvec&",
+              "file":None
+             }
+
+corbaOutTypes = {"double":"CORBA::Double&", "long":"CORBA::Long&",
+                 "string":"CORBA::String_out", "dblevec":"%s::dblevec_out",
+                 "stringvec":"%s::stringvec_out", "intvec":"%s::intvec_out",
+                 "file":None
+                }
+moduleTypes = {"double":"", "long":"", "string":"", "dblevec":"", "stringvec":"", "intvec":"", "file":"" }
+
+idlTypes = {"double":"double", "long":"long", "string":"string", "dblevec":"dblevec", "stringvec":"stringvec", "intvec":"intvec", "file":"" }
+
+def corba_in_type(typ, module):
+  if corbaTypes[typ].count("%s")>0:
+    return corbaTypes[typ] % module
+  else:
+    return corbaTypes[typ]
+
+def corba_out_type(typ, module):
+  if corbaOutTypes[typ].count("%s")>0:
+    return corbaOutTypes[typ] % module
+  else:
+    return corbaOutTypes[typ]
+
+ValidTypes = corbaTypes.keys()
+PyValidTypes = ValidTypes+["pyobj"]
+
+def add_type(typename, corbaType, corbaOutType, module, idltype):
+  """ add a data type YACS from other module than KERNEL to the list of available types
+
+       :param typename: YACS data type name
+       :type typename: string
+       :param corbaType: representation for C++ CORBA in parameter
+       :type corbaType: string
+       :param corbaOutType: representation for C++ CORBA out parameter
+       :type corbaOutType: string
+       :param module: name of the module that defines the data type (GEOM for GEOM_Object)
+       :type module: string
+       :param idltype: representation for CORBA idl
+       :type idltype: string
+  """
+  corbaTypes[typename] = corbaType
+  corbaOutTypes[typename] = corbaOutType
+  moduleTypes[typename] = module
+  idlTypes[typename] = idltype
+  ValidTypes.append(typename)
+  PyValidTypes.append(typename)
+
+calciumTypes = {"CALCIUM_double":"CALCIUM_double",
+                "CALCIUM_integer":"CALCIUM_integer",
+                "CALCIUM_real":"CALCIUM_real",
+                "CALCIUM_string":"CALCIUM_string",
+                "CALCIUM_complex":"CALCIUM_complex",
+                "CALCIUM_logical":"CALCIUM_logical",
+                "CALCIUM_long":"CALCIUM_long",
+               }
+
+DatastreamParallelTypes = {"Param_Double_Port":"Param_Double_Port"}
+
+ValidImpl = ("CPP", "PY", "F77", "ASTER", "PACO")
+ValidImplTypes = ("sequential", "parallel")
+ValidStreamTypes = calciumTypes.keys()
+ValidParallelStreamTypes = DatastreamParallelTypes.keys()
+ValidDependencies = ("I", "T")
+
+add_type("dataref", "const Engines::dataref&", "Engines::dataref_out", "", "dataref")
+add_type("GEOM_Object", "GEOM::GEOM_Object_ptr", "GEOM::GEOM_Object_out", "GEOM", "GEOM::GEOM_Object")
+add_type("SMESH_Mesh", "SMESH::SMESH_Mesh_ptr", "SMESH::SMESH_Mesh_out", "SMESH", "SMESH::SMESH_Mesh")
+add_type("SMESH_Hypothesis", "SMESH::SMESH_Hypothesis_ptr", "SMESH::SMESH_Hypothesis_out", "SMESH", "SMESH::SMESH_Hypothesis")
+add_type("SALOME_MED/MED", "SALOME_MED::MED_ptr", "SALOME_MED::MED_out", "MED", "SALOME_MED::MED")
+add_type("SALOME_MED/MESH", "SALOME_MED::MESH_ptr", "SALOME_MED::MESH_out", "MED", "SALOME_MED::MESH")
+add_type("SALOME_MED/SUPPORT", "SALOME_MED::SUPPORT_ptr", "SALOME_MED::SUPPORT_out", "MED", "SALOME_MED::SUPPORT")
+add_type("SALOME_MED/FIELD", "SALOME_MED::FIELD_ptr", "SALOME_MED::FIELD_out", "MED", "SALOME_MED::FIELD")
+add_type("SALOME_MED/FIELDDOUBLE", "SALOME_MED::FIELDDOUBLE_ptr", "SALOME_MED::FIELDDOUBLE_out", "MED", "SALOME_MED::FIELDDOUBLE")
+add_type("SALOME_MED/FIELDINT", "SALOME_MED::FIELDINT_ptr", "SALOME_MED::FIELDINT_out", "MED", "SALOME_MED::FIELDINT")
index d752c0042bf95f7c1d5462eeff88d7448b0528a8..6bc29e722b3cd112b4a0b333f040f699bf9c3757 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,25 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 from distutils.core import setup
 setup(name='YACSGEN',
-      version='5.1.3',
+      version='5.1.4',
       author='C. Caremoli',
       packages=['module_generator'],
      )