Logo Search packages:      
Sourcecode: icu version File versions

void UnicodeSetIterator::reset ( void   ) 

Resets this iterator to the start of the set. ICU 2.4

Resets to the start, to allow the iteration to start over again.

Definition at line 110 of file usetiter.cpp.

References endElement, endRange, loadRange(), nextElement, nextString, NULL, range, and stringCount.

Referenced by reset(), and UnicodeSetIterator().

                               {
    if (set == NULL) {
        // Set up indices to empty iteration
        endRange = -1;
        stringCount = 0;
    } else {
        endRange = set->getRangeCount() - 1;
        stringCount = set->strings->size();
    }
    range = 0;
    endElement = -1;
    nextElement = 0;            
    if (endRange >= 0) {
        loadRange(range);
    }
    nextString = 0;
    string = NULL;
}


Generated by  Doxygen 1.6.0   Back to index