Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QJsonValueConstRef Class Reference

#include <qjsonvalue.h>

Collaboration diagram for QJsonValueConstRef:

Public Member Functions

 QJsonValueConstRef (const QJsonValueConstRef &)=default
QJsonValueConstRefoperator= (const QJsonValueConstRef &)=delete
 operator QJsonValue () const
Q_CORE_EXPORT 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
QAnyStringView toStringView (QAnyStringView defaultValue={}) const
Q_CORE_EXPORT QJsonArray toArray () const
Q_CORE_EXPORT QJsonObject toObject () const
const QJsonValue operator[] (QStringView key) const
const QJsonValue operator[] (QLatin1StringView key) const
const QJsonValue operator[] (qsizetype i) const

Protected Member Functions

QString objectKey () const
QAnyStringView objectKeyView () const
constexpr QJsonValueConstRef (QCborContainerPrivate *d, size_t index, bool is_object)
 QJsonValueConstRef (QJsonArray *array, qsizetype idx)
 QJsonValueConstRef (QJsonObject *object, qsizetype idx)
void rebind (QJsonValueConstRef other)

Static Protected Member Functions

static Q_CORE_EXPORT QJsonValue::Type Q_DECL_PURE_FUNCTION concreteType (QJsonValueConstRef self) noexcept
static Q_CORE_EXPORT bool Q_DECL_PURE_FUNCTION concreteBool (QJsonValueConstRef self, bool defaultValue) noexcept
static Q_CORE_EXPORT qint64 Q_DECL_PURE_FUNCTION concreteInt (QJsonValueConstRef self, qint64 defaultValue, bool clamp) noexcept
static Q_CORE_EXPORT double Q_DECL_PURE_FUNCTION concreteDouble (QJsonValueConstRef self, double defaultValue) noexcept
static Q_CORE_EXPORT QString concreteString (QJsonValueConstRef self, const QString &defaultValue)
static Q_CORE_EXPORT QAnyStringView concreteStringView (QJsonValueConstRef self, QAnyStringView defaultValue)
static Q_CORE_EXPORT QJsonValue concrete (QJsonValueConstRef self) noexcept
static Q_CORE_EXPORT QString objectKey (QJsonValueConstRef self)
static Q_CORE_EXPORT QAnyStringView objectKeyView (QJsonValueConstRef self)

Protected Attributes

QCborContainerPrivated = nullptr
size_t is_object: 1
size_t index: std::numeric_limits<size_t>::digits - 1

Friends

class QJsonArray
class QJsonObject
class QJsonPrivate::Value
size_t qHash (const QJsonValueConstRef &key, size_t seed=0) noexcept
bool comparesEqual (const QJsonValueConstRef &lhs, const QJsonValueConstRef &rhs)
bool comparesEqual (const QJsonValueConstRef &lhs, const QJsonValue &rhs)

Detailed Description

Definition at line 141 of file qjsonvalue.h.

Constructor & Destructor Documentation

◆ QJsonValueConstRef() [1/4]

QJsonValueConstRef::QJsonValueConstRef ( const QJsonValueConstRef & )
default

◆ QJsonValueConstRef() [2/4]

QJsonValueConstRef::QJsonValueConstRef ( QCborContainerPrivate * d,
size_t index,
bool is_object )
inlineconstexprprotected

Definition at line 237 of file qjsonvalue.h.

References QJsonValueConstRef(), and d.

Referenced by QJsonValueConstRef().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QJsonValueConstRef() [3/4]

QJsonValueConstRef::QJsonValueConstRef ( QJsonArray * array,
qsizetype idx )
inlineprotected

Definition at line 322 of file qjsonarray.h.

◆ QJsonValueConstRef() [4/4]

QJsonValueConstRef::QJsonValueConstRef ( QJsonObject * object,
qsizetype idx )
inlineprotected

Definition at line 404 of file qjsonobject.h.

Member Function Documentation

◆ concrete()

QJsonValue QJsonValueConstRef::concrete ( QJsonValueConstRef self)
staticprotectednoexcept

Definition at line 1098 of file qjsonvalue.cpp.

References QJsonPrivate::Value::container().

Here is the call graph for this function:

◆ concreteBool()

bool QJsonValueConstRef::concreteBool ( QJsonValueConstRef self,
bool defaultValue )
staticprotectednoexcept

Definition at line 1044 of file qjsonvalue.cpp.

◆ concreteDouble()

double QJsonValueConstRef::concreteDouble ( QJsonValueConstRef self,
double defaultValue )
staticprotectednoexcept

Definition at line 1070 of file qjsonvalue.cpp.

◆ concreteInt()

qint64 QJsonValueConstRef::concreteInt ( QJsonValueConstRef self,
qint64 defaultValue,
bool clamp )
staticprotectednoexcept

Definition at line 1054 of file qjsonvalue.cpp.

◆ concreteString()

QString QJsonValueConstRef::concreteString ( QJsonValueConstRef self,
const QString & defaultValue )
staticprotected

Definition at line 1080 of file qjsonvalue.cpp.

References QJsonPrivate::Value::container().

Here is the call graph for this function:

◆ concreteStringView()

QAnyStringView QJsonValueConstRef::concreteStringView ( QJsonValueConstRef self,
QAnyStringView defaultValue )
staticprotected

Definition at line 1089 of file qjsonvalue.cpp.

References QJsonPrivate::Value::container().

Here is the call graph for this function:

◆ concreteType()

