TTKMusicPlayer  4.2.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)
 
QJsonRootparse ()
 
QJsonParseError state () const
 

Private Member Functions

char peek ()
 
QJsonObjectgetObject ()
 
QJsonArraygetArray ()
 
QJsonValue getValue ()
 
QString getString ()
 
QJsonValue getTrue ()
 
QJsonValue getFalse ()
 
QJsonValue getNull ()
 
QJsonValue getNumber ()
 
QPair< QString, QJsonValuegetPair ()
 
void throwError (QJsonParseError::ParseError e)
 

Private Attributes

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

Static Private Attributes

static const char ArrayBegin = '['
 
static const char ArrayEnd = ']'
 
static const char NameSeparator = ':'
 
static const char ValueSeparator = ','
 
static const char ObjectBegin = '{'
 
static const char ObjectEnd = '}'
 
static 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

const char QJsonParser::ArrayBegin = '['
staticprivate

Definition at line 49 of file QJsonParser.h.

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

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().

const char QJsonParser::NameSeparator = ':'
staticprivate

Definition at line 51 of file QJsonParser.h.

Referenced by getPair().

const char QJsonParser::ObjectBegin = '{'
staticprivate

Definition at line 53 of file QJsonParser.h.

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

const char QJsonParser::ObjectEnd = '}'
staticprivate

Definition at line 54 of file QJsonParser.h.

Referenced by getObject().

const char* QJsonParser::p_
private
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().

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: