MythTV  master
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
MythCBORSerialiser Class Reference

#include <libmythbase/http/serialisers/mythcborserialiser.h>

Inheritance diagram for MythCBORSerialiser:
[legend]
Collaboration diagram for MythCBORSerialiser:
[legend]

Public Member Functions

 MythCBORSerialiser (const QString &Name, const QVariant &Value)
 
- Public Member Functions inherited from MythSerialiser
 MythSerialiser ()
 
HTTPData Result ()
 

Protected Member Functions

void AddObject (const QString &Name, const QVariant &Value)
 
void AddValue (const QVariant &Value)
 MythCBORSerialiser::AddValue. More...
 
void AddQObject (const QObject *Object)
 
void AddStringList (const QVariant &Values)
 
void AddList (const QVariant &Values)
 
void AddMap (const QVariantMap &Map)
 

Private Attributes

QCborStreamWriter * m_writer { nullptr }
 

Additional Inherited Members

- Static Public Member Functions inherited from MythSerialiser
static HTTPData Serialise (const QString &Name, const QVariant &Value, const QStringList &Accept)
 Serialise the given data with an encoding suggested by Accept. More...
 
- Protected Attributes inherited from MythSerialiser
QBuffer m_buffer
 
HTTPData m_result { nullptr }
 

Detailed Description

Definition at line 9 of file mythcborserialiser.h.

Constructor & Destructor Documentation

◆ MythCBORSerialiser()

MythCBORSerialiser::MythCBORSerialiser ( const QString &  Name,
const QVariant &  Value 
)

Definition at line 10 of file mythcborserialiser.cpp.

Member Function Documentation

◆ AddObject()

void MythCBORSerialiser::AddObject ( const QString &  Name,
const QVariant &  Value 
)
protected

Definition at line 19 of file mythcborserialiser.cpp.

Referenced by MythCBORSerialiser().

◆ AddValue()

void MythCBORSerialiser::AddValue ( const QVariant &  Value)
protected

MythCBORSerialiser::AddValue.

Note
Cbor is a superset of JSON and hence supports additional types. We do not attempt to use those here however to maintain consistency with the other serialisers - and hence lossless conversion between formats using different (de)serialisers.

Definition at line 35 of file mythcborserialiser.cpp.

Referenced by AddList(), AddMap(), AddObject(), and AddQObject().

◆ AddQObject()

void MythCBORSerialiser::AddQObject ( const QObject *  Object)
protected

Definition at line 101 of file mythcborserialiser.cpp.

Referenced by AddValue().

◆ AddStringList()

void MythCBORSerialiser::AddStringList ( const QVariant &  Values)
protected

Definition at line 132 of file mythcborserialiser.cpp.

Referenced by AddValue().

◆ AddList()

void MythCBORSerialiser::AddList ( const QVariant &  Values)
protected

Definition at line 144 of file mythcborserialiser.cpp.

Referenced by AddValue().

◆ AddMap()

void MythCBORSerialiser::AddMap ( const QVariantMap &  Map)
protected

Definition at line 153 of file mythcborserialiser.cpp.

Referenced by AddValue().

Member Data Documentation

◆ m_writer

QCborStreamWriter* MythCBORSerialiser::m_writer { nullptr }
private

Definition at line 24 of file mythcborserialiser.h.

Referenced by AddList(), AddMap(), AddObject(), AddQObject(), AddStringList(), and AddValue().


The documentation for this class was generated from the following files: