| OLD | NEW |
| 1 /* | 1 /* |
| 2 ****************************************************************************** | 2 ****************************************************************************** |
| 3 * Copyright (C) 1998-2010, International Business Machines Corporation and | 3 * Copyright (C) 1998-2010, International Business Machines Corporation and |
| 4 * others. All Rights Reserved. | 4 * others. All Rights Reserved. |
| 5 ****************************************************************************** | 5 ****************************************************************************** |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include <typeinfo> // for 'typeid' to work | |
| 9 | 8 |
| 10 #include "unicode/uchriter.h" | 9 #include "unicode/uchriter.h" |
| 11 #include "unicode/ustring.h" | 10 #include "unicode/ustring.h" |
| 12 #include "uhash.h" | 11 #include "uhash.h" |
| 13 | 12 |
| 14 U_NAMESPACE_BEGIN | 13 U_NAMESPACE_BEGIN |
| 15 | 14 |
| 16 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(UCharCharacterIterator) | 15 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(UCharCharacterIterator) |
| 17 | 16 |
| 18 UCharCharacterIterator::UCharCharacterIterator() | 17 UCharCharacterIterator::UCharCharacterIterator() |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 } | 60 } |
| 62 | 61 |
| 63 UCharCharacterIterator::~UCharCharacterIterator() { | 62 UCharCharacterIterator::~UCharCharacterIterator() { |
| 64 } | 63 } |
| 65 | 64 |
| 66 UBool | 65 UBool |
| 67 UCharCharacterIterator::operator==(const ForwardCharacterIterator& that) const { | 66 UCharCharacterIterator::operator==(const ForwardCharacterIterator& that) const { |
| 68 if (this == &that) { | 67 if (this == &that) { |
| 69 return TRUE; | 68 return TRUE; |
| 70 } | 69 } |
| 71 if (typeid(*this) != typeid(that)) { | 70 if (CR_TYPEID(*this) != CR_TYPEID(that)) { |
| 72 return FALSE; | 71 return FALSE; |
| 73 } | 72 } |
| 74 | 73 |
| 75 UCharCharacterIterator& realThat = (UCharCharacterIterator&)that; | 74 UCharCharacterIterator& realThat = (UCharCharacterIterator&)that; |
| 76 | 75 |
| 77 return text == realThat.text | 76 return text == realThat.text |
| 78 && textLength == realThat.textLength | 77 && textLength == realThat.textLength |
| 79 && pos == realThat.pos | 78 && pos == realThat.pos |
| 80 && begin == realThat.begin | 79 && begin == realThat.begin |
| 81 && end == realThat.end; | 80 && end == realThat.end; |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 end = textLength = newTextLength; | 354 end = textLength = newTextLength; |
| 356 pos = begin = 0; | 355 pos = begin = 0; |
| 357 } | 356 } |
| 358 | 357 |
| 359 void | 358 void |
| 360 UCharCharacterIterator::getText(UnicodeString& result) { | 359 UCharCharacterIterator::getText(UnicodeString& result) { |
| 361 result = UnicodeString(text, textLength); | 360 result = UnicodeString(text, textLength); |
| 362 } | 361 } |
| 363 | 362 |
| 364 U_NAMESPACE_END | 363 U_NAMESPACE_END |
| OLD | NEW |