aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/mapper/style/StyleRuleMapper.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-01-24 20:26:58 +0800
committercrupest <crupest@outlook.com>2022-01-24 20:26:58 +0800
commit72402c09d45b696cd58a65b4a141a804e1cd9371 (patch)
tree4a8793a588370c071d576f144994495886d8e909 /include/cru/ui/mapper/style/StyleRuleMapper.hpp
parent549b072d241a8d2d1ca187bba8c1cb5190dd737e (diff)
downloadcru-72402c09d45b696cd58a65b4a141a804e1cd9371.tar.gz
cru-72402c09d45b696cd58a65b4a141a804e1cd9371.tar.bz2
cru-72402c09d45b696cd58a65b4a141a804e1cd9371.zip
...
Diffstat (limited to 'include/cru/ui/mapper/style/StyleRuleMapper.hpp')
-rw-r--r--include/cru/ui/mapper/style/StyleRuleMapper.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/cru/ui/mapper/style/StyleRuleMapper.hpp b/include/cru/ui/mapper/style/StyleRuleMapper.hpp
new file mode 100644
index 00000000..ce5ccf00
--- /dev/null
+++ b/include/cru/ui/mapper/style/StyleRuleMapper.hpp
@@ -0,0 +1,20 @@
+#pragma once
+#include "../Mapper.hpp"
+#include "cru/common/ClonablePtr.hpp"
+#include "cru/ui/style/StyleRule.hpp"
+#include "cru/xml/XmlNode.hpp"
+
+namespace cru::ui::mapper::style {
+class CRU_UI_API StyleRuleMapper : public BasicPtrMapper<ui::style::StyleRule> {
+ public:
+ CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(StyleRuleMapper)
+
+ public:
+ bool SupportMapFromXml() override { return true; }
+ bool XmlElementIsOfThisType(xml::XmlElementNode* node) override;
+
+ protected:
+ ClonablePtr<ui::style::StyleRule> DoMapFromXml(
+ xml::XmlElementNode* node) override;
+};
+} // namespace cru::ui::mapper::style