cleanup template for normal uorb headers

This commit is contained in:
Thomas Gubler 2015-01-23 10:37:17 +01:00
parent 738f65a705
commit 5e9bef6f4b

View File

@ -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));