OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
GenericDataStructSingle.h
Go to the documentation of this file.
1#pragma once
3#include "OTCore/Variable.h"
4
5namespace ot
6{
7 class __declspec(dllexport) GenericDataStructSingle : public GenericDataStruct
8 {
9
10 public:
11 GenericDataStructSingle();
12 GenericDataStructSingle(const GenericDataStructSingle& _other);
13 GenericDataStructSingle(GenericDataStructSingle&& _other) noexcept;
14 GenericDataStructSingle& operator=(const GenericDataStructSingle& _other) = default;
15 GenericDataStructSingle& operator=(GenericDataStructSingle&& _other) noexcept = default;
16 ~GenericDataStructSingle();
17
18 void setValue(const ot::Variable& _value);
19 void setValue(ot::Variable&& _value);
20
21 const ot::Variable& getValue() const;
22
23 virtual void addToJsonObject(ot::JsonValue& _object, ot::JsonAllocator& _allocator) const override;
24 virtual void setFromJsonObject(const ot::ConstJsonObject& _object) override;
25
26 static std::string getClassName() { return "GenericDataStructSingle"; }
27
28 private:
29 ot::Variable m_value;
30 };
31
32}
Definition Variable.h:107
Definition Connector.h:8
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