27 class RBBIRuleScanner;
29 class UnicodeSetStringSpan;
31 class RuleCharacterIterator;
280 int32_t bufferCapacity;
294 UnicodeSetStringSpan *stringSpan;
311 inline UBool isBogus(
void)
const;
380 #ifndef U_HIDE_INTERNAL_API
474 virtual int32_t hashCode(
void)
const;
503 inline USet *toUSet();
513 inline const USet * toUSet()
const;
528 inline UBool isFrozen()
const;
594 #ifndef U_HIDE_INTERNAL_API
737 virtual int32_t size(
void)
const;
745 virtual UBool isEmpty(
void)
const;
935 int32_t spanUTF8(
const char *s, int32_t length,
USetSpanCondition spanCondition)
const;
954 int32_t spanBackUTF8(
const char *s, int32_t length,
USetSpanCondition spanCondition)
const;
989 int32_t start, int32_t limit,
1001 int32_t findCodePoint(
UChar32 c)
const;
1022 int32_t indexOf(
UChar32 c)
const;
1033 UChar32 charAt(int32_t index)
const;
1350 virtual int32_t getRangeCount(
void)
const;
1359 virtual UChar32 getRangeStart(int32_t index)
const;
1368 virtual UChar32 getRangeEnd(int32_t index)
const;
1418 int32_t serialize(uint16_t *dest, int32_t destCapacity,
UErrorCode& ec)
const;
1455 friend class USetAccess;
1457 int32_t getStringCount()
const;
1475 friend class RBBIRuleScanner;
1492 void applyPattern(RuleCharacterIterator& chars,
1503 void ensureCapacity(int32_t newLen,
UErrorCode& ec);
1505 void ensureBufferCapacity(int32_t newLen,
UErrorCode& ec);
1507 void swapBuffers(
void);
1512 UBool escapeUnprintable)
const;
1515 UBool escapeUnprintable)
const;
1525 void exclusiveOr(
const UChar32* other, int32_t otherLen, int8_t polarity);
1527 void add(
const UChar32* other, int32_t otherLen, int8_t polarity);
1529 void retain(
const UChar32* other, int32_t otherLen, int8_t polarity);
1539 static UBool resemblesPropertyPattern(RuleCharacterIterator& chars,
1585 void applyPropertyPattern(RuleCharacterIterator& chars,
1595 typedef UBool (*Filter)(
UChar32 codePoint,
void* context);
1606 void applyFilter(Filter filter,
1618 void releasePattern();
1629 inline UBool UnicodeSet::isFrozen()
const {
1634 return !containsNone(start, end);
1638 return !containsNone(s);
1642 return !containsNone(s);
1645 inline UBool UnicodeSet::isBogus()
const {
1646 return (
UBool)(fFlags & kIsBogus);
1654 return reinterpret_cast<const UnicodeSet *
>(uset);
1657 inline USet *UnicodeSet::toUSet() {
1658 return reinterpret_cast<USet *
>(
this);
1661 inline const USet *UnicodeSet::toUSet()
const {
1662 return reinterpret_cast<const USet *
>(
this);
1666 int32_t sLength=s.
length();
1669 }
else if(start>sLength) {
1672 return start+span(s.
getBuffer()+start, sLength-start, spanCondition);
1676 int32_t sLength=s.
length();
1679 }
else if(limit>sLength) {
1682 return spanBack(s.
getBuffer(), limit, spanCondition);
static UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.
UMatchDegree
Constants returned by UnicodeMatcher::matches() indicating the degree of match.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
UnicodeSetIterator iterates over the contents of a UnicodeSet.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
virtual UBool matchesIndexValue(uint8_t v) const =0
Returns TRUE if this matcher will match a character c, where c & 0xFF == v, at offset, in the forward direction (with limit > offset).
An interface that defines both lookup protocol and parsing of symbolic names.
virtual UClassID getDynamicClassID(void) const =0
Returns a unique class ID polymorphically.
virtual UnicodeFunctor * clone() const =0
Return a copy of this object.
Replaceable is an abstract base class representing a string of characters that supports the replaceme...
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
UnicodeFilter defines a protocol for selecting a subset of the full range (U+0000 to U+10FFFF) of Uni...
UChar * getBuffer(int32_t minCapacity)
Get a read/write pointer to the internal buffer.
virtual void addMatchSetTo(UnicodeSet &toUnionTo) const =0
Union the set of all characters that may be matched by this object into the given set...
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
#define NULL
Define NULL if necessary, to 0 for C++ and to ((void *)0) for C.
UnicodeFunctor is an abstract base class for objects that perform match and/or replace operations on ...
virtual UMatchDegree matches(const Replaceable &text, int32_t &offset, int32_t limit, UBool incremental)
Implement UnicodeMatcher API.
A mutable set of Unicode characters and multicharacter strings.
USetSpanCondition
Argument values for whether span() and similar functions continue while the current character is cont...
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
UProperty
Selection constants for Unicode properties.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
ParsePosition is a simple class used by Format and its subclasses to keep track of the current positi...
virtual UnicodeString & toPattern(UnicodeString &result, UBool escapeUnprintable=FALSE) const =0
Returns a string representation of this matcher.
virtual UBool contains(UChar32 c) const =0
Returns true for characters that are in the selected subset.
#define FALSE
The FALSE value of a UBool.
#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...
int32_t length(void) const
Return the length of the UnicodeString object.
int8_t UBool
The ICU boolean type.