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

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

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

Public Member Functions

 MythJSONSerialiser (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, const QMetaProperty *MetaProperty=nullptr)
 
void AddQObject (const QObject *Object)
 
void AddStringList (const QVariant &Values)
 
void AddList (const QVariant &Values)
 
void AddMap (const QVariantMap &Map)
 

Static Protected Member Functions

static QString Encode (const QString &Value)
 

Private Attributes

QTextStream m_writer
 
std::stack< boolm_first
 

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 10 of file mythjsonserialiser.h.

Constructor & Destructor Documentation

◆ MythJSONSerialiser()

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

Definition at line 10 of file mythjsonserialiser.cpp.

Member Function Documentation

◆ AddObject()

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

Definition at line 21 of file mythjsonserialiser.cpp.

Referenced by MythJSONSerialiser().

◆ AddValue()

void MythJSONSerialiser::AddValue ( const QVariant &  Value,
const QMetaProperty *  MetaProperty = nullptr 
)
protected

Definition at line 31 of file mythjsonserialiser.cpp.

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

◆ AddQObject()

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

Definition at line 94 of file mythjsonserialiser.cpp.

Referenced by AddValue().

◆ AddStringList()

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

Definition at line 128 of file mythjsonserialiser.cpp.

Referenced by AddValue().

◆ AddList()

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

Definition at line 141 of file mythjsonserialiser.cpp.

Referenced by AddValue().

◆ AddMap()

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

Definition at line 157 of file mythjsonserialiser.cpp.

Referenced by AddValue().

◆ Encode()

QString MythJSONSerialiser::Encode ( const QString &  Value)
staticprotected

Definition at line 172 of file mythjsonserialiser.cpp.

Referenced by AddStringList(), and AddValue().

Member Data Documentation

◆ m_writer

QTextStream MythJSONSerialiser::m_writer
private

◆ m_first

std::stack<bool> MythJSONSerialiser::m_first
private

Definition at line 27 of file mythjsonserialiser.h.

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


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