QCborValueRef Class

qmake: QT += core

Public Functions

const QCborValue operator[](const QString &key) const
const QCborValue operator[](QLatin1String key) const
const QCborValue operator[](qint64 key) const
QCborValueRef operator[](qint64 key)
QCborValueRef operator[](QLatin1String key)
QCborValueRef operator[](const QString &key)

Member Function Documentation

const QCborValue QCborValueRef::operator[](const QString &key) const

If this QCborValueRef refers to a QCborMap, searches elements for the value whose key matches key. If there's no key matching key in the map or if this QCborValueRef object is not a map, returns the undefined value.

This function is equivalent to:


  value.toMap().value(key);

See also operator[](qint64), QCborMap::operator[], QCborMap::value(), and QCborMap::find().

const QCborValue QCborValueRef::operator[](QLatin1String key) const

This is an overloaded function.

If this QCborValueRef refers to a QCborMap, searches elements for the value whose key matches key. If there's no key matching key in the map or if this QCborValueRef object is not a map, returns the undefined value.

This function is equivalent to:


  value.toMap().value(key);

See also operator[](qint64), QCborMap::operator[], QCborMap::value(), and QCborMap::find().

const QCborValue QCborValueRef::operator[](qint64 key) const

This is an overloaded function.

If this QCborValueRef refers to a QCborMap, searches elements for the value whose key matches key. If this is a QCborArray, returns the element whose index is key. If there's no matching value in the array or map, or if this QCborValueRef object is not an array or map, returns the undefined value.

See also operator[], QCborMap::operator[], QCborMap::value(), QCborMap::find(), QCborArray::operator[], and QCborArray::at().

QCborValueRef QCborValueRef::operator[](qint64 key)

This is an overloaded function.

Returns a QCborValueRef that can be used to read or modify the entry in this, as a map or array, with the given key. When this QCborValue is a QCborMap or, for 0 <= key < 0x10000, a QCborArray, this function is equivalent to the matching operator[] on that map or array.

Before returning the reference: if the QCborValue referenced was an array but the key is out of range, the array is first converted to a map (so that map[i] is array[i] for each index, i, with valid array[i]); otherwise, if it was not a map it will be over-written with an empty map.

See also operator[], QCborMap::operator[], QCborMap::value(), QCborMap::find(), QCborArray::operator[], and QCborArray::at().

QCborValueRef QCborValueRef::operator[](QLatin1String key)

This is an overloaded function.

Returns a QCborValueRef that can be used to read or modify the entry in this, as a map, with the given key. When this QCborValue is a QCborMap, this function is equivalent to the matching operator[] on that map.

Before returning the reference: if the QCborValue referenced was an array, it is first converted to a map (so that map[i] is array[i] for each index, i, with valid array[i]); otherwise, if it was not a map it will be over-written with an empty map.

See also operator[](qint64), QCborMap::operator[], QCborMap::value(), and QCborMap::find().

QCborValueRef QCborValueRef::operator[](const QString &key)

Returns a QCborValueRef that can be used to read or modify the entry in this, as a map, with the given key. When this QCborValueRef refers to a QCborMap, this function is equivalent to the matching operator[] on that map.

Before returning the reference: if the QCborValue referenced was an array, it is first converted to a map (so that map[i] is array[i] for each index, i, with valid array[i]); otherwise, if it was not a map it will be over-written with an empty map.

See also operator[](qint64), QCborMap::operator[], QCborMap::value(), and QCborMap::find().