ROS 2 rclcpp + rcl - rolling  rolling-a919a6e5
ROS 2 C++ Client Library with ROS Client Library
Classes | Public Member Functions | List of all members
rclcpp::AnySubscriptionCallback< MessageT, AllocatorT > Class Template Reference

Public Member Functions

 AnySubscriptionCallback (const AllocatorT &allocator=AllocatorT())
 
 AnySubscriptionCallback (const AnySubscriptionCallback &)=default
 
template<typename CallbackT >
AnySubscriptionCallback< MessageT, AllocatorT > set (CallbackT callback)
 Generic function for setting the callback. More...
 
std::unique_ptr< ROSMessageType, ROSMessageTypeDeleter > create_ros_unique_ptr_from_ros_shared_ptr_message (const std::shared_ptr< const ROSMessageType > &message)
 
std::unique_ptr< rclcpp::SerializedMessage, SerializedMessageDeleter > create_serialized_message_unique_ptr_from_shared_ptr (const std::shared_ptr< const rclcpp::SerializedMessage > &serialized_message)
 
std::unique_ptr< SubscribedType, SubscribedTypeDeleter > create_custom_unique_ptr_from_custom_shared_ptr_message (const std::shared_ptr< const SubscribedType > &message)
 
std::unique_ptr< SubscribedType, SubscribedTypeDeleter > convert_ros_message_to_custom_type_unique_ptr (const ROSMessageType &msg)
 
std::unique_ptr< ROSMessageType, ROSMessageTypeDeleter > convert_custom_type_to_ros_message_unique_ptr (const SubscribedType &msg)
 
template<typename TMsg = ROSMessageType>
std::enable_if<!serialization_traits::is_serialized_message_class< TMsg >::value, void >::type dispatch (std::shared_ptr< ROSMessageType > message, const rclcpp::MessageInfo &message_info)
 
void dispatch (std::shared_ptr< const rclcpp::SerializedMessage > serialized_message, const rclcpp::MessageInfo &message_info)
 
void dispatch_intra_process (std::shared_ptr< const SubscribedType > message, const rclcpp::MessageInfo &message_info)
 
void dispatch_intra_process (std::unique_ptr< SubscribedType, SubscribedTypeDeleter > message, const rclcpp::MessageInfo &message_info)
 
constexpr bool use_take_shared_method () const
 
constexpr bool is_serialized_message_callback () const
 
void register_callback_for_tracing ()
 
HelperT::variant_type & get_variant ()
 
const HelperT::variant_type & get_variant () const
 

Detailed Description

template<typename MessageT, typename AllocatorT = std::allocator<void>>
class rclcpp::AnySubscriptionCallback< MessageT, AllocatorT >

Definition at line 262 of file any_subscription_callback.hpp.

Member Function Documentation

◆ set()

template<typename MessageT , typename AllocatorT = std::allocator<void>>
template<typename CallbackT >
AnySubscriptionCallback<MessageT, AllocatorT> rclcpp::AnySubscriptionCallback< MessageT, AllocatorT >::set ( CallbackT  callback)
inline

Generic function for setting the callback.

There are specializations that overload this in order to deprecate some callback signatures, and also to fix ambiguity between shared_ptr and unique_ptr callback signatures when using them with lambda functions.

Definition at line 388 of file any_subscription_callback.hpp.

Referenced by rclcpp::create_generic_subscription(), and rclcpp::create_subscription_factory().

Here is the caller graph for this function:

The documentation for this class was generated from the following file: