GUIFramework
1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
MenuParser.cpp
Go to the documentation of this file.
1
#include "
MenuParser.h
"
2
3
#include "
Utility/Utility.h
"
4
#include "
Interfaces/Utility/ISerializable.h
"
5
6
using namespace
std;
7
8
namespace
gui_framework
9
{
10
namespace
parsers
11
{
12
void
MenuParser::parse
(json::utility::jsonObject& description)
13
{
14
using
json::utility::jsonObject;
15
16
uint32_t codepage =
interfaces::ISerializable::getCodepage
();
17
18
mainMenuName
=
utility::to_wstring
(description.getString(
"mainMenuName"
), codepage);
19
20
mainMenuItems
= move(
const_cast<
vector<jsonObject>&
>
(description.getArray(
"mainMenuItems"
)));
21
22
popupItems
= move(
const_cast<
vector<jsonObject>&
>
(description.getArray(
"popupItems"
)));
23
}
24
}
25
}
ISerializable.h
MenuParser.h
Utility.h
gui_framework::interfaces::ISerializable::getCodepage
static uint32_t getCodepage()
Definition
ISerializable.h:25
gui_framework::utility::to_wstring
wstring to_wstring(const string &stringToConvert, uint32_t codepage)
Definition
Utility.cpp:82
gui_framework
Definition
BaseComponent.cpp:21
gui_framework::parsers::MenuParser::mainMenuItems
std::vector< json::utility::jsonObject > mainMenuItems
Definition
MenuParser.h:12
gui_framework::parsers::MenuParser::popupItems
std::vector< json::utility::jsonObject > popupItems
Definition
MenuParser.h:13
gui_framework::parsers::MenuParser::mainMenuName
std::wstring mainMenuName
Definition
MenuParser.h:11
gui_framework::parsers::MenuParser::parse
void parse(json::utility::jsonObject &description)
Definition
MenuParser.cpp:12
GUIFramework
src
Deserialization
Parsers
MenuParser.cpp
Generated by
1.12.0