12 struct __declspec(dllexport) MatrixEntryPointer
14 uint32_t m_column = 0;
18 class __declspec(dllexport) GenericDataStructMatrix :
public GenericDataStruct
22 GenericDataStructMatrix();
23 ~GenericDataStructMatrix();
24 GenericDataStructMatrix(
const GenericDataStructMatrix& _other);
25 GenericDataStructMatrix(GenericDataStructMatrix&& _other)
noexcept;
26 GenericDataStructMatrix& operator=(
const GenericDataStructMatrix& _other) =
default;
27 GenericDataStructMatrix& operator=(GenericDataStructMatrix&& _other)
noexcept =
default;
30 GenericDataStructMatrix(uint32_t _rows, uint32_t _columns);
31 GenericDataStructMatrix(
const MatrixEntryPointer& _matrixEntryPointer);
32 GenericDataStructMatrix(uint32_t _rows, uint32_t _columns,
ot::Variable _defaultValue);
33 GenericDataStructMatrix(
const MatrixEntryPointer& _matrixEntryPointer,
ot::Variable _defaultValue);
35 void setValue(
const MatrixEntryPointer& _matrixEntryPointer,
ot::Variable&& _value);
36 void setValue(
const MatrixEntryPointer& _matrixEntryPointer,
const ot::Variable& _value);
37 void setValues(
const ot::Variable* _values, uint32_t _size);
40 void setValues(std::list<ot::Variable> _values);
44 const ot::Variable& getValue(
const MatrixEntryPointer& _matrixEntryPointer)
const;
46 const uint32_t getNumberOfColumns()
const {
return m_numberOfColumns; }
47 const uint32_t getNumberOfRows()
const {
return m_numberOfRows; }
52 static std::string getClassName() {
return "GenericDataStructMatrix"; }
55 uint32_t m_numberOfColumns = 0;
56 uint32_t m_numberOfRows = 0;
58 std::vector<ot::Variable> m_values;
59 void allocateValueMemory();
60 void allocateValueMemory(
const ot::Variable& _defaultValue);
63 inline uint32_t getIndex(
const uint32_t& _columnIndex,
const uint32_t& _rowIndex)
const {
return m_numberOfColumns * _rowIndex + _columnIndex; }
Definition Variable.h:107
rapidjson::Value JsonValue
Writable JSON value.
Definition JSON.h:27
rapidjson::GenericObject< true, rapidjson::GenericValue< rapidjson::UTF8<>, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > > > ConstJsonObject
Read only JSON Object.
Definition JSON.h:35
rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > JsonAllocator
Allocator used for writing to JSON values.
Definition JSON.h:30