]> SALOME platform Git repositories - tools/yacsgen.git/commitdiff
Salome HOME
hxx2salome integration:
authorcrouzet <crouzet>
Tue, 19 Oct 2010 14:01:47 +0000 (14:01 +0000)
committercrouzet <crouzet>
Tue, 19 Oct 2010 14:01:47 +0000 (14:01 +0000)
   add the possibility to define services with a return value

module_generator/cppcompo.py

index eb6edea20e9ac5737793aa317b23a6c6100d7572..8c0819c9f69718b451e997a0a451a6df6548edc7 100644 (file)
@@ -25,6 +25,7 @@ import os
 from gener import Component, Invalid
 from cpp_tmpl import initService, cxxService, hxxCompo, cxxCompo
 from cpp_tmpl import exeCPP, compoEXEMakefile, compoMakefile
+from yacstypes import corba_rtn_type
 
 class CPPComponent(Component):
   def __init__(self, name, services=None, libs="", rlibs="", includes="",
@@ -98,7 +99,7 @@ AM_CFLAGS=$(SALOME_INCLUDES) -fexceptions
     """
     services = []
     for serv in self.services:
-      service = "    void %s(" % serv.name
+      service = "    %s %s(" % (corba_rtn_type(serv.ret,gen.module.name),serv.name)
       service = service+gen.makeArgs(serv)+");"
       services.append(service)
     servicesdef = "\n".join(services)