| OLD | NEW |
| 1 /* | 1 /* |
| 2 ******************************************************************************* | 2 ******************************************************************************* |
| 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 ******************************************************************************* | 5 ******************************************************************************* |
| 6 * | 6 * |
| 7 * File FORMAT.CPP | 7 * File FORMAT.CPP |
| 8 * | 8 * |
| 9 * Modification History: | 9 * Modification History: |
| 10 * | 10 * |
| 11 * Date Name Description | 11 * Date Name Description |
| 12 * 02/19/97 aliu Converted from java. | 12 * 02/19/97 aliu Converted from java. |
| 13 * 03/17/97 clhuang Implemented with new APIs. | 13 * 03/17/97 clhuang Implemented with new APIs. |
| 14 * 03/27/97 helena Updated to pass the simple test after code review. | 14 * 03/27/97 helena Updated to pass the simple test after code review. |
| 15 * 07/20/98 stephen Added explicit init values for Field/ParsePositio
n | 15 * 07/20/98 stephen Added explicit init values for Field/ParsePositio
n |
| 16 ******************************************************************************** | 16 ******************************************************************************** |
| 17 */ | 17 */ |
| 18 // ***************************************************************************** | 18 // ***************************************************************************** |
| 19 // This file was generated from the java source file Format.java | 19 // This file was generated from the java source file Format.java |
| 20 // ***************************************************************************** | 20 // ***************************************************************************** |
| 21 | 21 |
| 22 #include <typeinfo> // for 'typeid' to work | |
| 23 | 22 |
| 24 #include "unicode/utypes.h" | 23 #include "unicode/utypes.h" |
| 25 | 24 |
| 26 /* | 25 /* |
| 27 * Dummy code: | 26 * Dummy code: |
| 28 * If all modules in the I18N library are switched off, then there are no | 27 * If all modules in the I18N library are switched off, then there are no |
| 29 * library exports and MSVC 6 writes a .dll but not a .lib file. | 28 * library exports and MSVC 6 writes a .dll but not a .lib file. |
| 30 * Unless we export _something_ in that case... | 29 * Unless we export _something_ in that case... |
| 31 */ | 30 */ |
| 32 #if UCONFIG_NO_COLLATION && UCONFIG_NO_FORMATTING && UCONFIG_NO_TRANSLITERATION | 31 #if UCONFIG_NO_COLLATION && UCONFIG_NO_FORMATTING && UCONFIG_NO_TRANSLITERATION |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 status = U_INVALID_FORMAT_ERROR; | 145 status = U_INVALID_FORMAT_ERROR; |
| 147 } | 146 } |
| 148 } | 147 } |
| 149 | 148 |
| 150 // ------------------------------------- | 149 // ------------------------------------- |
| 151 | 150 |
| 152 UBool | 151 UBool |
| 153 Format::operator==(const Format& that) const | 152 Format::operator==(const Format& that) const |
| 154 { | 153 { |
| 155 // Subclasses: Call this method and then add more specific checks. | 154 // Subclasses: Call this method and then add more specific checks. |
| 156 return typeid(*this) == typeid(that); | 155 return CR_TYPEID(*this) == CR_TYPEID(that); |
| 157 } | 156 } |
| 158 //--------------------------------------- | 157 //--------------------------------------- |
| 159 | 158 |
| 160 /** | 159 /** |
| 161 * Simple function for initializing a UParseError from a UnicodeString. | 160 * Simple function for initializing a UParseError from a UnicodeString. |
| 162 * | 161 * |
| 163 * @param pattern The pattern to copy into the parseError | 162 * @param pattern The pattern to copy into the parseError |
| 164 * @param pos The position in pattern where the error occured | 163 * @param pos The position in pattern where the error occured |
| 165 * @param parseError The UParseError object to fill in | 164 * @param parseError The UParseError object to fill in |
| 166 * @draft ICU 2.4 | 165 * @draft ICU 2.4 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 Format::setLocaleIDs(const char* valid, const char* actual) { | 203 Format::setLocaleIDs(const char* valid, const char* actual) { |
| 205 U_LOCALE_BASED(locBased, *this); | 204 U_LOCALE_BASED(locBased, *this); |
| 206 locBased.setLocaleIDs(valid, actual); | 205 locBased.setLocaleIDs(valid, actual); |
| 207 } | 206 } |
| 208 | 207 |
| 209 U_NAMESPACE_END | 208 U_NAMESPACE_END |
| 210 | 209 |
| 211 #endif /* #if !UCONFIG_NO_FORMATTING */ | 210 #endif /* #if !UCONFIG_NO_FORMATTING */ |
| 212 | 211 |
| 213 //eof | 212 //eof |
| OLD | NEW |