aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/mapper/style/StyleRuleMapper.h
blob: 21bf317613511c6026a08bbafc572cc3e39af6e3 (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/common/Base.h"
#include "cru/common/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(u"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