Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <qjsonvalue.h>
Public Member Functions | |
QJsonValueConstRef (const QJsonValueConstRef &)=default | |
QJsonValueConstRef & | operator= (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 |
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 |
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 | concreteType (QJsonValueConstRef self) noexcept Q_DECL_PURE_FUNCTION |
static Q_CORE_EXPORT bool | concreteBool (QJsonValueConstRef self, bool defaultValue) noexcept Q_DECL_PURE_FUNCTION |
static Q_CORE_EXPORT qint64 | concreteInt (QJsonValueConstRef self, qint64 defaultValue, bool clamp) noexcept Q_DECL_PURE_FUNCTION |
static Q_CORE_EXPORT double | concreteDouble (QJsonValueConstRef self, double defaultValue) noexcept Q_DECL_PURE_FUNCTION |
static Q_CORE_EXPORT QString | concreteString (QJsonValueConstRef self, const QString &defaultValue) |
static Q_CORE_EXPORT QJsonValue | concrete (QJsonValueConstRef self) noexcept |
static Q_CORE_EXPORT QString | objectKey (QJsonValueConstRef self) |
Protected Attributes | |
QCborContainerPrivate * | d = nullptr |
size_t | is_object: 1 |
size_t | index: std::numeric_limits<size_t>::digits - 1 |
Friends | |
class | QJsonArray |
class | QJsonObject |
class | QJsonPrivate::Value |
bool | comparesEqual (const QJsonValueConstRef &lhs, const QJsonValueConstRef &rhs) noexcept |
bool | comparesEqual (const QJsonValueConstRef &lhs, const QJsonValue &rhs) noexcept |
Definition at line 124 of file qjsonvalue.h.
|
default |
|
inlineconstexprprotected |
Definition at line 211 of file qjsonvalue.h.
|
inlineprotected |
Definition at line 321 of file qjsonarray.h.
|
inlineprotected |
Definition at line 364 of file qjsonobject.h.
|
staticprotectednoexcept |
Definition at line 1012 of file qjsonvalue.cpp.
References QJsonPrivate::Value::container(), d, QJsonPrivate::Value::fromTrustedCbor(), and QJsonPrivate::Value::indexHelper().
Referenced by toArray(), toObject(), and toVariant().
|
staticprotectednoexcept |
Definition at line 967 of file qjsonvalue.cpp.
References QJsonPrivate::Value::elementHelper(), QCborValue::False, and QCborValue::True.
|
staticprotectednoexcept |
Definition at line 993 of file qjsonvalue.cpp.
References QCborValue::Double, QJsonPrivate::Value::elementHelper(), and QCborValue::Integer.
|
staticprotectednoexcept |
Definition at line 977 of file qjsonvalue.cpp.
References QCborValue::Double, QJsonPrivate::Value::elementHelper(), and QCborValue::Integer.
|
staticprotected |
Definition at line 1003 of file qjsonvalue.cpp.
References QList< T >::at(), QJsonPrivate::Value::container(), d, QCborContainerPrivate::elements, QJsonPrivate::Value::indexHelper(), QCborValue::String, QCborContainerPrivate::stringAt(), and QtCbor::Element::type.
|
staticprotectednoexcept |
Definition at line 962 of file qjsonvalue.cpp.
References convertFromCborType(), and QJsonPrivate::Value::elementHelper().
|
inline |
Definition at line 137 of file qjsonvalue.h.
References QJsonValue::Array.
|
inline |
Definition at line 134 of file qjsonvalue.h.
References QJsonValue::Bool.
|
inline |
Definition at line 135 of file qjsonvalue.h.
References QJsonValue::Double.
|
inline |
Definition at line 133 of file qjsonvalue.h.
References QJsonValue::Null.
|
inline |
Definition at line 138 of file qjsonvalue.h.
References QJsonValue::Object.
|
inline |
Definition at line 136 of file qjsonvalue.h.
References QJsonValue::String.
|
inline |
Definition at line 139 of file qjsonvalue.h.
References QJsonValue::Undefined.
|
inlineprotected |
Definition at line 185 of file qjsonvalue.h.
References objectKey().
Referenced by objectKey().
|
staticprotected |
Definition at line 1019 of file qjsonvalue.cpp.
References QJsonPrivate::Value::container(), d, elements, QJsonPrivate::Value::indexHelper(), Q_ASSERT, and QCborContainerPrivate::stringAt().
|
inline |
Definition at line 129 of file qjsonvalue.h.
|
delete |
|
inline |
Definition at line 155 of file qjsonvalue.h.
|
inline |
Definition at line 156 of file qjsonvalue.h.
References i.
|
inline |
Definition at line 154 of file qjsonvalue.h.
|
inlineprotected |
QJsonArray QJsonValueConstRef::toArray | ( | ) | const |
Definition at line 952 of file qjsonvalue.cpp.
References concrete().
|
inline |
Definition at line 141 of file qjsonvalue.h.
|
inline |
Definition at line 147 of file qjsonvalue.h.
|
inline |
Definition at line 143 of file qjsonvalue.h.
Definition at line 145 of file qjsonvalue.h.
QJsonObject QJsonValueConstRef::toObject | ( | ) | const |
Definition at line 957 of file qjsonvalue.cpp.
References concrete().
Definition at line 149 of file qjsonvalue.h.
QVariant QJsonValueConstRef::toVariant | ( | ) | const |
Definition at line 946 of file qjsonvalue.cpp.
References concrete().
|
inline |
Definition at line 132 of file qjsonvalue.h.
|
friend |
Definition at line 164 of file qjsonvalue.h.
|
friend |
Definition at line 159 of file qjsonvalue.h.
|
friend |
Definition at line 230 of file qjsonvalue.h.
|
friend |
Definition at line 231 of file qjsonvalue.h.
|
friend |
Definition at line 232 of file qjsonvalue.h.
|
protected |
Definition at line 225 of file qjsonvalue.h.
Referenced by concreteString(), and objectKey().
|
protected |
Definition at line 227 of file qjsonvalue.h.
|
protected |
Definition at line 226 of file qjsonvalue.h.