diff options
author | crupest <crupest@outlook.com> | 2022-02-23 21:37:11 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-02-23 21:37:11 +0800 |
commit | 9a3a9f487b24a7b1afff5e6f07e88096dc5755be (patch) | |
tree | 3aef99be8bf58509907d056bef469820d2a106b5 /include/cru/ui/mapper | |
parent | 603f46e195823530bafda97f0dda1a332cc39dc8 (diff) | |
download | cru-9a3a9f487b24a7b1afff5e6f07e88096dc5755be.tar.gz cru-9a3a9f487b24a7b1afff5e6f07e88096dc5755be.tar.bz2 cru-9a3a9f487b24a7b1afff5e6f07e88096dc5755be.zip |
...
Diffstat (limited to 'include/cru/ui/mapper')
-rw-r--r-- | include/cru/ui/mapper/style/CheckedConditionMapper.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/cru/ui/mapper/style/CheckedConditionMapper.h b/include/cru/ui/mapper/style/CheckedConditionMapper.h new file mode 100644 index 00000000..d62aba60 --- /dev/null +++ b/include/cru/ui/mapper/style/CheckedConditionMapper.h @@ -0,0 +1,26 @@ +#pragma once +#include "../Mapper.h" +#include "IConditionMapper.h" +#include "cru/ui/style/Condition.h" + +namespace cru::ui::mapper::style { +class CRU_UI_API CheckedConditionMapper + : public BasicPtrMapper<ui::style::CheckedCondition>, + public virtual IConditionMapper { + public: + CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(CheckedConditionMapper) + + 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::CheckedCondition> DoMapFromXml( + xml::XmlElementNode* node) override; +}; +} // namespace cru::ui::mapper::style |