18namespace sparta::utils
36 const std::string & name,
37 std::vector<sparta::TreeNode*> & found_nodes)
40 if(starting_node->
getName() == name) {
41 found_nodes.emplace_back(starting_node);
48 return found_nodes.size();
Basic Node framework in sparta device tree composite pattern.
uint64_t recursiveTreeSearch(sparta::TreeNode *starting_node, const std::string &name, std::vector< sparta::TreeNode * > &found_nodes)
Search a TreeNode for a given named node.
Node in a composite tree representing a sparta Tree item.
const ChildrenVector getChildren() const
Gets a vector of all children of this node in any group in the order in which they were added to this...
const std::string & getName() const override
Gets the name of this node.