OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
MenuEntryCfg.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
10#include "OTCore/Serializable.h"
12
13// std header
14#include <string>
15
16#pragma warning(disable:4251)
17
18namespace ot {
19
21 public:
22 enum EntryType {
25 Separator
26 };
27
28 static std::string toString(EntryType _type);
29 static EntryType stringToEntryType(const std::string& _type);
30 static const std::string& entryTypeJsonKey(void);
31
33 MenuEntryCfg(const MenuEntryCfg& _other);
34 virtual ~MenuEntryCfg();
35
36 MenuEntryCfg& operator = (const MenuEntryCfg& _other);
37
38 virtual MenuEntryCfg* createCopy(void) const = 0;
39 virtual EntryType getMenuEntryType(void) const = 0;
40
44 virtual void addToJsonObject(ot::JsonValue& _object, ot::JsonAllocator& _allocator) const override;
45
49 virtual void setFromJsonObject(const ot::ConstJsonObject& _object) override;
50 };
51
52}
This file contains defines that may be used simplyfy class creation.
#define OT_GUI_API_EXPORT
Definition OTGuiAPIExport.h:9
Definition MenuEntryCfg.h:20
virtual MenuEntryCfg * createCopy(void) const =0
EntryType
Definition MenuEntryCfg.h:22
@ Button
Definition MenuEntryCfg.h:24
@ Menu
Definition MenuEntryCfg.h:23
virtual EntryType getMenuEntryType(void) const =0
The Serializable class is the default interface of serializable objects.
Definition Serializable.h:17
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
OT_GUI_API_EXPORT std::string toString(ColorStyleName _colorStyleName)
Definition ColorStyleTypes.cpp:10
rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > JsonAllocator
Allocator used for writing to JSON values.
Definition JSON.h:30