]> SALOME platform Git repositories - tools/yacsgen.git/commitdiff
Salome HOME
Add in yacsgen/hxx2salome the treatment of type DataArrayDouble
authorvsr <vsr@opencascade.com>
Mon, 16 Nov 2015 13:55:28 +0000 (16:55 +0300)
committervsr <vsr@opencascade.com>
Mon, 16 Nov 2015 13:55:28 +0000 (16:55 +0300)
(merge of commit cf4e0557)

module_generator/hxx_awk.py [changed mode: 0644->0755]
module_generator/hxxcompo.py [changed mode: 0644->0755]
module_generator/yacstypes.py [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 25d4523..8c8a53d
@@ -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<std::string>"]="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
old mode 100644 (file)
new mode 100755 (executable)
index 39ce461..349dc8c
@@ -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,
old mode 100644 (file)
new mode 100755 (executable)
index c267ff5..31f6415
@@ -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")