rclcpp  master
C++ ROS Client Library API
Public Types | Public Attributes | List of all members
rclcpp::SubscriptionFactory Struct Reference

Factory containing a function used to create a Subscription<MessageT>. More...

#include <subscription_factory.hpp>

Collaboration diagram for rclcpp::SubscriptionFactory:
Collaboration graph
[legend]

Public Types

using SubscriptionFactoryFunction = std::function< rclcpp::SubscriptionBase::SharedPtr(rclcpp::node_interfaces::NodeBaseInterface *node_base, const std::string &topic_name, const rclcpp::QoS &qos)>
 

Public Attributes

const SubscriptionFactoryFunction create_typed_subscription
 

Detailed Description

Factory containing a function used to create a Subscription<MessageT>.

This factory class is used to encapsulate the template generated function which is used during the creation of a Message type specific subscription within a non-templated class.

It is created using the create_subscription_factory function, which is usually called from a templated "create_subscription" method of the Node class, and is passed to the non-templated "create_subscription" method of the NodeTopics class where it is used to create and setup the Subscription.

It also handles the two step construction of Subscriptions, first calling the constructor and then the post_init_setup() method.

Member Typedef Documentation

◆ SubscriptionFactoryFunction

Member Data Documentation

◆ create_typed_subscription

const SubscriptionFactoryFunction rclcpp::SubscriptionFactory::create_typed_subscription

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