aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--msg/templates/uorb/msg.h.template17
1 files 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<ContainerAllocator>'%(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));