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
qcborvalue.cpp File Reference

(bb30dc9f00598e1f2e079c847c9d784050fe0a66)

#include "qcborvalue.h"
#include "qcborvalue_p.h"
#include "qdatastream.h"
#include "qcborarray.h"
#include "qcbormap.h"
#include <QtCore/qdebug.h>
#include <qendian.h>
#include <qlocale.h>
#include <qdatetime.h>
#include <qtimezone.h>
#include <private/qnumeric_p.h>
#include <private/qsimd_p.h>
#include <new>
#include "qcborarray.cpp"
#include "qcbormap.cpp"
#include "moc_qcborvalue.cpp"
Include dependency graph for qcborvalue.cpp:

Go to the source code of this file.

Functions

static QCborContainerPrivateassignContainer (QCborContainerPrivate *&d, QCborContainerPrivate *x)
static QCborValue::Type convertToExtendedType (QCborContainerPrivate *d)
static int typeOrder (QCborValue::Type e1, QCborValue::Type e2)
void qt_to_latin1_unchecked (uchar *dst, const char16_t *uc, qsizetype len)
static auto nextUtf32Character (const char16_t *&ptr, const char16_t *end) noexcept
static qsizetype stringLengthInUtf8 (const char16_t *ptr, const char16_t *end) noexcept
static int compareStringsInUtf8 (QStringView lhs, QStringView rhs, Comparison mode) noexcept
static int compareStringsInUtf8 (QUtf8StringView lhs, QStringView rhs, Comparison mode) noexcept
static int compareStringsInUtf8 (QStringView lhs, QUtf8StringView rhs, Comparison mode) noexcept
static int compareContainer (const QCborContainerPrivate *c1, const QCborContainerPrivate *c2, Comparison mode) noexcept
static int compareElementNoData (const Element &e1, const Element &e2) noexcept
static int compareElementRecursive (const QCborContainerPrivate *c1, const Element &e1, const QCborContainerPrivate *c2, const Element &e2, Comparison mode) noexcept
bool comparesEqual (const QCborValue &lhs, const QCborValue &rhs)
bool comparesEqual (const QCborArray &lhs, const QCborArray &rhs)
bool comparesEqual (const QCborMap &lhs, const QCborMap &rhs)
static bool shouldArrayRemainArray (qint64 key, QCborValue::Type t, QCborContainerPrivate *container)
static void convertArrayToMap (QCborContainerPrivate *&array)
static QCborContainerPrivatemaybeGrow (QCborContainerPrivate *container, qsizetype index)
size_t qHash (const QCborValue &value, size_t seed)
Q_CORE_EXPORT const char * qt_cbor_simpletype_id (QCborSimpleType st)
Q_CORE_EXPORT const char * qt_cbor_tag_id (QCborTag tag)
static QDebug debugContents (QDebug &dbg, const QCborValue &v)
QDebug operator<< (QDebug dbg, const QCborValue &v)
QDebug operator<< (QDebug dbg, QCborSimpleType st)
QDebug operator<< (QDebug dbg, QCborTag tag)
QDebug operator<< (QDebug dbg, QCborKnownTags tag)

Variables

static QT_BEGIN_NAMESPACE constexpr quint64 MaxAcceptableMemoryUse = (sizeof(void*) == 4 ? 256 : 1024) * 1024 * 1024
static Q_DECL_UNUSED constexpr int MaximumRecursionDepth = 1024
static Q_DECL_UNUSED constexpr quint64 MaximumPreallocatedElementCount

Function Documentation

◆ assignContainer()

QCborContainerPrivate * assignContainer ( QCborContainerPrivate *& d,
QCborContainerPrivate * x )
static

Definition at line 756 of file qcborvalue.cpp.

References QCborContainerPrivate::deref().

Referenced by convertArrayToMap().

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

◆ compareContainer()

int compareContainer ( const QCborContainerPrivate * c1,
const QCborContainerPrivate * c2,
Comparison mode )
staticnoexcept

Definition at line 1316 of file qcborvalue.cpp.

References compareElementRecursive().

Here is the call graph for this function:

◆ compareElementNoData()

int compareElementNoData ( const Element & e1,
const Element & e2 )
staticnoexcept

Definition at line 1218 of file qcborvalue.cpp.

Referenced by compareElementRecursive().

Here is the caller graph for this function:

◆ compareElementRecursive()

int compareElementRecursive ( const QCborContainerPrivate * c1,
const Element & e1,
const QCborContainerPrivate * c2,
const Element & e2,
Comparison mode )
staticnoexcept

Definition at line 1261 of file qcborvalue.cpp.

References QCborContainerPrivate::byteData(), compareElementNoData(), QtCbor::ForEquality, QtCbor::Element::IsContainer, and QtCbor::Element::StringIsUtf16.

Referenced by compareContainer(), QCborContainerPrivate::compareElement_helper(), QCborValueConstRef::comparesEqual_helper(), and QCborValueConstRef::compareThreeWay_helper().

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

◆ comparesEqual() [1/3]

bool comparesEqual ( const QCborArray & lhs,
const QCborArray & rhs )
noexcept

Definition at line 1498 of file qcborvalue.cpp.

