blob: ca6cf0b36ef0827bb490e602f5868854eb205c64 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include "cru/ui/mapper/Mapper.h"
#include "cru/base/StringUtil.h"
#include <typeindex>
namespace cru::ui::mapper {
MapperBase::MapperBase(std::type_index type_index)
: type_index_(std::move(type_index)) {}
bool MapperBase::XmlElementIsOfThisType(xml::XmlElementNode* node) {
for (const auto& tag : allowed_tags_) {
if (cru::string::CaseInsensitiveCompare(node->GetTag(), tag.ToUtf8()) ==
0) {
return true;
}
}
return false;
}
} // namespace cru::ui::mapper
|