OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
QuantityDescriptionSParameter.h
Go to the documentation of this file.
1#pragma once
4class __declspec(dllexport) QuantityDescriptionSParameter :public QuantityDescription
5{
6public:
7 QuantityDescriptionSParameter(uint64_t _reserveNumberOfEntries = 0);
8
9 QuantityDescriptionSParameter(uint32_t _portNumber, uint64_t _reserveNumberOfEntries = 0);
10
11 QuantityDescriptionSParameter(QuantityDescriptionSParameter&& _other) noexcept = default;
12 QuantityDescriptionSParameter& operator=(QuantityDescriptionSParameter&& _other) noexcept = default;
13 QuantityDescriptionSParameter(const QuantityDescriptionSParameter& _other) = default;
14 QuantityDescriptionSParameter& operator=(const QuantityDescriptionSParameter& _other) = default;
15
16 void setNumberOfPorts(uint32_t _portNumber);
17
20 void initiateZeroFilledValueMatrices(uint64_t _numberOfValues);
21
22 void reserve(uint64_t _reserveNumberOfEntries);
23
24 void optimiseMemory();
25
26 void pushBackFirstValue(ot::GenericDataStructMatrix&& _sparameterMatrix);
27
28 void pushBackSecondValue(ot::GenericDataStructMatrix&& _sparameterMatrix);
29
31 void setFirstValue(uint64_t _index, const ot::MatrixEntryPointer& _matrixPointer, ot::Variable&& _value);
32
34 void setSecondValue(uint64_t _index, const ot::MatrixEntryPointer& _matrixPointer, ot::Variable&& _value);
35
37 //const ot::Variable& getFirstValue(uint64_t _index, uint32_t _row, uint32_t _column);
38 const std::vector<ot::Variable> getFirstValues(uint64_t _index);
39
41 //const ot::Variable& getSecondValue(uint64_t _index, uint32_t _row, uint32_t _column);
42 const std::vector<ot::Variable> getSecondValues(uint64_t _index);
43
45 const size_t getNumberOfFirstValues() const { return m_quantityValuesFirst.size(); }
46
48 const size_t getNumberOfSecondValues() const { return m_quantityValuesSecond.size(); }
49private:
50 uint64_t m_numberOfMatrixEntries = 0;
51 std::vector<ot::GenericDataStructMatrix> m_quantityValuesFirst;
52 std::vector<ot::GenericDataStructMatrix> m_quantityValuesSecond;
53
54 bool inline firstValueAccessValid(uint64_t _index, uint32_t _row, uint32_t _column);
55
56 bool inline secondValueAccessValid(uint64_t _index, uint32_t _row, uint32_t _column);
57
58};
Definition Variable.h:107