7 #include <unordered_map>
8 #include <unordered_set>
13 #include "SchemaAttribute.hpp"
16 #include <boost/expected/expected.hpp>
20 enum class EventDirection
25 typedef std::unordered_set<QByteArray> Events;
35 const std::unordered_set<QByteArray>& roles()
const;
36 const Slots& componentSlots()
const;
37 QByteArray subtype()
const;
40 const Events & events(EventDirection type)
const;
44 bool passEvents(EventDirection type)
const;
46 void parse(
const QString& path);
47 void parseSlots(
const QVariantMap& slotMap);
49 void addSlot(
const Slot& slot);
51 static void parseSchemaAttributes(SchemaAttributeMap& attrs,
const QVariantList &list);
53 const SchemaAttributeMap & attributes()
const;
55 bool isValidAttribute(
const QByteArray & name)
const;
57 bool dataGatheringEnabled()
const;
60 void includeSchema(
const QString & path);
62 std::unordered_set<QByteArray> m_roles;
69 boost::expected<bool> m_passEventsIn;
70 boost::expected<bool> m_passEventsOut;
71 boost::expected<bool> m_dataGathering;
74 SchemaAttributeMap m_attributes;