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
QCborContainerPrivate Class Reference

#include <qcborvalue_p.h>

Inheritance diagram for QCborContainerPrivate:
Collaboration diagram for QCborContainerPrivate:

Public Types

enum  ContainerDisposition { CopyContainer , MoveContainer }

Public Member Functions

 QCborContainerPrivate ()=default
 QCborContainerPrivate (const QCborContainerPrivate &)=default
 QCborContainerPrivate (QCborContainerPrivate &&)=default
QCborContainerPrivateoperator= (const QCborContainerPrivate &)=delete
QCborContainerPrivateoperator= (QCborContainerPrivate &&)=delete
void deref ()
void compact ()
qptrdiff addByteData (const char *block, qsizetype len)
const QtCbor::ByteDatabyteData (QtCbor::Element e) const
const QtCbor::ByteDatabyteData (qsizetype idx) const
QCborContainerPrivatecontainerAt (qsizetype idx, QCborValue::Type type) const
void replaceAt_complex (QtCbor::Element &e, const QCborValue &value, ContainerDisposition disp)
void replaceAt_internal (QtCbor::Element &e, const QCborValue &value, ContainerDisposition disp)
void replaceAt (qsizetype idx, const QCborValue &value, ContainerDisposition disp=CopyContainer)
void insertAt (qsizetype idx, const QCborValue &value, ContainerDisposition disp=CopyContainer)
void append (QtCbor::Undefined)
void append (qint64 value)
void append (QCborTag tag)
void appendByteData (const char *data, qsizetype len, QCborValue::Type type, QtCbor::Element::ValueFlags extraFlags={})
void appendAsciiString (const QString &s)
void appendAsciiString (const char *str, qsizetype len)
void appendUtf8String (const char *str, qsizetype len)
void append (QLatin1StringView s)
void appendAsciiString (QStringView s)
void appendNonAsciiString (QStringView s)
void append (const QString &s)
void append (QStringView s)
void append (const QCborValue &v)
void append (QCborValue &&v)
QByteArray byteArrayAt (qsizetype idx) const
QString stringAt (qsizetype idx) const
QAnyStringView anyStringViewAt (qsizetype idx) const
QCborValue valueAt (qsizetype idx) const
QCborValue extractAt_complex (QtCbor::Element e)
QCborValue extractAt (qsizetype idx)
template<typename String>
int stringCompareElement (const QtCbor::Element &e, String s, QtCbor::Comparison mode) const
template<typename String>
bool stringEqualsElement (const QtCbor::Element &e, String s) const
template<typename String>
bool stringEqualsElement (qsizetype idx, String s) const
int compareElement (qsizetype idx, const QCborValue &value, QtCbor::Comparison mode) const
void removeAt (qsizetype idx)
template<typename KeyType>
QCborValueConstRef findCborMapKey (KeyType key)
Public Member Functions inherited from QSharedData
 QSharedData () noexcept
 Constructs a QSharedData object with a reference count of 0.
 QSharedData (const QSharedData &) noexcept
 Constructs a QSharedData object with reference count 0.
QSharedDataoperator= (const QSharedData &)=delete
 ~QSharedData ()=default

Static Public Member Functions

static QCborContainerPrivateclone (QCborContainerPrivate *d, qsizetype reserved=-1)
static QCborContainerPrivatedetach (QCborContainerPrivate *d, qsizetype reserved)
static QCborContainerPrivategrow (QCborContainerPrivate *d, qsizetype index)
 Prepare for an insertion at position index.
static qptrdiff addByteDataImpl (QByteArray &target, QByteArray::size_type &targetUsed, const char *block, qsizetype len)
static void resetValue (QCborValue &v)
static QCborValue makeValue (QCborValue::Type type, qint64 n, QCborContainerPrivate *d=nullptr, ContainerDisposition disp=CopyContainer)
static QtCbor::Element elementFromValue (const QCborValue &value)
static int compareUtf8 (const QtCbor::ByteData *b, QLatin1StringView s)
static int compareUtf8 (const QtCbor::ByteData *b, QStringView s)
static int compareElement_helper (const QCborContainerPrivate *c1, QtCbor::Element e1, const QCborContainerPrivate *c2, QtCbor::Element e2, QtCbor::Comparison mode) noexcept
template<typename KeyType>
static QCborValue findCborMapKey (const QCborValue &self, KeyType key)
template<typename KeyType>
static QCborValueRef findOrAddMapKey (QCborContainerPrivate *container, KeyType key)
template<typename KeyType>
static QCborValueRef findOrAddMapKey (QCborMap &map, KeyType key)
template<typename KeyType>
static QCborValueRef findOrAddMapKey (QCborValue &self, KeyType key)
template<typename KeyType>
static QCborValueRef findOrAddMapKey (QCborValueRef self, KeyType key)

