11 namespace deserializers
15 using json::utility::jsonObject;
19 parser.
parse(description);
39 if (description.contains(
"children", json::utility::variantTypeEnum::jJSONArray))
41 const auto& children = description.getArray(
"children");
43 for (
const auto& i : children)
45 const auto& [componentName, data] = get<jsonObject>(i.data.front().second).data.front();
46 const auto& description = get<jsonObject>(data);
50 deserializer->deserialize(componentName, description, result);
std::unique_ptr< T > smartPointerType
Compatible smart pointer type.
Base class for all windows, controls, etc.
virtual void setTextColor(uint8_t red, uint8_t green, uint8_t blue)
Base class for all windows that has children windows.
void setOnDestroy(const std::function< void()> &onDestroy)
void setExitMode(exitMode mode)
virtual void setBackgroundColor(uint8_t red, uint8_t green, uint8_t blue) final override
const std::unordered_map< size_t, smartPointerType< utility::BaseComponentCreator > > & getCreators() const
Get all current registered creators.
const std::unordered_map< size_t, smartPointerType< interfaces::IDeserializer > > & getDeserializers() const
Get all current registered deserializers.
static GUIFramework & get()
Singleton instance access.
BaseComponent * deserialize(const std::string &componentName, const json::utility::jsonObject &description, BaseComposite *parent) const override
Created component pointer already handled by its parent.
static uint32_t getCodepage()
Base templated class for component creators.
virtual std::any getData() const
wstring to_wstring(const string &stringToConvert, uint32_t codepage)
std::array< uint8_t, 3 > backgroundColor
utility::ComponentSettings settings
std::array< uint8_t, 3 > textColor
Parse BaseComposite properties.
BaseComposite::exitMode mode
std::string windowFunctionName
std::string onDestroyFunctionName
virtual void parse(const json::utility::jsonObject &description) override
std::string onDestroyFunctionModuleName