bpmn++
A BPMN parser library, written in C++
Loading...
Searching...
No Matches
Activity.cpp
Go to the documentation of this file.
1#include "Activity.h"
5
6using namespace BPMN;
7
9 : Node(activity)
10 , FlowNode(activity,parent)
11 , compensatedBy(nullptr)
12 , isForCompensation(activity->isForCompensation.has_value() && activity->isForCompensation.value().get().value)
13 , element(activity)
14{
15 auto marker = activity->getChildren<XML::bpmn::tLoopCharacteristics>();
16 if ( !marker.empty() ) {
17 if ( marker[0].get().is<XML::bpmn::tStandardLoopCharacteristics>() ) {
19 }
20 else if ( auto multiInstanceMarker = marker[0].get().is<XML::bpmn::tMultiInstanceLoopCharacteristics>() ) {
21 if ( multiInstanceMarker->isSequential.has_value() &&
22 (bool)multiInstanceMarker->isSequential.value().get().value
23 ) {
25 }
26 else {
28 }
29 }
30 else {
31 throw std::logic_error("Activity: Failed determining loop characteristics for activity '" + activity->id.value().get().value.value + "'");
32 }
33 }
34}
35
Activity(XML::bpmn::tActivity *activity, Scope *parent)
Definition Activity.cpp:8
std::optional< LoopCharacteristics > loopCharacteristics
Definition Activity.h:24
T * get()
Casts the element to the specified type T.
Definition BaseElement.h:47
Base class for BPMN elements that may contain incoming and outgoing sequence flows.
Definition FlowNode.h:20
Base class for all nodes in a BPMN model.
Definition Node.h:24
Base class for BPMN elements that may contain a ChildNode elements.
Definition Scope.h:24
std::vector< std::reference_wrapper< T > > getChildren()
Get all children of type T.
Definition XMLObject.h:301
std::optional< std::reference_wrapper< Attribute > > id
Attribute value can be expected to be of type 'std::string'.
The BPMN namespace contains linked classes representing a BPMN model.