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

void SearchIterator::setBreakIterator ( BreakIterator breakiter,
UErrorCode status 
) [inherited]

Set the BreakIterator that will be used to restrict the points at which matches are detected. The user is responsible for deleting the breakiterator.

Parameters:
breakiter A BreakIterator that will be used to restrict the points at which matches are detected. If a match is found, but the match's start or end index is not a boundary as determined by the BreakIterator, the match will be rejected and another will be searched for. If this parameter is NULL, no break detection is attempted.
status for errors if it occurs
See also:
BreakIterator ICU 2.0

Definition at line 122 of file search.cpp.

References SearchIterator::m_breakiterator_, SearchIterator::m_search_, NULL, and U_SUCCESS.

{
    if (U_SUCCESS(status)) {
#if 0
        m_search_->breakIter = NULL;
        // the c++ breakiterator may not make use of ubreakiterator.
        // so we'll have to keep track of it ourselves.
#else
        // Well, gee... the Constructors that take a BreakIterator
        // all cast the BreakIterator to a UBreakIterator and
        // pass it to the corresponding usearch_openFromXXX
        // routine, so there's no reason not to do this.
        //
        // Besides, a UBreakIterator is a BreakIterator, so
        // any subclass of BreakIterator should work fine here...
        m_search_->breakIter = (UBreakIterator *) breakiter;
#endif
        
        m_breakiterator_ = breakiter;
    }
}


Generated by  Doxygen 1.6.0   Back to index