Go to the documentation of this file.
32 class RBBIRuleScanner;
34 class UnicodeSetStringSpan;
36 class RuleCharacterIterator;
285 int32_t bufferCapacity;
299 UnicodeSetStringSpan *stringSpan;
316 inline UBool isBogus(
void)
const;
374 #ifndef U_HIDE_INTERNAL_API
392 UnicodeSet(
const uint16_t buffer[], int32_t bufferLen,
393 ESerialization serialization,
UErrorCode &status);
407 #ifndef U_HIDE_INTERNAL_API
501 virtual int32_t hashCode(
void)
const;
530 inline USet *toUSet();
540 inline const USet * toUSet()
const;
555 inline UBool isFrozen()
const;
621 #ifndef U_HIDE_INTERNAL_API
764 virtual int32_t size(
void)
const;
772 virtual UBool isEmpty(
void)
const;
894 int32_t span(
const char16_t *s, int32_t length,
USetSpanCondition spanCondition)
const;
927 int32_t spanBack(
const char16_t *s, int32_t length,
USetSpanCondition spanCondition)
const;
962 int32_t spanUTF8(
const char *s, int32_t length,
USetSpanCondition spanCondition)
const;
981 int32_t spanBackUTF8(
const char *s, int32_t length,
USetSpanCondition spanCondition)
const;
1016 int32_t start, int32_t limit,
1028 int32_t findCodePoint(
UChar32 c)
const;
1049 int32_t indexOf(
UChar32 c)
const;
1060 UChar32 charAt(int32_t index)
const;
1377 virtual int32_t getRangeCount(
void)
const;
1386 virtual UChar32 getRangeStart(int32_t index)
const;
1395 virtual UChar32 getRangeEnd(int32_t index)
const;
1445 int32_t serialize(uint16_t *dest, int32_t destCapacity,
UErrorCode& ec)
const;
1482 friend class USetAccess;
1484 int32_t getStringCount()
const;
1502 friend class RBBIRuleScanner;
1519 void applyPattern(RuleCharacterIterator& chars,
1531 void ensureCapacity(int32_t newLen,
UErrorCode& ec);
1533 void ensureBufferCapacity(int32_t newLen,
UErrorCode& ec);
1535 void swapBuffers(
void);
1540 UBool escapeUnprintable)
const;
1543 UBool escapeUnprintable)
const;
1553 void exclusiveOr(
const UChar32* other, int32_t otherLen, int8_t polarity);
1555 void add(
const UChar32* other, int32_t otherLen, int8_t polarity);
1557 void retain(
const UChar32* other, int32_t otherLen, int8_t polarity);
1567 static UBool resemblesPropertyPattern(RuleCharacterIterator& chars,
1613 void applyPropertyPattern(RuleCharacterIterator& chars,
1624 typedef UBool (*Filter)(
UChar32 codePoint,
void* context);
1635 void applyFilter(Filter filter,
1647 void releasePattern();
1658 inline UBool UnicodeSet::isFrozen()
const {
1663 return !containsNone(start, end);
1667 return !containsNone(s);
1671 return !containsNone(s);
1674 inline UBool UnicodeSet::isBogus()
const {
1675 return (
UBool)(fFlags & kIsBogus);
1683 return reinterpret_cast<const UnicodeSet *
>(uset);
1686 inline USet *UnicodeSet::toUSet() {
1687 return reinterpret_cast<USet *
>(
this);
1690 inline const USet *UnicodeSet::toUSet()
const {
1691 return reinterpret_cast<const USet *
>(
this);
1695 int32_t sLength=s.
length();
1698 }
else if(start>sLength) {
1701 return start+span(s.
getBuffer()+start, sLength-start, spanCondition);
1705 int32_t sLength=s.
length();
1708 }
else if(limit>sLength) {
1711 return spanBack(s.
getBuffer(), limit, spanCondition);
#define FALSE
The FALSE value of a UBool.
char16_t * getBuffer(int32_t minCapacity)
Get a read/write pointer to the internal buffer.
virtual UnicodeString & toPattern(UnicodeString &result, UBool escapeUnprintable=FALSE) const =0
Returns a string representation of this matcher.
A mutable set of Unicode characters and multicharacter strings.
int8_t UBool
The ICU boolean type.
Replaceable is an abstract base class representing a string of characters that supports the replaceme...
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
virtual UBool matchesIndexValue(uint8_t v) const =0
Returns TRUE if this matcher will match a character c, where c & 0xFF == v, at offset,...
UProperty
Selection constants for Unicode properties.
An interface that defines both lookup protocol and parsing of symbolic names.
USetSpanCondition
Argument values for whether span() and similar functions continue while the current character is cont...
int32_t length(void) const
Return the length of the UnicodeString object.
static UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.
UnicodeSetIterator iterates over the contents of a UnicodeSet.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
UnicodeFunctor is an abstract base class for objects that perform match and/or replace operations on ...
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
UMatchDegree
Constants returned by UnicodeMatcher::matches() indicating the degree of match.
virtual UBool contains(UChar32 c) const =0
Returns true for characters that are in the selected subset.
void UnicodeSet_initInclusion(int32_t src, UErrorCode &status)
virtual UClassID getDynamicClassID(void) const =0
Returns a unique class ID polymorphically.
virtual UnicodeFunctor * clone() const =0
Return a copy of this object.
UnicodeFilter defines a protocol for selecting a subset of the full range (U+0000 to U+10FFFF) of Uni...
ParsePosition is a simple class used by Format and its subclasses to keep track of the current positi...
#define U_NAMESPACE_BEGIN
virtual UMatchDegree matches(const Replaceable &text, int32_t &offset, int32_t limit, UBool incremental)
Implement UnicodeMatcher API.
virtual void addMatchSetTo(UnicodeSet &toUnionTo) const =0
Union the set of all characters that may be matched by this object into the given set.