ICU 63.1 63.1

schriter.h
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 ******************************************************************************
5 *
6 * Copyright (C) 1998-2005, International Business Machines
7 * Corporation and others. All Rights Reserved.
8 *
9 ******************************************************************************
10 *
11 * File schriter.h
12 *
13 * Modification History:
14 *
15 * Date Name Description
16 * 05/05/99 stephen Cleaned up.
17 ******************************************************************************
18 */
19
20 #ifndef SCHRITER_H
21 #define SCHRITER_H
22
23 #include "unicode/utypes.h"
24 #include "unicode/chariter.h"
25 #include "unicode/uchriter.h"
26
32 U_NAMESPACE_BEGIN
45 class U_COMMON_API StringCharacterIterator : public UCharCharacterIterator {
46 public:
54 StringCharacterIterator(const UnicodeString& textStr);
55
65 StringCharacterIterator(const UnicodeString& textStr,
66 int32_t textPos);
67
84 StringCharacterIterator(const UnicodeString& textStr,
85 int32_t textBegin,
86 int32_t textEnd,
87 int32_t textPos);
88
97 StringCharacterIterator(const StringCharacterIterator& that);
98
103 virtual ~StringCharacterIterator();
104
113 StringCharacterIterator&
114 operator=(const StringCharacterIterator& that);
115
124 virtual UBool operator==(const ForwardCharacterIterator& that) const;
125
133 virtual CharacterIterator* clone(void) const;
134
140 void setText(const UnicodeString& newText);
141
149 virtual void getText(UnicodeString& result);
150
156 virtual UClassID getDynamicClassID(void) const;
157
163 static UClassID U_EXPORT2 getStaticClassID(void);
164
165 protected:
170 StringCharacterIterator();
171
178 void setText(const char16_t* newText, int32_t newTextLength);
179
184 UnicodeString text;
185
186 };
187
188 U_NAMESPACE_END
189 #endif
icu::UCharCharacterIterator::operator==
virtual UBool operator==(const ForwardCharacterIterator &that) const
Returns true if the iterators iterate over the same range of the same string and are pointing at the ...
UClassID
void * UClassID
UClassID is used to identify classes without using the compiler&#39;s RTTI.
Definition: uobject.h:90
icu::UCharCharacterIterator::operator=
UCharCharacterIterator & operator=(const UCharCharacterIterator &that)
Assignment operator.
icu::StringCharacterIterator::text
UnicodeString text
Copy of the iterated string object.
Definition: schriter.h:184
icu::UCharCharacterIterator::getDynamicClassID
virtual UClassID getDynamicClassID(void) const
Return a class ID for this object (not really public)
icu::UCharCharacterIterator::getText
virtual void getText(UnicodeString &result)
Copies the char16_t array under iteration into the UnicodeString referred to by "result".
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:137
icu::CharacterIterator
Abstract class that defines an API for iteration on text objects.
Definition: chariter.h:358
icu::UCharCharacterIterator
A concrete subclass of CharacterIterator that iterates over the characters (code units or code points...
Definition: uchriter.h:35
icu::StringCharacterIterator
A concrete subclass of CharacterIterator that iterates over the characters (code units or code points...
Definition: schriter.h:45
uchriter.h
C++ API: char16_t Character Iterator.
icu::UCharCharacterIterator::setText
void setText(ConstChar16Ptr newText, int32_t newTextLength)
Sets the iterator to iterate over a new range of text.
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:138
icu::ForwardCharacterIterator
Abstract class that defines an API for forward-only iteration on text objects.
Definition: chariter.h:91
icu::UCharCharacterIterator::getStaticClassID
static UClassID getStaticClassID(void)
Return a class ID for this class (not really public)
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
U_COMMON_API
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside...
Definition: utypes.h:300
icu::UnicodeString
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
Definition: unistr.h:289
chariter.h
C++ API: Character Iterator.
icu::UCharCharacterIterator::clone
virtual CharacterIterator * clone(void) const
Returns a new UCharCharacterIterator referring to the same character in the same range of the same st...
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:225