Public Attributes

QByteArray::size_type usedData = 0
QByteArray data
QList< QtCbor::Elementelements
Public Attributes inherited from QSharedData
QAtomicInt ref

Friends

class QExplicitlySharedDataPointer< QCborContainerPrivate >

Detailed Description

Definition at line 100 of file qcborvalue_p.h.

Member Enumeration Documentation

◆ ContainerDisposition

Enumerator
CopyContainer 
MoveContainer 

Definition at line 112 of file qcborvalue_p.h.

Constructor & Destructor Documentation

◆ QCborContainerPrivate() [1/3]

QCborContainerPrivate::QCborContainerPrivate ( )
default

◆ QCborContainerPrivate() [2/3]

QCborContainerPrivate::QCborContainerPrivate ( const QCborContainerPrivate & )
default

Referenced by clone().

Here is the caller graph for this function:

◆ QCborContainerPrivate() [3/3]

QCborContainerPrivate::QCborContainerPrivate ( QCborContainerPrivate && )
default

Member Function Documentation

◆ addByteData()

qptrdiff QCborContainerPrivate::addByteData ( const char * block,
qsizetype len )
inline

Definition at line 151 of file qcborvalue_p.h.

◆ addByteDataImpl()

qptrdiff QCborContainerPrivate::addByteDataImpl ( QByteArray & target,
QByteArray::size_type & targetUsed,
const char * block,
qsizetype len )
inlinestatic

Definition at line 124 of file qcborvalue_p.h.

◆ anyStringViewAt()

QAnyStringView QCborContainerPrivate::anyStringViewAt ( qsizetype idx) const
inline

Definition at line 291 of file qcborvalue_p.h.

References byteData(), QtCbor::Element::StringIsAscii, and QtCbor::Element::StringIsUtf16.

Here is the call graph for this function:

◆ append() [1/8]

void QCborContainerPrivate::append ( const QCborValue & v)
inline

Definition at line 260 of file qcborvalue_p.h.

◆ append() [2/8]

void QCborContainerPrivate::append ( const QString & s)
inline

Definition at line 248 of file qcborvalue_p.h.

References append().

Here is the call graph for this function:

◆ append() [3/8]

void QCborContainerPrivate::append ( QCborTag tag)
inline

Definition at line 217 of file qcborvalue_p.h.

◆ append() [4/8]

void QCborContainerPrivate::append ( QCborValue && v)
inline

Definition at line 264 of file qcborvalue_p.h.

◆ append() [5/8]

void QCborContainerPrivate::append ( qint64 value)
inline

Definition at line 213 of file qcborvalue_p.h.

◆ append() [6/8]

void QCborContainerPrivate::append ( QLatin1StringView s)
inline

Definition at line 236 of file qcborvalue_p.h.

◆ append() [7/8]

void QCborContainerPrivate::append ( QStringView s)
inline

Definition at line 253 of file qcborvalue_p.h.

◆ append() [8/8]

void QCborContainerPrivate::append ( QtCbor::Undefined )
inline

Definition at line 209 of file qcborvalue_p.h.

Referenced by append(), appendVariant(), findOrAddMapKey(), and grow().

Here is the caller graph for this function:

◆ appendAsciiString() [1/3]

void QCborContainerPrivate::appendAsciiString ( const char * str,
qsizetype len )
inline

Definition at line 228 of file qcborvalue_p.h.

◆ appendAsciiString() [2/3]

void QCborContainerPrivate::appendAsciiString ( const QString & s)

◆ appendAsciiString() [3/3]

Q_NEVER_INLINE void QCborContainerPrivate::appendAsciiString ( QStringView s)

◆ appendByteData()

void QCborContainerPrivate::appendByteData ( const char * data,
qsizetype len,
QCborValue::Type type,
QtCbor::Element::ValueFlags extraFlags = {} )
inline

Definition at line 221 of file qcborvalue_p.h.

◆ appendNonAsciiString()

void QCborContainerPrivate::appendNonAsciiString ( QStringView s)

Definition at line 1069 of file qcborvalue.cpp.

◆ appendUtf8String()

void QCborContainerPrivate::appendUtf8String ( const char * str,
qsizetype len )
inline

Definition at line 232 of file qcborvalue_p.h.

◆ byteArrayAt()

QByteArray QCborContainerPrivate::byteArrayAt ( qsizetype idx) const
inline

Definition at line 271 of file qcborvalue_p.h.

References byteData().

