-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added dockblock to ComponentManager class #1102
Conversation
Signed-off-by: ahcorde <ahcorde@gmail.com>
rclcpp_components/include/rclcpp_components/component_manager.hpp
Outdated
Show resolved
Hide resolved
rclcpp_components/include/rclcpp_components/component_manager.hpp
Outdated
Show resolved
Hide resolved
rclcpp_components/include/rclcpp_components/component_manager.hpp
Outdated
Show resolved
Hide resolved
RCLCPP_COMPONENTS_PUBLIC | ||
virtual std::shared_ptr<rclcpp_components::NodeFactory> | ||
create_component_factory(const ComponentResource & resource); | ||
|
||
protected: | ||
// Service to load a new node in the component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the service callback, right? Say that instead. Also, when might a deriving class want to override these functions?
These questions apply also to the next two functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you derive from this class and change these methods we are going to change the behaviour of this abstraction. do you think we should explicitly indicate it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just surprised to see protected virtual callbacks, and I wasn't entirely sure when that would be useful to override, so I thought some documentation might help. But seeing as all the public functions are virtual as well, I guess this class was just designed with that sort of flexibility in mind.
Signed-off-by: ahcorde <ahcorde@gmail.com>
RCLCPP_COMPONENTS_PUBLIC | ||
virtual std::shared_ptr<rclcpp_components::NodeFactory> | ||
create_component_factory(const ComponentResource & resource); | ||
|
||
protected: | ||
// Service to load a new node in the component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just surprised to see protected virtual callbacks, and I wasn't entirely sure when that would be useful to override, so I thought some documentation might help. But seeing as all the public functions are virtual as well, I guess this class was just designed with that sort of flexibility in mind.
* Added dockblock to ComponentManager class Signed-off-by: ahcorde <ahcorde@gmail.com> * added feedback Signed-off-by: ahcorde <ahcorde@gmail.com>
Added dockblock to ComponentManager class
Signed-off-by: ahcorde ahcorde@gmail.com