2 #include <ossia/detail/config.hpp>
6 #define SCORE_SERIALIZE_DATASTREAM_DECLARE(EXPORT, T) \
8 QDataStream& operator<<(QDataStream& stream, const T& obj); \
10 QDataStream& operator>>(QDataStream& stream, T& obj);
12 #define SCORE_SERALIZE_DATASTREAM_DEFINE(T) \
13 QDataStream& operator<<(QDataStream& stream, const T& obj) \
15 DataStreamReader reader{stream.device()}; \
16 reader.readFrom(obj); \
19 QDataStream& operator>>(QDataStream& stream, T& obj) \
21 DataStreamWriter writer{stream.device()}; \
22 writer.writeTo(obj); \
26 #define SCORE_SERALIZE_DATASTREAM_DEFINE_T(TEMPLATE, T) \
28 QDataStream& operator<<(QDataStream& stream, const T& obj) \
30 DataStreamReader reader{stream.device()}; \
31 reader.readFrom(obj); \
35 QDataStream& operator>>(QDataStream& stream, T& obj) \
37 DataStreamWriter writer{stream.device()}; \
38 writer.writeTo(obj); \