MCPcopy Create free account
hub / github.com/BehaviorTree/Groot / addNode

Method addNode

bt_editor/bt_editor_base.cpp:58–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57
58AbstractTreeNode* AbsBehaviorTree::addNode(AbstractTreeNode* parent,
59 AbstractTreeNode && new_node )
60{
61 int index = _nodes.size();
62 new_node.index = index;
63 if( parent )
64 {
65 _nodes.push_back( std::move(new_node) );
66 parent->children_index.push_back( index );
67 }
68 else{
69 _nodes.clear();
70 _nodes.push_back(new_node);
71 }
72 return &_nodes.back();
73}
74
75void AbsBehaviorTree::debugPrint() const
76{

Callers 3

BuildTreeFromSceneFunction · 0.80
BuildTreeFromXMLFunction · 0.80
BuildTreeFromFlatbuffersFunction · 0.80

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected