OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
EntityInformation.h
Go to the documentation of this file.
1#pragma once
2
3// OpenTwin header
5
6// std header
7#include <string>
8
9class EntityBase;
10
11namespace ot {
12
13 class __declspec(dllexport) EntityInformation : public BasicEntityInformation {
14 public:
15 EntityInformation();
16 EntityInformation(EntityBase* _entity);
17 EntityInformation(const EntityInformation&) = default;
18 virtual ~EntityInformation();
19
20 EntityInformation& operator = (const EntityInformation&) = default;
21
25 virtual void addToJsonObject(ot::JsonValue& _object, ot::JsonAllocator& _allocator) const override;
26
30 virtual void setFromJsonObject(const ot::ConstJsonObject& _object) override;
31
32 void setEntityType(std::string _type) { m_type = _type; };
33 const std::string& getEntityType(void) const { return m_type; };
34
35 private:
36 std::string m_type;
37 };
38
39}
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