1 // © 2016 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html 4 ********************************************************************** 5 * Copyright (c) 2002-2014, International Business Machines 6 * Corporation and others. All Rights Reserved. 7 ********************************************************************** 14 #if U_SHOW_CPLUSPLUS_API 73 enum { IS_STRING = -1 };
137 inlineUBool isString()
const;
144 inlineUChar32 getCodepoint()
const;
152 inlineUChar32 getCodepointEnd()
const;
177 // Finish code point/range iteration. 258 // ======================= PRIVATES =========================== 262 // endElement and nextElements are really UChar32's, but we keep 263 // them as signed int32_t's so we can do comparisons with 264 // endElement set to -1. Leave them as int32_t's. 303 void loadRange(int32_t range);
306 inlineUBool UnicodeSetIterator::isString()
const{
307 return codepoint < 0;
310 inlineUChar32 UnicodeSetIterator::getCodepoint()
const{
314 inlineUChar32 UnicodeSetIterator::getCodepointEnd()
const{
321 #endif/* U_SHOW_CPLUSPLUS_API */ 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.
void reset()
Resets this iterator to the start of the set.
UBool nextRange()
Returns the next element in the set, either a code point range or a string.
UnicodeSetIterator & skipToStrings()
Skips over the remaining code points/ranges, if any.
const UnicodeString & getString()
Returns the current string, if isString() returned true.
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.
virtual UClassID getDynamicClassID() const override
ICU "poor man's RTTI", returns a UClassID for the actual class.
static UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.
virtual ~UnicodeSetIterator()
Destructor.
UnicodeSetIterator()
Create an iterator over nothing.
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.