aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/mapper/style/IConditionMapper.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/ui/mapper/style/IConditionMapper.hpp')
-rw-r--r--include/cru/ui/mapper/style/IConditionMapper.hpp17
1 files changed, 17 insertions, 0 deletions
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<MapperBase*>(this)->XmlElementIsOfThisType(node);
+ }
+
+ virtual ClonablePtr<ui::style::Condition> MapConditionFromXml(
+ xml::XmlElementNode* node) = 0;
+};
+} // namespace cru::ui::mapper::style