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/style/StyleRuleMapper.h | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'include/cru/ui/mapper/style/StyleRuleMapper.h') diff --git a/include/cru/ui/mapper/style/StyleRuleMapper.h b/include/cru/ui/mapper/style/StyleRuleMapper.h index 37790058..8ca47cce 100644 --- a/include/cru/ui/mapper/style/StyleRuleMapper.h +++ b/include/cru/ui/mapper/style/StyleRuleMapper.h @@ -1,24 +1,11 @@ #pragma once +#include "../../style/StyleRule.h" #include "../Mapper.h" -#include "cru/base/Base.h" -#include "cru/base/ClonePtr.h" -#include "cru/ui/style/StyleRule.h" -#include "cru/base/xml/XmlNode.h" namespace cru::ui::mapper::style { -class CRU_UI_API StyleRuleMapper : public BasicClonePtrMapper { - private: - constexpr static auto kLogTag = "StyleRuleMapper"; - - public: - CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(StyleRuleMapper) - - public: - bool SupportMapFromXml() override { return true; } - bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; - - protected: - ClonePtr DoMapFromXml( - xml::XmlElementNode* node) override; +class CRU_UI_API StyleRuleMapper + : public BasicClonePtrMapper { + CRU_UI_DECLARE_CAN_MAP_FROM_XML_ELEMENT_TAG(StyleRule, + ClonePtr) }; } // namespace cru::ui::mapper::style -- cgit v1.2.3