Salome HOME
More complete MedCoupling support in HXX2SALOME V5_1_5a1
authortajchman <tajchman>
Fri, 17 Sep 2010 09:05:44 +0000 (09:05 +0000)
committertajchman <tajchman>
Fri, 17 Sep 2010 09:05:44 +0000 (09:05 +0000)
scripts/parse3.awk
scripts/template_coupling_src.tgz

index 8d3107dc62b8b7b7e306cf8f139827fa1cd417cf..fed2e2a686f5d668f42013e6543c9db49bd00499 100644 (file)
@@ -53,6 +53,8 @@ BEGIN {
   idl_arg_type["const std::vector<int>&"]="in SALOME::vectorOfLong"
   idl_arg_type["std::vector<int>*&"]="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<int>&"]="\tlong _%s_size;\n\tint *_%s_value = ReceiverFactory::getValue(%s,_%s_size);\n"\
 #             "\tstd::vector<int> _%s(_%s_value,_%s_value+_%s_size);\n\tdelete [] _%s_value;"
   cpp_impl_a["std::vector<int>*&"]="\tstd::vector<int>* _%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
index 5171d89ebb1f5f2341b687d633315a0c17ac25db..d2057055cadf4aa55e3001cc7659c393ccaacc14 100644 (file)
Binary files a/scripts/template_coupling_src.tgz and b/scripts/template_coupling_src.tgz differ