//! \warning As with QDataStream, QDataWriter and QDataReader must bind compatible C++ data types, and QDataStream ByteOrder, FloatingPointPrecision and Version
//! \remark When not statically known, such information can be transmitted using meta({{"type",...}}) although some IBind implementations may not support it
classQDataWriter:publicIWriter// allows runtime flexibility but requires QBind<T> in addition to T::operator<<(QDebug&) and does not warrant QDataStream operators compatibility if QBind<T> ignores qmDataStreamVersion in meta(QMetaData&)
classQDataWriter:publicIWriter// allows runtime flexibility but requires QBind<T> in addition to T::operator<<(QDataStream&) and does not warrant QDataStream operators compatibility if QBind<T> ignores qmDataStreamVersion in meta(QMetaData&)
{
Q_DISABLE_COPY(QDataWriter)
public:
...
...
@@ -87,8 +87,6 @@ private:
QStringversion;
};
template<typenameT>structBindSupport<T,QDataWriter>:BindNative{};//!< \remark Use meta() or QVariant to encapsulate Ts that are not statically known (provided qRegisterMetaType<T>() and qRegisterMetaTypeStreamOperators<T>() are called)
@@ -15,7 +15,7 @@ is used in the field and diagnose complex issues:
### Serialization (Write)
W1. Fast: not as fast but comparable to protobuf/lttng/etl ; potentially without dynamic memory allocation or write thread locking
W1. Fast: similar to QDataStream ; same order of magnitude as protobuf/lttng/etl (up to 10x slower) ; potentially without dynamic memory allocation or write thread locking
W2. Easily extensible to user-defined and third-part types
W3. Support almost all features of simple Qt data (QJson*, QDataStream, QSettings) and most features of complex Qt data (QCbor*, QXml*, QMetaObject, QModel*)
W4. Provide most well-formedness guarantees with low impact on performance