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 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)
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

union { 
   QByteArray::size_type   usedData = 0 
   QCborContainerPrivate *   nextToDelete 
}; 
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 154 of file qcborvalue_p.h.

◆ addByteDataImpl()

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

Definition at line 127 of file qcborvalue_p.h.

◆ anyStringViewAt()

QAnyStringView QCborContainerPrivate::anyStringViewAt ( qsizetype idx) const
inline

Definition at line 293 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 262 of file qcborvalue_p.h.

◆ append() [2/8]

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

Definition at line 250 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 220 of file qcborvalue_p.h.

◆ append() [4/8]

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

Definition at line 266 of file qcborvalue_p.h.

◆ append() [5/8]

void QCborContainerPrivate::append ( qint64 value)
inline

Definition at line 216 of file qcborvalue_p.h.

◆ append() [6/8]

void QCborContainerPrivate::append ( QLatin1StringView s)
inline

Definition at line 238 of file qcborvalue_p.h.

◆ append() [7/8]

void QCborContainerPrivate::append ( QStringView s)
inline

Definition at line 255 of file qcborvalue_p.h.

◆ append() [8/8]

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

Definition at line 212 of file qcborvalue_p.h.

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

Here is the caller graph for this function:

◆ appendAsciiString() [1/2]

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

Definition at line 230 of file qcborvalue_p.h.

◆ appendAsciiString() [2/2]

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 224 of file qcborvalue_p.h.

◆ appendNonAsciiString()

void QCborContainerPrivate::appendNonAsciiString ( QStringView s)

Definition at line 1108 of file qcborvalue.cpp.

◆ appendUtf8String()

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

Definition at line 234 of file qcborvalue_p.h.

◆ byteArrayAt()

QByteArray QCborContainerPrivate::byteArrayAt ( qsizetype idx) const
inline

Definition at line 273 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 172 of file qcborvalue_p.h.

References byteData().

Here is the call graph for this function:

◆ byteData() [2/2]

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

Definition at line 159 of file qcborvalue_p.h.

References QtCbor::Element::HasByteData.

Referenced by anyStringViewAt(), byteArrayAt(), byteData(), 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 985 of file qcborvalue.cpp.

References QCborContainerPrivate().

Here is the call graph for this function:

◆ compact()

void QCborContainerPrivate::compact ( )

Definition at line 965 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 414 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 1376 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 371 of file qcborvalue_p.h.

◆ compareUtf8() [2/2]

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

Definition at line 376 of file qcborvalue_p.h.

◆ containerAt()

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

Definition at line 177 of file qcborvalue_p.h.

References QtCbor::Element::IsContainer.

◆ deref()

void QCborContainerPrivate::deref ( )
inline

Definition at line 121 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 1008 of file qcborvalue.cpp.

◆ elementFromValue()

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

Definition at line 356 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 1114 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 447 of file qcborvalue_p.h.

◆ findCborMapKey() [2/2]

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

Definition at line 428 of file qcborvalue_p.h.

◆ findOrAddMapKey() [1/4]

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

Definition at line 457 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 881 of file qcbormap.cpp.

◆ findOrAddMapKey() [3/4]

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

Definition at line 2577 of file qcborvalue.cpp.

◆ findOrAddMapKey() [4/4]

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

Definition at line 2593 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 1022 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 207 of file qcborvalue_p.h.

◆ makeValue()

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

Definition at line 311 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 421 of file qcborvalue_p.h.

◆ replaceAt()

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

Definition at line 195 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 1038 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 186 of file qcborvalue_p.h.

◆ resetValue()

void QCborContainerPrivate::resetValue ( QCborValue & v)
inlinestatic

Definition at line 306 of file qcborvalue_p.h.

◆ stringAt()

QString QCborContainerPrivate::stringAt ( qsizetype idx) const
inline

Definition at line 281 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 382 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 400 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 406 of file qcborvalue_p.h.

◆ valueAt()

QCborValue QCborContainerPrivate::valueAt ( qsizetype idx) const
inline

Definition at line 322 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

◆ [union]

union { ... } QCborContainerPrivate

◆ data

QByteArray QCborContainerPrivate::data

Definition at line 118 of file qcborvalue_p.h.

◆ elements

QList<QtCbor::Element> QCborContainerPrivate::elements

Definition at line 119 of file qcborvalue_p.h.

◆ nextToDelete

QCborContainerPrivate* QCborContainerPrivate::nextToDelete

Definition at line 116 of file qcborvalue_p.h.

◆ usedData

QByteArray::size_type QCborContainerPrivate::usedData = 0

Definition at line 115 of file qcborvalue_p.h.


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