From: crouzet Date: Mon, 16 Nov 2015 11:28:48 +0000 (+0100) Subject: add in yacsgen/hxx2salome the treatment of type DataArrayDouble X-Git-Tag: V8_0_0a1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cf4e05579f38a75fa33567c115ce56a07a220917;p=tools%2Fyacsgen.git add in yacsgen/hxx2salome the treatment of type DataArrayDouble --- diff --git a/module_generator/hxx_awk.py b/module_generator/hxx_awk.py index ce03c4a..5f1f10d 100644 --- a/module_generator/hxx_awk.py +++ b/module_generator/hxx_awk.py @@ -117,6 +117,7 @@ cpp2yacs_mapping["const ParaMEDMEM::MEDCouplingUMesh*"]="SALOME_MED/MEDCouplingU cpp2yacs_mapping["ParaMEDMEM::MEDCouplingFieldDouble*&"]="SALOME_MED/MEDCouplingFieldDoubleCorbaInterface" cpp2yacs_mapping["ParaMEDMEM::MEDCouplingUMesh*"]="SALOME_MED/MEDCouplingUMeshCorbaInterface" cpp2yacs_mapping["ParaMEDMEM::MEDCouplingFieldDouble*"]="SALOME_MED/MEDCouplingFieldDoubleCorbaInterface" +cpp2yacs_mapping["ParaMEDMEM::DataArrayDouble*"]="SALOME_MED/DataArrayDoubleCorbaInterface" # table for c++ code generation : argument's processing cpp_impl_a={} cpp_impl_a["int"]="\tint _%(arg)s(%(arg)s);\n" @@ -220,6 +221,9 @@ cpp_impl_b["ParaMEDMEM::MEDCouplingFieldDouble*"]="""\tParaMEDMEM::MEDCouplingFi cpp_impl_b["ParaMEDMEM::MEDCouplingUMesh*"]="""\tParaMEDMEM::MEDCouplingUMeshServant * _rtn_mesh_i = new ParaMEDMEM::MEDCouplingUMeshServant(_rtn_cpp); \t_rtn_cpp->decrRef(); \tSALOME_MED::MEDCouplingUMeshCorbaInterface_ptr _rtn_ior = _rtn_mesh_i->_this();\n""" +cpp_impl_b["ParaMEDMEM::DataArrayDouble*"]="""\tParaMEDMEM::DataArrayDoubleServant * _rtn_field_i = new ParaMEDMEM::DataArrayDoubleServant(_rtn_cpp); +\t_rtn_cpp->decrRef(); +\tSALOME_MED::DataArrayDoubleCorbaInterface_ptr _rtn_ior = _rtn_field_i->_this();\n""" # # table for c++ code generation : out parameters processing and removeRef for reference counted objects # @@ -409,6 +413,7 @@ BEGIN { idl_rtn_type["std::vector"]="StrSeq" idl_rtn_type["ParaMEDMEM::MEDCouplingUMesh*"]="SALOME_MED::MEDCouplingUMeshCorbaInterface" idl_rtn_type["ParaMEDMEM::MEDCouplingFieldDouble*"]="SALOME_MED::MEDCouplingFieldDoubleCorbaInterface" + idl_rtn_type["ParaMEDMEM::DataArrayDouble*"]="SALOME_MED::DataArrayDoubleServantCorbaInterface" # # # record sep is ");\\n" whith blanks all around, and optional "(" at the beginning diff --git a/module_generator/hxxcompo.py b/module_generator/hxxcompo.py index 968ca90..94d8220 100644 --- a/module_generator/hxxcompo.py +++ b/module_generator/hxxcompo.py @@ -280,7 +280,7 @@ class HXX2SALOMEComponent(Component): # find out if component uses medmem types and/or medcoupling types for (argname,argtype) in inports + outports + [("return",Return)]: if moduleTypes[argtype]=="MED": - if argtype.count("Coupling")>0: + if argtype.count("CorbaInterface")>0: self.use_medcoupling=True else: self.use_medmem=True @@ -328,11 +328,14 @@ class HXX2SALOMEComponent(Component): #include CORBA_CLIENT_HEADER(MEDCouplingCorbaServant) #include "MEDCouplingFieldDoubleServant.hxx" #include "MEDCouplingUMeshServant.hxx" +#include "DataArrayDoubleServant.hxx" #include "MEDCouplingFieldDouble.hxx" #include "MEDCouplingUMesh.hxx" #include "MEDCouplingUMeshClient.hxx" #include "MEDCouplingFieldDouble.hxx" #include "MEDCouplingFieldDoubleClient.hxx" +#include "MEDCouplingMemArray.hxx" +#include "DataArrayDoubleClient.hxx" """ Component.__init__(self, name, services, impl="CPP", libs=Libs, diff --git a/module_generator/yacstypes.py b/module_generator/yacstypes.py index c8f0acd..9dcd59a 100644 --- a/module_generator/yacstypes.py +++ b/module_generator/yacstypes.py @@ -136,3 +136,4 @@ add_type("SALOME/Matrix", "SALOME::Matrix_ptr", "SALOME::Matrix_out", "MED", "SA add_type("SALOME_MED/MEDCouplingFieldDoubleCorbaInterface", "SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr", "SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_out", "MED", "SALOME_MED::MEDCouplingFieldDoubleCorbaInterface", "SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr") add_type("SALOME_MED/MPIMEDCouplingFieldDoubleCorbaInterface", "SALOME_MED::MPIMEDCouplingFieldDoubleCorbaInterface_ptr", "SALOME_MED::MPIMEDCouplingFieldDoubleCorbaInterface_out", "MED", "SALOME_MED::MPIMEDCouplingFieldDoubleCorbaInterface", "SALOME_MED::MPIMEDCouplingFieldDoubleCorbaInterface_ptr") add_type("SALOME_MED/MEDCouplingUMeshCorbaInterface", "SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr", "SALOME_MED::MEDCouplingUMeshCorbaInterface_out", "MED", "SALOME_MED::MEDCouplingUMeshCorbaInterface", "SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr") +add_type("SALOME_MED/DataArrayDoubleCorbaInterface", "SALOME_MED::DataArrayDoubleCorbaInterface_ptr", "SALOME_MED::DataArrayDoubleCorbaInterface_out", "MED", "SALOME_MED::DataArrayDoubleCorbaInterface", "SALOME_MED::DataArrayDoubleCorbaInterface_ptr")