| 203 | } |
| 204 | |
| 205 | void BehaviorTreeFactory::registerBuilder(const TreeNodeManifest& manifest, |
| 206 | const NodeBuilder& builder) |
| 207 | { |
| 208 | auto it = _p->builders.find(manifest.registration_ID); |
| 209 | if(it != _p->builders.end()) |
| 210 | { |
| 211 | throw BehaviorTreeException("ID [", manifest.registration_ID, "] already registered"); |
| 212 | } |
| 213 | |
| 214 | _p->builders.insert({ manifest.registration_ID, builder }); |
| 215 | _p->manifests.insert({ manifest.registration_ID, manifest }); |
| 216 | } |
| 217 | |
| 218 | void BehaviorTreeFactory::registerSimpleCondition( |
| 219 | const std::string& ID, const SimpleConditionNode::TickFunctor& tick_functor, |
no test coverage detected