00001 // © 2016 and later: Unicode, Inc. and others. 00002 // License & terms of use: http://www.unicode.org/copyright.html 00003 /* 00004 ****************************************************************************** 00005 * 00006 * Copyright (C) 1998-2005, International Business Machines 00007 * Corporation and others. All Rights Reserved. 00008 * 00009 ****************************************************************************** 00010 * 00011 * File schriter.h 00012 * 00013 * Modification History: 00014 * 00015 * Date Name Description 00016 * 05/05/99 stephen Cleaned up. 00017 ****************************************************************************** 00018 */ 00019 00020 #ifndef SCHRITER_H 00021 #define SCHRITER_H 00022 00023 #include "unicode/utypes.h" 00024 #include "unicode/chariter.h" 00025 #include "unicode/uchriter.h" 00026 00032 U_NAMESPACE_BEGIN 00045 class U_COMMON_API StringCharacterIterator : public UCharCharacterIterator { 00046 public: 00054 StringCharacterIterator(const UnicodeString& textStr); 00055 00065 StringCharacterIterator(const UnicodeString& textStr, 00066 int32_t textPos); 00067 00084 StringCharacterIterator(const UnicodeString& textStr, 00085 int32_t textBegin, 00086 int32_t textEnd, 00087 int32_t textPos); 00088 00097 StringCharacterIterator(const StringCharacterIterator& that); 00098 00103 virtual ~StringCharacterIterator(); 00104 00113 StringCharacterIterator& 00114 operator=(const StringCharacterIterator& that); 00115 00124 virtual UBool operator==(const ForwardCharacterIterator& that) const; 00125 00133 virtual CharacterIterator* clone(void) const; 00134 00140 void setText(const UnicodeString& newText); 00141 00149 virtual void getText(UnicodeString& result); 00150 00156 virtual UClassID getDynamicClassID(void) const; 00157 00163 static UClassID U_EXPORT2 getStaticClassID(void); 00164 00165 protected: 00170 StringCharacterIterator(); 00171 00178 void setText(const char16_t* newText, int32_t newTextLength); 00179 00184 UnicodeString text; 00185 00186 }; 00187 00188 U_NAMESPACE_END 00189 #endif
1.6.1