|
4 | 4 | #include "rosidl_runtime_cpp/message_type_support_decl.hpp" |
5 | 5 |
|
6 | 6 | #ifdef ROS_HUMBLE |
7 | | - #include "rosbag2_cpp/typesupport_helpers.hpp" |
| 7 | +#include "rosbag2_cpp/typesupport_helpers.hpp" |
8 | 8 | #else |
9 | | - #include "rclcpp/typesupport_helpers.hpp" |
| 9 | +#include "rclcpp/typesupport_helpers.hpp" |
10 | 10 | #endif |
11 | 11 |
|
12 | | -namespace wrapper { |
13 | | - std::shared_ptr<rcpputils::SharedLibrary> |
14 | | - get_typesupport_library(const std::string & type, const std::string & typesupport_identifier) { |
15 | | - #ifdef ROS_HUMBLE |
16 | | - return rosbag2_cpp::get_typesupport_library(type, typesupport_identifier); |
17 | | - #else |
18 | | - return rclcpp::get_typesupport_library(type, typesupport_identifier); |
19 | | - #endif |
20 | | - } |
| 12 | +namespace wrapper |
| 13 | +{ |
| 14 | +std::shared_ptr<rcpputils::SharedLibrary> get_typesupport_library(const std::string& type, |
| 15 | + const std::string& typesupport_identifier) |
| 16 | +{ |
| 17 | +#ifdef ROS_HUMBLE |
| 18 | + return rosbag2_cpp::get_typesupport_library(type, typesupport_identifier); |
| 19 | +#else |
| 20 | + return rclcpp::get_typesupport_library(type, typesupport_identifier); |
| 21 | +#endif |
| 22 | +} |
21 | 23 |
|
22 | | - const rosidl_message_type_support_t * |
23 | | - get_message_typesupport_handle(const std::string &type, |
24 | | - const std::string &typesupport_identifier, |
25 | | - std::shared_ptr<rcpputils::SharedLibrary> library) { |
26 | | - #ifdef ROS_HUMBLE |
27 | | - return rosbag2_cpp::get_typesupport_handle(type, typesupport_identifier, library); |
28 | | - #else |
29 | | - return rclcpp::get_message_typesupport_handle(type, typesupport_identifier, *library); |
30 | | - #endif |
31 | | - } |
| 24 | +const rosidl_message_type_support_t* get_message_typesupport_handle(const std::string& type, |
| 25 | + const std::string& typesupport_identifier, |
| 26 | + std::shared_ptr<rcpputils::SharedLibrary> library) |
| 27 | +{ |
| 28 | +#ifdef ROS_HUMBLE |
| 29 | + return rosbag2_cpp::get_typesupport_handle(type, typesupport_identifier, library); |
| 30 | +#else |
| 31 | + return rclcpp::get_message_typesupport_handle(type, typesupport_identifier, *library); |
| 32 | +#endif |
32 | 33 | } |
| 34 | +} // namespace wrapper |
0 commit comments