15 #ifndef RCLCPP__PUBLISHER_FACTORY_HPP_ 16 #define RCLCPP__PUBLISHER_FACTORY_HPP_ 24 #include "rosidl_typesupport_cpp/message_type_support.hpp" 49 rclcpp::PublisherBase::SharedPtr(
58 template<
typename MessageT,
typename Alloc,
typename PublisherT>
68 [event_callbacks, allocator](
74 auto options_copy = publisher_options;
75 auto message_alloc = std::make_shared<typename PublisherT::MessageAlloc>(*allocator.
get());
76 options_copy.allocator = allocator::get_rcl_allocator<MessageT>(*message_alloc.get());
78 return std::make_shared<PublisherT>(
92 #endif // RCLCPP__PUBLISHER_FACTORY_HPP_ PublisherFactory create_publisher_factory(const PublisherEventCallbacks &event_callbacks, std::shared_ptr< Alloc > allocator)
Return a PublisherFactory with functions setup for creating a PublisherT<MessageT, Alloc>.
Definition: publisher_factory.hpp:60
Contains callbacks for various types of events a Publisher can receive from the middleware.
Definition: qos_event.hpp:42
PublisherFactoryFunction create_typed_publisher
Definition: publisher_factory.hpp:54
This header provides the get_node_topics_interface() template function.
Definition: allocator_common.hpp:24
Factory with functions used to create a MessageT specific PublisherT.
Definition: publisher_factory.hpp:45
Pure virtual interface class for the NodeBase part of the Node API.
Definition: node_base_interface.hpp:36