Here is the call graph for this function:

◆ byteData() [1/2]

const QtCbor::ByteData * QCborContainerPrivate::byteData ( qsizetype idx) const
inline

Definition at line 169 of file qcborvalue_p.h.

◆ byteData() [2/2]

const QtCbor::ByteData * QCborContainerPrivate::byteData ( QtCbor::Element e) const
inline

Definition at line 156 of file qcborvalue_p.h.

References QtCbor::Element::HasByteData.

Referenced by anyStringViewAt(), byteArrayAt(), compareElementRecursive(), convertToExtendedType(), encodeByteArray(), extractAt_complex(), replaceAt(), stringAt(), and stringCompareElement().

Here is the caller graph for this function:

◆ clone()

QCborContainerPrivate * QCborContainerPrivate::clone ( QCborContainerPrivate * d,
qsizetype reserved = -1 )
static

Definition at line 947 of file qcborvalue.cpp.

References QCborContainerPrivate().

Here is the call graph for this function:

◆ compact()

void QCborContainerPrivate::compact ( )

Definition at line 927 of file qcborvalue.cpp.

Referenced by extractAt_complex(), and replaceAt_complex().

Here is the caller graph for this function:

◆ compareElement()

int QCborContainerPrivate::compareElement ( qsizetype idx,
const QCborValue & value,
QtCbor::Comparison mode ) const
inline

Definition at line 412 of file qcborvalue_p.h.

References compareElement_helper().

Here is the call graph for this function:

◆ compareElement_helper()

int QCborContainerPrivate::compareElement_helper ( const QCborContainerPrivate * c1,
QtCbor::Element e1,
const QCborContainerPrivate * c2,
QtCbor::Element e2,
QtCbor::Comparison mode )
inlinestaticnoexcept

Definition at line 1337 of file qcborvalue.cpp.

References compareElementRecursive().

Referenced by compareElement().

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

◆ compareUtf8() [1/2]

int QCborContainerPrivate::compareUtf8 ( const QtCbor::ByteData * b,
QLatin1StringView s )
inlinestatic

Definition at line 369 of file qcborvalue_p.h.

◆ compareUtf8() [2/2]

int QCborContainerPrivate::compareUtf8 ( const QtCbor::ByteData * b,
QStringView s )
inlinestatic

Definition at line 374 of file qcborvalue_p.h.

◆ containerAt()

QCborContainerPrivate * QCborContainerPrivate::containerAt ( qsizetype idx,
QCborValue::Type type ) const
inline

Definition at line 174 of file qcborvalue_p.h.

References QtCbor::Element::IsContainer.

◆ deref()

void QCborContainerPrivate::deref ( )
inline

Definition at line 118 of file qcborvalue_p.h.

Referenced by assignContainer().

Here is the caller graph for this function:

◆ detach()

QCborContainerPrivate * QCborContainerPrivate::detach ( QCborContainerPrivate * d,
qsizetype reserved )
static

Definition at line 970 of file qcborvalue.cpp.

◆ elementFromValue()

QtCbor::Element QCborContainerPrivate::elementFromValue ( const QCborValue & value)
inlinestatic

Definition at line 354 of file qcborvalue_p.h.

References QtCbor::Element::IsContainer.

◆ extractAt()

QCborValue QCborContainerPrivate::extractAt ( qsizetype idx)
inline

◆ extractAt_complex()

QCborValue QCborContainerPrivate::extractAt_complex ( QtCbor::Element e)

Definition at line 1075 of file qcborvalue.cpp.

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

Here is the call graph for this function:

◆ findCborMapKey() [1/2]

template<typename KeyType>
QCborValue QCborContainerPrivate::findCborMapKey ( const QCborValue & self,
KeyType key )
inlinestatic

Definition at line 445 of file qcborvalue_p.h.

◆ findCborMapKey() [2/2]

template<typename KeyType>
QCborValueConstRef QCborContainerPrivate::findCborMapKey ( KeyType key)
inline

Definition at line 426 of file qcborvalue_p.h.

◆ findOrAddMapKey() [1/4]

template<typename KeyType>
QCborValueRef QCborContainerPrivate::findOrAddMapKey ( QCborContainerPrivate * container,
KeyType key )
inlinestatic

Definition at line 455 of file qcborvalue_p.h.

References append().

Here is the call graph for this function:

◆ findOrAddMapKey() [2/4]

template<typename KeyType>
QCborValueRef QCborContainerPrivate::findOrAddMapKey ( QCborMap & map,
KeyType key )
inlinestatic

Definition at line 880 of file qcbormap.cpp.

◆ findOrAddMapKey() [3/4]

