(900d4bd29f30effbb5dbb0efa96886af03839a15)
#include <QtCore/qglobal.h>
#include <QtCore/qcontainertools_impl.h>
Go to the source code of this file.
◆ Q_DECLARE_ASSOCIATIVE_FORWARD_ITERATOR
#define Q_DECLARE_ASSOCIATIVE_FORWARD_ITERATOR |
( |
| C | ) |
|
Value:\
template <class Key, class T> \
{ \
inline bool item_exists()
const {
return n !=
c.constEnd(); } \
public: \
inline Q##C##
Iterator(
const Q##C<Key,T> &container) \
:
c(container),
i(
c.constBegin()),
n(
c.constEnd()) {} \
inline Q##C##Iterator &operator=(const Q##C<Key,T> &container) \
{
c = container;
i =
c.constBegin();
n =
c.constEnd();
return *
this; } \
inline void toBack() {
i =
c.constEnd();
n =
c.constEnd(); } \
inline bool hasNext()
const {
return i !=
c.constEnd(); } \
inline Item peekNext()
const {
return i; } \
inline const T &
value()
const {
Q_ASSERT(item_exists());
return *
n; } \
inline const Key &
key()
const {
Q_ASSERT(item_exists());
return n.key(); } \
inline bool findNext(
const T &
t) \
{
while ((
n =
i) !=
c.constEnd())
if (*
i++ ==
t)
return true;
return false; } \
};
const_iterator constBegin() const noexcept
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
static bool hasNext(const Symbols &symbols, int i)
Definition at line 172 of file qiterator.h.
◆ Q_DECLARE_ASSOCIATIVE_ITERATOR
#define Q_DECLARE_ASSOCIATIVE_ITERATOR |
( |
| C | ) |
|
◆ Q_DECLARE_MUTABLE_ASSOCIATIVE_FORWARD_ITERATOR
#define Q_DECLARE_MUTABLE_ASSOCIATIVE_FORWARD_ITERATOR |
( |
| C | ) |
|
Value:\
template <class Key, class T> \
{ \
typedef typename Q##C<Key,T>::iterator
iterator; \
inline bool item_exists()
const {
return const_iterator(
n) !=
c->constEnd(); } \
public: \
inline QMutable##C##
Iterator(Q##C<Key,T> &container) \
{
i =
c->begin();
n =
c->end(); } \
inline QMutable##C##Iterator &operator=(Q##C<Key,T> &container) \
{
c = &container;
i =
c->begin();
n =
c->end();
return *
this; } \
inline void toFront() {
i =
c->
begin();
n =
c->end(); } \
inline void toBack() {
i =
c->end();
n =
c->end(); } \
inline Item peekNext()
const {
return i; } \
inline const T &
value()
const {
Q_ASSERT(item_exists());
return *
n; } \
inline const Key &
key()
const {
Q_ASSERT(item_exists());
return n.key(); } \
inline bool findNext(
const T &
t) \
};
iterator begin()
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
typename C::const_iterator const_iterator
settings setValue("DataPump/bgcolor", color)
settings remove("monkey")
Definition at line 198 of file qiterator.h.
◆ Q_DECLARE_MUTABLE_ASSOCIATIVE_ITERATOR
#define Q_DECLARE_MUTABLE_ASSOCIATIVE_ITERATOR |
( |
| C | ) |
|
◆ Q_DECLARE_MUTABLE_SEQUENTIAL_ITERATOR
#define Q_DECLARE_MUTABLE_SEQUENTIAL_ITERATOR |
( |
| C | ) |
|
◆ Q_DECLARE_SEQUENTIAL_ITERATOR
#define Q_DECLARE_SEQUENTIAL_ITERATOR |
( |
| C | ) |
|
Value:\
template <class T> \
{ \
public: \
inline Q##C##
Iterator(
const Q##C<T> &container) \
:
c(container),
i(
c.constBegin()) {} \
inline Q##C##
Iterator &operator=(
const Q##C<T> &container) \
{
c = container;
i =
c.constBegin();
return *
this; } \
inline void toBack() {
i =
c.constEnd(); } \
inline bool hasNext()
const {
return i !=
c.constEnd(); } \
inline const T &
next() {
return *
i++; } \
inline const T &peekNext()
const {
return *
i; } \
Q_DISABLE_BACKWARD_ITERATOR \
inline
bool hasPrevious()
const {
return i !=
c.constBegin(); } \
Q_DISABLE_BACKWARD_ITERATOR \
inline
const T &previous() {
return *--
i; } \
Q_DISABLE_BACKWARD_ITERATOR \
inline bool findNext(
const T &
t) \
{
while (
i !=
c.constEnd())
if (*
i++ ==
t)
return true;
return false; } \
Q_DISABLE_BACKWARD_ITERATOR \
inline
bool findPrevious(
const T &
t) \
{
while (
i !=
c.constBegin())
if (*(--
i) ==
t)
return true; \
return false; } \
};
Definition at line 21 of file qiterator.h.
◆ Q_DISABLE_BACKWARD_ITERATOR