![]() |
Qt 4.8
|
Performs deduplication of the nodes on its source list. More...
#include <qdeduplicateiterator_p.h>
Public Functions | |
| virtual Item::Iterator::Ptr | copy () const |
| Copies this QAbstractXmlForwardIterator and returns the copy. More... | |
| virtual xsInteger | count () |
| Determines the number of items this QAbstractXmlForwardIterator represents. More... | |
| DeduplicateIterator (const Item::List &source) | |
| virtual Item | next () |
| Returns the next item in the sequence, or a null object if the end has been reached. More... | |
Public Functions inherited from QPatternist::ListIterator< Item > | |
| ListIterator (const QList< Item > &list) | |
| virtual QList< Item > | toList () |
| Performs a copy of this QAbstractXmlForwardIterator(with copy()), and returns its items in a QList. More... | |
| virtual QVector< Item > | toVector () |
Public Functions inherited from QPatternist::ListIteratorPlatform< InputType, OutputType, Derived, ListType > | |
| virtual OutputType | current () const |
| Returns the current item in the sequence. More... | |
| virtual qint64 | position () const |
| Returns the current position in the sequence represented by this. More... | |
Public Functions inherited from QAbstractXmlForwardIterator< OutputType > | |
| virtual bool | isEmpty () |
| Returns true if the sequence is empty. More... | |
| virtual OutputType | last () |
| Returns the item at the end of this QAbstractXmlForwardIterator. More... | |
| QAbstractXmlForwardIterator () | |
| Default constructor. More... | |
| virtual qint64 | sizeHint () const |
| Gives a hint to the size of the contained sequence. More... | |
| virtual QAbstractXmlForwardIterator< OutputType >::Ptr | toReversed () |
| Returns a reverse iterator for the sequence. More... | |
| virtual | ~QAbstractXmlForwardIterator () |
| Destructor. More... | |
Public Functions inherited from QSharedData | |
| QSharedData () | |
| Constructs a QSharedData object with a reference count of 0. More... | |
| QSharedData (const QSharedData &) | |
| Constructs a QSharedData object with reference count 0. More... | |
Properties | |
| int | m_listPos |
Performs deduplication of the nodes on its source list.
Definition at line 78 of file qdeduplicateiterator_p.h.
| DeduplicateIterator::DeduplicateIterator | ( | const Item::List & | source | ) |
|
virtual |
Copies this QAbstractXmlForwardIterator and returns the copy.
A copy and the original instance are completely independent of each other. Because evaluating an QAbstractXmlForwardIterator modifies it, one should always use a copy when an QAbstractXmlForwardIterator needs to be used several times.
Reimplemented from QPatternist::ListIteratorPlatform< InputType, OutputType, Derived, ListType >.
Definition at line 90 of file qdeduplicateiterator.cpp.
|
virtual |
Determines the number of items this QAbstractXmlForwardIterator represents.
Note that this function is not const. It modifies the QAbstractXmlForwardIterator. The reason for this is efficiency. If this QAbstractXmlForwardIterator must not be changed, get a copy() before performing the count.
The default implementation simply calls next() until the end is reached. Hence, it may be of interest to override this function if the sub-class knows a better way of computing its count.
The number of items in the sequence is returned.
Reimplemented from QPatternist::ListIteratorPlatform< InputType, OutputType, Derived, ListType >.
Definition at line 85 of file qdeduplicateiterator.cpp.
|
virtual |
Returns the next item in the sequence, or a null object if the end has been reached.
Reimplemented from QPatternist::ListIteratorPlatform< InputType, OutputType, Derived, ListType >.
Definition at line 56 of file qdeduplicateiterator.cpp.
|
private |
m_position in ListIteratorPlatform is the position that we show to the outside through position) but do not correspond to the position in m_list, since we skip entries in that one.
However, this guy, m_listPos, is the position into m_list.
Definition at line 95 of file qdeduplicateiterator_p.h.
Referenced by next().