OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ResultCollectionMetadataAccess.h
Go to the documentation of this file.
1#pragma once
2#include <string>
3#include <list>
4
6
7#include "EntityBase.h"
8
9#include "MetadataCampaign.h"
10#include "MetadataQuantity.h"
11#include "MetadataParameter.h"
12#include "MetadataSeries.h"
13
14class ClassFactory;
15
16
17class __declspec(dllexport) ResultCollectionMetadataAccess
18{
19public:
20 ResultCollectionMetadataAccess(const std::string& collectionName, ot::components::ModelComponent* modelComponent, ClassFactory* classFactory);
21 ResultCollectionMetadataAccess(const std::string& crossCollectionName, ot::components::ModelComponent* modelComponent, ClassFactory* classFactory, const std::string& sessionServiceURL);
22 ResultCollectionMetadataAccess(ResultCollectionMetadataAccess&& other) noexcept;
23 ResultCollectionMetadataAccess& operator=(ResultCollectionMetadataAccess&& other) noexcept;
24
25 virtual ~ResultCollectionMetadataAccess() {};
26
27 const std::list<std::string> listAllSeriesNames() const;
28 const std::list<std::string> listAllParameterLabels() const;
29 const std::list<std::string> listAllQuantityLabels() const;
30
31 const std::list<std::string> listAllParameterLabelsFromSeries(const std::string& _label) const;
32 const std::list<std::string> listAllQuantityLabelsFromSeries(const std::string& _label) const;
33
35 const MetadataSeries* findMetadataSeries(const std::string& _label) const;
37 const MetadataSeries* findMetadataSeries(ot::UID _index) const ;
39 const MetadataParameter* findMetadataParameter(const std::string& _label) const;
41 const MetadataParameter* findMetadataParameter(ot::UID _index) const;
43 const MetadataQuantity* findMetadataQuantity(const std::string& _label) const;
45 const MetadataQuantity* findMetadataQuantity(ot::UID _index) const; //Needs to look through the value descriptions!
46
47 std::list< MetadataQuantity*>findQuantityWithSameName(const std::string& _name);
48 std::list< MetadataParameter*>findParameterWithSameName(const std::string& _name);
49
50 const MetadataCampaign& getMetadataCampaign() const { return m_metadataCampaign; }
51
52 const std::string& getCollectionName() const { return m_collectionName; }
53
54 bool collectionHasMetadata() const { return m_metadataExistInProject; }
55
56protected:
57 ResultCollectionMetadataAccess() {};
58 bool m_metadataExistInProject = false;
59 std::string m_collectionName;
60 ot::components::ModelComponent* m_modelComponent = nullptr;
61 MetadataCampaign m_metadataCampaign;
62
63private:
64 void loadExistingCampaignData(ClassFactory* classFactory);
65 std::vector<EntityBase*> findAllExistingMetadata(ClassFactory* classFactory);
66};
Definition ModelComponent.h:42
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27