#include <src/PRGraphVisitors.h>
Definition at line 65 of file PRGraphVisitors.h.
concurrency::Supervisor::Supervisor |
( |
const int & |
slotNum | ) |
|
|
inline |
concurrency::Supervisor::~Supervisor |
( |
| ) |
|
|
inlineoverride |
void concurrency::Supervisor::reset |
( |
| ) |
|
|
inlineoverridevirtual |
Implements concurrency::IGraphVisitor.
Definition at line 157 of file PRGraphVisitors.cpp.
159 bool foundNonResolvedChild =
false;
160 bool foundNegativeChild =
false;
161 bool foundPositiveChild =
false;
164 for (
auto child : node.getDaughters()) {
165 int& childDecision = child->m_graph->getNodeDecisions(
m_slotNum)[child->getNodeIndex()];
167 if (childDecision == -1)
168 foundNonResolvedChild =
true;
169 else if (childDecision == 1)
170 foundPositiveChild =
true;
172 foundNegativeChild =
true;
174 if (node.m_modePromptDecision) {
175 if (node.m_modeOR && foundPositiveChild) {
178 }
else if (!node.m_modeOR && foundNegativeChild) {
183 if (foundNonResolvedChild)
188 if (!foundNonResolvedChild && decision == -1) {
190 if (foundPositiveChild) decision = 1;
193 if (foundNegativeChild) decision = 0;
197 if (node.m_allPass && !foundNonResolvedChild)
200 if (decision != -1) {
201 node.m_graph->getNodeDecisions(
m_slotNum)[node.getNodeIndex()] = decision;
bool concurrency::Supervisor::visitEnter |
( |
DecisionNode & |
node | ) |
const |
|
overridevirtual |
bool concurrency::Supervisor::visitEnter |
( |
AlgorithmNode & |
node | ) |
const |
|
overridevirtual |
bool concurrency::Supervisor::visitLeave |
( |
DecisionNode & |
| ) |
const |
|
inlineoverridevirtual |
The documentation for this class was generated from the following files: