| OLD | NEW |
| 1 /* | 1 /* |
| 2 ********************************************************************** | 2 ********************************************************************** |
| 3 * Copyright (c) 2004-2010, International Business Machines | 3 * Copyright (c) 2004-2010, International Business Machines |
| 4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
| 5 ********************************************************************** | 5 ********************************************************************** |
| 6 * Author: Alan Liu | 6 * Author: Alan Liu |
| 7 * Created: April 20, 2004 | 7 * Created: April 20, 2004 |
| 8 * Since: ICU 3.0 | 8 * Since: ICU 3.0 |
| 9 ********************************************************************** | 9 ********************************************************************** |
| 10 */ | 10 */ |
| 11 #include <typeinfo> // for 'typeid' to work | |
| 12 | 11 |
| 13 #include "unicode/utypes.h" | 12 #include "unicode/utypes.h" |
| 14 | 13 |
| 15 #if !UCONFIG_NO_FORMATTING | 14 #if !UCONFIG_NO_FORMATTING |
| 16 | 15 |
| 17 #include "currfmt.h" | 16 #include "currfmt.h" |
| 18 #include "unicode/numfmt.h" | 17 #include "unicode/numfmt.h" |
| 19 | 18 |
| 20 U_NAMESPACE_BEGIN | 19 U_NAMESPACE_BEGIN |
| 21 | 20 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 32 } | 31 } |
| 33 | 32 |
| 34 CurrencyFormat::~CurrencyFormat() { | 33 CurrencyFormat::~CurrencyFormat() { |
| 35 delete fmt; | 34 delete fmt; |
| 36 } | 35 } |
| 37 | 36 |
| 38 UBool CurrencyFormat::operator==(const Format& other) const { | 37 UBool CurrencyFormat::operator==(const Format& other) const { |
| 39 if (this == &other) { | 38 if (this == &other) { |
| 40 return TRUE; | 39 return TRUE; |
| 41 } | 40 } |
| 42 if (typeid(*this) != typeid(other)) { | 41 if (CR_TYPEID(*this) != CR_TYPEID(other)) { |
| 43 return FALSE; | 42 return FALSE; |
| 44 } | 43 } |
| 45 const CurrencyFormat* c = (const CurrencyFormat*) &other; | 44 const CurrencyFormat* c = (const CurrencyFormat*) &other; |
| 46 return *fmt == *c->fmt; | 45 return *fmt == *c->fmt; |
| 47 } | 46 } |
| 48 | 47 |
| 49 Format* CurrencyFormat::clone() const { | 48 Format* CurrencyFormat::clone() const { |
| 50 return new CurrencyFormat(*this); | 49 return new CurrencyFormat(*this); |
| 51 } | 50 } |
| 52 | 51 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 63 ParsePosition& pos) const | 62 ParsePosition& pos) const |
| 64 { | 63 { |
| 65 fmt->parseCurrency(source, result, pos); | 64 fmt->parseCurrency(source, result, pos); |
| 66 } | 65 } |
| 67 | 66 |
| 68 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CurrencyFormat) | 67 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CurrencyFormat) |
| 69 | 68 |
| 70 U_NAMESPACE_END | 69 U_NAMESPACE_END |
| 71 | 70 |
| 72 #endif /* #if !UCONFIG_NO_FORMATTING */ | 71 #endif /* #if !UCONFIG_NO_FORMATTING */ |
| OLD | NEW |