aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/mapper/style/StyleRuleMapper.h
blob: 12fcb85b78fc20be0255fba1679f0784da3822ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once
#include "../Mapper.h"
#include "cru/base/Base.h"
#include "cru/base/ClonablePtr.h"
#include "cru/ui/style/StyleRule.h"
#include "cru/xml/XmlNode.h"

namespace cru::ui::mapper::style {
class CRU_UI_API StyleRuleMapper : public BasicClonablePtrMapper<ui::style::StyleRule> {
  CRU_DEFINE_CLASS_LOG_TAG("StyleRuleMapper")
 public:
  CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(StyleRuleMapper)

 public:
  bool SupportMapFromXml() override { return true; }
  bool XmlElementIsOfThisType(xml::XmlElementNode* node) override;

 protected:
  ClonablePtr<ui::style::StyleRule> DoMapFromXml(
      xml::XmlElementNode* node) override;
};
}  // namespace cru::ui::mapper::style