BPMN-OS
BPMN for optimization and simulation
Loading...
Searching...
No Matches
AttributeRegistry.h
Go to the documentation of this file.
1#ifndef BPMNOS_Model_AttributeRegistry_H
2#define BPMNOS_Model_AttributeRegistry_H
3
4#include <memory>
5#include <vector>
6#include <string>
7#include <unordered_map>
8#include <limex.h>
10
11#include "Attribute.h"
12
13namespace BPMNOS::Model {
14
16public:
17 AttributeRegistry(const LIMEX::Handle<double>& limexHandle);
18 const LIMEX::Handle<double>& limexHandle;
19
20 std::vector<Attribute*> statusAttributes;
21 std::vector<Attribute*> dataAttributes;
22 std::vector<Attribute*> globalAttributes;
23 std::unordered_map< std::string, Attribute*> statusMap;
24 std::unordered_map< std::string, Attribute*> dataMap;
25 std::unordered_map< std::string, Attribute*> globalMap;
26 Attribute* operator[](const std::string& name) const;
27 bool contains(const std::string& name) const;
28 bool contains(const Attribute* attribute) const;
29
30 std::optional<BPMNOS::number> getValue(const Attribute* attribute, const Values& status, const Values& data, const Values& globals) const;
31 std::optional<BPMNOS::number> getValue(const Attribute* attribute, const Values& status, const SharedValues& data, const Values& globals) const;
32 void setValue(const Attribute* attribute, Values& status, Values& data, Values& globals, std::optional<BPMNOS::number> value) const;
33 void setValue(const Attribute* attribute, Values& status, SharedValues& data, Values& globals, std::optional<BPMNOS::number> value) const;
34private:
35 friend class Attribute;
36 void add(Attribute* attribute);
37};
38
39} // namespace BPMNOS::Model
40
41#endif // BPMNOS_Model_AttributeRegistry_H
bool contains(const std::string &name) const
const LIMEX::Handle< double > & limexHandle
std::unordered_map< std::string, Attribute * > dataMap
void setValue(const Attribute *attribute, Values &status, Values &data, Values &globals, std::optional< BPMNOS::number > value) const
AttributeRegistry(const LIMEX::Handle< double > &limexHandle)
std::unordered_map< std::string, Attribute * > globalMap
Attribute * operator[](const std::string &name) const
std::vector< Attribute * > statusAttributes
std::vector< Attribute * > dataAttributes
std::unordered_map< std::string, Attribute * > statusMap
std::vector< Attribute * > globalAttributes
std::optional< BPMNOS::number > getValue(const Attribute *attribute, const Values &status, const Values &data, const Values &globals) const