From a85136edc9dde9c0542ee75471e6e8e24ed77ead Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 16 Nov 2015 16:55:28 +0300 Subject: [PATCH] Add in yacsgen/hxx2salome the treatment of type DataArrayDouble (merge of commit cf4e0557) --- module_generator/hxx_awk.py | 5 +++++ module_generator/hxxcompo.py | 5 ++++- module_generator/yacstypes.py | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) mode change 100644 => 100755 module_generator/hxx_awk.py mode change 100644 => 100755 module_generator/hxxcompo.py mode change 100644 => 100755 module_generator/yacstypes.py diff --git a/module_generator/hxx_awk.py b/module_generator/hxx_awk.py old mode 100644 new mode 100755 index 25d4523..8c8a53d --- 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 old mode 100644 new mode 100755 index 39ce461..349dc8c --- a/module_generator/hxxcompo.py +++ b/module_generator/hxxcompo.py @@ -278,7 +278,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 @@ -327,11 +327,14 @@ class HXX2SALOMEComponent(Component): #include CORBA_CLIENT_HEADER(MED_Gen) #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 old mode 100644 new mode 100755 index c267ff5..31f6415 --- 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") -- 2.39.2