15#ifndef RCLCPP__TYPE_ADAPTER_HPP_
16#define RCLCPP__TYPE_ADAPTER_HPP_
97template<
typename CustomType,
typename ROSMessageType =
void,
class Enable =
void>
112template<
typename ... Ts>
117struct TypeAdapter<
T, void, std::enable_if_t<is_type_adapter<T>::value>>:
T {};
122template<
typename CustomType,
typename ROSMessageType>
127 type_adapter::is_specialized::value,
128 "No type adapter for this custom type/ros message type pair");
134template<
typename CustomType>
137 template<
typename ROSMessageType>
138 using as = typename ::rclcpp::detail::assert_type_pair_is_specialized_type_adapter<
161template<
typename CustomType>
176struct TypeAdapter<
T, void, std::enable_if_t<ImplicitTypeAdapter<T>::is_specialized::value>>
189#define RCLCPP_USING_CUSTOM_TYPE_AS_ROS_MESSAGE_TYPE(CustomType, ROSMessageType) \
191 struct rclcpp::ImplicitTypeAdapter<CustomType> \
192 : public rclcpp::TypeAdapter<CustomType, ROSMessageType> \
195 is_specialized::value, \
196 "Cannot use custom type as ros type when there is no TypeAdapter for that pair"); \
Implicit type adapter used as a short hand way to create something with just the custom type.
std::false_type is_specialized
Template structure used to adapt custom, user-defined types to ROS types.
std::false_type is_specialized
CustomType ros_message_type
Template metafunction that can make the type being adapted explicit.
typename ::rclcpp::detail::assert_type_pair_is_specialized_type_adapter< CustomType, ROSMessageType >::type_adapter as
Helper template to determine if a type is a TypeAdapter, false specialization.