OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
Plot1DCurveInfoCfg.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
9#include "OTCore/CoreTypes.h"
10#include "OTCore/Serializable.h"
12
13// std header
14#include <string>
15
16#pragma warning(disable:4251)
17
18namespace ot {
19
21 public:
23 Plot1DCurveInfoCfg(UID _id, UID _version, const std::string& _name);
25 virtual ~Plot1DCurveInfoCfg();
26
27 Plot1DCurveInfoCfg& operator = (const Plot1DCurveInfoCfg& _other);
28
32 virtual void addToJsonObject(ot::JsonValue& _object, ot::JsonAllocator& _allocator) const override;
33
37 virtual void setFromJsonObject(const ot::ConstJsonObject& _object) override;
38
39 // ###########################################################################################################################################################################################################################################################################################################################
40
41 // Setter / Getter
42
43 void setId(UID _id) { m_id = _id; };
44 UID getId(void) const { return m_id; };
45
46 void setVersion(UID _version) { m_version = _version; };
47 UID getVersion(void) const { return m_version; };
48
49 void setTreeId(UID _id) { m_treeId = _id; };
50 UID getTreeId(void) const { return m_treeId; };
51
52 void setDimmed(bool _isDimmed) { m_dimmed = _isDimmed; };
53 bool getDimmed(void) const { return m_dimmed; };
54
55 void setName(const std::string& _name) { m_name = _name; };
56 const std::string& getName(void) const { return m_name; };
57
58 private:
59 bool m_dimmed;
60 UID m_id;
61 UID m_version;
62 UID m_treeId;
63 std::string m_name;
64 };
65
66}
#define OT_GUI_API_EXPORT
Definition OTGuiAPIExport.h:9
Definition Plot1DCurveInfoCfg.h:20
const std::string & getName(void) const
Definition Plot1DCurveInfoCfg.h:56
UID getId(void) const
Definition Plot1DCurveInfoCfg.h:44
void setTreeId(UID _id)
Definition Plot1DCurveInfoCfg.h:49
void setVersion(UID _version)
Definition Plot1DCurveInfoCfg.h:46
UID getTreeId(void) const
Definition Plot1DCurveInfoCfg.h:50
UID getVersion(void) const
Definition Plot1DCurveInfoCfg.h:47
void setId(UID _id)
Definition Plot1DCurveInfoCfg.h:43
bool getDimmed(void) const
Definition Plot1DCurveInfoCfg.h:53
void setName(const std::string &_name)
Definition Plot1DCurveInfoCfg.h:55
void setDimmed(bool _isDimmed)
Definition Plot1DCurveInfoCfg.h:52
The Serializable class is the default interface of serializable objects.
Definition Serializable.h:17
Definition Connector.h:8
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27
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