From 1cc6e51838fcd5fc986dbb3e13bbb85f11a348be Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 24 Jan 2022 17:52:47 +0800 Subject: ... --- include/cru/ui/mapper/style/IConditionMapper.hpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 include/cru/ui/mapper/style/IConditionMapper.hpp (limited to 'include/cru/ui/mapper/style/IConditionMapper.hpp') diff --git a/include/cru/ui/mapper/style/IConditionMapper.hpp b/include/cru/ui/mapper/style/IConditionMapper.hpp new file mode 100644 index 00000000..f5d7ad1e --- /dev/null +++ b/include/cru/ui/mapper/style/IConditionMapper.hpp @@ -0,0 +1,17 @@ +#pragma once +#include "../../Base.hpp" +#include "cru/common/ClonablePtr.hpp" +#include "cru/ui/mapper/Mapper.hpp" +#include "cru/ui/style/Condition.hpp" +#include "cru/xml/XmlNode.hpp" + +namespace cru::ui::mapper::style { +struct IConditionMapper : virtual Interface { + bool XmlElementIsOfThisType(xml::XmlElementNode* node) { + return dynamic_cast(this)->XmlElementIsOfThisType(node); + } + + virtual ClonablePtr MapConditionFromXml( + xml::XmlElementNode* node) = 0; +}; +} // namespace cru::ui::mapper::style -- cgit v1.2.3