12#include <QSharedPointer>
25 QDataStream stream(data);
37 QDataStream stream(&res, QIODevice::WriteOnly);
52 return fromBytes(QByteArray::fromBase64(data, QByteArray::Base64UrlEncoding));
56 return toBytes().toBase64(QByteArray::Base64UrlEncoding);
64 return typeid (
this).hash_code();
68 return (&obj)->toStream(stream);
72 return (&obj)->fromStream(stream);
The StreamBase class add support streaming data for all children classes. For correctly working all s...
virtual unsigned int typeId() const
typeId This method return id of type.
bool fromBytes(const QByteArray &data)
fromBytes This method provide initialization of object from byte array.
virtual int parsingVersion() const
parsingVersion this method return parsing version of Qt. By Default is 0 (last available parsing)....
QByteArray toBytes() const
toBytes This method convert a current object to bytes array.
virtual QDataStream & fromStream(QDataStream &stream)=0
fromStream This method should be read all bytes from the stream object and full the current object.
virtual QDataStream & toStream(QDataStream &stream) const =0
fromStream This method should be write all members of the current object to the stream object.
bool fromBase64(const QString &data)
fromBase64 This method provide initialization of object from the base64 string.
QByteArray toBase64() const
toBase64 This method convert a current object to the base64 string.
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
QDataStream & operator>>(QDataStream &stream, HostAddress &address)
QDataStream & operator<<(QDataStream &stream, const HostAddress &address)