aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/mapper/style/OrConditionMapper.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-01-24 17:52:47 +0800
committercrupest <crupest@outlook.com>2022-01-24 17:52:47 +0800
commit1cc6e51838fcd5fc986dbb3e13bbb85f11a348be (patch)
tree438ed0961b708139f2c3f8429052a737e0b8e334 /include/cru/ui/mapper/style/OrConditionMapper.hpp
parent6d64ac7d354831b687aee1b7450d539411648888 (diff)
downloadcru-1cc6e51838fcd5fc986dbb3e13bbb85f11a348be.tar.gz
cru-1cc6e51838fcd5fc986dbb3e13bbb85f11a348be.tar.bz2
cru-1cc6e51838fcd5fc986dbb3e13bbb85f11a348be.zip
...
Diffstat (limited to 'include/cru/ui/mapper/style/OrConditionMapper.hpp')
-rw-r--r--include/cru/ui/mapper/style/OrConditionMapper.hpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/cru/ui/mapper/style/OrConditionMapper.hpp b/include/cru/ui/mapper/style/OrConditionMapper.hpp
new file mode 100644
index 00000000..252d8340
--- /dev/null
+++ b/include/cru/ui/mapper/style/OrConditionMapper.hpp
@@ -0,0 +1,24 @@
+#pragma once
+#include "../Mapper.hpp"
+#include "IConditionMapper.hpp"
+
+namespace cru::ui::mapper::style {
+class OrConditionMapper : public BasicPtrMapper<ui::style::OrCondition>,
+ public virtual IConditionMapper {
+ public:
+ CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(OrConditionMapper)
+
+ public:
+ bool SupportMapFromXml() override { return true; }
+ bool XmlElementIsOfThisType(xml::XmlElementNode* node) override;
+
+ ClonablePtr<ui::style::Condition> MapConditionFromXml(
+ xml::XmlElementNode* node) override {
+ return MapFromXml(node);
+ }
+
+ protected:
+ ClonablePtr<ui::style::OrCondition> DoMapFromXml(
+ xml::XmlElementNode* node) override;
+};
+} // namespace cru::ui::mapper::style