BPMN-OS
BPMN for optimization and simulation
Loading...
Searching...
No Matches
DynamicDataProvider.h
Go to the documentation of this file.
1#ifndef BPMNOS_Model_DynamicDataProvider_H
2#define BPMNOS_Model_DynamicDataProvider_H
3
4#include "DataProvider.h"
6
7namespace BPMNOS::Model {
8
9/**
10 * @brief Class representing a data provider for dynamic BPMN instance data.
11 *
12 * The DynamicDataProvider class is responsible for providing and managing instance data
13 * for BPMN processes.
14 * */
16public:
17 /**
18 * @brief Constructor for DynamicDataProvider.
19 *
20 * @param modelFile The file path to the BPMN model file.
21 * @param instanceFileOrString The file path to the instance data file or a string containing the data.
22 */
23 DynamicDataProvider(const std::string& modelFile, const std::string& instanceFileOrString);
24 /**
25 * @brief Constructor for DynamicDataProvider.
26 *
27 * @param modelFile The file path to the BPMN model file.
28 * @param folders The folders containing lookup tables.
29 * @param instanceFileOrString The file path to the instance data file or a string containing the data.
30 */
31 DynamicDataProvider(const std::string& modelFile, const std::vector<std::string>& folders, const std::string& instanceFileOrString);
32
33
34 ~DynamicDataProvider() override = default;
35 std::unique_ptr<Scenario> createScenario(unsigned int scenarioId = 0) override;
36protected:
38 void readInstances();
39
43 std::vector< std::pair<BPMNOS::number,BPMNOS::number> > instantiation; ///< Instantiation data consisting of disclosure-value pairs
44 std::unordered_map< const Attribute*, std::vector< std::pair<BPMNOS::number,BPMNOS::number> > > data; ///< Map of attribute data consisting of disclosure-value pairs
45 };
46 std::unordered_map< long unsigned int, DynamicInstanceData > instances;
47 std::unordered_map< const Attribute*, BPMNOS::number > globalValueMap;
50};
51
52} // namespace BPMNOS::Model
53
54#endif // BPMNOS_Model_DynamicDataProvider_H
Abstract base class representing a data provider for BPMN instance data.
Class representing a data provider for dynamic BPMN instance data.
std::unordered_map< const Attribute *, BPMNOS::number > globalValueMap
DynamicDataProvider(const std::string &modelFile, const std::string &instanceFileOrString)
Constructor for DynamicDataProvider.
std::unique_ptr< Scenario > createScenario(unsigned int scenarioId=0) override
std::unordered_map< long unsigned int, DynamicInstanceData > instances
~DynamicDataProvider() override=default
BPMNOS_NUMBER_TYPE number
Definition Number.h:42
std::vector< std::pair< BPMNOS::number, BPMNOS::number > > instantiation
Instantiation data consisting of disclosure-value pairs.
std::unordered_map< const Attribute *, std::vector< std::pair< BPMNOS::number, BPMNOS::number > > > data
Map of attribute data consisting of disclosure-value pairs.