| OLD | NEW |
| 1 /******************************************************************** | 1 /******************************************************************** |
| 2 * COPYRIGHT: | 2 * COPYRIGHT: |
| 3 * Copyright (c) 1997-2010, International Business Machines Corporation and | 3 * Copyright (c) 1997-2010, International Business Machines Corporation and |
| 4 * others. All Rights Reserved. | 4 * others. All Rights Reserved. |
| 5 * Copyright (C) 2010 , Yahoo! Inc. | 5 * Copyright (C) 2010 , Yahoo! Inc. |
| 6 ******************************************************************** | 6 ******************************************************************** |
| 7 * | 7 * |
| 8 * File SELFMT.CPP | 8 * File SELFMT.CPP |
| 9 * | 9 * |
| 10 * Modification History: | 10 * Modification History: |
| 11 * | 11 * |
| 12 * Date Name Description | 12 * Date Name Description |
| 13 * 11/11/09 kirtig Finished first cut of implementation. | 13 * 11/11/09 kirtig Finished first cut of implementation. |
| 14 * 11/16/09 kirtig Improved version | 14 * 11/16/09 kirtig Improved version |
| 15 ********************************************************************/ | 15 ********************************************************************/ |
| 16 | 16 |
| 17 #include <typeinfo> // for 'typeid' to work | |
| 18 | 17 |
| 19 #include "unicode/utypes.h" | 18 #include "unicode/utypes.h" |
| 20 #include "unicode/ustring.h" | 19 #include "unicode/ustring.h" |
| 21 #include "unicode/ucnv_err.h" | 20 #include "unicode/ucnv_err.h" |
| 22 #include "unicode/uchar.h" | 21 #include "unicode/uchar.h" |
| 23 #include "unicode/umsg.h" | 22 #include "unicode/umsg.h" |
| 24 #include "unicode/rbnf.h" | 23 #include "unicode/rbnf.h" |
| 25 #include "cmemory.h" | 24 #include "cmemory.h" |
| 26 #include "util.h" | 25 #include "util.h" |
| 27 #include "uassert.h" | 26 #include "uassert.h" |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 copyHashtable(other.parsedValuesHash, status); | 370 copyHashtable(other.parsedValuesHash, status); |
| 372 } | 371 } |
| 373 return *this; | 372 return *this; |
| 374 } | 373 } |
| 375 | 374 |
| 376 UBool | 375 UBool |
| 377 SelectFormat::operator==(const Format& other) const { | 376 SelectFormat::operator==(const Format& other) const { |
| 378 if( this == &other){ | 377 if( this == &other){ |
| 379 return TRUE; | 378 return TRUE; |
| 380 } | 379 } |
| 381 if (typeid(*this) != typeid(other)) { | 380 if (CR_TYPEID(*this) != CR_TYPEID(other)) { |
| 382 return FALSE; | 381 return FALSE; |
| 383 } | 382 } |
| 384 SelectFormat* fmt = (SelectFormat*)&other; | 383 SelectFormat* fmt = (SelectFormat*)&other; |
| 385 Hashtable* hashOther = fmt->parsedValuesHash; | 384 Hashtable* hashOther = fmt->parsedValuesHash; |
| 386 if ( parsedValuesHash == NULL && hashOther == NULL) | 385 if ( parsedValuesHash == NULL && hashOther == NULL) |
| 387 return TRUE; | 386 return TRUE; |
| 388 if ( parsedValuesHash == NULL || hashOther == NULL) | 387 if ( parsedValuesHash == NULL || hashOther == NULL) |
| 389 return FALSE; | 388 return FALSE; |
| 390 return parsedValuesHash->equals(*hashOther); | 389 return parsedValuesHash->equals(*hashOther); |
| 391 } | 390 } |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 return; | 437 return; |
| 439 } | 438 } |
| 440 } | 439 } |
| 441 } | 440 } |
| 442 | 441 |
| 443 U_NAMESPACE_END | 442 U_NAMESPACE_END |
| 444 | 443 |
| 445 #endif /* #if !UCONFIG_NO_FORMATTING */ | 444 #endif /* #if !UCONFIG_NO_FORMATTING */ |
| 446 | 445 |
| 447 //eof | 446 //eof |
| OLD | NEW |