Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QIterable< Container > Class Template Reference

\inmodule QtCore More...

#include <qiterable.h>

+ Collaboration diagram for QIterable< Container >:

Public Member Functions

template<class T >
 QIterable (const Container &metaContainer, const T *p)
 
template<class T >
 QIterable (const Container &metaContainer, T *p)
 
template<typename Pointer >
 QIterable (const Container &metaContainer, Pointer iterable)
 
 QIterable (const Container &metaContainer, qsizetype alignment, const void *p)
 
 QIterable (const Container &metaContainer, qsizetype alignment, void *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< Container > constBegin () const
 Returns a QConstIterator for the beginning of the container.
 
QConstIterator< Container > constEnd () const
 Returns a Qterable::QConstIterator for the end of the container.
 
QIterator< Container > mutableBegin ()
 Returns a QIterator for the beginning of the container.
 
QIterator< Container > mutableEnd ()
 Returns a QSequentialIterable::iterator for the end of the container.
 
qsizetype size () const
 Returns the number of values in the container.
 
Container metaContainer () const
 

Protected Attributes

uint m_revision = 0
 
QtPrivate::QConstPreservingPointer< void, quint16m_iterable
 
Container m_metaContainer
 

Friends

class QBaseIterator< Container >
 

Detailed Description

template<class Container>
class QIterable< Container >

\inmodule QtCore

Since
6.0

QIterable is a template class that is the base class for QSequentialIterable and QAssociativeIterable.

Definition at line 411 of file qiterable.h.

Constructor & Destructor Documentation

◆ QIterable() [1/5]

template<class Container >
template<class T >
QIterable< Container >::QIterable ( const Container & metaContainer,
const T * p )
inline

Definition at line 422 of file qiterable.h.

◆ QIterable() [2/5]

template<class Container >
template<class T >
QIterable< Container >::QIterable ( const Container & metaContainer,
T * p )
inline

Definition at line 428 of file qiterable.h.

◆ QIterable() [3/5]

template<class Container >
template<typename Pointer >
QIterable< Container >::QIterable ( const Container & metaContainer,
Pointer iterable )
inline

Definition at line 434 of file qiterable.h.

◆ QIterable() [4/5]

template<class Container >
QIterable< Container >::QIterable ( const Container & metaContainer,
qsizetype alignment,
const void * p )
inline

Definition at line 439 of file qiterable.h.

◆ QIterable() [5/5]

template<class Container >
QIterable< Container >::QIterable ( const Container & metaContainer,
qsizetype alignment,
void * p )
inline

Definition at line 444 of file qiterable.h.

Member Function Documentation

◆ canForwardIterate()

template<class Container >
template< class Container > bool QIterable< Container >::canForwardIterate ( ) const
inline

Returns whether it is possible to iterate over the container in forward direction.

This corresponds to the std::forward_iterator_tag iterator trait of the iterator and const_iterator of the container.

Definition at line 454 of file qiterable.h.

References QIterable< Container >::m_metaContainer.

◆ canInputIterate()

template<class Container >
template< class Container > bool QIterable< Container >::canInputIterate ( ) const
inline

Returns whether the container has an input iterator.

This corresponds to the std::input_iterator_tag iterator trait of the iterator and const_iterator of the container.

Definition at line 449 of file qiterable.h.

References QIterable< Container >::m_metaContainer.

◆ canRandomAccessIterate()

template<class Container >
template< class Container > bool QIterable< Container >::canRandomAccessIterate ( ) const
inline

Returns whether it is possible to efficiently skip over multiple values using and iterator.

This corresponds to the std::random_access_iterator_tag iterator trait of the iterator and const_iterator of the container.

Definition at line 464 of file qiterable.h.

References QIterable< Container >::m_metaContainer.

◆ canReverseIterate()

template<class Container >
template< class Container > bool QIterable< Container >::canReverseIterate ( ) const
inline

Returns whether it is possible to iterate over the container in reverse.

This corresponds to the std::bidirectional_iterator_tag iterator trait of the const_iterator of the container.

Definition at line 459 of file qiterable.h.

References QIterable< Container >::m_metaContainer.

◆ constBegin()

template<class Container >
template< class Container > QConstIterator< Container > QIterable< Container >::constBegin ( ) const
inline

Returns a QConstIterator for the beginning of the container.

This can be used in stl-style iteration.

See also
constEnd(), mutableBegin()

Definition at line 472 of file qiterable.h.

References QIterable< Container >::constIterable(), and QIterable< Container >::m_metaContainer.

Referenced by QAssociativeIterable::constBegin(), and QSequentialIterable::constBegin().

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

◆ constEnd()

template<class Container >
template< class Container > QConstIterator< Container > QIterable< Container >::constEnd ( ) const
inline

Returns a Qterable::QConstIterator for the end of the container.

This can be used in stl-style iteration.

See also
constBegin(), mutableEnd()

Definition at line 477 of file qiterable.h.

References QIterable< Container >::constIterable(), and QIterable< Container >::m_metaContainer.

Referenced by QAssociativeIterable::constEnd(), and QSequentialIterable::constEnd().

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

◆ constIterable()

template<class Container >
const void * QIterable< Container >::constIterable ( ) const
inline

Definition at line 469 of file qiterable.h.

References QtPrivate::QConstPreservingPointer< Type, Storage >::constPointer(), and QIterable< Container >::m_iterable.

Referenced by QIterable< Container >::constBegin(), QIterable< Container >::constEnd(), and QIterable< Container >::size().

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

◆ metaContainer()

template<class Container >
Container QIterable< Container >::metaContainer ( ) const
inline

Definition at line 508 of file qiterable.h.

References QIterable< Container >::m_metaContainer.

◆ mutableBegin()

template<class Container >
template< class Container > QIterator< Container > QIterable< Container >::mutableBegin ( )
inline

Returns a QIterator for the beginning of the container.

This can be used in stl-style iteration.

See also
mutableEnd(), constBegin()

Definition at line 482 of file qiterable.h.

References QIterable< Container >::m_metaContainer, and QIterable< Container >::mutableIterable().

Referenced by QAssociativeIterable::mutableBegin(), and QSequentialIterable::mutableBegin().

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

◆ mutableEnd()

template<class Container >
template< class Container > QIterator< Container > QIterable< Container >::mutableEnd ( )
inline

Returns a QSequentialIterable::iterator for the end of the container.

This can be used in stl-style iteration.

See also
mutableBegin(), constEnd()

Definition at line 487 of file qiterable.h.

References QIterable< Container >::m_metaContainer, and QIterable< Container >::mutableIterable().

Referenced by QAssociativeIterable::mutableEnd(), and QSequentialIterable::mutableEnd().

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

◆ mutableIterable()

template<class Container >
void * QIterable< Container >::mutableIterable ( )
inline

Definition at line 470 of file qiterable.h.

References QIterable< Container >::m_iterable, and QtPrivate::QConstPreservingPointer< Type, Storage >::mutablePointer().

Referenced by QIterable< Container >::mutableBegin(), and QIterable< Container >::mutableEnd().

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

◆ size()

template<class Container >
template< class Container > qsizetype QIterable< Container >::size ( ) const
inline

Returns the number of values in the container.

Definition at line 492 of file qiterable.h.

References begin(), QIterable< Container >::constIterable(), QIterable< Container >::m_metaContainer, and QIterable< Container >::size().

Referenced by QIterable< Container >::size().

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

Friends And Related Symbol Documentation

◆ QBaseIterator< Container >

template<class Container >
friend class QBaseIterator< Container >
friend

Definition at line 404 of file qiterable.h.

Member Data Documentation

◆ m_iterable

template<class Container >
QtPrivate::QConstPreservingPointer<void, quint16> QIterable< Container >::m_iterable
protected

◆ m_metaContainer

◆ m_revision

template<class Container >
uint QIterable< Container >::m_revision = 0
protected

Definition at line 416 of file qiterable.h.


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