Debian Codegraph @

wxcrafter/src/string_property.cpp

raw
1 #include "string_property.h"
2 #include <wx/textctrl.h>
3
4 StringProperty::StringProperty()
5 : MultiStringsProperty("", "", "\n", "")
6 {
7 }
8
9 StringProperty::~StringProperty() {}
10
11 wxString StringProperty::GetValue() const { return m_value; }
12
13 void StringProperty::SetValue(const wxString& value) { m_value = value; }
14
15 JSONElement StringProperty::Serialize() const
16 {
17 JSONElement json = JSONElement::createObject();
18 json.addProperty(wxT("type"), wxT("string"));
19 DoBaseSerialize(json);
20 json.addProperty(wxT("m_value"), m_value);
21 return json;
22 }
23
24 void StringProperty::UnSerialize(const JSONElement& json)
25 {
26 DoBaseUnSerialize(json);
27 m_value = json.namedObject(wxT("m_value")).toString();
28 }