GUIFramework
1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
ComboBoxParser.cpp
Go to the documentation of this file.
1
#include "
ComboBoxParser.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
ComboBoxParser::parse
(
const
json::utility::jsonObject& description)
13
{
14
BaseComponentParser::parse
(description);
15
16
vector<string> tem = json::utility::JSONArrayWrapper(description.getArray(
"comboBoxValues"
)).getAsStringArray();
17
uint32_t codepage =
interfaces::ISerializable::getCodepage
();
18
19
values
.reserve(tem.size());
20
21
for
(
const
auto
& i : tem)
22
{
23
values
.emplace_back(
utility::to_wstring
(i, codepage));
24
}
25
26
functionName
= description.getString(
"functionName"
);
27
moduleName
= description.getString(
"moduleName"
);
28
}
29
}
30
}
ComboBoxParser.h
ISerializable.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::BaseComponentParser::parse
virtual void parse(const json::utility::jsonObject &description)
Definition
BaseComponentParser.cpp:20
gui_framework::parsers::ComboBoxParser::moduleName
std::string moduleName
Definition
ComboBoxParser.h:14
gui_framework::parsers::ComboBoxParser::parse
void parse(const json::utility::jsonObject &description) override
Definition
ComboBoxParser.cpp:12
gui_framework::parsers::ComboBoxParser::functionName
std::string functionName
Definition
ComboBoxParser.h:13
gui_framework::parsers::ComboBoxParser::values
std::vector< std::wstring > values
Definition
ComboBoxParser.h:12
GUIFramework
src
Deserialization
Parsers
ComboBoxParser.cpp
Generated by
1.12.0