Qt 4.8
|
Implements the except
operator. That is, the computation of the sequence of nodes from one sequence, that doesn't appear in the other.
More...
#include <qexceptiterator_p.h>
Public Functions | |
virtual Item::Iterator::Ptr | copy () const |
Copies this QAbstractXmlForwardIterator and returns the copy. More... | |
virtual Item | current () const |
Returns the current item in the sequence. More... | |
ExceptIterator (const Item::Iterator::Ptr &it1, const Item::Iterator::Ptr &it2) | |
virtual Item | next () |
Returns the next item in the sequence, or a null object if the end has been reached. More... | |
virtual xsInteger | position () const |
Returns the current position in the sequence represented by this. More... | |
Public Functions inherited from QAbstractXmlForwardIterator< Item > | |
virtual qint64 | count () |
Determines the number of items this QAbstractXmlForwardIterator represents. More... | |
virtual bool | isEmpty () |
Returns true if the sequence is empty. More... | |
virtual Item | 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 QList< Item > | toList () |
Performs a copy of this QAbstractXmlForwardIterator(with copy()), and returns its items in a QList. More... | |
virtual QAbstractXmlForwardIterator< Item >::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... | |
Private Functions | |
Item | fromFirstOperand () |
Properties | |
Item | m_current |
const Item::Iterator::Ptr | m_it1 |
const Item::Iterator::Ptr | m_it2 |
Item | m_node1 |
Item | m_node2 |
xsInteger | m_position |
Implements the except
operator. That is, the computation of the sequence of nodes from one sequence, that doesn't appear in the other.
Definition at line 70 of file qexceptiterator_p.h.
ExceptIterator::ExceptIterator | ( | const Item::Iterator::Ptr & | it1, |
const Item::Iterator::Ptr & | it2 | ||
) |
It is assumed that it1
and it2
are in document order and without duplicates.
Definition at line 50 of file qexceptiterator.cpp.
Referenced by copy().
|
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 QAbstractXmlForwardIterator< Item >.
Definition at line 117 of file qexceptiterator.cpp.
|
virtual |
Returns the current item in the sequence.
If this function is called before the first call to next(), a null object is returned. If the end of the sequence has been reached, a null object is returned.
Implements QAbstractXmlForwardIterator< Item >.
Definition at line 107 of file qexceptiterator.cpp.
|
inlineprivate |
|
virtual |
Returns the next item in the sequence, or a null object if the end has been reached.
Implements QAbstractXmlForwardIterator< Item >.
Definition at line 70 of file qexceptiterator.cpp.
|
virtual |
Returns the current position in the sequence represented by this.
The first position is 1, not 0. If next() hasn't been called, 0 is returned. If this has reached the end, -1 is returned.
Implements QAbstractXmlForwardIterator< Item >.
Definition at line 112 of file qexceptiterator.cpp.
|
private |
Definition at line 90 of file qexceptiterator_p.h.
Referenced by current(), fromFirstOperand(), and next().
|
private |
Definition at line 88 of file qexceptiterator_p.h.
Referenced by copy(), ExceptIterator(), fromFirstOperand(), and next().
|
private |
Definition at line 89 of file qexceptiterator_p.h.
Referenced by copy(), ExceptIterator(), and next().
|
private |
Definition at line 92 of file qexceptiterator_p.h.
Referenced by fromFirstOperand(), and next().
|
private |
Definition at line 93 of file qexceptiterator_p.h.
Referenced by next().
|
private |
Definition at line 91 of file qexceptiterator_p.h.
Referenced by fromFirstOperand(), next(), and position().