QJsonValue::Type QJsonValueConstRef::concreteType ( QJsonValueConstRef self)
staticprotectednoexcept

Definition at line 1039 of file qjsonvalue.cpp.

◆ isArray()

bool QJsonValueConstRef::isArray ( ) const
inline

Definition at line 154 of file qjsonvalue.h.

◆ isBool()

bool QJsonValueConstRef::isBool ( ) const
inline

Definition at line 151 of file qjsonvalue.h.

◆ isDouble()

bool QJsonValueConstRef::isDouble ( ) const
inline

Definition at line 152 of file qjsonvalue.h.

◆ isNull()

bool QJsonValueConstRef::isNull ( ) const
inline

Definition at line 150 of file qjsonvalue.h.

◆ isObject()

bool QJsonValueConstRef::isObject ( ) const
inline

Definition at line 155 of file qjsonvalue.h.

◆ isString()

bool QJsonValueConstRef::isString ( ) const
inline

Definition at line 153 of file qjsonvalue.h.

◆ isUndefined()

bool QJsonValueConstRef::isUndefined ( ) const
inline

Definition at line 156 of file qjsonvalue.h.

◆ objectKey() [1/2]

QString QJsonValueConstRef::objectKey ( ) const
inlineprotected

Definition at line 208 of file qjsonvalue.h.

◆ objectKey() [2/2]

QString QJsonValueConstRef::objectKey ( QJsonValueConstRef self)
staticprotected

Definition at line 1116 of file qjsonvalue.cpp.

References QJsonPrivate::Value::container().

Here is the call graph for this function:

◆ objectKeyView() [1/2]

QAnyStringView QJsonValueConstRef::objectKeyView ( ) const
inlineprotected

Definition at line 211 of file qjsonvalue.h.

◆ objectKeyView() [2/2]

QAnyStringView QJsonValueConstRef::objectKeyView ( QJsonValueConstRef self)
staticprotected

Definition at line 1105 of file qjsonvalue.cpp.

References QJsonPrivate::Value::container().

Here is the call graph for this function:

◆ operator QJsonValue()

QJsonValueConstRef::operator QJsonValue ( ) const
inline

Definition at line 146 of file qjsonvalue.h.

◆ operator=()

QJsonValueConstRef & QJsonValueConstRef::operator= ( const QJsonValueConstRef & )
delete

◆ operator[]() [1/3]

const QJsonValue QJsonValueConstRef::operator[] ( QLatin1StringView key) const
inline

Definition at line 174 of file qjsonvalue.h.

◆ operator[]() [2/3]

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

Definition at line 175 of file qjsonvalue.h.

◆ operator[]() [3/3]

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

Definition at line 173 of file qjsonvalue.h.

◆ rebind()

void QJsonValueConstRef::rebind ( QJsonValueConstRef other)
inlineprotected

Definition at line 245 of file qjsonvalue.h.

References d.

◆ toArray()

QJsonArray QJsonValueConstRef::toArray ( ) const

Definition at line 1029 of file qjsonvalue.cpp.

◆ toBool()

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

Definition at line 158 of file qjsonvalue.h.

◆ toDouble()

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

Definition at line 164 of file qjsonvalue.h.

◆ toInt()

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

Definition at line 160 of file qjsonvalue.h.

◆ toInteger()

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

Definition at line 162 of file qjsonvalue.h.

◆ toObject()

QJsonObject QJsonValueConstRef::toObject ( ) const

Definition at line 1034 of file qjsonvalue.cpp.

◆ toString()

QString QJsonValueConstRef::toString ( const QString & defaultValue = {}) const
inline

Definition at line 166 of file qjsonvalue.h.

◆ toStringView()

QAnyStringView QJsonValueConstRef::toStringView ( QAnyStringView defaultValue = {}) const
inline

Definition at line 168 of file qjsonvalue.h.

◆ toVariant()

QVariant QJsonValueConstRef::toVariant ( ) const

Definition at line 1023 of file qjsonvalue.cpp.

◆ type()

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

Definition at line 149 of file qjsonvalue.h.

◆ comparesEqual [1/2]

bool comparesEqual ( const QJsonValueConstRef & lhs,
const QJsonValue & rhs )
friend

Definition at line 186 of file qjsonvalue.h.

◆ comparesEqual [2/2]

bool comparesEqual ( const QJsonValueConstRef & lhs,
const QJsonValueConstRef & rhs )
friend

Definition at line 181 of file qjsonvalue.h.

◆ qHash

size_t qHash ( const QJsonValueConstRef & key,
size_t seed = 0 )
friend

Definition at line 178 of file qjsonvalue.h.

◆ QJsonArray

friend class QJsonArray
friend

Definition at line 256 of file qjsonvalue.h.

◆ QJsonObject

friend class QJsonObject
friend

Definition at line 257 of file qjsonvalue.h.

◆ QJsonPrivate::Value

friend class QJsonPrivate::Value
friend

Definition at line 258 of file qjsonvalue.h.

Member Data Documentation

◆ d

QCborContainerPrivate* QJsonValueConstRef::d = nullptr
protected

Definition at line 251 of file qjsonvalue.h.

Referenced by QJsonValueConstRef(), QJsonPrivate::Value::container(), and rebind().

◆ index

size_t QJsonValueConstRef::index
protected

Definition at line 253 of file qjsonvalue.h.

◆ is_object

size_t QJsonValueConstRef::is_object
protected

Definition at line 252 of file qjsonvalue.h.


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