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

namespace cru::ui::mapper::style {
struct CRU_UI_API IConditionMapper : virtual Interface {
  bool XmlElementIsOfThisType(xml::XmlElementNode* node) {
    return dynamic_cast<MapperBase*>(this)->XmlElementIsOfThisType(node);
  }

  virtual ClonablePtr<ui::style::Condition> MapConditionFromXml(
      xml::XmlElementNode* node) = 0;
};
}  // namespace cru::ui::mapper::style