diff options
author | crupest <crupest@outlook.com> | 2022-01-20 22:49:41 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-01-20 22:49:41 +0800 |
commit | c0f802594e17efd5b93d4019431bf1a6d24249c3 (patch) | |
tree | 408c1a212f02a11ba84eb3911137f272f3862799 /include/cru/ui/mapper | |
parent | 6f26995173d8ad46e347afc2ebd27573cee98ce7 (diff) | |
download | cru-c0f802594e17efd5b93d4019431bf1a6d24249c3.tar.gz cru-c0f802594e17efd5b93d4019431bf1a6d24249c3.tar.bz2 cru-c0f802594e17efd5b93d4019431bf1a6d24249c3.zip |
...
Diffstat (limited to 'include/cru/ui/mapper')
-rw-r--r-- | include/cru/ui/mapper/PointMapper.hpp | 2 | ||||
-rw-r--r-- | include/cru/ui/mapper/SizeMapper.hpp | 18 |
2 files changed, 18 insertions, 2 deletions
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<Point> { 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<Size> { + 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<Size> DoMapFromString(String str) override; + std::unique_ptr<Size> DoMapFromXml(xml::XmlElementNode* node) override; +}; +} // namespace cru::ui::mapper |