aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/mapper
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-03-02 22:07:33 +0800
committercrupest <crupest@outlook.com>2022-03-02 22:07:33 +0800
commit57353bd3acd97957cb5f970016fec52977cc6e95 (patch)
tree6e47a50f33466f7bcdce7c7aa9bf15b82fe4a58a /include/cru/ui/mapper
parent7adfe813c23d20abe936aa0624fd68e0112717b3 (diff)
downloadcru-57353bd3acd97957cb5f970016fec52977cc6e95.tar.gz
cru-57353bd3acd97957cb5f970016fec52977cc6e95.tar.bz2
cru-57353bd3acd97957cb5f970016fec52977cc6e95.zip
...
Diffstat (limited to 'include/cru/ui/mapper')
-rw-r--r--include/cru/ui/mapper/StringMapper.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/cru/ui/mapper/StringMapper.h b/include/cru/ui/mapper/StringMapper.h
new file mode 100644
index 00000000..8a907591
--- /dev/null
+++ b/include/cru/ui/mapper/StringMapper.h
@@ -0,0 +1,18 @@
+#pragma once
+#include "Mapper.h"
+
+namespace cru::ui::mapper {
+class CRU_UI_API StringMapper : public BasicMapper<String> {
+ public:
+ StringMapper();
+ ~StringMapper();
+
+ public:
+ bool SupportMapFromString() override { return true; }
+ bool SupportMapFromXml() override { return true; }
+
+ protected:
+ String DoMapFromString(String str) override;
+ String DoMapFromXml(xml::XmlElementNode* node) override;
+};
+} // namespace cru::ui::mapper