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"
5
6using namespace std;
7
8namespace 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}
wstring to_wstring(const string &stringToConvert, uint32_t codepage)
Definition Utility.cpp:82
std::vector< json::utility::jsonObject > mainMenuItems
Definition MenuParser.h:12
std::vector< json::utility::jsonObject > popupItems
Definition MenuParser.h:13
void parse(json::utility::jsonObject &description)