![]() |
Qt 4.8
|
Represents a stream of Unicode codepoints, which are computed from a string. More...
#include <qtocodepointsiterator_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... | |
| virtual Item | current () const |
| Returns the current item in the sequence. More... | |
| 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... | |
| ToCodepointsIterator (const QString &string) | |
Public Functions inherited from QAbstractXmlForwardIterator< Item > | |
| 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... | |
Properties | |
| Item | m_current |
| const int | m_len |
| xsInteger | m_position |
| const QString | m_string |
Represents a stream of Unicode codepoints, which are computed from a string.
ToCodepointsIterator takes in its constructor a string, whose Unicode characters' codepoints it forms an QAbstractXmlForwardIterator over.
Definition at line 75 of file qtocodepointsiterator_p.h.
| ToCodepointsIterator::ToCodepointsIterator | ( | const QString & | string | ) |
Constructs a ToCodepointsIterator.
| string | the string to retrieve Unicode codepoints from. Can not be empty. |
Definition at line 50 of file qtocodepointsiterator.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 90 of file qtocodepointsiterator.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 QAbstractXmlForwardIterator< Item >.
Definition at line 75 of file qtocodepointsiterator.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 80 of file qtocodepointsiterator.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 58 of file qtocodepointsiterator.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 85 of file qtocodepointsiterator.cpp.
|
private |
Definition at line 94 of file qtocodepointsiterator_p.h.
|
private |
Definition at line 93 of file qtocodepointsiterator_p.h.
|
private |
Definition at line 95 of file qtocodepointsiterator_p.h.
Referenced by next(), and position().
|
private |
Definition at line 92 of file qtocodepointsiterator_p.h.