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
QtMetaContainerPrivate::Association Class Reference

#include <qmetaassociation.h>

Inheritance diagram for QtMetaContainerPrivate::Association:
Collaboration diagram for QtMetaContainerPrivate::Association:

Public Types

using Iterator = QTaggedIterator<AssociativeIterator, void>
using RandomAccessIterator = QTaggedIterator<AssociativeIterator, std::random_access_iterator_tag>
using BidirectionalIterator = QTaggedIterator<AssociativeIterator, std::bidirectional_iterator_tag>
using ForwardIterator = QTaggedIterator<AssociativeIterator, std::forward_iterator_tag>
using InputIterator = QTaggedIterator<AssociativeIterator, std::input_iterator_tag>
using ConstIterator = QTaggedIterator<AssociativeConstIterator, void>
using RandomAccessConstIterator = QTaggedIterator<AssociativeConstIterator, std::random_access_iterator_tag>
using BidirectionalConstIterator = QTaggedIterator<AssociativeConstIterator, std::bidirectional_iterator_tag>
using ForwardConstIterator = QTaggedIterator<AssociativeConstIterator, std::forward_iterator_tag>
using InputConstIterator = QTaggedIterator<AssociativeConstIterator, std::input_iterator_tag>
using iterator = Iterator
using const_iterator = ConstIterator

Public Member Functions

template<class T>
 Association (const T *p)
template<class T>
 Association (T *p)
 Association ()
template<typename Pointer>
 Association (const QMetaAssociation &metaAssociation, Pointer iterable)
 Association (const QMetaAssociation &metaAssociation, QMetaType metaType, void *iterable)
 Association (const QMetaAssociation &metaAssociation, QMetaType metaType, const void *iterable)
 Association (QIterable< QMetaAssociation > &&other)
Associationoperator= (QIterable< QMetaAssociation > &&other)
ConstIterator begin () const
ConstIterator end () const
ConstIterator constBegin () const
ConstIterator constEnd () const
Iterator mutableBegin ()
Iterator mutableEnd ()
ConstIterator find (const QVariant &key) const
 Retrieves a ConstIterator pointing to the element at the given key, or the end of the container if that key does not exist.
ConstIterator constFind (const QVariant &key) const
Iterator mutableFind (const QVariant &key)
 Retrieves an iterator pointing to the element at the given key, or the end of the container if that key does not exist.
bool containsKey (const QVariant &key) const
 Returns true if the container has an entry with the given key, or false otherwise.
void insertKey (const QVariant &key)
 Inserts a new entry with the given key, or resets the mapped value of any existing entry with the given key to the default constructed mapped value.
void removeKey (const QVariant &key)
 Removes the entry with the given key from the container.
QVariant value (const QVariant &key) const
 Retrieves the mapped value at the given key, or a QVariant of a default-constructed instance of the mapped type, if the key does not exist.
void setValue (const QVariant &key, const QVariant &mapped)
 Sets the mapped value associated with key to mapped, if possible.
Public Member Functions inherited from QIterable< QMetaAssociation >
 QIterable (const QMetaAssociation &metaContainer, const T *p)
bool canInputIterate () const
 Returns whether the container has an input iterator.
bool canForwardIterate () const
 Returns whether it is possible to iterate over the container in forward direction.
bool canReverseIterate () const
 Returns whether it is possible to iterate over the container in reverse.
bool canRandomAccessIterate () const
 Returns whether it is possible to efficiently skip over multiple values using and iterator.
const voidconstIterable () const
voidmutableIterable ()
QConstIterator< QMetaAssociationconstBegin () const
 Returns a QConstIterator for the beginning of the container.
QConstIterator< QMetaAssociationconstEnd () const
 Returns a Qterable::QConstIterator for the end of the container.
QIterator< QMetaAssociationmutableBegin ()
 Returns a QIterator for the beginning of the container.
QIterator< QMetaAssociationmutableEnd ()
 Returns a QMetaSequence::Iterable::iterator for the end of the container.
qsizetype size () const
 Returns the number of values in the container.
void clear ()
 Clears the container.
QMetaAssociation metaContainer () const

Additional Inherited Members

Protected Attributes inherited from QIterable< QMetaAssociation >
uint m_revision
QtPrivate::QConstPreservingPointer< void, quint16m_iterable
QMetaAssociation m_metaContainer

Detailed Description

Definition at line 127 of file qmetaassociation.h.

Member Typedef Documentation

◆ BidirectionalConstIterator

using QtMetaContainerPrivate::Association::BidirectionalConstIterator = QTaggedIterator<AssociativeConstIterator, std::bidirectional_iterator_tag>

Definition at line 138 of file qmetaassociation.h.

◆ BidirectionalIterator

using QtMetaContainerPrivate::Association::BidirectionalIterator = QTaggedIterator<AssociativeIterator, std::bidirectional_iterator_tag>

Definition at line 132 of file qmetaassociation.h.

◆ const_iterator

◆ ConstIterator

Definition at line 136 of file qmetaassociation.h.

◆ ForwardConstIterator

using QtMetaContainerPrivate::Association::ForwardConstIterator = QTaggedIterator<AssociativeConstIterator, std::forward_iterator_tag>

Definition at line 139 of file qmetaassociation.h.

◆ ForwardIterator

using QtMetaContainerPrivate::Association::ForwardIterator = QTaggedIterator<AssociativeIterator, std::forward_iterator_tag>

Definition at line 133 of file qmetaassociation.h.

◆ InputConstIterator

using QtMetaContainerPrivate::Association::InputConstIterator = QTaggedIterator<AssociativeConstIterator, std::input_iterator_tag>

Definition at line 140 of file qmetaassociation.h.

◆ InputIterator

using QtMetaContainerPrivate::Association::InputIterator = QTaggedIterator<AssociativeIterator, std::input_iterator_tag>

