182 bool foundNonResolvedChild =
false;
183 bool foundNegativeChild =
false;
184 bool foundPositiveChild =
false;
197 bool breakout =
false;
198 for (
unsigned int slotIndex : searchResult->second ) {
203 for (
auto child : node.getDaughters() ) {
207 if ( childDecision == -1 )
208 foundNonResolvedChild =
true;
209 else if ( childDecision == 1 )
210 foundPositiveChild =
true;
212 foundNegativeChild =
true;
214 if ( node.m_modePromptDecision ) {
215 if ( node.m_modeOR && foundPositiveChild ) {
219 }
else if ( !node.m_modeOR && foundNegativeChild ) {
225 if ( foundNonResolvedChild ) {
234 if ( breakout )
break;
237 for (
auto child : node.getDaughters() ) {
240 if ( childDecision == -1 )
241 foundNonResolvedChild =
true;
242 else if ( childDecision == 1 )
243 foundPositiveChild =
true;
245 foundNegativeChild =
true;
247 if ( node.m_modePromptDecision ) {
248 if ( node.m_modeOR && foundPositiveChild ) {
251 }
else if ( !node.m_modeOR && foundNegativeChild ) {
256 if ( foundNonResolvedChild )
break;
261 if ( !foundNonResolvedChild && decision == -1 ) {
262 if ( node.m_modeOR ) {
263 if ( foundPositiveChild )
268 if ( foundNegativeChild )
275 if ( node.m_inverted && decision == 1 )
277 else if ( node.m_inverted && decision == 0 )
280 if ( node.m_allPass && !foundNonResolvedChild ) decision = 1;
282 if ( decision != -1 ) {
286 for (
auto parent : node.m_parents ) {
287 parent->accept( *
this );
290 if ( oldSlot )
m_slot = oldSlot;
297 for (
unsigned int slotIndex : searchResult->second ) {
302 for (
auto child : node.getDaughters() ) {
303 bool result = child->accept( *
this );
304 if ( !node.m_modeConcurrent )
312 for (
auto child : node.getDaughters() ) {
313 bool result = child->accept( *
this );
314 if ( !node.m_modeConcurrent )
319 if ( oldSlot )
m_slot = oldSlot;
std::string entryPoint
Name of the node this slot is attached to ("" for top level)
std::vector< int > controlFlowState
State of the control flow.
EventSlot * parentSlot
Pointer to parent slot (null for top level)
std::map< std::string, std::vector< unsigned int > > subSlotsByNode
Listing of sub-slots by the node (name) they are attached to.
std::vector< EventSlot > allSubSlots
Actual sub-slot instances.
Class representing the event slot.