#include "rclcpp_lifecycle/lifecycle_node.hpp"
#include "rclcpp/rclcpp.hpp"
#include "rclcpp/macros.hpp"
Go to the source code of this file.
|
#define | CS_REGISTER_COMPONENT(class_name) |
| Macro to define a factory function for creating a shared pointer instance of a component class within the lifecycle node context.
|
|
◆ CS_REGISTER_COMPONENT
#define CS_REGISTER_COMPONENT |
( |
| class_name | ) |
|
Value: extern "C" class_name::SharedPtr create_instance( \
rclcpp_lifecycle::LifecycleNode::SharedPtr parent) \
{ \
return class_name::make_shared(parent); \
}
Macro to define a factory function for creating a shared pointer instance of a component class within the lifecycle node context.
This macro generates an extern "C"
factory function named create_instance
that returns a shared pointer to the specified class, allowing dynamic component loading.
- Parameters
-
class_name | The name of the class to register as a component. |