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

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

Constructor for use by subclasses.

Note: No parsing of the text within the CharacterIterator will be done during searching for this version. The block of text in CharacterIterator will be used as it is.

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:

handlePrev ICU 2.0

Definition at line 377 of file search.cpp.

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

    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         = m_text_.length();
    m_breakiterator_             = breakiter;

Generated by  Doxygen 1.6.0   Back to index