aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-01-20 22:28:25 +0800
committercrupest <crupest@outlook.com>2022-01-20 22:28:25 +0800
commit6f26995173d8ad46e347afc2ebd27573cee98ce7 (patch)
treed26ed750bb1a0e148f6eb05f923b3b6f6e54dc53 /include/cru/ui
parentb68d2027fe7505c14899db9fa1496b5ace09e25f (diff)
downloadcru-6f26995173d8ad46e347afc2ebd27573cee98ce7.tar.gz
cru-6f26995173d8ad46e347afc2ebd27573cee98ce7.tar.bz2
cru-6f26995173d8ad46e347afc2ebd27573cee98ce7.zip
...
Diffstat (limited to 'include/cru/ui')
-rw-r--r--include/cru/ui/mapper/PointMapper.hpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/cru/ui/mapper/PointMapper.hpp b/include/cru/ui/mapper/PointMapper.hpp
index 0f7f39fe..0fcb733f 100644
--- a/include/cru/ui/mapper/PointMapper.hpp
+++ b/include/cru/ui/mapper/PointMapper.hpp
@@ -1,4 +1,20 @@
#pragma once
#include "Mapper.hpp"
-namespace cru::ui::mapper {}
+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; }
+ bool SupportMapFromXml() override { return true; }
+ bool XmlElementIsOfThisType(xml::XmlElementNode* node) override;
+
+ protected:
+ std::unique_ptr<Point> DoMapFromString(String str) override;
+ std::unique_ptr<Point> DoMapFromXml(xml::XmlElementNode* node) override;
+};
+} // namespace cru::ui::mapper