| 259 | } |
| 260 | |
| 261 | void TreeNode::checkPostConditions(NodeStatus status) |
| 262 | { |
| 263 | auto ExecuteScript = [this](const PostCond& cond) { |
| 264 | const auto& parse_executor = _p->post_parsed[size_t(cond)]; |
| 265 | if(parse_executor) |
| 266 | { |
| 267 | Ast::Environment env = { config().blackboard, config().enums }; |
| 268 | parse_executor(env); |
| 269 | } |
| 270 | }; |
| 271 | |
| 272 | if(status == NodeStatus::SUCCESS) |
| 273 | { |
| 274 | ExecuteScript(PostCond::ON_SUCCESS); |
| 275 | } |
| 276 | else if(status == NodeStatus::FAILURE) |
| 277 | { |
| 278 | ExecuteScript(PostCond::ON_FAILURE); |
| 279 | } |
| 280 | ExecuteScript(PostCond::ALWAYS); |
| 281 | } |
| 282 | |
| 283 | void TreeNode::resetStatus() |
| 284 | { |
nothing calls this directly
no outgoing calls
no test coverage detected