QtBase  v6.3.1
Public Member Functions | Friends | List of all members
QJsonValueRef Class Reference

The QJsonValueRef class is a helper class for QJsonValue. More...

#include <qjsonvalue.h>

Collaboration diagram for QJsonValueRef:
Collaboration graph
[legend]

Public Member Functions

 QJsonValueRef (QJsonArray *array, qsizetype idx)
 
 QJsonValueRef (QJsonObject *object, qsizetype idx)
 
 QJsonValueRef (const QJsonValueRef &)=default
 
 operator QJsonValue () const
 
QJsonValueRefoperator= (const QJsonValue &val)
 
QJsonValueRefoperator= (const QJsonValueRef &val)
 
QVariant toVariant () const
 
QJsonValue::Type type () const
 
bool isNull () const
 
bool isBool () const
 
bool isDouble () const
 
bool isString () const
 
bool isArray () const
 
bool isObject () const
 
bool isUndefined () const
 
bool toBool (bool defaultValue=false) const
 
int toInt (int defaultValue=0) const
 
qint64 toInteger (qint64 defaultValue=0) const
 
double toDouble (double defaultValue=0) const
 
QString toString (const QString &defaultValue={}) const
 
QJsonArray toArray () const
 
QJsonObject toObject () const
 
const QJsonValue operator[] (QStringView key) const
 
const QJsonValue operator[] (QLatin1String key) const
 
const QJsonValue operator[] (qsizetype i) const
 
bool operator== (const QJsonValue &other) const
 
bool operator!= (const QJsonValue &other) const
 

Friends

class QJsonArray
 
class QJsonObject
 

Detailed Description

The QJsonValueRef class is a helper class for QJsonValue.

\inmodule QtCore \reentrant

Definition at line 153 of file qjsonvalue.h.

Constructor & Destructor Documentation

◆ QJsonValueRef() [1/3]

QJsonValueRef::QJsonValueRef ( QJsonArray array,
qsizetype  idx 
)
inline

Definition at line 156 of file qjsonvalue.h.

◆ QJsonValueRef() [2/3]

QJsonValueRef::QJsonValueRef ( QJsonObject object,
qsizetype  idx 
)
inline

Definition at line 158 of file qjsonvalue.h.

◆ QJsonValueRef() [3/3]

QJsonValueRef::QJsonValueRef ( const QJsonValueRef )
default

Member Function Documentation

◆ isArray()

bool QJsonValueRef::isArray ( ) const
inline

Definition at line 173 of file qjsonvalue.h.

◆ isBool()

bool QJsonValueRef::isBool ( ) const
inline

Definition at line 170 of file qjsonvalue.h.

◆ isDouble()

bool QJsonValueRef::isDouble ( ) const
inline

Definition at line 171 of file qjsonvalue.h.

◆ isNull()

bool QJsonValueRef::isNull ( ) const
inline

Definition at line 169 of file qjsonvalue.h.

◆ isObject()

bool QJsonValueRef::isObject ( ) const
inline

Definition at line 174 of file qjsonvalue.h.

◆ isString()

bool QJsonValueRef::isString ( ) const
inline

Definition at line 172 of file qjsonvalue.h.

◆ isUndefined()

bool QJsonValueRef::isUndefined ( ) const
inline

Definition at line 175 of file qjsonvalue.h.

◆ operator QJsonValue()

QJsonValueRef::operator QJsonValue ( ) const
inline

Definition at line 163 of file qjsonvalue.h.

◆ operator!=()

bool QJsonValueRef::operator!= ( const QJsonValue other) const
inline

Definition at line 190 of file qjsonvalue.h.

Here is the call graph for this function:

◆ operator=() [1/2]

QJsonValueRef & QJsonValueRef::operator= ( const QJsonValue val)

Definition at line 917 of file qjsonvalue.cpp.

◆ operator=() [2/2]

QJsonValueRef & QJsonValueRef::operator= ( const QJsonValueRef val)

Definition at line 927 of file qjsonvalue.cpp.

◆ operator==()

bool QJsonValueRef::operator== ( const QJsonValue other) const
inline

Definition at line 189 of file qjsonvalue.h.

Here is the call graph for this function:

◆ operator[]() [1/3]

const QJsonValue QJsonValueRef::operator[] ( QLatin1String  key) const
inline

Definition at line 186 of file qjsonvalue.h.

◆ operator[]() [2/3]

const QJsonValue QJsonValueRef::operator[] ( qsizetype  i) const
inline

Definition at line 187 of file qjsonvalue.h.

◆ operator[]() [3/3]

const QJsonValue QJsonValueRef::operator[] ( QStringView  key) const
inline

Definition at line 185 of file qjsonvalue.h.

◆ toArray()

QJsonArray QJsonValueRef::toArray ( ) const

Definition at line 942 of file qjsonvalue.cpp.

Here is the call graph for this function:

◆ toBool()

bool QJsonValueRef::toBool ( bool  defaultValue = false) const
inline

Definition at line 177 of file qjsonvalue.h.

◆ toDouble()

double QJsonValueRef::toDouble ( double  defaultValue = 0) const
inline

Definition at line 180 of file qjsonvalue.h.

◆ toInt()

int QJsonValueRef::toInt ( int  defaultValue = 0) const
inline

Definition at line 178 of file qjsonvalue.h.

◆ toInteger()

qint64 QJsonValueRef::toInteger ( qint64  defaultValue = 0) const
inline

Definition at line 179 of file qjsonvalue.h.

◆ toObject()

QJsonObject QJsonValueRef::toObject ( ) const

Definition at line 947 of file qjsonvalue.cpp.

Here is the call graph for this function:

◆ toString()

QString QJsonValueRef::toString ( const QString defaultValue = {}) const
inline

Definition at line 181 of file qjsonvalue.h.

◆ toVariant()

QVariant QJsonValueRef::toVariant ( ) const

Definition at line 937 of file qjsonvalue.cpp.

Here is the call graph for this function:

◆ type()

QJsonValue::Type QJsonValueRef::type ( ) const
inline

Definition at line 168 of file qjsonvalue.h.

Friends And Related Function Documentation

◆ QJsonArray

friend class QJsonArray
friend

Definition at line 202 of file qjsonvalue.h.

◆ QJsonObject

friend class QJsonObject
friend

Definition at line 203 of file qjsonvalue.h.

Member Data Documentation

◆ a

QJsonArray* QJsonValueRef::a

Definition at line 196 of file qjsonvalue.h.

◆ o

QJsonObject* QJsonValueRef::o

Definition at line 197 of file qjsonvalue.h.


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