14 #if U_SHOW_CPLUSPLUS_API
76 enum { IS_STRING = -1 };
143 inline UBool isString()
const;
150 inline UChar32 getCodepoint()
const;
158 inline UChar32 getCodepointEnd()
const;
308 inline UBool UnicodeSetIterator::isString()
const {
309 return codepoint == (
UChar32)IS_STRING;
312 inline UChar32 UnicodeSetIterator::getCodepoint()
const {
316 inline UChar32 UnicodeSetIterator::getCodepointEnd()
const {
UObject is the common ICU "boilerplate" class.
UnicodeSetIterator iterates over the contents of a UnicodeSet.
UBool next()
Advances the iteration position to the next element in the set, which can be either a single code poi...
UnicodeSetIterator(const UnicodeSet &set)
Create an iterator over the given set.
int32_t nextElement
Next element.
void reset()
Resets this iterator to the start of the set.
virtual void loadRange(int32_t range)
Load range.
UChar32 codepointEnd
When iterating over ranges using nextRange(), codepointEnd contains the inclusive end of the iteratio...
virtual UClassID getDynamicClassID() const
ICU "poor man's RTTI", returns a UClassID for the actual class.
const UnicodeSet * set
The set.
UBool nextRange()
Returns the next element in the set, either a code point range or a string.
int32_t endRange
End range.
UnicodeString * cpString
Points to the string to use when the caller asks for a string and the current iteration item is a cod...
const UnicodeString & getString()
Returns the current string, if isString() returned true.
UnicodeSetIterator(const UnicodeSetIterator &)
Copy constructor.
void reset(const UnicodeSet &set)
Sets this iterator to visit the elements of the given set and resets it to the start of that set.
int32_t nextString
Next string.
UChar32 codepoint
Current code point, or the special value IS_STRING, if the iterator points to a string.
static UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.
const UnicodeString * string
If codepoint == IS_STRING, then string points to the current string.
virtual ~UnicodeSetIterator()
Destructor.
int32_t stringCount
String count.
UnicodeSetIterator()
Create an iterator over nothing.
int32_t endElement
End element.
UnicodeSetIterator & operator=(const UnicodeSetIterator &)
Assignment operator.
A mutable set of Unicode characters and multicharacter strings.
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.
int8_t UBool
The ICU boolean type, a signed-byte integer.
C++ API: Common ICU base class UObject.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
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.