ROS 2 rclcpp + rcl - jazzy  jazzy
ROS 2 C++ Client Library with ROS Client Library
dynamic_serialization_support.hpp
1 // Copyright 2023 Open Source Robotics Foundation, Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef RCLCPP__DYNAMIC_TYPESUPPORT__DYNAMIC_SERIALIZATION_SUPPORT_HPP_
16 #define RCLCPP__DYNAMIC_TYPESUPPORT__DYNAMIC_SERIALIZATION_SUPPORT_HPP_
17 
18 #include <rcl/allocator.h>
19 #include <rosidl_dynamic_typesupport/api/serialization_support.h>
20 #include <rosidl_dynamic_typesupport/types.h>
21 
22 #include <memory>
23 #include <string>
24 
25 #include "rclcpp/macros.hpp"
26 #include "rclcpp/visibility_control.hpp"
27 
28 namespace rclcpp
29 {
30 namespace dynamic_typesupport
31 {
32 
34 class DynamicSerializationSupport : public std::enable_shared_from_this<DynamicSerializationSupport>
35 {
36 public:
37  RCLCPP_SMART_PTR_ALIASES_ONLY(DynamicSerializationSupport)
38 
39  RCLCPP_PUBLIC
41 
42  RCLCPP_PUBLIC
44  const std::string & serialization_library_name,
46 
47  RCLCPP_PUBLIC
48  virtual ~DynamicSerializationSupport();
49 
50 protected:
51  rosidl_dynamic_typesupport_serialization_support_t rosidl_serialization_support_;
52 
53 private:
54  RCLCPP_DISABLE_COPY(DynamicSerializationSupport)
55 };
56 
57 } // namespace dynamic_typesupport
58 } // namespace rclcpp
59 
60 #endif // RCLCPP__DYNAMIC_TYPESUPPORT__DYNAMIC_SERIALIZATION_SUPPORT_HPP_
#define rcl_get_default_allocator
Return a properly initialized rcl_allocator_t with default values.
Definition: allocator.h:37
rcutils_allocator_t rcl_allocator_t
Encapsulation of an allocator.
Definition: allocator.h:31
Utility wrapper class for rosidl_dynamic_typesupport_serialization_support_t.
Versions of rosidl_typesupport_cpp::get_message_type_support_handle that handle adapted types.