◆ comparesEqual() [2/3]

bool comparesEqual ( const QCborMap & lhs,
const QCborMap & rhs )
noexcept

Definition at line 1524 of file qcborvalue.cpp.

◆ comparesEqual() [3/3]

bool comparesEqual ( const QCborValue & lhs,
const QCborValue & rhs )
noexcept

Definition at line 1367 of file qcborvalue.cpp.

◆ compareStringsInUtf8() [1/3]

int compareStringsInUtf8 ( QStringView lhs,
QStringView rhs,
Comparison mode )
staticnoexcept

Definition at line 1129 of file qcborvalue.cpp.

References QtCbor::ForEquality.

◆ compareStringsInUtf8() [2/3]

int compareStringsInUtf8 ( QStringView lhs,
QUtf8StringView rhs,
Comparison mode )
staticnoexcept

Definition at line 1210 of file qcborvalue.cpp.

◆ compareStringsInUtf8() [3/3]

int compareStringsInUtf8 ( QUtf8StringView lhs,
QStringView rhs,
Comparison mode )
staticnoexcept

Definition at line 1163 of file qcborvalue.cpp.

References QtCbor::ForEquality.

◆ convertArrayToMap()

void convertArrayToMap ( QCborContainerPrivate *& array)
static

Definition at line 2486 of file qcborvalue.cpp.

References assignContainer().

Here is the call graph for this function:

◆ convertToExtendedType()

QCborValue::Type convertToExtendedType ( QCborContainerPrivate * d)
static

Definition at line 767 of file qcborvalue.cpp.

References QtCbor::ByteData::byte(), QCborContainerPrivate::byteData(), and QtCbor::Element::HasByteData.

Here is the call graph for this function:

◆ debugContents()

QDebug debugContents ( QDebug & dbg,
const QCborValue & v )
static

Definition at line 3308 of file qcborvalue.cpp.

◆ maybeGrow()

QCborContainerPrivate * maybeGrow ( QCborContainerPrivate * container,
qsizetype index )
static

Definition at line 2515 of file qcborvalue.cpp.

◆ nextUtf32Character()

auto nextUtf32Character ( const char16_t *& ptr,
const char16_t * end )
staticnoexcept

Definition at line 1100 of file qcborvalue.cpp.

◆ operator<<() [1/4]

QDebug operator<< ( QDebug dbg,
const QCborValue & v )

Definition at line 3370 of file qcborvalue.cpp.

◆ operator<<() [2/4]

QDebug operator<< ( QDebug dbg,
QCborKnownTags tag )

Definition at line 3400 of file qcborvalue.cpp.

◆ operator<<() [3/4]

QDebug operator<< ( QDebug dbg,
QCborSimpleType st )

Definition at line 3377 of file qcborvalue.cpp.

◆ operator<<() [4/4]

QDebug operator<< ( QDebug dbg,
QCborTag tag )

Definition at line 3387 of file qcborvalue.cpp.

◆ qHash()

size_t qHash ( const QCborValue & value,
size_t seed )

Definition at line 3183 of file qcborvalue.cpp.

◆ qt_cbor_simpletype_id()

Q_CORE_EXPORT const char * qt_cbor_simpletype_id ( QCborSimpleType st)

Definition at line 3234 of file qcborvalue.cpp.

◆ qt_cbor_tag_id()

Q_CORE_EXPORT const char * qt_cbor_tag_id ( QCborTag tag)

Definition at line 3249 of file qcborvalue.cpp.

◆ qt_to_latin1_unchecked()

void qt_to_latin1_unchecked ( uchar * dst,
const char16_t * uc,
qsizetype len )

Definition at line 1189 of file qstring.cpp.

◆ shouldArrayRemainArray()

bool shouldArrayRemainArray ( qint64 key,
QCborValue::Type t,
QCborContainerPrivate * container )
static

Definition at line 2468 of file qcborvalue.cpp.

◆ stringLengthInUtf8()

qsizetype stringLengthInUtf8 ( const char16_t * ptr,
const char16_t * end )
staticnoexcept

Definition at line 1121 of file qcborvalue.cpp.

◆ typeOrder()

int typeOrder ( QCborValue::Type e1,
QCborValue::Type e2 )
inlinestatic

Definition at line 908 of file qcborvalue.cpp.

Variable Documentation

◆ MaxAcceptableMemoryUse

QT_BEGIN_NAMESPACE constexpr quint64 MaxAcceptableMemoryUse = (sizeof(void*) == 4 ? 256 : 1024) * 1024 * 1024
staticconstexpr

Definition at line 34 of file qcborvalue.cpp.

◆ MaximumPreallocatedElementCount

Q_DECL_UNUSED constexpr quint64 MaximumPreallocatedElementCount
staticconstexpr
Initial value:
=
static Q_DECL_UNUSED constexpr int MaximumRecursionDepth
static QT_BEGIN_NAMESPACE constexpr quint64 MaxAcceptableMemoryUse

Definition at line 45 of file qcborvalue.cpp.

◆ MaximumRecursionDepth

Q_DECL_UNUSED constexpr int MaximumRecursionDepth = 1024
staticconstexpr

Definition at line 44 of file qcborvalue.cpp.