diff options
| author | Yuqian Yang <crupest@crupest.life> | 2025-12-15 21:27:33 +0800 |
|---|---|---|
| committer | Yuqian Yang <crupest@crupest.life> | 2025-12-15 21:27:33 +0800 |
| commit | c77072d586bf7aca58e6465ceab3d11a0be0021f (patch) | |
| tree | 83605be90fd32104ef74bbd1d84d900aaf0271ce /src/ui/mapper/style/HoverConditionMapper.cpp | |
| parent | bc3fa9650699046f3a87a620282ee43f26b2fa75 (diff) | |
| download | cru-c77072d586bf7aca58e6465ceab3d11a0be0021f.tar.gz cru-c77072d586bf7aca58e6465ceab3d11a0be0021f.tar.bz2 cru-c77072d586bf7aca58e6465ceab3d11a0be0021f.zip | |
Clean up mapper codes.
Diffstat (limited to 'src/ui/mapper/style/HoverConditionMapper.cpp')
| -rw-r--r-- | src/ui/mapper/style/HoverConditionMapper.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/ui/mapper/style/HoverConditionMapper.cpp b/src/ui/mapper/style/HoverConditionMapper.cpp deleted file mode 100644 index 7797ad7c..00000000 --- a/src/ui/mapper/style/HoverConditionMapper.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "cru/ui/mapper/style/HoverConditionMapper.h" -#include "cru/base/ClonePtr.h" -#include "cru/base/StringUtil.h" -#include "cru/ui/style/Condition.h" - -namespace cru::ui::mapper::style { -using namespace cru::ui::style; - -bool HoverConditionMapper::XmlElementIsOfThisType(xml::XmlElementNode* node) { - return cru::string::CaseInsensitiveCompare(node->GetTag(), - "HoverCondition") == 0; -} - -ClonePtr<HoverCondition> HoverConditionMapper::DoMapFromXml( - xml::XmlElementNode* node) { - auto value = node->GetAttributeValueCaseInsensitive("value"); - if (cru::string::CaseInsensitiveCompare(value, "true") == 0) { - return ui::style::HoverCondition::Create(true); - } else if (cru::string::CaseInsensitiveCompare(value, "false") == 0) { - return ui::style::HoverCondition::Create(false); - } else { - throw Exception("Invalid value for HoverCondition: " + value); - } -} -} // namespace cru::ui::mapper::style |
