3#include <score/tools/Debug.hpp>
20#include <QtContainerFwd>
22#include <score_lib_base_export.h>
39struct is_qpointer : std::false_type
43struct is_qpointer<QPointer<T>> : std::true_type
47static constexpr bool is_qpointer_v = is_qpointer<T>::value;
49#if defined(SCORE_DEBUG_DELIMITERS)
50#define SCORE_DEBUG_INSERT_DELIMITER \
55#define SCORE_DEBUG_INSERT_DELIMITER2(Vis) \
58 Vis.insertDelimiter(); \
60#define SCORE_DEBUG_CHECK_DELIMITER \
65#define SCORE_DEBUG_CHECK_DELIMITER2(Vis) \
68 Vis.checkDelimiter(); \
71#define SCORE_DEBUG_INSERT_DELIMITER
72#define SCORE_DEBUG_INSERT_DELIMITER2(Vis)
73#define SCORE_DEBUG_CHECK_DELIMITER
74#define SCORE_DEBUG_CHECK_DELIMITER2(Vis)
87 = std::is_arithmetic<T>::value || std::is_same<T, QStringList>::value
88 || std::is_same<T, QVector2D>::value || std::is_same<T, QVector3D>::value
89 || std::is_same<T, QVector4D>::value || std::is_same<T, QPointF>::value
90 || std::is_same<T, QPoint>::value || std::is_same<T, std::string>::value;
92SCORE_LIB_BASE_EXPORT QDataStream&
93operator<<(QDataStream& stream,
const std::string& obj);
94SCORE_LIB_BASE_EXPORT QDataStream& operator>>(QDataStream& stream, std::string& obj);
107#if(INTPTR_MAX == INT64_MAX) && !defined(__APPLE__) && !defined(_WIN32)
108#define SCORE_INT64_IS_QINT64
111#if defined(SCORE_INT64_IS_QINT64)
112inline QDataStream& operator<<(QDataStream& s, uint64_t val)
117inline QDataStream& operator>>(QDataStream& s, uint64_t& val)
122inline QDataStream& operator<<(QDataStream& s, int64_t val)
127inline QDataStream& operator>>(QDataStream& s, int64_t& val)
134#if defined(__APPLE__) || defined(__EMSCRIPTEN__)
135inline QDataStream& operator<<(QDataStream& s, std::size_t val)
140inline QDataStream& operator>>(QDataStream& s, std::size_t& val)
148 requires(!std::is_enum_v<T>)
152 requires(!std::is_enum_v<T>)
155#define DATASTREAM_QT_BUILTIN(T) \
157 DataStreamInput& operator<<(DataStreamInput& s, const T& obj) \
163 DataStreamOutput& operator>>(DataStreamOutput& s, T& obj) \
169DATASTREAM_QT_BUILTIN(
bool)
170DATASTREAM_QT_BUILTIN(
char)
171DATASTREAM_QT_BUILTIN(qint8)
172DATASTREAM_QT_BUILTIN(qint16)
173DATASTREAM_QT_BUILTIN(qint32)
174DATASTREAM_QT_BUILTIN(qint64)
176#if defined(SCORE_INT64_IS_QINT64)
177DATASTREAM_QT_BUILTIN(int64_t)
180DATASTREAM_QT_BUILTIN(quint8)
181DATASTREAM_QT_BUILTIN(quint16)
182DATASTREAM_QT_BUILTIN(quint32)
183DATASTREAM_QT_BUILTIN(quint64)
185#if defined(SCORE_INT64_IS_QINT64)
186DATASTREAM_QT_BUILTIN(uint64_t)
189DATASTREAM_QT_BUILTIN(
float)
190DATASTREAM_QT_BUILTIN(
double)
191DATASTREAM_QT_BUILTIN(QString)
192DATASTREAM_QT_BUILTIN(QStringList)
193DATASTREAM_QT_BUILTIN(QPoint)
194DATASTREAM_QT_BUILTIN(QPointF)
195DATASTREAM_QT_BUILTIN(QRect)
196DATASTREAM_QT_BUILTIN(QRectF)
197DATASTREAM_QT_BUILTIN(QVector2D)
198DATASTREAM_QT_BUILTIN(QVector3D)
199DATASTREAM_QT_BUILTIN(QVector4D)
200DATASTREAM_QT_BUILTIN(QByteArray)
201DATASTREAM_QT_BUILTIN(QSizeF)
202DATASTREAM_QT_BUILTIN(QColor)
203DATASTREAM_QT_BUILTIN(QVariant)
204DATASTREAM_QT_BUILTIN(std::string)
211template <
typename K,
typename V>
213template <
typename K,
typename V>
216template <
typename K,
typename V>
218template <
typename K,
typename V>
222 requires(std::is_enum_v<T>)
230 requires(std::is_enum_v<T>)
Definition ClipMode.hpp:10
Definition DataStreamHelpers.hpp:87
Definition DataStreamHelpers.hpp:103
Definition DataStreamHelpers.hpp:30