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