From: tajchman Date: Fri, 17 Sep 2010 09:05:44 +0000 (+0000) Subject: More complete MedCoupling support in HXX2SALOME X-Git-Tag: V5_1_5a1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e321f6cf47b09a0e65f784729d91388bb825bee6;p=tools%2Fhxx2salome.git More complete MedCoupling support in HXX2SALOME --- diff --git a/scripts/parse3.awk b/scripts/parse3.awk index 8d3107d..fed2e2a 100644 --- a/scripts/parse3.awk +++ b/scripts/parse3.awk @@ -53,6 +53,8 @@ BEGIN { idl_arg_type["const std::vector&"]="in SALOME::vectorOfLong" idl_arg_type["std::vector*&"]="out SALOME::vectorOfLong" idl_arg_type["const ParaMEDMEM::MEDCouplingFieldDouble*"]="in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface" + idl_arg_type["const ParaMEDMEM::MEDCouplingFieldDouble&"]="in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface" + idl_arg_type["ParaMEDMEM::MEDCouplingFieldDouble*&"]="out SALOME_MED::MEDCouplingFieldDoubleCorbaInterface" # # # mapping for returned types @@ -133,6 +135,7 @@ BEGIN { idl_impl_hxx["in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface"]="SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr" idl_impl_hxx["SALOME_MED::MEDCouplingUMeshCorbaInterface"]="SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr" idl_impl_hxx["SALOME_MED::MEDCouplingFieldDoubleCorbaInterface"]="SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr" + idl_impl_hxx["out SALOME_MED::MEDCouplingFieldDoubleCorbaInterface"]="SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_out" # # # table for c++ code generation : argument's processing @@ -179,8 +182,16 @@ BEGIN { # cpp_impl_a["const std::vector&"]="\tlong _%s_size;\n\tint *_%s_value = ReceiverFactory::getValue(%s,_%s_size);\n"\ # "\tstd::vector _%s(_%s_value,_%s_value+_%s_size);\n\tdelete [] _%s_value;" cpp_impl_a["std::vector*&"]="\tstd::vector* _%s;\n" - cpp_impl_a["const ParaMEDMEM::MEDCouplingFieldDouble*"]="\tSALOME_MED::MEDCouplingFieldDoubleCorbaInterface::_duplicate(%s);\n"\ + cpp_impl_a["const ParaMEDMEM::MEDCouplingFieldDouble*"]=\ + "\tSALOME_MED::MEDCouplingFieldDoubleCorbaInterface::_duplicate(%s);\n"\ + "\t%s->Register();\n"\ "\tParaMEDMEM::MEDCouplingFieldDouble* _%s=ParaMEDMEM::MEDCouplingFieldDoubleClient::New(%s);\n" + cpp_impl_a["const ParaMEDMEM::MEDCouplingFieldDouble&"]=\ + "\tSALOME_MED::MEDCouplingFieldDoubleCorbaInterface::_duplicate(%s);\n"\ + "\t%s->Register();\n"\ + "\tParaMEDMEM::MEDCouplingFieldDouble* __%s=ParaMEDMEM::MEDCouplingFieldDoubleClient::New(%s);\n"\ + "\tParaMEDMEM::MEDCouplingFieldDouble& _%s=*__%s;\n" + cpp_impl_a["ParaMEDMEM::MEDCouplingFieldDouble*&"]="\tParaMEDMEM::MEDCouplingFieldDouble* _%s;\n" # # # table for c++ code generation : returned value processing @@ -304,6 +315,11 @@ BEGIN { cpp_impl_c["const MEDMEM::SUPPORT&"]="\t_%s->removeReference();\n" cpp_impl_c["const MEDMEM::SUPPORT*"]="\t_%s->removeReference();\n" cpp_impl_c["const ParaMEDMEM::MEDCouplingFieldDouble*"]="\t_%s->decrRef();\n" + cpp_impl_c["const ParaMEDMEM::MEDCouplingFieldDouble&"]="\t__%s->decrRef();\n" + cpp_impl_c["ParaMEDMEM::MEDCouplingFieldDouble*&"]= \ + "\tParaMEDMEM::MEDCouplingFieldDoubleServant * %s_out=new ParaMEDMEM::MEDCouplingFieldDoubleServant(_%s);\ + _%s->decrRef(); \ + %s = %s_out->_this();\n" # # # record sep is ");\n" whith blanks all around, and optional "(" at the beginning diff --git a/scripts/template_coupling_src.tgz b/scripts/template_coupling_src.tgz index 5171d89..d205705 100644 Binary files a/scripts/template_coupling_src.tgz and b/scripts/template_coupling_src.tgz differ