| 311 | } |
| 312 | |
| 313 | NodeStatus BehaviorState::runSelector(SelectorNode const& node, NodeState& state) { |
| 314 | if (state.isNothing()) |
| 315 | state.set(CompositeState(node.children.size())); |
| 316 | |
| 317 | CompositeState& composite = state->get<CompositeState>(); |
| 318 | while (composite.index < node.children.size()) { |
| 319 | NodeStatus childStatus = runNode(*node.children[composite.index], *composite.children[composite.index]); |
| 320 | |
| 321 | if (childStatus == NodeStatus::Success || childStatus == NodeStatus::Running) |
| 322 | return childStatus; |
| 323 | else |
| 324 | composite.index++; |
| 325 | } |
| 326 | |
| 327 | return NodeStatus::Failure; |
| 328 | } |
| 329 | |
| 330 | NodeStatus BehaviorState::runParallel(ParallelNode const& node, NodeState& state) { |
| 331 | if (state.isNothing()) |
nothing calls this directly
no test coverage detected