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

Method unregisterBuilder

src/bt_factory.cpp:189–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187BehaviorTreeFactory::operator=(BehaviorTreeFactory&& other) noexcept = default;
188
189bool BehaviorTreeFactory::unregisterBuilder(const std::string& ID)
190{
191 if(builtinNodes().count(ID) != 0)
192 {
193 throw LogicError("You can not remove the builtin registration ID [", ID, "]");
194 }
195 auto it = _p->builders.find(ID);
196 if(it == _p->builders.end())
197 {
198 return false;
199 }
200 _p->builders.erase(ID);
201 _p->manifests.erase(ID);
202 return true;
203}
204
205void BehaviorTreeFactory::registerBuilder(const TreeNodeManifest& manifest,
206 const NodeBuilder& builder)

Callers

nothing calls this directly

Calls 2

LogicErrorClass · 0.85
endMethod · 0.45

Tested by

no test coverage detected