BPMN-OS
BPMN for optimization and simulation
Loading...
Searching...
No Matches
InstantEntry.cpp
Go to the documentation of this file.
1#include "InstantEntry.h"
3#include <cassert>
4
5using namespace BPMNOS::Execution;
6
10
11std::shared_ptr<Event> InstantEntry::dispatchEvent( const SystemState* systemState ) {
12 for ( auto& [token_ptr, request_ptr] : systemState->pendingEntryDecisions ) {
13 if( auto request = request_ptr.lock() ) {
14 assert( request );
15 return std::make_shared<EntryEvent>(request->token);
16 }
17 }
18 return nullptr;
19}
20
std::shared_ptr< Event > dispatchEvent(const SystemState *systemState) override
A class representing the state that the execution or simulation of a given scenario is in.
Definition SystemState.h:21
auto_list< std::weak_ptr< Token >, std::weak_ptr< DecisionRequest > > pendingEntryDecisions
Definition SystemState.h:71