Definition at line 134 of file qmetaassociation.h.

◆ Iterator

Definition at line 130 of file qmetaassociation.h.

◆ iterator

◆ RandomAccessConstIterator

using QtMetaContainerPrivate::Association::RandomAccessConstIterator = QTaggedIterator<AssociativeConstIterator, std::random_access_iterator_tag>

Definition at line 137 of file qmetaassociation.h.

◆ RandomAccessIterator

using QtMetaContainerPrivate::Association::RandomAccessIterator = QTaggedIterator<AssociativeIterator, std::random_access_iterator_tag>

Definition at line 131 of file qmetaassociation.h.

Constructor & Destructor Documentation

◆ Association() [1/7]

template<class T>
QtMetaContainerPrivate::Association::Association ( const T * p)
inline

Definition at line 146 of file qmetaassociation.h.

◆ Association() [2/7]

template<class T>
QtMetaContainerPrivate::Association::Association ( T * p)
inline

Definition at line 149 of file qmetaassociation.h.

◆ Association() [3/7]

QtMetaContainerPrivate::Association::Association ( )
inline

Definition at line 151 of file qmetaassociation.h.

◆ Association() [4/7]

template<typename Pointer>
QtMetaContainerPrivate::Association::Association ( const QMetaAssociation & metaAssociation,
Pointer iterable )
inline

Definition at line 154 of file qmetaassociation.h.

◆ Association() [5/7]

QtMetaContainerPrivate::Association::Association ( const QMetaAssociation & metaAssociation,
QMetaType metaType,
void * iterable )
inline

Definition at line 159 of file qmetaassociation.h.

◆ Association() [6/7]

QtMetaContainerPrivate::Association::Association ( const QMetaAssociation & metaAssociation,
QMetaType metaType,
const void * iterable )
inline

Definition at line 164 of file qmetaassociation.h.

References Association().

Referenced by Association().

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

◆ Association() [7/7]

QtMetaContainerPrivate::Association::Association ( QIterable< QMetaAssociation > && other)
inline

Definition at line 169 of file qmetaassociation.h.

References Association().

Referenced by Association().

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

Member Function Documentation

◆ begin()

ConstIterator QtMetaContainerPrivate::Association::begin ( ) const
inline

Definition at line 179 of file qmetaassociation.h.

◆ constBegin()

ConstIterator QtMetaContainerPrivate::Association::constBegin ( ) const
inline

Definition at line 182 of file qmetaassociation.h.

◆ constEnd()

ConstIterator QtMetaContainerPrivate::Association::constEnd ( ) const
inline

Definition at line 183 of file qmetaassociation.h.

◆ constFind()

ConstIterator QtMetaContainerPrivate::Association::constFind ( const QVariant & key) const
inline

Definition at line 199 of file qmetaassociation.h.

◆ containsKey()

bool QtMetaContainerPrivate::Association::containsKey ( const QVariant & key) const
inline

Returns true if the container has an entry with the given key, or false otherwise.

If the key isn't convertible to the expected type, false is returned.

Definition at line 210 of file qmetaassociation.h.

◆ end()

ConstIterator QtMetaContainerPrivate::Association::end ( ) const
inline

Definition at line 180 of file qmetaassociation.h.

◆ find()

ConstIterator QtMetaContainerPrivate::Association::find ( const QVariant & key) const
inline

Retrieves a ConstIterator pointing to the element at the given key, or the end of the container if that key does not exist.

If the key isn't convertible to the expected type, the end of the container is returned.

Definition at line 188 of file qmetaassociation.h.

◆ insertKey()

void QtMetaContainerPrivate::Association::insertKey ( const QVariant & key)
inline

Inserts a new entry with the given key, or resets the mapped value of any existing entry with the given key to the default constructed mapped value.

The key is coerced to the expected type: If it isn't convertible, a default value is inserted.

Definition at line 219 of file qmetaassociation.h.

◆ mutableBegin()

Iterator QtMetaContainerPrivate::Association::mutableBegin ( )
inline

Definition at line 185 of file qmetaassociation.h.

◆ mutableEnd()

Iterator QtMetaContainerPrivate::Association::mutableEnd ( )
inline

Definition at line 186 of file qmetaassociation.h.

◆ mutableFind()

Iterator QtMetaContainerPrivate::Association::mutableFind ( const QVariant & key)
inline

Retrieves an iterator pointing to the element at the given key, or the end of the container if that key does not exist.

If the key isn't convertible to the expected type, the end of the container is returned.

Definition at line 201 of file qmetaassociation.h.

◆ operator=()

Association & QtMetaContainerPrivate::Association::operator= ( QIterable< QMetaAssociation > && other)
inline

Definition at line 173 of file qmetaassociation.h.

◆ removeKey()

void QtMetaContainerPrivate::Association::removeKey ( const QVariant & key)
inline

Removes the entry with the given key from the container.

The key is coerced to the expected type: If it isn't convertible, the default value is removed.

Definition at line 226 of file qmetaassociation.h.

◆ setValue()

void QtMetaContainerPrivate::Association::setValue ( const QVariant & key,
const QVariant & mapped )
inline

Sets the mapped value associated with key to mapped, if possible.

Inserts a new entry if none exists yet, for the given key. If the key is not convertible to the key type, the value for the default-constructed key type is overwritten.

Definition at line 242 of file qmetaassociation.h.

◆ value()

QVariant QtMetaContainerPrivate::Association::value ( const QVariant & key) const
inline

Retrieves the mapped value at the given key, or a QVariant of a default-constructed instance of the mapped type, if the key does not exist.

If the key is not convertible to the key type, the mapped value associated with the default-constructed key is returned.

Definition at line 233 of file qmetaassociation.h.


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