From c0f802594e17efd5b93d4019431bf1a6d24249c3 Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 20 Jan 2022 22:49:41 +0800 Subject: ... --- include/cru/ui/mapper/PointMapper.hpp | 2 -- include/cru/ui/mapper/SizeMapper.hpp | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 include/cru/ui/mapper/SizeMapper.hpp (limited to 'include/cru/ui/mapper') diff --git a/include/cru/ui/mapper/PointMapper.hpp b/include/cru/ui/mapper/PointMapper.hpp index 0fcb733f..5641af01 100644 --- a/include/cru/ui/mapper/PointMapper.hpp +++ b/include/cru/ui/mapper/PointMapper.hpp @@ -5,8 +5,6 @@ namespace cru::ui::mapper { class CRU_UI_API PointMapper : public BasicMapper { public: CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(PointMapper) - CRU_DELETE_COPY(PointMapper) - CRU_DELETE_MOVE(PointMapper) public: bool SupportMapFromString() override { return true; } diff --git a/include/cru/ui/mapper/SizeMapper.hpp b/include/cru/ui/mapper/SizeMapper.hpp new file mode 100644 index 00000000..20558bf4 --- /dev/null +++ b/include/cru/ui/mapper/SizeMapper.hpp @@ -0,0 +1,18 @@ +#pragma once +#include "Mapper.hpp" + +namespace cru::ui::mapper { +class CRU_UI_API SizeMapper : public BasicMapper { + public: + CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(SizeMapper) + + public: + bool SupportMapFromString() override { return true; } + bool SupportMapFromXml() override { return true; } + bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; + + protected: + std::unique_ptr DoMapFromString(String str) override; + std::unique_ptr DoMapFromXml(xml::XmlElementNode* node) override; +}; +} // namespace cru::ui::mapper -- cgit v1.2.3