Go to the documentation of this file.
32 #if UCONFIG_NO_BREAK_ITERATION
234 virtual int32_t
last(
void) = 0;
250 virtual int32_t
next(
void) = 0;
298 virtual int32_t
next(int32_t n) = 0;
480 const Locale& displayLocale,
517 #ifndef U_HIDE_DEPRECATED_API
525 inline UBool isBufferClone(
void);
529 #if !UCONFIG_NO_SERVICE
580 #ifndef U_HIDE_INTERNAL_API
622 friend class ICUBreakIteratorFactory;
623 friend class ICUBreakIteratorService;
632 #ifndef U_HIDE_INTERNAL_API
646 #ifndef U_HIDE_DEPRECATED_API
648 inline UBool BreakIterator::isBufferClone()
#define FALSE
The FALSE value of a UBool.
The BreakIterator class implements methods for finding the location of boundaries in text.
Locale getLocale(ULocDataLocaleType type, UErrorCode &status) const
Returns the locale for this break iterator.
Basic definitions for ICU, for both C and C++ APIs.
virtual int32_t current(void) const =0
Return character index of the current iterator position within the text.
int8_t UBool
The ICU boolean type.
virtual int32_t getRuleStatus() const
For RuleBasedBreakIterators, return the status tag from the break rule that determined the boundary a...
ULocDataLocaleType
Constants for *_getLocale() Allow user to select whether she wants information on requested,...
virtual ~BreakIterator()
destructor
static UBool unregister(URegistryKey key, UErrorCode &status)
Unregister a previously-registered BreakIterator using the key returned from the register call.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
C API: Abstract Unicode Text API.
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside.
virtual BreakIterator * createBufferClone(void *stackBuffer, int32_t &BufferSize, UErrorCode &status)=0
Deprecated functionality.
virtual void setText(const UnicodeString &text)=0
Change the text over which this operates.
virtual UBool isBoundary(int32_t offset)=0
Return true if the specified position is a boundary position.
virtual UClassID getDynamicClassID(void) const =0
Return a polymorphic class ID for this object.
virtual int32_t preceding(int32_t offset)=0
Set the iterator position to the first boundary preceding the specified offset.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
const void * URegistryKey
Opaque type returned by registerInstance, registerFactory and unregister for service registration.
UObject is the common ICU "boilerplate" class.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
virtual BreakIterator & refreshInputText(UText *input, UErrorCode &status)=0
Set the subject text string upon which the break iterator is operating without changing any other asp...
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
Base class for 'pure' C++ implementations of uenum api.
static UnicodeString & getDisplayName(const Locale &objectLocale, const Locale &displayLocale, UnicodeString &name)
Get name of the object for the desired Locale, in the desired language.
static BreakIterator * createLineInstance(const Locale &where, UErrorCode &status)
Create BreakIterator for line-breaks using specified locale.
static UnicodeString & getDisplayName(const Locale &objectLocale, UnicodeString &name)
Get name of the object for the desired Locale, in the language of the default locale.
virtual int32_t following(int32_t offset)=0
Advance the iterator to the first boundary following the specified offset.
UBreakIteratorType
The possible types of text boundaries.
static URegistryKey registerInstance(BreakIterator *toAdopt, const Locale &locale, UBreakIteratorType kind, UErrorCode &status)
Register a new break iterator of the indicated kind, to use in the given locale.
virtual void adoptText(CharacterIterator *it)=0
Change the text over which this operates.
UBool operator!=(const BreakIterator &rhs) const
Returns the complement of the result of operator==.
BreakIterator(const BreakIterator &other)
virtual int32_t last(void)=0
Set the iterator position to the index immediately BEYOND the last character in the text being scanne...
virtual int32_t getRuleStatusVec(int32_t *fillInVec, int32_t capacity, UErrorCode &status)
For RuleBasedBreakIterators, get the status (tag) values from the break rule(s) that determined the b...
Abstract class that defines an API for iteration on text objects.
#define ULOC_FULLNAME_CAPACITY
Useful constant for the maximum size of the whole locale ID (including the terminating NULL and all k...
static BreakIterator * createCharacterInstance(const Locale &where, UErrorCode &status)
Create BreakIterator for character-breaks using specified locale Returns an instance of a BreakIterat...
virtual BreakIterator * clone(void) const =0
Return a polymorphic copy of this object.
virtual UBool operator==(const BreakIterator &) const =0
Return true if another object is semantically equal to this one.
virtual int32_t first(void)=0
Sets the current iteration position to the beginning of the text, position zero.
static BreakIterator * createWordInstance(const Locale &where, UErrorCode &status)
Create BreakIterator for word-breaks using the given locale.
virtual UText * getUText(UText *fillIn, UErrorCode &status) const =0
Get a UText for the text being analyzed.
C++ API: String Enumeration.
C++ API: Character Iterator.
virtual int32_t next(void)=0
Advance the iterator to the boundary following the current boundary.
virtual int32_t previous(void)=0
Set the iterator position to the boundary preceding the current boundary.
static StringEnumeration * getAvailableLocales(void)
Return a StringEnumeration over the locales available at the time of the call, including registered l...
static BreakIterator * createSentenceInstance(const Locale &where, UErrorCode &status)
Create BreakIterator for sentence-breaks using specified locale Returns an instance of a BreakIterato...
C++ API: Locale ID object.
BreakIterator(const Locale &valid, const Locale &actual)
virtual CharacterIterator & getText(void) const =0
Return a CharacterIterator over the text being analyzed.
C++ API: Common ICU base class UObject.
static BreakIterator * createTitleInstance(const Locale &where, UErrorCode &status)
Create BreakIterator for title-casing breaks using the specified locale Returns an instance of a Brea...
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
virtual int32_t next(int32_t n)=0
Set the iterator position to the nth boundary from the current boundary.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
A Locale object represents a specific geographical, political, or cultural region.
static const Locale * getAvailableLocales(int32_t &count)
Get the set of Locales for which TextBoundaries are installed.
const char * getLocaleID(ULocDataLocaleType type, UErrorCode &status) const
Get the locale for this break iterator object.
virtual void setText(UText *text, UErrorCode &status)=0
Reset the break iterator to operate over the text represented by the UText.