Helper class passed to the type converter by the serializer. Do not implement yourself. More...
#include <typeconverter.h>
Public Member Functions | |
virtual bool | jsonMode () const =0 |
Returns true, if de/serializing to JSON, and false for CBOR. | |
virtual QVariant | getProperty (const char *name) const =0 |
Returns a property from the serializer. | |
virtual QCborTag | typeTag (int metaTypeId) const =0 |
Returns a tag registered for the given metaTypeId. | |
virtual QSharedPointer< const TypeExtractor > | extractor (int metaTypeId) const =0 |
Returns a reference to an extractor for the given type, or nullptr. | |
virtual QCborValue | serializeSubtype (const QMetaProperty &property, const QVariant &value) const =0 |
Serialize a subvalue, represented by a meta property. | |
virtual QCborValue | serializeSubtype (int propertyType, const QVariant &value, const QByteArray &traceHint={}) const =0 |
Serialize a subvalue, represented by a type id. | |
virtual QVariant | deserializeSubtype (const QMetaProperty &property, const QCborValue &value, QObject *parent) const =0 |
Deserialize a subvalue, represented by a meta property. | |
virtual QVariant | deserializeSubtype (int propertyType, const QCborValue &value, QObject *parent, const QByteArray &traceHint={}) const =0 |
Deserialize a subvalue, represented by a type id. | |
Helper class passed to the type converter by the serializer. Do not implement yourself.
For the de/serializeSubtype methods, always prefer the overload with the QMetaProperty parameter, in case you have one. If not, it is recommended to pass a "naming" string as last parameter, to help identifying errors.
Definition at line 66 of file typeconverter.h.