rclcpp_components  master
Package containing tools for dynamically loadable components
Public Types | Public Member Functions | List of all members
rclcpp_components::NodeInstanceWrapper Class Reference

The NodeInstanceWrapper encapsulates the node instance. More...

#include <node_instance_wrapper.hpp>

Public Types

using NodeBaseInterfaceGetter = std::function< rclcpp::node_interfaces::NodeBaseInterface::SharedPtr(const std::shared_ptr< void > &)>
 

Public Member Functions

 NodeInstanceWrapper ()
 
 NodeInstanceWrapper (std::shared_ptr< void > node_instance, NodeBaseInterfaceGetter node_base_interface_getter)
 
const std::shared_ptr< void > get_node_instance () const
 Get a type-erased pointer to the original Node instance. More...
 
rclcpp::node_interfaces::NodeBaseInterface::SharedPtr get_node_base_interface ()
 Get NodeBaseInterface pointer for the encapsulated Node Instance. More...
 

Detailed Description

The NodeInstanceWrapper encapsulates the node instance.

Member Typedef Documentation

◆ NodeBaseInterfaceGetter

using rclcpp_components::NodeInstanceWrapper::NodeBaseInterfaceGetter = std::function< rclcpp::node_interfaces::NodeBaseInterface::SharedPtr(const std::shared_ptr<void> &)>

Constructor & Destructor Documentation

◆ NodeInstanceWrapper() [1/2]

rclcpp_components::NodeInstanceWrapper::NodeInstanceWrapper ( )
inline

◆ NodeInstanceWrapper() [2/2]

rclcpp_components::NodeInstanceWrapper::NodeInstanceWrapper ( std::shared_ptr< void >  node_instance,
NodeBaseInterfaceGetter  node_base_interface_getter 
)
inline

Member Function Documentation

◆ get_node_instance()

const std::shared_ptr<void> rclcpp_components::NodeInstanceWrapper::get_node_instance ( ) const
inline

Get a type-erased pointer to the original Node instance.

This is only for debugging and special cases. For most cases get_node_base_interface will be sufficient.

Returns
Shared pointer to the encapsulated Node instance.

◆ get_node_base_interface()

rclcpp::node_interfaces::NodeBaseInterface::SharedPtr rclcpp_components::NodeInstanceWrapper::get_node_base_interface ( )
inline

Get NodeBaseInterface pointer for the encapsulated Node Instance.

Returns
Shared NodeBaseInterface pointer of the encapsulated Node instance.

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