4 #include "SchemaAttribute.hpp"
13 typedef std::set<Slot> Slots;
19 typedef std::map<QByteArray, Range<unsigned> > SlotRanges;
23 size_t operator()(
const Slot& slot)
const
25 return std::hash<QByteArray>()(slot.name());
49 SlotType type()
const;
50 void setType(SlotType type);
52 void setName(
const QByteArray& name);
53 const QByteArray& name()
const;
55 void setRange(Range<unsigned> r);
56 void setRange(Range<unsigned> r,
const QByteArray & keyword);
57 void setRange(
const SlotRanges & ranges);
58 Range<unsigned> range()
const;
59 Range<unsigned> range(
const QByteArray & keyword)
const;
61 static Slot parse(
const QVariantMap& map);
62 static SlotType stringTotype(
const QString& type);
65 const SchemaAttributeMap& attributes()
const;
66 const Slots& nodeSlots()
const;
70 bool operator<(
const Slot& slot)
const;
71 bool operator==(
const Slot& slot)
const;
76 std::map<QByteArray, Range<unsigned> > m_range;
77 Range<unsigned> m_defaultRange;
80 SchemaAttributeMap m_nodeAttributes;
84 std::unique_ptr<Slots> m_nodeSlots{
new Slots()};