| OLD | NEW |
| 1 /* | 1 /* |
| 2 ****************************************************************************** | 2 ****************************************************************************** |
| 3 * Copyright (C) 1996-2010, International Business Machines Corporation and | 3 * Copyright (C) 1996-2010, International Business Machines Corporation and |
| 4 * others. All Rights Reserved. | 4 * others. All Rights Reserved. |
| 5 ****************************************************************************** | 5 ****************************************************************************** |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * File tblcoll.cpp | 9 * File tblcoll.cpp |
| 10 * | 10 * |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 * 06/22/99 stephen Fixed logic in constructFromFile() since .ctx | 47 * 06/22/99 stephen Fixed logic in constructFromFile() since .ctx |
| 48 * files are no longer used. | 48 * files are no longer used. |
| 49 * 11/02/99 helena Collator performance enhancements. Special case | 49 * 11/02/99 helena Collator performance enhancements. Special case |
| 50 * for NO_OP situations. | 50 * for NO_OP situations. |
| 51 * 11/17/99 srl More performance enhancements. Inlined some internal
functions. | 51 * 11/17/99 srl More performance enhancements. Inlined some internal
functions. |
| 52 * 12/15/99 aliu Update to support Thai collation. Move NormalizerIt
erator | 52 * 12/15/99 aliu Update to support Thai collation. Move NormalizerIt
erator |
| 53 * to implementation file. | 53 * to implementation file. |
| 54 * 01/29/01 synwee Modified into a C++ wrapper calling C APIs (ucol.h) | 54 * 01/29/01 synwee Modified into a C++ wrapper calling C APIs (ucol.h) |
| 55 */ | 55 */ |
| 56 | 56 |
| 57 #include <typeinfo> // for 'typeid' to work | |
| 58 | 57 |
| 59 #include "unicode/utypes.h" | 58 #include "unicode/utypes.h" |
| 60 | 59 |
| 61 #if !UCONFIG_NO_COLLATION | 60 #if !UCONFIG_NO_COLLATION |
| 62 | 61 |
| 63 #include "unicode/tblcoll.h" | 62 #include "unicode/tblcoll.h" |
| 64 #include "unicode/coleitr.h" | 63 #include "unicode/coleitr.h" |
| 65 #include "unicode/ures.h" | 64 #include "unicode/ures.h" |
| 66 #include "unicode/uset.h" | 65 #include "unicode/uset.h" |
| 67 #include "ucol_imp.h" | 66 #include "ucol_imp.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 } | 187 } |
| 189 | 188 |
| 190 /* RuleBaseCollator public methods --------------------------------------- */ | 189 /* RuleBaseCollator public methods --------------------------------------- */ |
| 191 | 190 |
| 192 UBool RuleBasedCollator::operator==(const Collator& that) const | 191 UBool RuleBasedCollator::operator==(const Collator& that) const |
| 193 { | 192 { |
| 194 /* only checks for address equals here */ | 193 /* only checks for address equals here */ |
| 195 if (Collator::operator==(that)) | 194 if (Collator::operator==(that)) |
| 196 return TRUE; | 195 return TRUE; |
| 197 | 196 |
| 198 if (typeid(*this) != typeid(that)) | 197 if (CR_TYPEID(*this) != CR_TYPEID(that)) |
| 199 return FALSE; /* not the same class */ | 198 return FALSE; /* not the same class */ |
| 200 | 199 |
| 201 RuleBasedCollator& thatAlias = (RuleBasedCollator&)that; | 200 RuleBasedCollator& thatAlias = (RuleBasedCollator&)that; |
| 202 | 201 |
| 203 // weiv: use C function, commented code below is wrong | 202 // weiv: use C function, commented code below is wrong |
| 204 return ucol_equals(this->ucollator, thatAlias.ucollator); | 203 return ucol_equals(this->ucollator, thatAlias.ucollator); |
| 205 /* | 204 /* |
| 206 synwee : orginal code does not check for data compatibility | 205 synwee : orginal code does not check for data compatibility |
| 207 */ | 206 */ |
| 208 /* | 207 /* |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 dataIsOwned = TRUE; | 722 dataIsOwned = TRUE; |
| 724 isWriteThroughAlias = FALSE; | 723 isWriteThroughAlias = FALSE; |
| 725 } | 724 } |
| 726 } | 725 } |
| 727 | 726 |
| 728 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(RuleBasedCollator) | 727 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(RuleBasedCollator) |
| 729 | 728 |
| 730 U_NAMESPACE_END | 729 U_NAMESPACE_END |
| 731 | 730 |
| 732 #endif /* #if !UCONFIG_NO_COLLATION */ | 731 #endif /* #if !UCONFIG_NO_COLLATION */ |
| OLD | NEW |