OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
MetadataCampaign.h
Go to the documentation of this file.
1#pragma once
2#include <map>
3#include <string>
4#include <memory>
5
6#include "MetadataSeries.h"
7#include "MetadataQuantity.h"
8#include "MetadataParameter.h"
9#include "MetadataEntry.h"
10#include "OTCore/CoreTypes.h"
11
12class __declspec(dllexport) MetadataCampaign
13{
14public:
15 MetadataCampaign() = default;
16 MetadataCampaign(const MetadataCampaign& _other) = default;
17 MetadataCampaign& operator=(const MetadataCampaign& _other) = delete;
18 MetadataCampaign(MetadataCampaign&& other) noexcept =default;
19 MetadataCampaign& operator=(MetadataCampaign&& other) noexcept = default;
20 ~MetadataCampaign() {};
21
22 void addMetaInformation(const std::string& key, std::shared_ptr<MetadataEntry> _metadata) { m_metaData[key] = _metadata; }
23 const std::map <std::string, std::shared_ptr<MetadataEntry>>& getMetaData() const { return m_metaData; }
24
25 void addSeriesMetadata(MetadataSeries&& seriesMetadata) { m_seriesMetadata.push_back(seriesMetadata); }
26 const std::list<MetadataSeries>& getSeriesMetadata() const { return m_seriesMetadata; };
27
28 void setCampaignName(const std::string _name) { m_campaignName = _name; }
29 const std::string& getCampaignName()const { return m_campaignName; }
30
31 const std::map <std::string, MetadataQuantity*>& getMetadataQuantitiesByLabel() const { return m_quantityOverviewByLabel; }
32 const std::map <std::string, MetadataParameter*>& getMetadataParameterByLabel() const { return m_parameterOverviewByLabel; }
33 const std::map <ot::UID, MetadataParameter>& getMetadataParameterByUID() const { return m_parameterOverviewByUID; }
34 const std::map <ot::UID, MetadataQuantity>& getMetadataQuantitiesByUID() const { return m_quantityOverviewByUID; }
35
36 void updateMetadataOverview();
37 void updateMetadataOverviewFromLastAddedSeries();
38
39 void reset();
40private:
41 std::list<MetadataSeries> m_seriesMetadata;
42
43 std::map<ot::UID,MetadataQuantity> m_quantityOverviewByUID;
44 std::map<ot::UID, MetadataParameter> m_parameterOverviewByUID;
45 std::map<std::string, MetadataQuantity*> m_quantityOverviewByLabel;
46 std::map<std::string, MetadataParameter*> m_parameterOverviewByLabel;
47
48 std::string m_campaignName;
49
50 std::map <std::string, std::shared_ptr<MetadataEntry>> m_metaData;
51
52 void updateMetadataOverview(MetadataSeries& _series);
53
54};
55