OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
UIDNamePair.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 <list>
15#include <string>
16
17namespace ot {
18
20 public:
22 UIDNamePair(UID _uid, const std::string& _name);
23 UIDNamePair(const ConstJsonObject& _jsonObject);
24 UIDNamePair(const UIDNamePair& _other);
25 virtual ~UIDNamePair();
26
27 UIDNamePair& operator = (const UIDNamePair& _other);
28
29 bool operator == (const UIDNamePair& _other) const;
30 bool operator != (const UIDNamePair& _other) const;
31
35 virtual void addToJsonObject(JsonValue& _object, JsonAllocator& _allocator) const override;
36
40 virtual void setFromJsonObject(const ConstJsonObject& _object) override;
41
42 void setUid(ot::UID _uid) { m_uid = _uid; };
43 ot::UID getUid(void) const { return m_uid; };
44
45 void setName(const std::string& _name) { m_name = _name; };
46 const std::string& getName(void) const { return m_name; };
47
48 private:
49 UID m_uid;
50 std::string m_name;
51 };
52
53 typedef std::list<ot::UIDNamePair> UIDNamePairList;
54
55}
#define OT_CORE_API_EXPORT
Dll import.
Definition CoreAPIExport.h:8
bool operator==(const FaceSelection &left, const FaceSelection &right)
Definition Model.cpp:55
The Serializable class is the default interface of serializable objects.
Definition Serializable.h:17
Definition UIDNamePair.h:19
const std::string & getName(void) const
Definition UIDNamePair.h:46
ot::UID getUid(void) const
Definition UIDNamePair.h:43
void setName(const std::string &_name)
Definition UIDNamePair.h:45
void setUid(ot::UID _uid)
Definition UIDNamePair.h:42
Definition Connector.h:8
std::list< ot::UIDNamePair > UIDNamePairList
Definition UIDNamePair.h:53
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