From c77072d586bf7aca58e6465ceab3d11a0be0021f Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Mon, 15 Dec 2025 21:27:33 +0800 Subject: Clean up mapper codes. --- include/cru/ui/mapper/BorderStyleMapper.h | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'include/cru/ui/mapper/BorderStyleMapper.h') diff --git a/include/cru/ui/mapper/BorderStyleMapper.h b/include/cru/ui/mapper/BorderStyleMapper.h index fd84b0b0..41bbeff5 100644 --- a/include/cru/ui/mapper/BorderStyleMapper.h +++ b/include/cru/ui/mapper/BorderStyleMapper.h @@ -1,20 +1,25 @@ #pragma once +#include "../style/ApplyBorderStyleInfo.h" #include "Mapper.h" -#include "cru/ui/style/ApplyBorderStyleInfo.h" -#include "cru/base/xml/XmlNode.h" + +#include namespace cru::ui::mapper { +/** + * Example xml: + * ```xml + * + * + * + * + * + * + * + * ``` + */ class CRU_UI_API BorderStyleMapper : public BasicMapper { - public: - CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(BorderStyleMapper) - - public: - bool SupportMapFromXml() override { return true; } - bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; - - protected: - ui::style::ApplyBorderStyleInfo DoMapFromXml( - xml::XmlElementNode* node) override; + CRU_UI_DECLARE_CAN_MAP_FROM_XML_ELEMENT_TAG(BorderStyle, + ui::style::ApplyBorderStyleInfo) }; } // namespace cru::ui::mapper -- cgit v1.2.3