--- /dev/null
+# 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
+# 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
"""
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})
-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
+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
+# 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)
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
#!/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
--- /dev/null
+# 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
+# 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
"""
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})
+#!/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
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
+# 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
+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
+# 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
+# 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
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
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
#!/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
--- /dev/null
+# 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
--- /dev/null
+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
--- /dev/null
+# 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})
+
+
+
--- /dev/null
+
+<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>
+
--- /dev/null
+# 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
--- /dev/null
+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
--- /dev/null
+# 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})
+
+
+
--- /dev/null
+
+<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>
+
+# 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"
--- /dev/null
+# 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
+# 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
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})
+# 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
+# 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
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})
+// 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();
+# 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
$(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
+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
+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)
+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
+# 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
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})
+# 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
$(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
+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
+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
+# 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
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})
+# 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
--- /dev/null
+# 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
+# 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()
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})
--- /dev/null
+# 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
+# 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()
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})
--- /dev/null
+# 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
# -*- 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()
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})
--- /dev/null
+# 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"
+
+
--- /dev/null
+# 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
+# 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"
+# 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
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})
--- /dev/null
+# 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
+# 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
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})
+# 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
+# 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
+# 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 :
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
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)}
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()
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"))
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),
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"
+# 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
+# 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:
#include "SALOME_Exception.idl"
#include "SALOME_PACOExtension.idl"
+${idldefs}
+
module ${module}
{
typedef sequence<string> stringvec;
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) $$<
-#!/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)
+# 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:
#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
{
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)
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)
+# 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++
"""
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"""
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"]
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
+# 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
"""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
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
+# 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
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):
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:
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
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:
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":[],
"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
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)
#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":
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="",
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)
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):
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)
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()
+# 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:
application="""
<application>
<prerequisites path="${prerequisites}"/>
+${resources}
<modules>
${modules}
</modules>
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
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="""
#!/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
# 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:
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
"""
#!/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
# 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)
"""
+# 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
"""
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"""
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)"""
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)
+# 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:
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
'''
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}
--- /dev/null
+# 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}
--- /dev/null
+# 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")
+# 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'],
)