ICU 64.2  64.2
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 
46 public:
54  StringCharacterIterator(const UnicodeString& textStr);
55 
66  int32_t textPos);
67 
85  int32_t textBegin,
86  int32_t textEnd,
87  int32_t textPos);
88 
98 
103  virtual ~StringCharacterIterator();
104 
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:
171 
178  void setText(const char16_t* newText, int32_t newTextLength);
179 
185 
186 };
187 
189 #endif
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 ...
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition: uobject.h:93
UCharCharacterIterator & operator=(const UCharCharacterIterator &that)
Assignment operator.
UnicodeString text
Copy of the iterated string object.
Definition: schriter.h:184
virtual UClassID getDynamicClassID(void) const
Return a class ID for this object (not really public)
virtual void getText(UnicodeString &result)
Copies the char16_t array under iteration into the UnicodeString referred to by "result".
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:137
Abstract class that defines an API for iteration on text objects.
Definition: chariter.h:358
A concrete subclass of CharacterIterator that iterates over the characters (code units or code points...
Definition: uchriter.h:35
A concrete subclass of CharacterIterator that iterates over the characters (code units or code points...
Definition: schriter.h:45
C++ API: char16_t Character Iterator.
void setText(ConstChar16Ptr newText, int32_t newTextLength)
Sets the iterator to iterate over a new range of text.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:138
Abstract class that defines an API for forward-only iteration on text objects.
Definition: chariter.h:91
static UClassID getStaticClassID(void)
Return a class ID for this class (not really public)
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...
Definition: utypes.h:300
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
Definition: unistr.h:289
C++ API: Character Iterator.
virtual CharacterIterator * clone(void) const
Returns a new UCharCharacterIterator referring to the same character in the same range of the same st...
int8_t UBool
The ICU boolean type.
Definition: umachine.h:225