bpmn++
A BPMN parser library, written in C++
Loading...
Searching...
No Matches
Scope.h
Go to the documentation of this file.
1#ifndef BPMN_Scope_H
2#define BPMN_Scope_H
3
4#include <memory>
5#include <vector>
6#include <optional>
7#include "Node.h"
8#include "DataObject.h"
9
10namespace BPMN {
11
12class FlowNode;
13class Activity;
14class EventSubProcess;
15class SequenceFlow;
16
17/**
18 * @brief Base class for BPMN elements that may contain a ChildNode elements.
19 *
20 * The Scope class provides functionalities to access child nodes,
21 * event subprocesses, start nodes, and sequence flows associated
22 * with the scope.
23 */
24class Scope : virtual public Node {
25 friend class Model;
26public:
28
29 /// @brief Vector containing all child nodes within the scope of the nodes.
30 std::vector< std::unique_ptr<Node> > childNodes;
31
32 /// @brief Vector containing pointers to all flow nodes within the scope of the nodes.
33 std::vector< FlowNode* > flowNodes;
34
35 /// @brief Vector containing pointers to all event subprocesses within the scope of the nodes.
36 std::vector< EventSubProcess* > eventSubProcesses;
37
38 /// @brief Vector containing all flow nodes that may start execution of the scope.
39 std::vector< FlowNode* > startNodes;
40
41 /// @brief Vector containing all sequence flows within the scope.
42 std::vector< std::unique_ptr<SequenceFlow> > sequenceFlows;
43
44 /// @brief Vector containing pointers to all compensation activities within the scope.
45 std::vector< Activity* > compensationActivities;
46
47 /// @brief Pointer to compensation event subprocess of the scope.
49
50 /// @brief Vector containing all data objects within the scope.
51 std::vector< std::unique_ptr<DataObject> > dataObjects;
52
53protected:
54 void add(std::unique_ptr<Node> node);
55 void add(std::unique_ptr<SequenceFlow> sequenceFlow);
56 void add(std::unique_ptr<DataObject> dataObject);
57};
58
59} // namespace BPMN
60
61#endif // BPMN_Scope_H
XML::bpmn::tBaseElement * element
Definition BaseElement.h:20
Represents a BPMN model with all its processes and message flows.
Definition Model.h:170
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< FlowNode * > startNodes
Vector containing all flow nodes that may start execution of the scope.
Definition Scope.h:39
std::vector< Activity * > compensationActivities
Vector containing pointers to all compensation activities within the scope.
Definition Scope.h:45
EventSubProcess * compensationEventSubProcess
Pointer to compensation event subprocess of the scope.
Definition Scope.h:48
std::vector< EventSubProcess * > eventSubProcesses
Vector containing pointers to all event subprocesses within the scope of the nodes.
Definition Scope.h:36
std::vector< FlowNode * > flowNodes
Vector containing pointers to all flow nodes within the scope of the nodes.
Definition Scope.h:33
void add(std::unique_ptr< Node > node)
Definition Scope.cpp:17
std::vector< std::unique_ptr< SequenceFlow > > sequenceFlows
Vector containing all sequence flows within the scope.
Definition Scope.h:42
std::vector< std::unique_ptr< DataObject > > dataObjects
Vector containing all data objects within the scope.
Definition Scope.h:51
std::vector< std::unique_ptr< Node > > childNodes
Vector containing all child nodes within the scope of the nodes.
Definition Scope.h:30
The BPMN namespace contains linked classes representing a BPMN model.