#include "cru/ui/mapper/style/FontStylerMapper.h" #include "cru/common/ClonablePtr.h" #include "cru/ui/mapper/MapperRegistry.h" namespace cru::ui::mapper::style { FontStylerMapper::FontStylerMapper() { SetAllowedTags({u"FontStyler"}); } FontStylerMapper::~FontStylerMapper() {} ClonablePtr FontStylerMapper::DoMapFromXml( xml::XmlElementNode* node) { auto font_mapper = MapperRegistry::GetInstance() ->GetSharedPtrMapper(); std::shared_ptr font; for (auto child_node : node->GetChildren()) { if (child_node->IsElementNode()) { font = font_mapper->MapFromXml(child_node->AsElement()); } } return ui::style::FontStyler::Create(std::move(font)); } } // namespace cru::ui::mapper::style