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