BPMN-OS
BPMN for optimization and simulation
Loading...
Searching...
No Matches
Restriction.h
Go to the documentation of this file.
1#ifndef BPMNOS_Model_Restriction_H
2#define BPMNOS_Model_Restriction_H
3
4#include <memory>
5#include <unordered_set>
6#include <string>
7#include <bpmn++.h>
11#include "Attribute.h"
12#include "AttributeRegistry.h"
13#include "Expression.h"
14
15namespace BPMNOS::Model {
16
18public:
19 Restriction(XML::bpmnos::tRestriction* restriction, const AttributeRegistry& attributeRegistry);
21
22 std::string& id;
24
25 enum class Scope { ENTRY, EXIT, FULL };
27
28/**
29 * @brief Check if the restriction is satisfied using an expression applied on status and data attribute values.
30 *
31 * This function checks whether the given restriction is satisfied based on the
32 * provided status and data attribute values.
33 *
34 * @return `true` if the restriction is satisfied, `false` otherwise.
35 */
36 template <typename DataType>
37 bool isSatisfied(const BPMNOS::Values& status, const DataType& data, const BPMNOS::Values& globals) const;
38};
39
40} // namespace BPMNOS::Model
41
42#endif // BPMNOS_Model_Restriction_H
Class representing a mathematical expression.
Definition Expression.h:17
const Expression expression
Definition Restriction.h:23
XML::bpmnos::tRestriction * element
Definition Restriction.h:20
bool isSatisfied(const BPMNOS::Values &status, const DataType &data, const BPMNOS::Values &globals) const
Check if the restriction is satisfied using an expression applied on status and data attribute values...
Restriction(XML::bpmnos::tRestriction *restriction, const AttributeRegistry &attributeRegistry)