TTKMusicPlayer  4.3.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
QJsonParser Class Reference

#include <QJsonParser.h>

Public Member Functions

 QJsonParser (const char *begin, const char *end)
 
QJsonRoot * parse ()
 
QJsonParseError state () const
 

Private Member Functions

char peek ()
 
QJsonObject * getObject ()
 
QJsonArray * getArray ()
 
QJsonValue getValue ()
 
QString getString ()
 
QJsonValue getTrue ()
 
QJsonValue getFalse ()
 
QJsonValue getNull ()
 
QJsonValue getNumber ()
 
QPair< QString, QJsonValue > getPair ()
 
void throwError (QJsonParseError::ParseError e)
 

Private Attributes

QJsonParseError state_
 
const char *const begin_
 
const char *const end_
 
const char * p_
 

Static Private Attributes

static constexpr const char ArrayBegin = '['
 
static constexpr const char ArrayEnd = ']'
 
static constexpr const char NameSeparator = ':'
 
static constexpr const char ValueSeparator = ','
 
static constexpr const char ObjectBegin = '{'
 
static constexpr const char ObjectEnd = '}'
 
static constexpr const char Quote = '"'
 

Friends

class QJsonDocument
 

Detailed Description

Definition at line 36 of file QJsonParser.h.

Constructor & Destructor Documentation

QJsonParser::QJsonParser ( const char *  begin,
const char *  end 
)

Member Function Documentation

QJsonArray * QJsonParser::getArray ( )
private
QJsonValue QJsonParser::getFalse ( )
private

Definition at line 369 of file QJsonParser.cpp.

References end_, QJsonParseError::IllegalValue, p_, and throwError().

Referenced by getValue().

QJsonValue QJsonParser::getNull ( )
private

Definition at line 345 of file QJsonParser.cpp.

References end_, QJsonParseError::IllegalValue, p_, and throwError().

Referenced by getValue().

QJsonValue QJsonParser::getNumber ( )
private
QJsonObject * QJsonParser::getObject ( )
private
QPair< QString, QJsonValue > QJsonParser::getPair ( )
private
QString QJsonParser::getString ( )
private
QJsonValue QJsonParser::getTrue ( )
private

Definition at line 357 of file QJsonParser.cpp.

References end_, QJsonParseError::IllegalValue, p_, and throwError().

Referenced by getValue().

QJsonValue QJsonParser::getValue ( )
private
QJsonRoot * QJsonParser::parse ( )
char QJsonParser::peek ( )
private

Definition at line 109 of file QJsonParser.cpp.

References end_, and p_.

Referenced by getArray(), getObject(), getPair(), getString(), getValue(), and parse().

QJsonParseError QJsonParser::state ( ) const

Definition at line 441 of file QJsonParser.cpp.

References state_.

Referenced by QJsonDocument::fromJson().

void QJsonParser::throwError ( QJsonParseError::ParseError  e)
private

Friends And Related Function Documentation

friend class QJsonDocument
friend

Definition at line 37 of file QJsonParser.h.

Member Data Documentation

constexpr const char QJsonParser::ArrayBegin = '['
staticprivate

Definition at line 49 of file QJsonParser.h.

Referenced by getArray(), getValue(), and parse().

constexpr const char QJsonParser::ArrayEnd = ']'
staticprivate

Definition at line 50 of file QJsonParser.h.

Referenced by getArray().

const char* const QJsonParser::begin_
private

Definition at line 74 of file QJsonParser.h.

Referenced by parse(), and throwError().

const char* const QJsonParser::end_
private

Definition at line 75 of file QJsonParser.h.

Referenced by getFalse(), getNull(), getNumber(), getString(), getTrue(), parse(), and peek().

constexpr const char QJsonParser::NameSeparator = ':'
staticprivate

Definition at line 51 of file QJsonParser.h.

Referenced by getPair().

constexpr const char QJsonParser::ObjectBegin = '{'
staticprivate

Definition at line 53 of file QJsonParser.h.

Referenced by getObject(), getValue(), and parse().

constexpr const char QJsonParser::ObjectEnd = '}'
staticprivate

Definition at line 54 of file QJsonParser.h.

Referenced by getObject().

const char* QJsonParser::p_
private
constexpr const char QJsonParser::Quote = '"'
staticprivate

Definition at line 55 of file QJsonParser.h.

Referenced by getString(), and getValue().

QJsonParseError QJsonParser::state_
private

Definition at line 73 of file QJsonParser.h.

Referenced by parse(), QJsonParser(), and state().

constexpr const char QJsonParser::ValueSeparator = ','
staticprivate

Definition at line 52 of file QJsonParser.h.

Referenced by getArray(), and getObject().


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