Logo Search packages:      
Sourcecode: icu version File versions  Download package

SearchIterator::SearchIterator ( const UnicodeString text,
BreakIterator breakiter = NULL 
) [protected]

Constructor for use by subclasses.

Parameters:
text The target text to be searched.
breakiter A BreakIterator that is used to restrict the points at which matches are detected. If handleNext or handlePrev finds a match, but the match's start or end index is not a boundary as determined by the BreakIterator, the match is rejected and handleNext or handlePrev is called again. If this parameter is NULL, no break detection is attempted.
See also:
handleNext

handlePrev ICU 2.0

Definition at line 359 of file search.cpp.

References FALSE, UnicodeString::getBuffer(), UnicodeString::length(), m_search_, m_text_, NULL, TRUE, and USEARCH_DONE.

                                                               :
                                     m_breakiterator_(breakiter),
                                     m_text_(text)
{
    m_search_                     = (USearch *)uprv_malloc(sizeof(USearch));
    m_search_->breakIter          = NULL;
    m_search_->isOverlap          = FALSE;
    m_search_->isCanonicalMatch   = FALSE;
    m_search_->elementComparisonType = 0;
    m_search_->isForwardSearching = TRUE;
    m_search_->reset              = TRUE;
    m_search_->matchedIndex       = USEARCH_DONE;
    m_search_->matchedLength      = 0;
    m_search_->text               = m_text_.getBuffer();
    m_search_->textLength         = text.length();
}


Generated by  Doxygen 1.6.0   Back to index