OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
MetadataParameter.h
Go to the documentation of this file.
1#pragma once
2#include "OTCore/Variable.h"
3#include "OTCore/CoreTypes.h"
4#include "MetadataEntry.h"
5
6#include <string>
7#include <list>
8#include <map>
9#include <stdint.h>
10#include <memory>
11
12struct __declspec(dllexport) MetadataParameter
13{
14 MetadataParameter() = default;
15 MetadataParameter(const MetadataParameter& _other) = default;
16 MetadataParameter(MetadataParameter&& _other) = default;
17
18 /*MetadataParameter(const MetadataParameter& _other)
19 : parameterName(_other.parameterName),parameterLabel(_other.parameterLabel),parameterUID(_other.parameterUID),unit(_other.unit),typeName(_other.typeName),values(_other.values),metaData(_other.metaData) {}
20 MetadataParameter(MetadataParameter&& _other) noexcept
21 : parameterName(std::move(_other.parameterName)), parameterLabel(std::move(_other.parameterLabel)), parameterUID(std::move(_other.parameterUID)), unit(std::move(_other.unit)), typeName(std::move(_other.typeName)), values(std::move(_other.values)), metaData(std::move(_other.metaData)) {}*/
22 MetadataParameter& operator=(const MetadataParameter& _other) = default;
23 MetadataParameter& operator=(MetadataParameter&& _other) = default;
24 //Unique name
25 std::string parameterName = "";
26
27 //In case that the unique name is already taken, the name is extended with a number. The original name is kept in parameterLabel.
28 std::string parameterLabel = "";
29
30 /****************** Are set by the campaign handling class *********************/
31 ot::UID parameterUID = 0;
32 /******************************************************************************/
33
34 std::string unit;
35 std::string typeName;
36
37 std::list<ot::Variable> values;
38 std::map < std::string, std::shared_ptr<MetadataEntry>> metaData;
39
40 const bool operator==(const MetadataParameter& other) const
41 {
42 const bool equal = this->typeName == other.typeName &&
43 this->unit == other.unit &&
44 this->parameterName == other.parameterName;
45 return equal;
46 }
47
48 const bool operator!=(const MetadataParameter& other) const
49 {
50 return !(*this == other);
51 }
52};
bool operator==(const FaceSelection &left, const FaceSelection &right)
Definition Model.cpp:55
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27