21 #if U_SHOW_CPLUSPLUS_API 28 #if !UCONFIG_NO_BREAK_ITERATION 40 class LanguageBreakEngine;
41 struct RBBIDataHeader;
42 class RBBIDataWrapper;
43 class UnhandledEngine;
47 #ifndef U_HIDE_INTERNAL_API 77 virtual bool isFor(
UChar32 c,
const char* locale)
const = 0;
87 virtual bool handles(
UChar32 c)
const = 0;
102 virtual int32_t fillBreaks(
UText* text, int32_t start, int32_t end,
103 int32_t* foundBreaks, int32_t foundBreaksCapacity,
128 #ifndef U_HIDE_INTERNAL_API 136 RBBIDataWrapper *fData =
nullptr;
149 int32_t fPosition = 0;
154 int32_t fRuleStatusIndex = 0;
160 BreakCache *fBreakCache =
nullptr;
166 class DictionaryCache;
167 DictionaryCache *fDictionaryCache =
nullptr;
175 UStack *fLanguageBreakEngines =
nullptr;
183 UnhandledEngine *fUnhandledBreakEngine =
nullptr;
189 uint32_t fDictionaryCharCount = 0;
213 int32_t *fLookAheadMatches =
nullptr;
218 UBool fIsPhraseBreaking =
false;
249 friend class RBBIRuleBuilder;
382 virtual int32_t hashCode()
const;
479 virtual int32_t
first()
override;
486 virtual int32_t
last()
override;
498 virtual int32_t
next(int32_t n)
override;
505 virtual int32_t
next()
override;
512 virtual int32_t
previous()
override;
521 virtual int32_t
following(int32_t offset)
override;
530 virtual int32_t
preceding(int32_t offset)
override;
550 virtual int32_t
current()
const override;
634 static UClassID U_EXPORT2 getStaticClassID();
636 #ifndef U_FORCE_HIDE_DEPRECATED_API 666 #endif // U_FORCE_HIDE_DEPRECATED_API 685 virtual const uint8_t *getBinaryRules(uint32_t &length);
727 int32_t handleSafePrevious(int32_t fromPosition);
739 int32_t handleNext();
757 template<
typename RowType, PTrieFunc trieFunc>
758 int32_t handleSafePrevious(int32_t fromPosition);
760 template<
typename RowType, PTrieFunc trieFunc>
761 int32_t handleNext();
770 const LanguageBreakEngine *getLanguageBreakEngine(
UChar32 c,
const char* locale);
773 #ifndef U_HIDE_INTERNAL_API 787 #ifndef U_HIDE_INTERNAL_API 797 static void U_EXPORT2 registerExternalBreakEngine(
virtual ~ExternalBreakEngine()
destructor
virtual U_COMMON_API UClassID getDynamicClassID() const override=0
Return a polymorphic class ID for this object.
virtual U_COMMON_API void adoptText(CharacterIterator *it)=0
Change the text over which this operates.
The ExternalBreakEngine class define an abstract interface for the host environment to provide a low ...
bool operator!=(const BreakIterator &that) const
Not-equal operator.
virtual U_COMMON_API int32_t last()=0
Set the iterator position to the index immediately BEYOND the last character in the text being scanne...
U_COMMON_API BreakIterator & operator=(const BreakIterator &other)
Immutable Unicode code point trie structure.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
virtual U_COMMON_API int32_t next()=0
Advance the iterator to the boundary following the current boundary.
virtual U_COMMON_API BreakIterator * createBufferClone(void *stackBuffer, int32_t &BufferSize, UErrorCode &status)=0
Deprecated functionality.
virtual U_COMMON_API int32_t getRuleStatus() const
For RuleBasedBreakIterators, return the status tag from the break rule that determined the boundary a...
virtual U_COMMON_API int32_t following(int32_t offset)=0
Advance the iterator to the first boundary following the specified offset.
virtual U_COMMON_API CharacterIterator & getText() const =0
Return a CharacterIterator over the text being analyzed.
virtual U_COMMON_API bool operator==(const BreakIterator &) const =0
Return true if another object is semantically equal to this one.
virtual U_COMMON_API int32_t first()=0
Sets the current iteration position to the beginning of the text, position zero.
virtual U_COMMON_API void setText(const UnicodeString &text)=0
Change the text over which this operates.
Abstract class that defines an API for iteration on text objects.
C++ API: String Character Iterator.
A concrete subclass of CharacterIterator that iterates over the characters (code units or code points...
The BreakIterator class implements methods for finding the location of boundaries in text...
virtual U_COMMON_API int32_t current() const =0
Return character index of the current iterator position within the text.
#define UTEXT_INITIALIZER
initializer to be used with local (stack) instances of a UText struct.
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
virtual U_COMMON_API BreakIterator * clone() const =0
Return a polymorphic copy of this object.
C API: Data loading interface.
struct UDataMemory UDataMemory
Forward declaration of the data memory type.
virtual U_COMMON_API UText * getUText(UText *fillIn, UErrorCode &status) const =0
Get a UText for the text being analyzed.
C API: Parse Error Information.
virtual U_COMMON_API 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...
virtual U_COMMON_API int32_t preceding(int32_t offset)=0
Set the iterator position to the first boundary preceding the specified offset.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
virtual U_COMMON_API int32_t previous()=0
Set the iterator position to the boundary preceding the current boundary.
A subclass of BreakIterator whose behavior is specified using a list of rules.
A UParseError struct is used to returned detailed information about parsing errors.
Basic definitions for ICU, for both C and C++ APIs.
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside...
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
virtual U_COMMON_API BreakIterator & refreshInputText(UText *input, UErrorCode &status)=0
Set the subject text string upon which the break iterator is operating without changing any other asp...
UObject is the common ICU "boilerplate" class.
virtual U_COMMON_API UBool isBoundary(int32_t offset)=0
Return true if the specified position is a boundary position.
int8_t UBool
The ICU boolean type, a signed-byte integer.