ICU 64.2
64.2
|
The BreakIteratorFilter is used to modify the behavior of a BreakIterator by constructing a new BreakIterator which suppresses certain segment boundaries. More...
#include <filteredbrk.h>
Public Member Functions | |
virtual | ~FilteredBreakIteratorBuilder () |
destructor. More... | |
virtual UBool | suppressBreakAfter (const UnicodeString &string, UErrorCode &status)=0 |
Suppress a certain string from being the end of a segment. More... | |
virtual UBool | unsuppressBreakAfter (const UnicodeString &string, UErrorCode &status)=0 |
Stop suppressing a certain string from being the end of the segment. More... | |
virtual BreakIterator * | build (BreakIterator *adoptBreakIterator, UErrorCode &status)=0 |
This function has been deprecated in favor of wrapIteratorWithFilter() The behavior is identical. More... | |
BreakIterator * | wrapIteratorWithFilter (BreakIterator *adoptBreakIterator, UErrorCode &status) |
Wrap (adopt) an existing break iterator in a new filtered instance. More... | |
Public Member Functions inherited from icu::UObject | |
virtual | ~UObject () |
Destructor. More... | |
virtual UClassID | getDynamicClassID () const |
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class. More... | |
Static Public Member Functions | |
static FilteredBreakIteratorBuilder * | createInstance (const Locale &where, UErrorCode &status) |
Construct a FilteredBreakIteratorBuilder based on rules in a locale. More... | |
static FilteredBreakIteratorBuilder * | createInstance (UErrorCode &status) |
This function has been deprecated in favor of createEmptyInstance, which has identical behavior. More... | |
static FilteredBreakIteratorBuilder * | createEmptyInstance (UErrorCode &status) |
Construct an empty FilteredBreakIteratorBuilder. More... | |
Protected Member Functions | |
FilteredBreakIteratorBuilder () | |
For subclass use. More... | |
The BreakIteratorFilter is used to modify the behavior of a BreakIterator by constructing a new BreakIterator which suppresses certain segment boundaries.
See http://www.unicode.org/reports/tr35/tr35-general.html#Segmentation_Exceptions . For example, a typical English Sentence Break Iterator would break on the space in the string "Mr. Smith" (resulting in two segments), but with "Mr." as an exception, a filtered break iterator would consider the string "Mr. Smith" to be a single segment.
Definition at line 36 of file filteredbrk.h.
|
virtual |
destructor.
|
protected |
For subclass use.
|
pure virtual |
This function has been deprecated in favor of wrapIteratorWithFilter() The behavior is identical.
adoptBreakIterator | the break iterator to adopt |
status | error code |
|
static |
Construct an empty FilteredBreakIteratorBuilder.
In this state, it will not suppress any segment boundaries.
status | The error code. |
|
static |
Construct a FilteredBreakIteratorBuilder based on rules in a locale.
The rules are taken from CLDR exception data for the locale, see http://www.unicode.org/reports/tr35/tr35-general.html#Segmentation_Exceptions This is the equivalent of calling createInstance(UErrorCode&) and then repeatedly calling addNoBreakAfter(...) with the contents of the CLDR exception data.
where | the locale. |
status | The error code. |
|
static |
This function has been deprecated in favor of createEmptyInstance, which has identical behavior.
status | The error code. |
|
pure virtual |
Suppress a certain string from being the end of a segment.
For example, suppressing "Mr.", then segments ending in "Mr." will not be returned by the iterator.
string | the string to suppress, such as "Mr." |
status | error code |
|
pure virtual |
Stop suppressing a certain string from being the end of the segment.
This function does not create any new segment boundaries, but only serves to un-do the effect of earlier calls to suppressBreakAfter, or to un-do the effect of locale data which may be suppressing certain strings.
string | the exception to remove |
status | error code |
|
inline |
Wrap (adopt) an existing break iterator in a new filtered instance.
The resulting BreakIterator is owned by the caller. The BreakIteratorFilter may be destroyed before the BreakIterator is destroyed. Note that the adoptBreakIterator is adopted by the new BreakIterator and should no longer be used by the caller. The FilteredBreakIteratorBuilder may be reused. This function is an alias for build()
adoptBreakIterator | the break iterator to adopt |
status | error code |
Definition at line 128 of file filteredbrk.h.
References U_NAMESPACE_END.