template<typename KeyType>
QCborValueRef QCborContainerPrivate::findOrAddMapKey ( QCborValue & self,
KeyType key )
inlinestatic

Definition at line 2527 of file qcborvalue.cpp.

◆ findOrAddMapKey() [4/4]

template<typename KeyType>
QCborValueRef QCborContainerPrivate::findOrAddMapKey ( QCborValueRef self,
KeyType key )
static

Definition at line 2543 of file qcborvalue.cpp.

References QtCbor::Element::IsContainer.

◆ grow()

QCborContainerPrivate * QCborContainerPrivate::grow ( QCborContainerPrivate * d,
qsizetype index )
static

Prepare for an insertion at position index.

Detaches and ensures there are at least index entries in the array, padding with Undefined as needed.

Definition at line 983 of file qcborvalue.cpp.

References append().

Here is the call graph for this function:

◆ insertAt()

void QCborContainerPrivate::insertAt ( qsizetype idx,
const QCborValue & value,
ContainerDisposition disp = CopyContainer )
inline

Definition at line 204 of file qcborvalue_p.h.

◆ makeValue()

QCborValue QCborContainerPrivate::makeValue ( QCborValue::Type type,
qint64 n,
QCborContainerPrivate * d = nullptr,
ContainerDisposition disp = CopyContainer )
inlinestatic

Definition at line 309 of file qcborvalue_p.h.

References CopyContainer.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

QCborContainerPrivate & QCborContainerPrivate::operator= ( QCborContainerPrivate && )
delete

◆ removeAt()

void QCborContainerPrivate::removeAt ( qsizetype idx)
inline

Definition at line 419 of file qcborvalue_p.h.

◆ replaceAt()

void QCborContainerPrivate::replaceAt ( qsizetype idx,
const QCborValue & value,
ContainerDisposition disp = CopyContainer )
inline

Definition at line 192 of file qcborvalue_p.h.

References byteData(), and QtCbor::Element::IsContainer.

Here is the call graph for this function:

◆ replaceAt_complex()

void QCborContainerPrivate::replaceAt_complex ( QtCbor::Element & e,
const QCborValue & value,
ContainerDisposition disp )

Definition at line 999 of file qcborvalue.cpp.

References compact(), CopyContainer, QtCbor::Element::HasByteData, QtCbor::Element::IsContainer, and MoveContainer.

Here is the call graph for this function:

◆ replaceAt_internal()

void QCborContainerPrivate::replaceAt_internal ( QtCbor::Element & e,
const QCborValue & value,
ContainerDisposition disp )
inline

Definition at line 183 of file qcborvalue_p.h.

◆ resetValue()

void QCborContainerPrivate::resetValue ( QCborValue & v)
inlinestatic

Definition at line 304 of file qcborvalue_p.h.

◆ stringAt()

QString QCborContainerPrivate::stringAt ( qsizetype idx) const
inline

Definition at line 279 of file qcborvalue_p.h.

References byteData(), QtCbor::Element::StringIsAscii, and QtCbor::Element::StringIsUtf16.

Here is the call graph for this function:

◆ stringCompareElement()

template<typename String>
int QCborContainerPrivate::stringCompareElement ( const QtCbor::Element & e,
String s,
QtCbor::Comparison mode ) const
inline

Definition at line 380 of file qcborvalue_p.h.

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

Here is the call graph for this function:

◆ stringEqualsElement() [1/2]

template<typename String>
bool QCborContainerPrivate::stringEqualsElement ( const QtCbor::Element & e,
String s ) const
inline

Definition at line 398 of file qcborvalue_p.h.

References QtCbor::ForEquality.

◆ stringEqualsElement() [2/2]

template<typename String>
bool QCborContainerPrivate::stringEqualsElement ( qsizetype idx,
String s ) const
inline

Definition at line 404 of file qcborvalue_p.h.

◆ valueAt()

QCborValue QCborContainerPrivate::valueAt ( qsizetype idx) const
inline

Definition at line 320 of file qcborvalue_p.h.

References QtCbor::Element::HasByteData, and QtCbor::Element::IsContainer.

◆ QExplicitlySharedDataPointer< QCborContainerPrivate >

Definition at line 91 of file qcborvalue_p.h.

Member Data Documentation

◆ data

QByteArray QCborContainerPrivate::data

Definition at line 115 of file qcborvalue_p.h.

◆ elements

QList<QtCbor::Element> QCborContainerPrivate::elements

Definition at line 116 of file qcborvalue_p.h.

◆ usedData

QByteArray::size_type QCborContainerPrivate::usedData = 0

Definition at line 114 of file qcborvalue_p.h.


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