Loading...
Searching...
No Matches
Message.hpp
1#pragma once
2#include <State/Address.hpp>
3#include <State/Value.hpp>
4namespace State
5{
14struct SCORE_LIB_STATE_EXPORT Message
15{
16 bool operator==(const Message& m) const noexcept
17 {
18 return address == m.address && value == m.value;
19 }
20
21 bool operator!=(const Message& m) const noexcept
22 {
23 return address != m.address || value != m.value;
24 }
25
26 // bool operator<(const Message& m) const noexcept { return
27 // address.toString() < m.address.toString(); }
28
29 QString toString() const;
30
31 AddressAccessor address;
32 Value value;
33};
34
35SCORE_LIB_STATE_EXPORT
36QDebug operator<<(QDebug s, const Message& mess);
37
38using MessageList = std::vector<Message>;
39inline bool operator<(const State::MessageList&, const State::MessageList&)
40{
41 return false;
42}
43}
44
45SCORE_SERIALIZE_DATASTREAM_DECLARE(SCORE_LIB_STATE_EXPORT, State::Message)
46SCORE_SERIALIZE_DATASTREAM_DECLARE(SCORE_LIB_STATE_EXPORT, State::MessageList)
47Q_DECLARE_METATYPE(State::Message)
48//Q_DECLARE_METATYPE(State::MessageList)
49W_REGISTER_ARGTYPE(State::Message)
50//W_REGISTER_ARGTYPE(State::MessageList)
Utilities for OSSIA data structures.
Definition DeviceInterface.hpp:33
Definition Address.hpp:108
The Message struct.
Definition Message.hpp:15