The QProtobufSerializer class. More...
#include <qprotobufserializer.h>
Protected Member Functions | |
QByteArray | serializeMessage (const QObject *object, const QProtobufMetaObject &metaObject) const override |
serializeMessage More... | |
void | deserializeMessage (QObject *object, const QProtobufMetaObject &metaObject, const QByteArray &data) const override |
serializeMessage More... | |
QByteArray | serializeObject (const QObject *object, const QProtobufMetaObject &metaObject, const QProtobufMetaProperty &metaProperty) const override |
serializeObject Serializes complete object according given propertyOrdering and metaObject information More... | |
void | deserializeObject (QObject *object, const QProtobufMetaObject &metaObject, QProtobufSelfcheckIterator &it) const override |
deserializeObject Deserializes buffer to an object More... | |
QByteArray | serializeListObject (const QObject *object, const QProtobufMetaObject &metaObject, const QProtobufMetaProperty &metaProperty) const override |
serializeListObject Method called to serialize object as a part of list property More... | |
bool | deserializeListObject (QObject *object, const QProtobufMetaObject &metaObject, QProtobufSelfcheckIterator &it) const override |
deserializeListObject Deserializes an object from byte stream as part of list property More... | |
QByteArray | serializeMapPair (const QVariant &key, const QVariant &value, const QProtobufMetaProperty &metaProperty) const override |
serializeMapPair Serializes QMap pair of key and value to raw data buffer More... | |
bool | deserializeMapPair (QVariant &key, QVariant &value, QProtobufSelfcheckIterator &it) const override |
deserializeMapPair Deserializes QMap pair of key and value from raw data More... | |
QByteArray | serializeEnum (int64 value, const QMetaEnum &metaEnum, const QtProtobuf::QProtobufMetaProperty &metaProperty) const override |
serializeEnum Serializes enum value represented as int64 type More... | |
QByteArray | serializeEnumList (const QList< int64 > &value, const QMetaEnum &metaEnum, const QtProtobuf::QProtobufMetaProperty &metaProperty) const override |
serializeEnumList Method called to serialize list of enum values More... | |
void | deserializeEnum (int64 &value, const QMetaEnum &metaEnum, QProtobufSelfcheckIterator &it) const override |
deserializeEnum Deserializes enum value from byte stream More... | |
void | deserializeEnumList (QList< int64 > &value, const QMetaEnum &metaEnum, QProtobufSelfcheckIterator &it) const override |
deserializeEnum Deserializes list of enum values from byte stream More... | |
Protected Attributes | |
std::unique_ptr< QProtobufSerializerPrivate > | dPtr |
Additional Inherited Members | |
Public Member Functions inherited from QtProtobuf::QAbstractProtobufSerializer | |
template<typename T > | |
QByteArray | serialize (const QObject *object) |
Serialization of a registered qtproto message object into byte-array. More... | |
template<typename T > | |
void | deserialize (T *object, const QByteArray &data) |
Deserialization of a byte-array into a registered qtproto message object. More... | |
virtual QByteArray | serializeListBegin (const QProtobufMetaProperty &metaProperty) const |
serializeListBegin Method called at the begining of object list serialization More... | |
virtual QByteArray | serializeListEnd (QByteArray &buffer, const QProtobufMetaProperty &metaProperty) const |
serializeListEnd Method called at the end of object list serialization More... | |
virtual QByteArray | serializeMapBegin (const QProtobufMetaProperty &metaProperty) const |
serializeMapEnd Method called at the begining of map serialization More... | |
virtual QByteArray | serializeMapEnd (QByteArray &buffer, const QProtobufMetaProperty &metaProperty) const |
serializeMapEnd Method called at the end of map serialization More... | |
The QProtobufSerializer class.
|
overrideprotectedvirtual |
deserializeEnum Deserializes enum value from byte stream
[out] | value | Buffer that will be used to collect new enum value |
[in] | metaEnum | Information about enumeration type |
[in] | it | Points to serialized raw key/value data |
Implements QtProtobuf::QAbstractProtobufSerializer.
|
overrideprotectedvirtual |
deserializeEnum Deserializes list of enum values from byte stream
[out] | value | QList that will be used to collect deserialized enum values |
[in] | metaEnum | Information about enumeration type |
[in] | it | Points to serialized raw key/value data |
Implements QtProtobuf::QAbstractProtobufSerializer.
|
overrideprotectedvirtual |
deserializeListObject Deserializes an object from byte stream as part of list property
[out] | object | Pointer to pre-allocated object, that will be appended to list property |
[in] | Protobuf | meta object information for given object. Static meta object usualy is used to get actual property value and write new property to object |
[in] | it | Pointer to beging of buffer where object serialized data is located |
Implements QtProtobuf::QAbstractProtobufSerializer.
|
overrideprotectedvirtual |
deserializeMapPair Deserializes QMap pair of key and value from raw data
[out] | key | Buffer that will be used to store deserialized key. When passed to function, QVariant already stores default constructed value. So it's possible to receive meta information about type from it. |
[out] | value | Buffer that will be used to store deserialized value. When passed to function, QVariant already stores default constructed value. So it's possible to receive meta information about type from it. |
[in] | it | Points to serialized raw key/value data |
Implements QtProtobuf::QAbstractProtobufSerializer.
|
overrideprotectedvirtual |
serializeMessage
object | |
propertyOrdering | |
metaObject |
Implements QtProtobuf::QAbstractProtobufSerializer.
|
overrideprotectedvirtual |
deserializeObject Deserializes buffer to an object
[out] | object | Pointer to pre-allocated object |
[in] | metaObject | Protobuf meta object information for given object. Static meta object usualy is used to get actual property value and write new property to object |
[in] | it | Pointer to beging of buffer where object serialized data is located |
[in] | propertyOrdering | Ordering of properties for given object |
[in] | metaProperty | Information about property to be serialized |
Implements QtProtobuf::QAbstractProtobufSerializer.
|
overrideprotectedvirtual |
serializeEnum Serializes enum value represented as int64 type
[in] | value | Enum value to be serialized |
[in] | metaEnum | Information about enumeration type |
[in] | metaProperty | Information about property to be serialized |
Implements QtProtobuf::QAbstractProtobufSerializer.
|
overrideprotectedvirtual |
serializeEnumList Method called to serialize list of enum values
[in] | value | List of enum values to be serialized, represented as int64 |
[in] | metaEnum | Information about enumeration type |
[in] | metaProperty | Information about property to be serialized |
Implements QtProtobuf::QAbstractProtobufSerializer.
|
overrideprotectedvirtual |
serializeListObject Method called to serialize object as a part of list property
[in] | object | Pointer to object that will be serialized |
[in] | metaObject | Protobuf meta object information for given object |
[in] | metaProperty | Information about property to be serialized |
Implements QtProtobuf::QAbstractProtobufSerializer.
|
overrideprotectedvirtual |
serializeMapPair Serializes QMap pair of key and value to raw data buffer
[in] | key | Map key |
[in] | value | Map value for given key |
[in] | metaProperty | Information about property to be serialized |
Implements QtProtobuf::QAbstractProtobufSerializer.
|
overrideprotectedvirtual |
serializeMessage
object | |
propertyOrdering | |
metaObject |
Implements QtProtobuf::QAbstractProtobufSerializer.
|
overrideprotectedvirtual |
serializeObject Serializes complete object according given propertyOrdering and metaObject information
[in] | object | Pointer to object to be serialized |
[in] | metaObject | Protobuf meta object information for given object |
[in] | metaProperty | Information about property to be serialized |
Implements QtProtobuf::QAbstractProtobufSerializer.