From 74bb9cd27242b9320f99ff4d2b50c3051576cc14 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 8 Feb 2022 16:53:51 +0800 Subject: ... --- include/cru/ui/mapper/style/AndConditionMapper.h | 25 +++++++++++++++++++ include/cru/ui/mapper/style/AndConditionMapper.hpp | 25 ------------------- include/cru/ui/mapper/style/BorderStylerMapper.h | 28 +++++++++++++++++++++ include/cru/ui/mapper/style/BorderStylerMapper.hpp | 28 --------------------- .../ui/mapper/style/ClickStateConditionMapper.h | 26 +++++++++++++++++++ .../ui/mapper/style/ClickStateConditionMapper.hpp | 26 ------------------- include/cru/ui/mapper/style/CursorStylerMapper.h | 26 +++++++++++++++++++ include/cru/ui/mapper/style/CursorStylerMapper.hpp | 26 ------------------- include/cru/ui/mapper/style/FocusConditionMapper.h | 26 +++++++++++++++++++ .../cru/ui/mapper/style/FocusConditionMapper.hpp | 26 ------------------- include/cru/ui/mapper/style/HoverConditionMapper.h | 26 +++++++++++++++++++ .../cru/ui/mapper/style/HoverConditionMapper.hpp | 26 ------------------- include/cru/ui/mapper/style/IConditionMapper.h | 17 +++++++++++++ include/cru/ui/mapper/style/IConditionMapper.hpp | 17 ------------- include/cru/ui/mapper/style/IStylerMapper.h | 17 +++++++++++++ include/cru/ui/mapper/style/IStylerMapper.hpp | 17 ------------- include/cru/ui/mapper/style/NoConditionMapper.h | 29 ++++++++++++++++++++++ include/cru/ui/mapper/style/NoConditionMapper.hpp | 29 ---------------------- include/cru/ui/mapper/style/OrConditionMapper.h | 25 +++++++++++++++++++ include/cru/ui/mapper/style/OrConditionMapper.hpp | 25 ------------------- include/cru/ui/mapper/style/StyleRuleMapper.h | 20 +++++++++++++++ include/cru/ui/mapper/style/StyleRuleMapper.hpp | 20 --------------- include/cru/ui/mapper/style/StyleRuleSetMapper.h | 21 ++++++++++++++++ include/cru/ui/mapper/style/StyleRuleSetMapper.hpp | 21 ---------------- 24 files changed, 286 insertions(+), 286 deletions(-) create mode 100644 include/cru/ui/mapper/style/AndConditionMapper.h delete mode 100644 include/cru/ui/mapper/style/AndConditionMapper.hpp create mode 100644 include/cru/ui/mapper/style/BorderStylerMapper.h delete mode 100644 include/cru/ui/mapper/style/BorderStylerMapper.hpp create mode 100644 include/cru/ui/mapper/style/ClickStateConditionMapper.h delete mode 100644 include/cru/ui/mapper/style/ClickStateConditionMapper.hpp create mode 100644 include/cru/ui/mapper/style/CursorStylerMapper.h delete mode 100644 include/cru/ui/mapper/style/CursorStylerMapper.hpp create mode 100644 include/cru/ui/mapper/style/FocusConditionMapper.h delete mode 100644 include/cru/ui/mapper/style/FocusConditionMapper.hpp create mode 100644 include/cru/ui/mapper/style/HoverConditionMapper.h delete mode 100644 include/cru/ui/mapper/style/HoverConditionMapper.hpp create mode 100644 include/cru/ui/mapper/style/IConditionMapper.h delete mode 100644 include/cru/ui/mapper/style/IConditionMapper.hpp create mode 100644 include/cru/ui/mapper/style/IStylerMapper.h delete mode 100644 include/cru/ui/mapper/style/IStylerMapper.hpp create mode 100644 include/cru/ui/mapper/style/NoConditionMapper.h delete mode 100644 include/cru/ui/mapper/style/NoConditionMapper.hpp create mode 100644 include/cru/ui/mapper/style/OrConditionMapper.h delete mode 100644 include/cru/ui/mapper/style/OrConditionMapper.hpp create mode 100644 include/cru/ui/mapper/style/StyleRuleMapper.h delete mode 100644 include/cru/ui/mapper/style/StyleRuleMapper.hpp create mode 100644 include/cru/ui/mapper/style/StyleRuleSetMapper.h delete mode 100644 include/cru/ui/mapper/style/StyleRuleSetMapper.hpp (limited to 'include/cru/ui/mapper/style') diff --git a/include/cru/ui/mapper/style/AndConditionMapper.h b/include/cru/ui/mapper/style/AndConditionMapper.h new file mode 100644 index 00000000..142637a7 --- /dev/null +++ b/include/cru/ui/mapper/style/AndConditionMapper.h @@ -0,0 +1,25 @@ +#pragma once +#include "../Mapper.h" +#include "IConditionMapper.h" + +namespace cru::ui::mapper::style { +class CRU_UI_API AndConditionMapper + : public BasicPtrMapper, + public virtual IConditionMapper { + public: + CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(AndConditionMapper) + + public: + bool SupportMapFromXml() override { return true; } + bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; + + ClonablePtr MapConditionFromXml( + xml::XmlElementNode* node) override { + return MapFromXml(node); + } + + protected: + ClonablePtr DoMapFromXml( + xml::XmlElementNode* node) override; +}; +} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/AndConditionMapper.hpp b/include/cru/ui/mapper/style/AndConditionMapper.hpp deleted file mode 100644 index 747e496d..00000000 --- a/include/cru/ui/mapper/style/AndConditionMapper.hpp +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once -#include "../Mapper.hpp" -#include "IConditionMapper.hpp" - -namespace cru::ui::mapper::style { -class CRU_UI_API AndConditionMapper - : public BasicPtrMapper, - public virtual IConditionMapper { - public: - CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(AndConditionMapper) - - public: - bool SupportMapFromXml() override { return true; } - bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; - - ClonablePtr MapConditionFromXml( - xml::XmlElementNode* node) override { - return MapFromXml(node); - } - - protected: - ClonablePtr DoMapFromXml( - xml::XmlElementNode* node) override; -}; -} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/BorderStylerMapper.h b/include/cru/ui/mapper/style/BorderStylerMapper.h new file mode 100644 index 00000000..da09989b --- /dev/null +++ b/include/cru/ui/mapper/style/BorderStylerMapper.h @@ -0,0 +1,28 @@ +#pragma once +#include "../Mapper.h" +#include "cru/common/ClonablePtr.h" +#include "cru/ui/mapper/style/IStylerMapper.h" +#include "cru/ui/style/Styler.h" +#include "cru/xml/XmlNode.h" + +namespace cru::ui::mapper::style { +class CRU_UI_API BorderStylerMapper + : public BasicPtrMapper, + public virtual IStylerMapper { + public: + CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(BorderStylerMapper) + + public: + bool SupportMapFromXml() override { return true; } + bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; + + ClonablePtr MapStylerFromXml( + xml::XmlElementNode* node) override { + return MapFromXml(node); + } + + protected: + ClonablePtr DoMapFromXml( + xml::XmlElementNode* node) override; +}; +} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/BorderStylerMapper.hpp b/include/cru/ui/mapper/style/BorderStylerMapper.hpp deleted file mode 100644 index 2f48550c..00000000 --- a/include/cru/ui/mapper/style/BorderStylerMapper.hpp +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once -#include "../Mapper.hpp" -#include "cru/common/ClonablePtr.hpp" -#include "cru/ui/mapper/style/IStylerMapper.hpp" -#include "cru/ui/style/Styler.hpp" -#include "cru/xml/XmlNode.hpp" - -namespace cru::ui::mapper::style { -class CRU_UI_API BorderStylerMapper - : public BasicPtrMapper, - public virtual IStylerMapper { - public: - CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(BorderStylerMapper) - - public: - bool SupportMapFromXml() override { return true; } - bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; - - ClonablePtr MapStylerFromXml( - xml::XmlElementNode* node) override { - return MapFromXml(node); - } - - protected: - ClonablePtr DoMapFromXml( - xml::XmlElementNode* node) override; -}; -} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/ClickStateConditionMapper.h b/include/cru/ui/mapper/style/ClickStateConditionMapper.h new file mode 100644 index 00000000..0c25646c --- /dev/null +++ b/include/cru/ui/mapper/style/ClickStateConditionMapper.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 ClickStateConditionMapper + : public BasicPtrMapper, + public virtual IConditionMapper { + public: + CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(ClickStateConditionMapper) + + public: + bool SupportMapFromXml() override { return true; } + bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; + + ClonablePtr MapConditionFromXml( + xml::XmlElementNode* node) override { + return MapFromXml(node); + } + + public: + ClonablePtr DoMapFromXml( + xml::XmlElementNode* node) override; +}; +} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/ClickStateConditionMapper.hpp b/include/cru/ui/mapper/style/ClickStateConditionMapper.hpp deleted file mode 100644 index 63577641..00000000 --- a/include/cru/ui/mapper/style/ClickStateConditionMapper.hpp +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once -#include "../Mapper.hpp" -#include "IConditionMapper.hpp" -#include "cru/ui/style/Condition.hpp" - -namespace cru::ui::mapper::style { -class CRU_UI_API ClickStateConditionMapper - : public BasicPtrMapper, - public virtual IConditionMapper { - public: - CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(ClickStateConditionMapper) - - public: - bool SupportMapFromXml() override { return true; } - bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; - - ClonablePtr MapConditionFromXml( - xml::XmlElementNode* node) override { - return MapFromXml(node); - } - - public: - ClonablePtr DoMapFromXml( - xml::XmlElementNode* node) override; -}; -} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/CursorStylerMapper.h b/include/cru/ui/mapper/style/CursorStylerMapper.h new file mode 100644 index 00000000..37c3ade9 --- /dev/null +++ b/include/cru/ui/mapper/style/CursorStylerMapper.h @@ -0,0 +1,26 @@ +#pragma once +#include "../Mapper.h" +#include "cru/ui/mapper/style/IStylerMapper.h" +#include "cru/ui/style/Styler.h" + +namespace cru::ui::mapper::style { +class CRU_UI_API CursorStylerMapper + : public BasicPtrMapper, + public virtual IStylerMapper { + public: + CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(CursorStylerMapper) + + public: + bool SupportMapFromXml() override { return true; } + bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; + + ClonablePtr MapStylerFromXml( + xml::XmlElementNode* node) override { + return MapFromXml(node); + } + + protected: + ClonablePtr DoMapFromXml( + xml::XmlElementNode* node) override; +}; +} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/CursorStylerMapper.hpp b/include/cru/ui/mapper/style/CursorStylerMapper.hpp deleted file mode 100644 index 2b0c62a8..00000000 --- a/include/cru/ui/mapper/style/CursorStylerMapper.hpp +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once -#include "../Mapper.hpp" -#include "cru/ui/mapper/style/IStylerMapper.hpp" -#include "cru/ui/style/Styler.hpp" - -namespace cru::ui::mapper::style { -class CRU_UI_API CursorStylerMapper - : public BasicPtrMapper, - public virtual IStylerMapper { - public: - CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(CursorStylerMapper) - - public: - bool SupportMapFromXml() override { return true; } - bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; - - ClonablePtr MapStylerFromXml( - xml::XmlElementNode* node) override { - return MapFromXml(node); - } - - protected: - ClonablePtr DoMapFromXml( - xml::XmlElementNode* node) override; -}; -} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/FocusConditionMapper.h b/include/cru/ui/mapper/style/FocusConditionMapper.h new file mode 100644 index 00000000..bc7264d1 --- /dev/null +++ b/include/cru/ui/mapper/style/FocusConditionMapper.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 FocusConditionMapper + : public BasicPtrMapper, + public virtual IConditionMapper { + public: + CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(FocusConditionMapper) + + public: + bool SupportMapFromXml() override { return true; } + bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; + + ClonablePtr MapConditionFromXml( + xml::XmlElementNode* node) override { + return MapFromXml(node); + } + + protected: + ClonablePtr DoMapFromXml( + xml::XmlElementNode* node) override; +}; +} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/FocusConditionMapper.hpp b/include/cru/ui/mapper/style/FocusConditionMapper.hpp deleted file mode 100644 index 00809850..00000000 --- a/include/cru/ui/mapper/style/FocusConditionMapper.hpp +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once -#include "../Mapper.hpp" -#include "IConditionMapper.hpp" -#include "cru/ui/style/Condition.hpp" - -namespace cru::ui::mapper::style { -class CRU_UI_API FocusConditionMapper - : public BasicPtrMapper, - public virtual IConditionMapper { - public: - CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(FocusConditionMapper) - - public: - bool SupportMapFromXml() override { return true; } - bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; - - ClonablePtr MapConditionFromXml( - xml::XmlElementNode* node) override { - return MapFromXml(node); - } - - protected: - ClonablePtr DoMapFromXml( - xml::XmlElementNode* node) override; -}; -} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/HoverConditionMapper.h b/include/cru/ui/mapper/style/HoverConditionMapper.h new file mode 100644 index 00000000..c897f672 --- /dev/null +++ b/include/cru/ui/mapper/style/HoverConditionMapper.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 HoverConditionMapper + : public BasicPtrMapper, + public virtual IConditionMapper { + public: + CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(HoverConditionMapper) + + public: + bool SupportMapFromXml() override { return true; } + bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; + + ClonablePtr MapConditionFromXml( + xml::XmlElementNode* node) override { + return MapFromXml(node); + } + + protected: + ClonablePtr DoMapFromXml( + xml::XmlElementNode* node) override; +}; +} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/HoverConditionMapper.hpp b/include/cru/ui/mapper/style/HoverConditionMapper.hpp deleted file mode 100644 index bbd840f0..00000000 --- a/include/cru/ui/mapper/style/HoverConditionMapper.hpp +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once -#include "../Mapper.hpp" -#include "IConditionMapper.hpp" -#include "cru/ui/style/Condition.hpp" - -namespace cru::ui::mapper::style { -class CRU_UI_API HoverConditionMapper - : public BasicPtrMapper, - public virtual IConditionMapper { - public: - CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(HoverConditionMapper) - - public: - bool SupportMapFromXml() override { return true; } - bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; - - ClonablePtr MapConditionFromXml( - xml::XmlElementNode* node) override { - return MapFromXml(node); - } - - protected: - ClonablePtr DoMapFromXml( - xml::XmlElementNode* node) override; -}; -} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/IConditionMapper.h b/include/cru/ui/mapper/style/IConditionMapper.h new file mode 100644 index 00000000..7610dc8d --- /dev/null +++ b/include/cru/ui/mapper/style/IConditionMapper.h @@ -0,0 +1,17 @@ +#pragma once +#include "../../Base.h" +#include "cru/common/ClonablePtr.h" +#include "cru/ui/mapper/Mapper.h" +#include "cru/ui/style/Condition.h" +#include "cru/xml/XmlNode.h" + +namespace cru::ui::mapper::style { +struct CRU_UI_API 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 diff --git a/include/cru/ui/mapper/style/IConditionMapper.hpp b/include/cru/ui/mapper/style/IConditionMapper.hpp deleted file mode 100644 index 3fa7d10a..00000000 --- a/include/cru/ui/mapper/style/IConditionMapper.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#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 CRU_UI_API 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 diff --git a/include/cru/ui/mapper/style/IStylerMapper.h b/include/cru/ui/mapper/style/IStylerMapper.h new file mode 100644 index 00000000..4c2ecd16 --- /dev/null +++ b/include/cru/ui/mapper/style/IStylerMapper.h @@ -0,0 +1,17 @@ +#pragma once +#include "../../Base.h" +#include "cru/common/ClonablePtr.h" +#include "cru/ui/mapper/Mapper.h" +#include "cru/ui/style/Styler.h" +#include "cru/xml/XmlNode.h" + +namespace cru::ui::mapper::style { +struct CRU_UI_API IStylerMapper : virtual Interface { + bool XmlElementIsOfThisType(xml::XmlElementNode* node) { + return dynamic_cast(this)->XmlElementIsOfThisType(node); + } + + virtual ClonablePtr MapStylerFromXml( + xml::XmlElementNode* node) = 0; +}; +} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/IStylerMapper.hpp b/include/cru/ui/mapper/style/IStylerMapper.hpp deleted file mode 100644 index d00f39be..00000000 --- a/include/cru/ui/mapper/style/IStylerMapper.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once -#include "../../Base.hpp" -#include "cru/common/ClonablePtr.hpp" -#include "cru/ui/mapper/Mapper.hpp" -#include "cru/ui/style/Styler.hpp" -#include "cru/xml/XmlNode.hpp" - -namespace cru::ui::mapper::style { -struct CRU_UI_API IStylerMapper : virtual Interface { - bool XmlElementIsOfThisType(xml::XmlElementNode* node) { - return dynamic_cast(this)->XmlElementIsOfThisType(node); - } - - virtual ClonablePtr MapStylerFromXml( - xml::XmlElementNode* node) = 0; -}; -} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/NoConditionMapper.h b/include/cru/ui/mapper/style/NoConditionMapper.h new file mode 100644 index 00000000..bc7ce623 --- /dev/null +++ b/include/cru/ui/mapper/style/NoConditionMapper.h @@ -0,0 +1,29 @@ +#pragma once +#include "../Mapper.h" +#include "IConditionMapper.h" +#include "cru/common/Base.h" +#include "cru/common/ClonablePtr.h" +#include "cru/ui/style/Condition.h" +#include "cru/xml/XmlNode.h" + +namespace cru::ui::mapper::style { +class CRU_UI_API NoConditionMapper + : public BasicPtrMapper, + public virtual IConditionMapper { + public: + CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(NoConditionMapper) + + public: + bool SupportMapFromXml() override { return true; } + bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; + + ClonablePtr MapConditionFromXml( + xml::XmlElementNode* node) override { + return MapFromXml(node); + } + + protected: + ClonablePtr DoMapFromXml( + xml::XmlElementNode* node) override; +}; +} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/NoConditionMapper.hpp b/include/cru/ui/mapper/style/NoConditionMapper.hpp deleted file mode 100644 index ed3a9699..00000000 --- a/include/cru/ui/mapper/style/NoConditionMapper.hpp +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once -#include "../Mapper.hpp" -#include "IConditionMapper.hpp" -#include "cru/common/Base.hpp" -#include "cru/common/ClonablePtr.hpp" -#include "cru/ui/style/Condition.hpp" -#include "cru/xml/XmlNode.hpp" - -namespace cru::ui::mapper::style { -class CRU_UI_API NoConditionMapper - : public BasicPtrMapper, - public virtual IConditionMapper { - public: - CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(NoConditionMapper) - - public: - bool SupportMapFromXml() override { return true; } - bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; - - ClonablePtr MapConditionFromXml( - xml::XmlElementNode* node) override { - return MapFromXml(node); - } - - protected: - ClonablePtr DoMapFromXml( - xml::XmlElementNode* node) override; -}; -} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/OrConditionMapper.h b/include/cru/ui/mapper/style/OrConditionMapper.h new file mode 100644 index 00000000..e93484b4 --- /dev/null +++ b/include/cru/ui/mapper/style/OrConditionMapper.h @@ -0,0 +1,25 @@ +#pragma once +#include "../Mapper.h" +#include "IConditionMapper.h" + +namespace cru::ui::mapper::style { +class CRU_UI_API OrConditionMapper + : public BasicPtrMapper, + public virtual IConditionMapper { + public: + CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(OrConditionMapper) + + public: + bool SupportMapFromXml() override { return true; } + bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; + + ClonablePtr MapConditionFromXml( + xml::XmlElementNode* node) override { + return MapFromXml(node); + } + + protected: + ClonablePtr DoMapFromXml( + xml::XmlElementNode* node) override; +}; +} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/OrConditionMapper.hpp b/include/cru/ui/mapper/style/OrConditionMapper.hpp deleted file mode 100644 index 21a402c2..00000000 --- a/include/cru/ui/mapper/style/OrConditionMapper.hpp +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once -#include "../Mapper.hpp" -#include "IConditionMapper.hpp" - -namespace cru::ui::mapper::style { -class CRU_UI_API OrConditionMapper - : public BasicPtrMapper, - public virtual IConditionMapper { - public: - CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(OrConditionMapper) - - public: - bool SupportMapFromXml() override { return true; } - bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; - - ClonablePtr MapConditionFromXml( - xml::XmlElementNode* node) override { - return MapFromXml(node); - } - - protected: - ClonablePtr DoMapFromXml( - xml::XmlElementNode* node) override; -}; -} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/StyleRuleMapper.h b/include/cru/ui/mapper/style/StyleRuleMapper.h new file mode 100644 index 00000000..cba4872c --- /dev/null +++ b/include/cru/ui/mapper/style/StyleRuleMapper.h @@ -0,0 +1,20 @@ +#pragma once +#include "../Mapper.h" +#include "cru/common/ClonablePtr.h" +#include "cru/ui/style/StyleRule.h" +#include "cru/xml/XmlNode.h" + +namespace cru::ui::mapper::style { +class CRU_UI_API StyleRuleMapper : public BasicPtrMapper { + public: + CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(StyleRuleMapper) + + public: + bool SupportMapFromXml() override { return true; } + bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; + + protected: + ClonablePtr DoMapFromXml( + xml::XmlElementNode* node) override; +}; +} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/StyleRuleMapper.hpp b/include/cru/ui/mapper/style/StyleRuleMapper.hpp deleted file mode 100644 index ce5ccf00..00000000 --- a/include/cru/ui/mapper/style/StyleRuleMapper.hpp +++ /dev/null @@ -1,20 +0,0 @@ -#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 { - public: - CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(StyleRuleMapper) - - public: - bool SupportMapFromXml() override { return true; } - bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; - - protected: - ClonablePtr DoMapFromXml( - xml::XmlElementNode* node) override; -}; -} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/StyleRuleSetMapper.h b/include/cru/ui/mapper/style/StyleRuleSetMapper.h new file mode 100644 index 00000000..95f745e5 --- /dev/null +++ b/include/cru/ui/mapper/style/StyleRuleSetMapper.h @@ -0,0 +1,21 @@ +#pragma once +#include +#include "../../style/StyleRuleSet.h" +#include "../Mapper.h" + +namespace cru::ui::mapper::style { +class CRU_UI_API StyleRuleSetMapper + : public BasicRefMapper { + public: + CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(StyleRuleSetMapper) + + public: + bool SupportMapFromXml() override { return true; } + bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; + + protected: + std::shared_ptr DoMapFromXml( + xml::XmlElementNode* node) override; +}; +; +} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/StyleRuleSetMapper.hpp b/include/cru/ui/mapper/style/StyleRuleSetMapper.hpp deleted file mode 100644 index 66b95f4a..00000000 --- a/include/cru/ui/mapper/style/StyleRuleSetMapper.hpp +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once -#include -#include "../../style/StyleRuleSet.hpp" -#include "../Mapper.hpp" - -namespace cru::ui::mapper::style { -class CRU_UI_API StyleRuleSetMapper - : public BasicRefMapper { - public: - CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(StyleRuleSetMapper) - - public: - bool SupportMapFromXml() override { return true; } - bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; - - protected: - std::shared_ptr DoMapFromXml( - xml::XmlElementNode* node) override; -}; -; -} // namespace cru::ui::mapper::style -- cgit v1.2.3