Qt 4.8
|
Implements the intersect
operator. That is, the computation of the intersection between two sequences of nodes.
More...
#include <qintersectiterator_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... | |
IntersectIterator (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 | closedExit () |
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 intersect
operator. That is, the computation of the intersection between two sequences of nodes.
The intersect
operator can be seen as logical AND
of the two sets.
Definition at line 71 of file qintersectiterator_p.h.
IntersectIterator::IntersectIterator | ( | 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 qintersectiterator.cpp.
Referenced by copy().
|
inlineprivate |
Definition at line 87 of file qintersectiterator_p.h.
Referenced by next().
|
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 110 of file qintersectiterator.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 100 of file qintersectiterator.cpp.
|
virtual |
Returns the next item in the sequence, or a null object if the end has been reached.
Implements QAbstractXmlForwardIterator< Item >.
Definition at line 61 of file qintersectiterator.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 105 of file qintersectiterator.cpp.
|
private |
Definition at line 96 of file qintersectiterator_p.h.
Referenced by closedExit(), current(), and next().
|
private |
Definition at line 94 of file qintersectiterator_p.h.
Referenced by copy(), IntersectIterator(), and next().
|
private |
Definition at line 95 of file qintersectiterator_p.h.
Referenced by copy(), IntersectIterator(), and next().
|
private |
Definition at line 98 of file qintersectiterator_p.h.
Referenced by next().
|
private |
Definition at line 99 of file qintersectiterator_p.h.
Referenced by next().
|
private |
Definition at line 97 of file qintersectiterator_p.h.
Referenced by closedExit(), next(), and position().