MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / getNodesByPath

Method getNodesByPath

include/behaviortree_cpp/bt_factory.h:183–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181 ///
182 template <typename NodeType = BT::TreeNode>
183 [[nodiscard]] std::vector<const TreeNode*>
184 getNodesByPath(StringView wildcard_filter) const
185 {
186 std::vector<const TreeNode*> nodes;
187 for(auto const& subtree : subtrees)
188 {
189 for(auto const& node : subtree->nodes)
190 {
191 if(auto node_recast = dynamic_cast<const NodeType*>(node.get()))
192 {
193 if(WildcardMatch(node->fullPath(), wildcard_filter))
194 {
195 nodes.push_back(node.get());
196 }
197 }
198 }
199 }
200 return nodes;
201 }
202
203private:
204 friend class BehaviorTreeFactory;

Callers

nothing calls this directly

Calls 3

WildcardMatchFunction · 0.85
push_backMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected