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

Member Enumeration Documentation

◆ ContainerDisposition

Enumerator
CopyContainer 
MoveContainer 

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

◆ addByteDataImpl()

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

Definition at line 122 of file qcborvalue_p.h.

◆ anyStringViewAt()

QAnyStringView QCborContainerPrivate::anyStringViewAt ( qsizetype idx) const
inline

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

◆ append() [2/8]

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

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

◆ append() [4/8]

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

Definition at line 262 of file qcborvalue_p.h.

◆ append() [5/8]

void QCborContainerPrivate::append ( qint64 value)
inline

Definition at line 211 of file qcborvalue_p.h.

◆ append() [6/8]

void QCborContainerPrivate::append ( QLatin1StringView s)
inline

Definition at line 234 of file qcborvalue_p.h.

◆ append() [7/8]

void QCborContainerPrivate::append ( QStringView s)
inline

Definition at line 251 of file qcborvalue_p.h.

◆ append() [8/8]

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

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

◆ appendNonAsciiString()

void QCborContainerPrivate::appendNonAsciiString ( QStringView s)

Definition at line 1066 of file qcborvalue.cpp.

◆ appendUtf8String()

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

Definition at line 230 of file qcborvalue_p.h.

◆ byteArrayAt()

QByteArray QCborContainerPrivate::byteArrayAt ( qsizetype idx) const
inline

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

◆ byteData() [2/2]

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

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

References QCborContainerPrivate().

+ Here is the call graph for this function:

◆ compact()

void QCborContainerPrivate::compact ( )

Definition at line 924 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 410 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 1334 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]

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

Definition at line 367 of file qcborvalue_p.h.

◆ compareUtf8() [2/2]

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

Definition at line 372 of file qcborvalue_p.h.

◆ containerAt()

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

Definition at line 172 of file qcborvalue_p.h.

References QtCbor::Element::IsContainer.

◆ deref()

void QCborContainerPrivate::deref ( )
inline

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

◆ elementFromValue()

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

Definition at line 352 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 1072 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>
static QCborValue QCborContainerPrivate::findCborMapKey ( const QCborValue & self,
KeyType key )
inlinestatic

Definition at line 443 of file qcborvalue_p.h.

◆ findCborMapKey() [2/2]

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

Definition at line 424 of file qcborvalue_p.h.

◆ findOrAddMapKey() [1/4]

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

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

◆ findOrAddMapKey() [3/4]

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

Definition at line 2526 of file qcborvalue.cpp.

◆ findOrAddMapKey() [4/4]

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

Definition at line 2542 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 980 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 202 of file qcborvalue_p.h.

◆ makeValue()

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

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

◆ replaceAt()

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

Definition at line 190 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 996 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 181 of file qcborvalue_p.h.

◆ resetValue()

static void QCborContainerPrivate::resetValue ( QCborValue & v)
inlinestatic

Definition at line 302 of file qcborvalue_p.h.

◆ stringAt()

QString QCborContainerPrivate::stringAt ( qsizetype idx) const
inline

Definition at line 277 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 378 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 396 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 402 of file qcborvalue_p.h.

◆ valueAt()

QCborValue QCborContainerPrivate::valueAt ( qsizetype idx) const
inline

Definition at line 318 of file qcborvalue_p.h.

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

Friends And Related Symbol Documentation

◆ QExplicitlySharedDataPointer< QCborContainerPrivate >

Definition at line 90 of file qcborvalue_p.h.

Member Data Documentation

◆ data

QByteArray QCborContainerPrivate::data

Definition at line 113 of file qcborvalue_p.h.

◆ elements

QList<QtCbor::Element> QCborContainerPrivate::elements

Definition at line 114 of file qcborvalue_p.h.

◆ usedData

QByteArray::size_type QCborContainerPrivate::usedData = 0

Definition at line 112 of file qcborvalue_p.h.


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