BPMN-OS
BPMN for optimization and simulation
Loading...
Searching...
No Matches
MessageDefinition.h
Go to the documentation of this file.
1#ifndef BPMNOS_Model_MessageDefinition_H
2#define BPMNOS_Model_MessageDefinition_H
3
4#include <memory>
5#include <vector>
6#include <set>
7#include <string>
8#include <bpmn++.h>
9#include "Parameter.h"
10#include "Content.h"
12
13namespace BPMNOS::Model {
14
16public:
17 MessageDefinition(XML::bpmnos::tMessage* message, const AttributeRegistry& attributeRegistry);
19 BPMNOS::number name; ///< Message name
20 ParameterMap parameterMap; ///< Map allowing to look up parameters by their names.
21 std::vector< std::string > header; ///< Set of parameter names always beginning with "sender" and "recipient"
23 ContentMap contentMap; ///< Map allowing to look up contents by their keys.
24
25 template <typename DataType>
26 BPMNOS::Values getSenderHeader(const AttributeRegistry& attributeRegistry, const BPMNOS::Values& status, const DataType& data, const BPMNOS::Values& globals) const; /// Returns a vector of values including message name, recipient, sender, and all other header parameters
27
28 template <typename DataType>
29 BPMNOS::Values getRecipientHeader(const AttributeRegistry& attributeRegistry, const BPMNOS::Values& status, const DataType& data, const BPMNOS::Values& globals) const; /// Returns a vector of values including message name, recipient, sender, and all other header parameters
30private:
31
32 template <typename DataType>
33 std::optional<BPMNOS::number> getHeaderValue(const std::string& key, const AttributeRegistry& attributeRegistry, const BPMNOS::Values& status, const DataType& data, const BPMNOS::Values& global ) const; ///< Returns the header value string with the given key represented as number.
34
35};
36
37} // namespace BPMNOS::Model
38
39#endif // BPMNOS_Model_MessageDefinition_H
ContentMap contentMap
Map allowing to look up contents by their keys.
BPMNOS::Values getRecipientHeader(const AttributeRegistry &attributeRegistry, const BPMNOS::Values &status, const DataType &data, const BPMNOS::Values &globals) const
Returns a vector of values including message name, recipient, sender, and all other header parameters...
std::vector< std::string > header
Set of parameter names always beginning with "sender" and "recipient".
ParameterMap parameterMap
Map allowing to look up parameters by their names.
BPMNOS::Values getSenderHeader(const AttributeRegistry &attributeRegistry, const BPMNOS::Values &status, const DataType &data, const BPMNOS::Values &globals) const
XML::bpmnos::tMessage * element
MessageDefinition(XML::bpmnos::tMessage *message, const AttributeRegistry &attributeRegistry)
BPMNOS::number name
Message name.
std::unordered_map< std::string, std::unique_ptr< Parameter > > ParameterMap
Definition Parameter.h:34
std::unordered_map< std::string, std::unique_ptr< Content > > ContentMap
Definition Content.h:27
BPMNOS_NUMBER_TYPE number
Definition Number.h:42