Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions rosidl_typesupport_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ endif()
find_package(ament_cmake_ros REQUIRED)
find_package(rcpputils REQUIRED)
find_package(rosidl_runtime_c REQUIRED)
find_package(rosidl_typesupport_c REQUIRED)

ament_export_dependencies(rcpputils)
ament_export_dependencies(rosidl_runtime_c)
Expand Down Expand Up @@ -41,6 +42,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC
ament_target_dependencies(${PROJECT_NAME}
"rcpputils"
"rosidl_runtime_c"
"rosidl_typesupport_c"
)
ament_export_libraries(${PROJECT_NAME})
ament_export_targets(${PROJECT_NAME})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,12 @@
#ifndef ROSIDL_TYPESUPPORT_CPP__TYPE_SUPPORT_MAP_H_
#define ROSIDL_TYPESUPPORT_CPP__TYPE_SUPPORT_MAP_H_

#include <cstddef>
// Keep this file not to break API. It was no more than
// a copy of rosidl_typesupport_c/type_support_map.h

#ifdef __cplusplus
extern "C"
{
#endif
#warning rosidl_typesupport_cpp/type_support_map.h header is deprecated \
in favor of rosidl_typesupport_c/type_support_map.h.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I wonder if we should remove this warning for the Foxy backport. After all, downstream consumers may already be relying on it. @jacobperron thoughts?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, we should avoid backporting deprecation warnings.


/// Contains all available C++ typesupport handles to choose from.
typedef struct type_support_map_t
{
// TODO(dirk-thomas) const should not be defined for the fields
// but should be set for the struct when it is being used
// same for rosidl_message_type_support_t et al

/// Length of the `typesupport_identidentifier`, `symbol_name` and `data` arrays.
const size_t size;

/// The ROS 2 package this is generated from.
const char * package_name;

/// Array of identifiers for the type_supports.
const char * const * typesupport_identifier;

/// Array of symbol names to get the typesupports.
const char * const * symbol_name;

/// Array of pointers to type support handle functions that were successfully found.
void ** data;
} type_support_map_t;

#ifdef __cplusplus
}
#endif
#include "rosidl_typesupport_c/type_support_map.h"

#endif // ROSIDL_TYPESUPPORT_CPP__TYPE_SUPPORT_MAP_H_
1 change: 1 addition & 0 deletions rosidl_typesupport_cpp/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

<depend>rcpputils</depend>
<build_depend>rosidl_runtime_c</build_depend>
<build_depend>rosidl_typesupport_c</build_depend>
<!--
Bloom does not support group_depend so entries below duplicate the group rosidl_typesupport_cpp_packages.
This ensures that binary packages have support for all of these rmw impl. enabled.
Expand Down
2 changes: 1 addition & 1 deletion rosidl_typesupport_cpp/resource/msg__type_support.cpp.em
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ if len(type_supports) != 1:
header_files.append('rosidl_typesupport_cpp/message_type_support.hpp')
if len(type_supports) != 1:
header_files += [
'rosidl_typesupport_c/type_support_map.h',
'rosidl_typesupport_cpp/message_type_support_dispatch.hpp',
'rosidl_typesupport_cpp/type_support_map.h',
]
header_files.append('rosidl_typesupport_cpp/visibility_control.h')
if len(type_supports) != 1:
Expand Down
2 changes: 1 addition & 1 deletion rosidl_typesupport_cpp/resource/srv__type_support.cpp.em
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ if len(type_supports) != 1:
header_files.append('rosidl_typesupport_cpp/service_type_support.hpp')
if len(type_supports) != 1:
header_files += [
'rosidl_typesupport_c/type_support_map.h',
'rosidl_typesupport_cpp/service_type_support_dispatch.hpp',
'rosidl_typesupport_cpp/type_support_map.h',
]
header_files.append('rosidl_typesupport_cpp/visibility_control.h')
if len(type_supports) != 1:
Expand Down
2 changes: 1 addition & 1 deletion rosidl_typesupport_cpp/src/type_support_dispatch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include "rcpputils/find_library.hpp"
#include "rcpputils/shared_library.hpp"
#include "rosidl_typesupport_cpp/type_support_map.h"
#include "rosidl_typesupport_c/type_support_map.h"

namespace rosidl_typesupport_cpp
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
// limitations under the License.

#include "rcpputils/shared_library.hpp"
#include "rosidl_typesupport_c/type_support_map.h"
#include "rosidl_typesupport_cpp/identifier.hpp"
#include "rosidl_typesupport_cpp/message_type_support_dispatch.hpp"
#include "rosidl_typesupport_cpp/service_type_support_dispatch.hpp"
#include "rosidl_typesupport_cpp/type_support_map.h"

#include "performance_test_fixture/performance_test_fixture.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#include <gtest/gtest.h>
#include "rcutils/testing/fault_injection.h"
#include "rcpputils/shared_library.hpp"
#include "rosidl_typesupport_c/type_support_map.h"
#include "rosidl_typesupport_cpp/identifier.hpp"
#include "rosidl_typesupport_cpp/message_type_support_dispatch.hpp"
#include "rosidl_typesupport_cpp/type_support_map.h"

constexpr size_t map_size = 4u;
constexpr const char package_name[] = "rosidl_typesupport_cpp";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#include <gtest/gtest.h>
#include "rcutils/testing/fault_injection.h"
#include "rcpputils/shared_library.hpp"
#include "rosidl_typesupport_c/type_support_map.h"
#include "rosidl_typesupport_cpp/identifier.hpp"
#include "rosidl_typesupport_cpp/service_type_support_dispatch.hpp"
#include "rosidl_typesupport_cpp/type_support_map.h"

constexpr size_t map_size = 4u;
constexpr const char package_name[] = "rosidl_typesupport_cpp";
Expand Down