Class ProcessingTimeNode
Defined in File time_keeper.hpp
Inheritance Relationships
Base Type
public std::enable_shared_from_this< ProcessingTimeNode >
Class Documentation
-
class ProcessingTimeNode : public std::enable_shared_from_this<ProcessingTimeNode>
Class representing a node in the time tracking tree.
Public Functions
-
explicit ProcessingTimeNode(const std::string &name)
Construct a new ProcessingTimeNode object.
- Parameters:
name – Name of the node
-
std::shared_ptr<ProcessingTimeNode> add_child(const std::string &name)
Add a child node.
- Parameters:
name – Name of the child node
- Returns:
std::shared_ptr<ProcessingTimeNode> Shared pointer to the newly added child node
-
std::string to_string() const
Get the result string representing the node and its children in a tree structure.
- Returns:
std::string Result string representing the node and its children
-
autoware_internal_debug_msgs::msg::ProcessingTimeTree to_msg() const
Construct a ProcessingTimeTree message from the node and its children.
- Returns:
autoware_internal_debug_msgs::msg::ProcessingTimeTree Constructed ProcessingTimeTree message
-
std::weak_ptr<ProcessingTimeNode> get_parent_node() const
Get the parent node.
- Returns:
std::weak_ptr<ProcessingTimeNode> Weak pointer to the parent node
-
std::vector<std::shared_ptr<ProcessingTimeNode>> get_child_nodes() const
Get the child nodes.
- Returns:
std::vector<std::shared_ptr<ProcessingTimeNode>> Vector of shared pointers to the child nodes
-
void set_time(const double processing_time)
Set the processing time for the node.
- Parameters:
processing_time – Processing time to be set
-
void set_comment(const std::string &comment)
Set the comment for the node.
- Parameters:
comment – Comment to be set
-
std::string get_name() const
Get the name of the node.
- Returns:
std::string Name of the node
-
explicit ProcessingTimeNode(const std::string &name)