diff options
Diffstat (limited to 'include/cru/ui')
-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 |