Skip to content

Commit 28e4b1b

Browse files
authored
Fix documentation of Context class (#2107)
Signed-off-by: Silvio Traversaro <[email protected]>
1 parent 35a5d6a commit 28e4b1b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

rclcpp/include/rclcpp/context.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,11 @@ using PreShutdownCallbackHandle = ShutdownCallbackHandle;
6565
/// Context which encapsulates shared state between nodes and other similar entities.
6666
/**
6767
* A context also represents the lifecycle between init and shutdown of rclcpp.
68-
* It is often used in conjunction with rclcpp::init, or rclcpp::init_local,
69-
* and rclcpp::shutdown.
68+
* Nodes may be attached to a particular context by passing to the rclcpp::Node
69+
* constructor a rclcpp::NodeOptions instance in which the Context is set via
70+
* rclcpp::NodeOptions::context.
71+
* Nodes will be automatically removed from the context when destructed.
72+
* Contexts may be shutdown by calling rclcpp::shutdown.
7073
*/
7174
class Context : public std::enable_shared_from_this<Context>
7275
{

0 commit comments

Comments
 (0)