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

namespace cru::ui::mapper::style {
class CRU_UI_API StyleRuleMapper : public BasicPtrMapper<ui::style::StyleRule> {
 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