cpp2yacs_mapping["ParaMEDMEM::MEDCouplingFieldDouble*&"]="SALOME_MED/MPIMEDCouplingFieldDoubleCorbaInterface"
cpp2yacs_mapping["ParaMEDMEM::MEDCouplingFieldDouble*"]="SALOME_MED/MPIMEDCouplingFieldDoubleCorbaInterface"
list_of_services=[]
- list_of_services_with_in_fields=[]
service_definition={}
result_parsing=open("parse_type_result","r")
for line in result_parsing.readlines():
assert inout=="in" or inout=="ou",'Error in table cpp2idl_mapping'
if inout == "in":
service_definition[list_of_services[-1]]["inports"].append( (argname,typename) )
- if typename=="const ParaMEDMEM::MEDCouplingFieldDouble*":
- list_of_services_with_in_fields.append(list_of_services[-1])
else:
service_definition[list_of_services[-1]]["outports"].append( (argname,typename) )
- for servNane in list_of_services_with_in_fields:
- service_definition[servNane]["inports"].append(("coupling","const char*"))
- service_definition[servNane]["ports"].append(("coupling","const char*"))
if service_definition.has_key('getInputFieldTemplate'):
del service_definition['getInputFieldTemplate']
# store it in service_definition[serv]["impl"]
#
from hxx_awk import cpp_impl_a,cpp_impl_b,cpp_impl_c # these tables contain the part of code which depends upon c++ types
- cpp_impl_b["ParaMEDMEM::MEDCouplingFieldDouble*"]="""\tParaMEDMEM::MPIMEDCouplingFieldDoubleServant * _rtn_field_i = new ParaMEDMEM::MPIMEDCouplingFieldDoubleServant(_orb,this,_rtn_cpp);
+ cpp_impl_b["ParaMEDMEM::MEDCouplingFieldDouble*"]="""\tParaMEDMEM::MPIMEDCouplingFieldDoubleServant * _rtn_field_i = new ParaMEDMEM::MPIMEDCouplingFieldDoubleServant(_orb,_poa,this,_rtn_cpp);
\t_rtn_cpp->decrRef();
\tSALOME_MED::MPIMEDCouplingFieldDoubleCorbaInterface_ptr _rtn_ior = _rtn_field_i->_this();\n"""
- cpp_impl_a["const ParaMEDMEM::MEDCouplingFieldDouble*"]="\tParaMEDMEM::MEDCouplingFieldDouble* _%(arg)s=cppCompo_->getInputFieldTemplate();\n\t_setInputField(coupling,%(arg)s,_%(arg)s);\n"
+ cpp_impl_a["const ParaMEDMEM::MEDCouplingFieldDouble*"]="\tParaMEDMEM::MEDCouplingFieldDouble* _%(arg)s=cppCompo_->getInputFieldTemplate();\n\t_setInputField(%(arg)s,_%(arg)s);\n\t_initializeCoupling(%(arg)s);\n"
from yacstypes import corbaTypes,corbaOutTypes
format_thread_signature="void * th_%s(void * st);" # this thread declaration will be included in servant's header
if argtype == "const MEDMEM::MESH&" or argtype == "const MEDMEM::SUPPORT&" :
pre="*" # we cannot create MESHClient on the stack (private constructor), so we create it on the heap and dereference it
post+="," # separator between arguments
- if(argname!="coupling"): # coupling is a special argument added for input fields - it should not be transferred to the underlying c++ component
- s_call_cpp_function += " %s_%s%s" % ( pre,argname,post)
+ s_call_cpp_function += " %s_%s%s" % ( pre,argname,post)
if s_call_cpp_function[-1]==',':
s_call_cpp_function=s_call_cpp_function[0:-1] # get rid of trailing comma
s_call_cpp_function=s_call_cpp_function+');\n'