From 5e9bef6f4b710aae319bd60068107bff41003fd8 Mon Sep 17 00:00:00 2001 From: Thomas Gubler Date: Fri, 23 Jan 2015 10:37:17 +0100 Subject: cleanup template for normal uorb headers --- msg/templates/uorb/msg.h.template | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/msg/templates/uorb/msg.h.template b/msg/templates/uorb/msg.h.template index 11cb1ea2a..622641617 100644 --- a/msg/templates/uorb/msg.h.template +++ b/msg/templates/uorb/msg.h.template @@ -47,17 +47,14 @@ * ****************************************************************************/ - /* Auto-generated by genmsg_cpp from file @file_name_in */ +/* Auto-generated by genmsg_cpp from file @file_name_in */ @{ import genmsg.msgs import gencpp -cpp_namespace = '::%s::'%(spec.package) # TODO handle nested namespace -cpp_class = '%s_'%spec.short_name -cpp_full_name = '%s%s'%(cpp_namespace,cpp_class) -cpp_full_name_with_alloc = '%s'%(cpp_full_name) -cpp_msg_definition = gencpp.escape_message_definition(msg_definition) +uorb_struct = '%s_s'%spec.short_name +topic_name = spec.short_name }@ #pragma once @@ -137,11 +134,11 @@ def print_field_def(field): } #ifdef __cplusplus -@#class @(spec.short_name)_s { -struct __EXPORT @(spec.short_name)_s { +@#class @(uorb_struct) { +struct __EXPORT @(uorb_struct) { @#public: #else -struct @(spec.short_name)_s { +struct @(uorb_struct) { #endif @{ # loop over all fields and print the type and name @@ -156,4 +153,4 @@ for field in spec.parsed_fields(): */ /* register this as object request broker structure */ -ORB_DECLARE(@(spec.short_name)); +ORB_DECLARE(@(topic_name)); -- cgit v1.2.3