52 #ifndef QABSTRACTXMLFORWARDITERATOR_H 53 #define QABSTRACTXMLFORWARDITERATOR_H 55 #include <QtCore/QList> 56 #include <QtCore/QVector> 57 #include <QtCore/QSharedData> 58 #include <QtCore/QString> 66 template<
typename T>
class QVector;
92 class QAbstractXmlForwardIteratorPrivate;
105 virtual T
next() = 0;
121 QAbstractXmlForwardIteratorPrivate *
d_ptr;
128 class DeduplicateIterator;
130 template<
typename InputType,
147 if(m_position == m_list.count())
150 m_current = OutputType();
154 m_current =
static_cast<const Derived *
>(
this)->inputToOutputItem(m_list.at(m_position));
171 return m_list.count();
233 return toVector(m_list);
320 "This function is internal, unsupported, and should never be called.");
#define QT_END_NAMESPACE
This macro expands to.
QList< T > toList() const
Returns a QList object with the data contained in this QVector.
virtual T current() const =0
Returns the current item in the sequence.
virtual bool isEmpty()
Returns true if the sequence is empty.
QList< QExplicitlySharedDataPointer< QAbstractXmlForwardIterator< T > > > List
A QList containing QAbstractXmlForwardIterator::Ptr instances.
The QExplicitlySharedDataPointer class represents a pointer to an explicitly shared object...
virtual QList< T > toList()
Performs a copy of this QAbstractXmlForwardIterator(with copy()), and returns its items in a QList...
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
QAbstractXmlForwardIterator< T >::Ptr makeListIterator(const QList< T > &list)
The QString class provides a Unicode character string.
QVector< T > toVector() const
Returns a QVector object with the data contained in this QList.
The QVector class is a template class that provides a dynamic array.
QExplicitlySharedDataPointer< QAbstractXmlForwardIterator< T > > Ptr
A smart pointer wrapping an instance of a QAbstractXmlForwardIterator subclass.
ListIterator(const ListType &list)
QVector< QExplicitlySharedDataPointer< QAbstractXmlForwardIterator< T > > > Vector
A QVector containing QAbstractXmlForwardIterator::Ptr instances.
virtual qint64 sizeHint() const
Gives a hint to the size of the contained sequence.
QAbstractXmlForwardIterator< T >::Ptr makeVectorIterator(const QVector< T > &vector)
void append(const T &t)
Inserts value at the end of the list.
#define QT_BEGIN_NAMESPACE
This macro expands to.
static QVector< T > toVector(const QList< T > &list)
void prepend(const T &t)
Inserts value at the beginning of the list.
The QAbstractXmlForwardIterator class is a base class for forward iterators.
The namespace for the internal API of QtXmlPatterns.
Performs deduplication of the nodes on its source list.
virtual T last()
Returns the item at the end of this QAbstractXmlForwardIterator.
virtual qint64 count()
Determines the number of items this QAbstractXmlForwardIterator represents.
virtual qint64 position() const =0
Returns the current position in the sequence represented by this.
virtual QAbstractXmlForwardIterator< T >::Ptr copy() const
Copies this QAbstractXmlForwardIterator and returns the copy.
bool isNull() const
Returns true if this string is null; otherwise returns false.
bool qIsForwardIteratorEnd(const T &unit)
The Callback QAbstractXmlForwardIterator uses for determining whether unit is the end of a sequence...
#define Q_ASSERT_X(cond, where, what)
virtual ~QAbstractXmlForwardIterator()
Destructor.
QAbstractXmlForwardIteratorPrivate * d_ptr
The QSharedData class is a base class for shared data objects.
const T & inputToOutputItem(const T &inputType) const
bool qIsForwardIteratorEnd(const QString &unit)
Helper class for StringSplitter.
virtual QVector< T > toVector()
virtual QList< T > toList()
Performs a copy of this QAbstractXmlForwardIterator(with copy()), and returns its items in a QList...
static QList< T > toList(const QList< T > &list)
QAbstractXmlForwardIterator()
Default constructor.
static QVector< T > toVector(const QVector< T > &vector)
Bridges values in Qt's QList container class into an QAbstractXmlForwardIterator. ...
virtual T next()=0
Returns the next item in the sequence, or a null object if the end has been reached.
static QList< T > toList(const QVector< T > &vector)
The QList class is a template class that provides lists.
virtual QAbstractXmlForwardIterator< T >::Ptr toReversed()
Returns a reverse iterator for the sequence.