Skip to content

Commit

Permalink
rename rosidl_generator_c 'namespace' to rosidl_runtime_c (#458)
Browse files Browse the repository at this point in the history
* move rosidl_generator_c headers

Signed-off-by: Dirk Thomas <[email protected]>

* rename rosidl_generator_c 'namespace'

Signed-off-by: Dirk Thomas <[email protected]>
  • Loading branch information
dirk-thomas authored Apr 11, 2020
1 parent 9025bd1 commit 034e526
Show file tree
Hide file tree
Showing 52 changed files with 475 additions and 475 deletions.
2 changes: 1 addition & 1 deletion rosidl_generator_c/resource/action__type_support.h.em
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@# Included from rosidl_generator_c/resource/idl__type_support.h.em
@{header_file = 'rosidl_generator_c/action_type_support_struct.h'}@
@{header_file = 'rosidl_runtime_c/action_type_support_struct.h'}@
@[if header_file in include_directives]@
// already included above
// @
Expand Down
2 changes: 1 addition & 1 deletion rosidl_generator_c/resource/idl__functions.h.em
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extern "C"
#include <stdbool.h>
#include <stdlib.h>

#include "rosidl_generator_c/visibility_control.h"
#include "rosidl_runtime_c/visibility_control.h"
#include "@(package_name)/msg/rosidl_generator_c__visibility_control.h"

#include "@(include_base)__struct.h"
Expand Down
6 changes: 3 additions & 3 deletions rosidl_generator_c/resource/msg__functions.c.em
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ includes = OrderedDict()
for member in message.structure.members:
if isinstance(member.type, AbstractSequence) and isinstance(member.type.value_type, BasicType):
member_names = includes.setdefault(
'rosidl_generator_c/primitives_sequence_functions.h', [])
'rosidl_runtime_c/primitives_sequence_functions.h', [])
member_names.append(member.name)
continue
type_ = member.type
if isinstance(type_, AbstractNestedType):
type_ = type_.value_type
if isinstance(type_, AbstractString):
member_names = includes.setdefault('rosidl_generator_c/string_functions.h', [])
member_names = includes.setdefault('rosidl_runtime_c/string_functions.h', [])
member_names.append(member.name)
elif isinstance(type_, AbstractWString):
member_names = includes.setdefault(
'rosidl_generator_c/u16string_functions.h', [])
'rosidl_runtime_c/u16string_functions.h', [])
member_names.append(member.name)
elif isinstance(type_, NamespacedType):
include_prefix = idl_structure_type_to_c_include_prefix(type_)
Expand Down
6 changes: 3 additions & 3 deletions rosidl_generator_c/resource/msg__struct.h.em
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ includes = OrderedDict()
for member in message.structure.members:
if isinstance(member.type, AbstractSequence) and isinstance(member.type.value_type, BasicType):
member_names = includes.setdefault(
'rosidl_generator_c/primitives_sequence.h', [])
'rosidl_runtime_c/primitives_sequence.h', [])
member_names.append(member.name)
continue
type_ = member.type
if isinstance(type_, AbstractNestedType):
type_ = type_.value_type
if isinstance(type_, AbstractString):
member_names = includes.setdefault('rosidl_generator_c/string.h', [])
member_names = includes.setdefault('rosidl_runtime_c/string.h', [])
member_names.append(member.name)
elif isinstance(type_, AbstractWString):
member_names = includes.setdefault(
'rosidl_generator_c/u16string.h', [])
'rosidl_runtime_c/u16string.h', [])
member_names.append(member.name)
elif isinstance(type_, NamespacedType):
include_prefix = idl_structure_type_to_c_include_prefix(type_)
Expand Down
2 changes: 1 addition & 1 deletion rosidl_generator_c/resource/msg__type_support.h.em
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@# Included from rosidl_generator_c/resource/idl__type_support.h.em
@{header_file = 'rosidl_generator_c/message_type_support_struct.h'}@
@{header_file = 'rosidl_runtime_c/message_type_support_struct.h'}@
@[if header_file in include_directives]@
// already included above
// @
Expand Down
2 changes: 1 addition & 1 deletion rosidl_generator_c/resource/srv__type_support.h.em
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ TEMPLATE(
include_directives=include_directives)
}@

@{header_file = 'rosidl_generator_c/service_type_support_struct.h'}@
@{header_file = 'rosidl_runtime_c/service_type_support_struct.h'}@
@[if header_file in include_directives]@
// already included above
// @
Expand Down
6 changes: 3 additions & 3 deletions rosidl_generator_c/rosidl_generator_c/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def idl_type_to_c(type_):
assert False, 'The array size is part of the variable'
if isinstance(type_, AbstractSequence):
if isinstance(type_.value_type, BasicType):
c_type = 'rosidl_generator_c__' + type_.value_type.typename.replace(' ', '_')
c_type = 'rosidl_runtime_c__' + type_.value_type.typename.replace(' ', '_')
else:
c_type = basetype_to_c(type_.value_type)
c_type += '__Sequence'
Expand All @@ -136,9 +136,9 @@ def basetype_to_c(basetype):
if isinstance(basetype, BasicType):
return BASIC_IDL_TYPES_TO_C[basetype.typename]
if isinstance(basetype, AbstractString):
return 'rosidl_generator_c__String'
return 'rosidl_runtime_c__String'
if isinstance(basetype, AbstractWString):
return 'rosidl_generator_c__U16String'
return 'rosidl_runtime_c__U16String'
if isinstance(basetype, NamespacedType):
return idl_structure_type_to_c_typename(basetype)
assert False, str(basetype)
Expand Down
Loading

0 comments on commit 034e526

Please sign in to comment.