| bms.h | | bms.h | |
| /* | | /* | |
|
| * Copyright (C) 1996-2011, International Business Machines Corporation and
Others. | | * Copyright (C) 1996-2012, International Business Machines Corporation and
Others. | |
| * All rights reserved. | | * All rights reserved. | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * \file | | * \file | |
| * \brief C API: Boyer-Moore StringSearch prototype. | | * \brief C API: Boyer-Moore StringSearch prototype. | |
| * \internal | | * \internal | |
| */ | | */ | |
| | | | |
| #ifndef _BMS_H | | #ifndef _BMS_H | |
| | | | |
| skipping to change at line 55 | | skipping to change at line 55 | |
| * @param status - will be set if any errors occur. | | * @param status - will be set if any errors occur. | |
| * | | * | |
| * @return the <code>UCD</code> object. You must call | | * @return the <code>UCD</code> object. You must call | |
| * <code>ucd_close</code> when you are done using the object. | | * <code>ucd_close</code> when you are done using the object. | |
| * | | * | |
| * Note: if on return status is set to an error, the only safe | | * Note: if on return status is set to an error, the only safe | |
| * thing to do with the returned object is to call <code>ucd_close</code>. | | * thing to do with the returned object is to call <code>ucd_close</code>. | |
| * | | * | |
| * @internal ICU 4.0.1 technology preview | | * @internal ICU 4.0.1 technology preview | |
| */ | | */ | |
|
| U_CAPI UCD * U_EXPORT2 | | U_INTERNAL UCD * U_EXPORT2 | |
| ucd_open(UCollator *coll, UErrorCode *status); | | ucd_open(UCollator *coll, UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Release a <code>UCD</code> object. | | * Release a <code>UCD</code> object. | |
| * | | * | |
| * @param ucd - the object | | * @param ucd - the object | |
| * | | * | |
| * @internal ICU 4.0.1 technology preview | | * @internal ICU 4.0.1 technology preview | |
| */ | | */ | |
|
| U_CAPI void U_EXPORT2 | | U_INTERNAL void U_EXPORT2 | |
| ucd_close(UCD *ucd); | | ucd_close(UCD *ucd); | |
| | | | |
| /** | | /** | |
| * Get the <code>UCollator</code> object used to create a <code>UCD</code>
object. | | * Get the <code>UCollator</code> object used to create a <code>UCD</code>
object. | |
| * The <code>UCollator</code> object returned may not be the exact | | * The <code>UCollator</code> object returned may not be the exact | |
| * object that was used to create this object, but it will have the | | * object that was used to create this object, but it will have the | |
| * same behavior. | | * same behavior. | |
| * | | * | |
| * @param ucd - the <code>UCD</code> object | | * @param ucd - the <code>UCD</code> object | |
| * | | * | |
| * @return the <code>UCollator</code> used to create the given | | * @return the <code>UCollator</code> used to create the given | |
| * <code>UCD</code> object. | | * <code>UCD</code> object. | |
| * | | * | |
| * @internal ICU 4.0.1 technology preview | | * @internal ICU 4.0.1 technology preview | |
| */ | | */ | |
|
| U_CAPI UCollator * U_EXPORT2 | | U_INTERNAL UCollator * U_EXPORT2 | |
| ucd_getCollator(UCD *ucd); | | ucd_getCollator(UCD *ucd); | |
| | | | |
| /** | | /** | |
| * <code>UCD</code> objects are expensive to compute, and so | | * <code>UCD</code> objects are expensive to compute, and so | |
| * may be cached. This routine will free the cached objects and delete | | * may be cached. This routine will free the cached objects and delete | |
| * the cache. | | * the cache. | |
| * | | * | |
| * WARNING: Don't call this until you are have called <code>close</code> | | * WARNING: Don't call this until you are have called <code>close</code> | |
| * for each <code>UCD</code> object that you have used. also, | | * for each <code>UCD</code> object that you have used. also, | |
| * DO NOT call this if another thread may be calling <code>ucd_flushCache</
code> | | * DO NOT call this if another thread may be calling <code>ucd_flushCache</
code> | |
| * at the same time. | | * at the same time. | |
| * | | * | |
| * @internal ICU 4.0.1 technology preview | | * @internal ICU 4.0.1 technology preview | |
| */ | | */ | |
|
| U_CAPI void U_EXPORT2 | | U_INTERNAL void U_EXPORT2 | |
| ucd_freeCache(); | | ucd_freeCache(); | |
| | | | |
| /** | | /** | |
| * <code>UCD</code> objects are expensive to compute, and so | | * <code>UCD</code> objects are expensive to compute, and so | |
| * may be cached. This routine will remove any unused <code>UCD</code> | | * may be cached. This routine will remove any unused <code>UCD</code> | |
| * objects from the cache. | | * objects from the cache. | |
| * | | * | |
| * @internal 4.0.1 technology preview | | * @internal 4.0.1 technology preview | |
| */ | | */ | |
|
| U_CAPI void U_EXPORT2 | | U_INTERNAL void U_EXPORT2 | |
| ucd_flushCache(); | | ucd_flushCache(); | |
| | | | |
| /** | | /** | |
| * BMS | | * BMS | |
| * | | * | |
| * This object holds the information needed to do a Collation sensitive Boy
er-Moore search. It encapulates | | * This object holds the information needed to do a Collation sensitive Boy
er-Moore search. It encapulates | |
| * the pattern, the "bad character" and "good suffix" tables, the Collator-
based data needed to compute them, | | * the pattern, the "bad character" and "good suffix" tables, the Collator-
based data needed to compute them, | |
| * and a reference to the text being searched. | | * and a reference to the text being searched. | |
| * | | * | |
| * To do a search, you first need to get a <code>UCD</code> object by calli
ng <code>ucd_open</code>. | | * To do a search, you first need to get a <code>UCD</code> object by calli
ng <code>ucd_open</code>. | |
| | | | |
| skipping to change at line 207 | | skipping to change at line 207 | |
| * @param status - will be set if any errors occur. | | * @param status - will be set if any errors occur. | |
| * | | * | |
| * @return the <code>BMS</code> object. | | * @return the <code>BMS</code> object. | |
| * | | * | |
| * Note: if on return status is set to an error, the only safe | | * Note: if on return status is set to an error, the only safe | |
| * thing to do with the returned object is to call | | * thing to do with the returned object is to call | |
| * <code>bms_close</code>. | | * <code>bms_close</code>. | |
| * | | * | |
| * @internal ICU 4.0.1 technology preview | | * @internal ICU 4.0.1 technology preview | |
| */ | | */ | |
|
| U_CAPI BMS * U_EXPORT2 | | U_INTERNAL BMS * U_EXPORT2 | |
| bms_open(UCD *ucd, | | bms_open(UCD *ucd, | |
| const UChar *pattern, int32_t patternLength, | | const UChar *pattern, int32_t patternLength, | |
| const UChar *target, int32_t targetLength, | | const UChar *target, int32_t targetLength, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Close a <code>BMS</code> object and release all the | | * Close a <code>BMS</code> object and release all the | |
| * storage associated with it. | | * storage associated with it. | |
| * | | * | |
| * @param bms - the <code>BMS</code> object to close. | | * @param bms - the <code>BMS</code> object to close. | |
| * @internal ICU 4.0.1 technology preview | | * @internal ICU 4.0.1 technology preview | |
| */ | | */ | |
|
| U_CAPI void U_EXPORT2 | | U_INTERNAL void U_EXPORT2 | |
| bms_close(BMS *bms); | | bms_close(BMS *bms); | |
| | | | |
| /** | | /** | |
| * Test the pattern to see if it generates any CEs. | | * Test the pattern to see if it generates any CEs. | |
| * | | * | |
| * @param bms - the <code>BMS</code> object | | * @param bms - the <code>BMS</code> object | |
| * @return <code>TRUE</code> if the pattern string did not generate any CEs | | * @return <code>TRUE</code> if the pattern string did not generate any CEs | |
| * | | * | |
| * @internal ICU 4.0.1 technology preview | | * @internal ICU 4.0.1 technology preview | |
| */ | | */ | |
|
| U_CAPI UBool U_EXPORT2 | | U_INTERNAL UBool U_EXPORT2 | |
| bms_empty(BMS *bms); | | bms_empty(BMS *bms); | |
| | | | |
| /** | | /** | |
| * Get the <code>UCD</code> object used to create | | * Get the <code>UCD</code> object used to create | |
| * a given <code>BMS</code> object. | | * a given <code>BMS</code> object. | |
| * | | * | |
| * @param bms - the <code>BMS</code> object | | * @param bms - the <code>BMS</code> object | |
| * | | * | |
| * @return - the <code>UCD</code> object used to create | | * @return - the <code>UCD</code> object used to create | |
| * the given <code>BMS</code> object. | | * the given <code>BMS</code> object. | |
| * | | * | |
| * @internal ICU 4.0.1 technology preview | | * @internal ICU 4.0.1 technology preview | |
| */ | | */ | |
|
| U_CAPI UCD * U_EXPORT2 | | U_INTERNAL UCD * U_EXPORT2 | |
| bms_getData(BMS *bms); | | bms_getData(BMS *bms); | |
| | | | |
| /** | | /** | |
| * Search for the pattern string in the target string. | | * Search for the pattern string in the target string. | |
| * | | * | |
| * @param bms - the <code>BMS</code> object | | * @param bms - the <code>BMS</code> object | |
| * @param offset - the offset in the target string at which to begin the se
arch | | * @param offset - the offset in the target string at which to begin the se
arch | |
| * @param start - will be set to the starting offset of the match, or -1 if
there's no match | | * @param start - will be set to the starting offset of the match, or -1 if
there's no match | |
| * @param end - will be set to the ending offset of the match, or -1 if the
re's no match | | * @param end - will be set to the ending offset of the match, or -1 if the
re's no match | |
| * | | * | |
| * @return <code>TRUE</code> if the match succeeds, <code>FALSE</code> othe
rwise. | | * @return <code>TRUE</code> if the match succeeds, <code>FALSE</code> othe
rwise. | |
| * | | * | |
| * @internal ICU 4.0.1 technology preview | | * @internal ICU 4.0.1 technology preview | |
| */ | | */ | |
|
| U_CAPI UBool U_EXPORT2 | | U_INTERNAL UBool U_EXPORT2 | |
| bms_search(BMS *bms, int32_t offset, int32_t *start, int32_t *end); | | bms_search(BMS *bms, int32_t offset, int32_t *start, int32_t *end); | |
| | | | |
| /** | | /** | |
| * Set the target string for the match. | | * Set the target string for the match. | |
| * | | * | |
| * @param bms - the <code>BMS</code> object | | * @param bms - the <code>BMS</code> object | |
| * @param target - the new target string | | * @param target - the new target string | |
| * @param targetLength - the length of the new target string | | * @param targetLength - the length of the new target string | |
| * @param status - will be set if any errors occur. | | * @param status - will be set if any errors occur. | |
| * | | * | |
| * @internal ICU 4.0.1 technology preview | | * @internal ICU 4.0.1 technology preview | |
| */ | | */ | |
|
| U_CAPI void U_EXPORT2 | | U_INTERNAL void U_EXPORT2 | |
| bms_setTargetString(BMS *bms, const UChar *target, int32_t targetLength, UE
rrorCode *status); | | bms_setTargetString(BMS *bms, const UChar *target, int32_t targetLength, UE
rrorCode *status); | |
| | | | |
| #endif /* U_HIDE_INTERNAL_API */ | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| #endif | | #endif | |
| | | | |
| #endif /* _BMS_H */ | | #endif /* _BMS_H */ | |
| | | | |
End of changes. 12 change blocks. |
| 12 lines changed or deleted | | 12 lines changed or added | |
|
| calendar.h | | calendar.h | |
| | | | |
| skipping to change at line 89 | | skipping to change at line 89 | |
| * Calendar *rightNow = Calendar::createInstance(errCode); | | * Calendar *rightNow = Calendar::createInstance(errCode); | |
| * </pre> | | * </pre> | |
| * \htmlonly</blockquote>\endhtmlonly | | * \htmlonly</blockquote>\endhtmlonly | |
| * | | * | |
| * <p> | | * <p> | |
| * A <code>Calendar</code> object can produce all the time field values | | * A <code>Calendar</code> object can produce all the time field values | |
| * needed to implement the date-time formatting for a particular language | | * needed to implement the date-time formatting for a particular language | |
| * and calendar style (for example, Japanese-Gregorian, Japanese-Traditiona
l). | | * and calendar style (for example, Japanese-Gregorian, Japanese-Traditiona
l). | |
| * | | * | |
| * <p> | | * <p> | |
|
| * When computing a <code>UDate</code> from time fields, two special circum
stances | | * When computing a <code>UDate</code> from time fields, some special circu
mstances | |
| * may arise: there may be insufficient information to compute the | | * may arise: there may be insufficient information to compute the | |
| * <code>UDate</code> (such as only year and month but no day in the month)
, | | * <code>UDate</code> (such as only year and month but no day in the month)
, | |
|
| * or there may be inconsistent information (such as "Tuesday, July 15, 199 | | * there may be inconsistent information (such as "Tuesday, July 15, 1996" | |
| 6" | | * -- July 15, 1996 is actually a Monday), or the input time might be ambig | |
| * -- July 15, 1996 is actually a Monday). | | uous | |
| | | * because of time zone transition. | |
| * | | * | |
| * <p> | | * <p> | |
| * <strong>Insufficient information.</strong> The calendar will use default | | * <strong>Insufficient information.</strong> The calendar will use default | |
| * information to specify the missing fields. This may vary by calendar; fo
r | | * information to specify the missing fields. This may vary by calendar; fo
r | |
| * the Gregorian calendar, the default for a field is the same as that of t
he | | * the Gregorian calendar, the default for a field is the same as that of t
he | |
| * start of the epoch: i.e., YEAR = 1970, MONTH = JANUARY, DATE = 1, etc. | | * start of the epoch: i.e., YEAR = 1970, MONTH = JANUARY, DATE = 1, etc. | |
| * | | * | |
| * <p> | | * <p> | |
| * <strong>Inconsistent information.</strong> If fields conflict, the calen
dar | | * <strong>Inconsistent information.</strong> If fields conflict, the calen
dar | |
| * will give preference to fields set more recently. For example, when | | * will give preference to fields set more recently. For example, when | |
| | | | |
| skipping to change at line 128 | | skipping to change at line 129 | |
| * For the time of day: | | * For the time of day: | |
| * | | * | |
| * \htmlonly<blockquote>\endhtmlonly | | * \htmlonly<blockquote>\endhtmlonly | |
| * <pre> | | * <pre> | |
| * HOUR_OF_DAY | | * HOUR_OF_DAY | |
| * AM_PM + HOUR | | * AM_PM + HOUR | |
| * </pre> | | * </pre> | |
| * \htmlonly</blockquote>\endhtmlonly | | * \htmlonly</blockquote>\endhtmlonly | |
| * | | * | |
| * <p> | | * <p> | |
|
| | | * <strong>Ambiguous Wall Clock Time.</strong> When time offset from UTC ha | |
| | | s | |
| | | * changed, it produces ambiguous time slot around the transition. For exam | |
| | | ple, | |
| | | * many US locations observe daylight saving time. On the date switching to | |
| | | daylight | |
| | | * saving time in US, wall clock time jumps from 1:00 AM (standard) to 2:00 | |
| | | AM | |
| | | * (daylight). Therefore, wall clock time from 1:00 AM to 1:59 AM do not ex | |
| | | ist on | |
| | | * the date. When the input wall time fall into this missing time slot, the | |
| | | ICU | |
| | | * Calendar resolves the time using the UTC offset before the transition by | |
| | | default. | |
| | | * In this example, 1:30 AM is interpreted as 1:30 AM standard time (non-ex | |
| | | ist), | |
| | | * so the final result will be 2:30 AM daylight time. | |
| | | * | |
| | | * <p>On the date switching back to standard time, wall clock time is moved | |
| | | back one | |
| | | * hour at 2:00 AM. So wall clock time from 1:00 AM to 1:59 AM occur twice. | |
| | | In this | |
| | | * case, the ICU Calendar resolves the time using the UTC offset after the | |
| | | transition | |
| | | * by default. For example, 1:30 AM on the date is resolved as 1:30 AM stan | |
| | | dard time. | |
| | | * | |
| | | * <p>Ambiguous wall clock time resolution behaviors can be customized by C | |
| | | alendar APIs | |
| | | * {@link #setRepeatedWallTimeOption} and {@link #setSkippedWallTimeOption} | |
| | | . | |
| | | * These methods are available in ICU 49 or later versions. | |
| | | * | |
| | | * <p> | |
| * <strong>Note:</strong> for some non-Gregorian calendars, different | | * <strong>Note:</strong> for some non-Gregorian calendars, different | |
| * fields may be necessary for complete disambiguation. For example, a full | | * fields may be necessary for complete disambiguation. For example, a full | |
| * specification of the historial Arabic astronomical calendar requires yea
r, | | * specification of the historial Arabic astronomical calendar requires yea
r, | |
| * month, day-of-month <em>and</em> day-of-week in some cases. | | * month, day-of-month <em>and</em> day-of-week in some cases. | |
| * | | * | |
| * <p> | | * <p> | |
| * <strong>Note:</strong> There are certain possible ambiguities in | | * <strong>Note:</strong> There are certain possible ambiguities in | |
| * interpretation of certain singular times, which are resolved in the | | * interpretation of certain singular times, which are resolved in the | |
| * following ways: | | * following ways: | |
| * <ol> | | * <ol> | |
| | | | |
| skipping to change at line 164 | | skipping to change at line 185 | |
| * can be incremented or decremented, but wrap around. For example, rolling
the | | * can be incremented or decremented, but wrap around. For example, rolling
the | |
| * month up in the date <code>December 12, <b>1996</b></code> results in | | * month up in the date <code>December 12, <b>1996</b></code> results in | |
| * <code>January 12, <b>1996</b></code>. | | * <code>January 12, <b>1996</b></code>. | |
| * | | * | |
| * <p> | | * <p> | |
| * <code>Calendar</code> also provides a date arithmetic function for | | * <code>Calendar</code> also provides a date arithmetic function for | |
| * adding the specified (signed) amount of time to a particular time field. | | * adding the specified (signed) amount of time to a particular time field. | |
| * For example, subtracting 5 days from the date <code>September 12, 1996</
code> | | * For example, subtracting 5 days from the date <code>September 12, 1996</
code> | |
| * results in <code>September 7, 1996</code>. | | * results in <code>September 7, 1996</code>. | |
| * | | * | |
|
| | | * <p><big><b>Supported range</b></big> | |
| | | * | |
| | | * <p>The allowable range of <code>Calendar</code> has been | |
| | | * narrowed. <code>GregorianCalendar</code> used to attempt to support | |
| | | * the range of dates with millisecond values from | |
| | | * <code>Long.MIN_VALUE</code> to <code>Long.MAX_VALUE</code>. | |
| | | * The new <code>Calendar</code> protocol specifies the | |
| | | * maximum range of supportable dates as those having Julian day numbers | |
| | | * of <code>-0x7F000000</code> to <code>+0x7F000000</code>. This | |
| | | * corresponds to years from ~5,800,000 BCE to ~5,800,000 CE. Programmers | |
| | | * should use the protected constants in <code>Calendar</code> to | |
| | | * specify an extremely early or extremely late date.</p> | |
| | | * | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| class U_I18N_API Calendar : public UObject { | | class U_I18N_API Calendar : public UObject { | |
| public: | | public: | |
| | | | |
| /** | | /** | |
| * Field IDs for date and time. Used to specify date/time fields. ERA i
s calendar | | * Field IDs for date and time. Used to specify date/time fields. ERA i
s calendar | |
| * specific. Example ranges given are for illustration only; see specif
ic Calendar | | * specific. Example ranges given are for illustration only; see specif
ic Calendar | |
| * subclasses for actual ranges. | | * subclasses for actual ranges. | |
| * @deprecated ICU 2.6. Use C enum UCalendarDateFields defined in ucal.
h | | * @deprecated ICU 2.6. Use C enum UCalendarDateFields defined in ucal.
h | |
| | | | |
| skipping to change at line 344 | | skipping to change at line 378 | |
| * otherwise. | | * otherwise. | |
| * @return A Calendar if created successfully. NULL otherwi
se. | | * @return A Calendar if created successfully. NULL otherwi
se. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| static Calendar* U_EXPORT2 createInstance(TimeZone* zoneToAdopt, const
Locale& aLocale, UErrorCode& success); | | static Calendar* U_EXPORT2 createInstance(TimeZone* zoneToAdopt, const
Locale& aLocale, UErrorCode& success); | |
| | | | |
| /** | | /** | |
| * Gets a Calendar using the given timezone and given locale. The Time
Zone | | * Gets a Calendar using the given timezone and given locale. The Time
Zone | |
| * is _not_ adopted; the client is still responsible for deleting it. | | * is _not_ adopted; the client is still responsible for deleting it. | |
| * | | * | |
|
| * @param zoneToAdopt The given timezone to be adopted. | | * @param zone The given timezone. | |
| * @param aLocale The given locale. | | * @param aLocale The given locale. | |
| * @param success Indicates the success/failure of Calendar creati
on. Filled in | | * @param success Indicates the success/failure of Calendar creati
on. Filled in | |
| * with U_ZERO_ERROR if created successfully, set t
o a failure result | | * with U_ZERO_ERROR if created successfully, set t
o a failure result | |
| * otherwise. | | * otherwise. | |
| * @return A Calendar if created successfully. NULL otherwi
se. | | * @return A Calendar if created successfully. NULL otherwi
se. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| static Calendar* U_EXPORT2 createInstance(const TimeZone& zoneToAdopt,
const Locale& aLocale, UErrorCode& success); | | static Calendar* U_EXPORT2 createInstance(const TimeZone& zone, const L
ocale& aLocale, UErrorCode& success); | |
| | | | |
| /** | | /** | |
| * Returns a list of the locales for which Calendars are installed. | | * Returns a list of the locales for which Calendars are installed. | |
| * | | * | |
| * @param count Number of locales returned. | | * @param count Number of locales returned. | |
| * @return An array of Locale objects representing the set of loc
ales for which | | * @return An array of Locale objects representing the set of loc
ales for which | |
| * Calendars are installed. The system retains ownership
of this list; | | * Calendars are installed. The system retains ownership
of this list; | |
| * the caller must NOT delete it. Does not include user-r
egistered Calendars. | | * the caller must NOT delete it. Does not include user-r
egistered Calendars. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| | | | |
| skipping to change at line 508 | | skipping to change at line 542 | |
| */ | | */ | |
| UBool after(const Calendar& when, UErrorCode& status) const; | | UBool after(const Calendar& when, UErrorCode& status) const; | |
| | | | |
| /** | | /** | |
| * UDate Arithmetic function. Adds the specified (signed) amount of tim
e to the given | | * UDate Arithmetic function. Adds the specified (signed) amount of tim
e to the given | |
| * time field, based on the calendar's rules. For example, to subtract
5 days from | | * time field, based on the calendar's rules. For example, to subtract
5 days from | |
| * the current time of the calendar, call add(Calendar::DATE, -5). When
adding on | | * the current time of the calendar, call add(Calendar::DATE, -5). When
adding on | |
| * the month or Calendar::MONTH field, other fields like date might con
flict and | | * the month or Calendar::MONTH field, other fields like date might con
flict and | |
| * need to be changed. For instance, adding 1 month on the date 01/31/9
6 will result | | * need to be changed. For instance, adding 1 month on the date 01/31/9
6 will result | |
| * in 02/29/96. | | * in 02/29/96. | |
|
| | | * Adding a positive value always means moving forward in time, so for | |
| | | the Gregorian calendar, | |
| | | * starting with 100 BC and adding +1 to year results in 99 BC (even th | |
| | | ough this actually reduces | |
| | | * the numeric value of the field itself). | |
| * | | * | |
| * @param field Specifies which date field to modify. | | * @param field Specifies which date field to modify. | |
| * @param amount The amount of time to be added to the field, in the n
atural unit | | * @param amount The amount of time to be added to the field, in the n
atural unit | |
| * for that field (e.g., days for the day fields, hours
for the hour | | * for that field (e.g., days for the day fields, hours
for the hour | |
| * field.) | | * field.) | |
| * @param status Output param set to success/failure code on exit. If
any value | | * @param status Output param set to success/failure code on exit. If
any value | |
| * previously set in the time field is invalid or restri
cted by | | * previously set in the time field is invalid or restri
cted by | |
| * leniency, this will be set to an error status. | | * leniency, this will be set to an error status. | |
| * @deprecated ICU 2.6. use add(UCalendarDateFields field, int32_t amou
nt, UErrorCode& status) instead. | | * @deprecated ICU 2.6. use add(UCalendarDateFields field, int32_t amou
nt, UErrorCode& status) instead. | |
| */ | | */ | |
| virtual void add(EDateFields field, int32_t amount, UErrorCode& status)
; | | virtual void add(EDateFields field, int32_t amount, UErrorCode& status)
; | |
| | | | |
| /** | | /** | |
| * UDate Arithmetic function. Adds the specified (signed) amount of tim
e to the given | | * UDate Arithmetic function. Adds the specified (signed) amount of tim
e to the given | |
| * time field, based on the calendar's rules. For example, to subtract
5 days from | | * time field, based on the calendar's rules. For example, to subtract
5 days from | |
| * the current time of the calendar, call add(Calendar::DATE, -5). When
adding on | | * the current time of the calendar, call add(Calendar::DATE, -5). When
adding on | |
| * the month or Calendar::MONTH field, other fields like date might con
flict and | | * the month or Calendar::MONTH field, other fields like date might con
flict and | |
| * need to be changed. For instance, adding 1 month on the date 01/31/9
6 will result | | * need to be changed. For instance, adding 1 month on the date 01/31/9
6 will result | |
| * in 02/29/96. | | * in 02/29/96. | |
|
| | | * Adding a positive value always means moving forward in time, so for | |
| | | the Gregorian calendar, | |
| | | * starting with 100 BC and adding +1 to year results in 99 BC (even th | |
| | | ough this actually reduces | |
| | | * the numeric value of the field itself). | |
| * | | * | |
| * @param field Specifies which date field to modify. | | * @param field Specifies which date field to modify. | |
| * @param amount The amount of time to be added to the field, in the n
atural unit | | * @param amount The amount of time to be added to the field, in the n
atural unit | |
| * for that field (e.g., days for the day fields, hours
for the hour | | * for that field (e.g., days for the day fields, hours
for the hour | |
| * field.) | | * field.) | |
| * @param status Output param set to success/failure code on exit. If
any value | | * @param status Output param set to success/failure code on exit. If
any value | |
| * previously set in the time field is invalid or restri
cted by | | * previously set in the time field is invalid or restri
cted by | |
| * leniency, this will be set to an error status. | | * leniency, this will be set to an error status. | |
| * @stable ICU 2.6. | | * @stable ICU 2.6. | |
| */ | | */ | |
| | | | |
| skipping to change at line 548 | | skipping to change at line 588 | |
| | | | |
| #ifndef U_HIDE_DEPRECATED_API | | #ifndef U_HIDE_DEPRECATED_API | |
| /** | | /** | |
| * Time Field Rolling function. Rolls (up/down) a single unit of time o
n the given | | * Time Field Rolling function. Rolls (up/down) a single unit of time o
n the given | |
| * time field. For example, to roll the current date up by one day, cal
l | | * time field. For example, to roll the current date up by one day, cal
l | |
| * roll(Calendar::DATE, true). When rolling on the year or Calendar::YE
AR field, it | | * roll(Calendar::DATE, true). When rolling on the year or Calendar::YE
AR field, it | |
| * will roll the year value in the range between getMinimum(Calendar::Y
EAR) and the | | * will roll the year value in the range between getMinimum(Calendar::Y
EAR) and the | |
| * value returned by getMaximum(Calendar::YEAR). When rolling on the mo
nth or | | * value returned by getMaximum(Calendar::YEAR). When rolling on the mo
nth or | |
| * Calendar::MONTH field, other fields like date might conflict and, ne
ed to be | | * Calendar::MONTH field, other fields like date might conflict and, ne
ed to be | |
| * changed. For instance, rolling the month up on the date 01/31/96 wil
l result in | | * changed. For instance, rolling the month up on the date 01/31/96 wil
l result in | |
|
| * 02/29/96. Rolling up always means rolling forward in time; e.g., rol | | * 02/29/96. Rolling up always means rolling forward in time (unless th | |
| ling the year | | e limit of the | |
| * up on "100 BC" will result in "99 BC", for Gregorian calendar. When | | * field is reached, in which case it may pin or wrap), so for Gregoria | |
| rolling on the | | n calendar, | |
| * hour-in-day or Calendar::HOUR_OF_DAY field, it will roll the hour va | | * starting with 100 BC and rolling the year up results in 99 BC. | |
| lue in the range | | * When eras have a definite beginning and end (as in the Chinese calen | |
| * between 0 and 23, which is zero-based. | | dar, or as in | |
| | | * most eras in the Japanese calendar) then rolling the year past eithe | |
| | | r limit of the | |
| | | * era will cause the year to wrap around. When eras only have a limit | |
| | | at one end, | |
| | | * then attempting to roll the year past that limit will result in pinn | |
| | | ing the year | |
| | | * at that limit. Note that for most calendars in which era 0 years mov | |
| | | e forward in | |
| | | * time (such as Buddhist, Hebrew, or Islamic), it is possible for add | |
| | | or roll to | |
| | | * result in negative years for era 0 (that is the only way to represen | |
| | | t years before | |
| | | * the calendar epoch). | |
| | | * When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it w | |
| | | ill roll the | |
| | | * hour value in the range between 0 and 23, which is zero-based. | |
| * <P> | | * <P> | |
| * NOTE: Do not use this method -- use roll(EDateFields, int, UErrorCod
e&) instead. | | * NOTE: Do not use this method -- use roll(EDateFields, int, UErrorCod
e&) instead. | |
| * | | * | |
| * @param field The time field. | | * @param field The time field. | |
| * @param up Indicates if the value of the specified time field is
to be rolled | | * @param up Indicates if the value of the specified time field is
to be rolled | |
| * up or rolled down. Use true if rolling up, false othe
rwise. | | * up or rolled down. Use true if rolling up, false othe
rwise. | |
| * @param status Output param set to success/failure code on exit. If
any value | | * @param status Output param set to success/failure code on exit. If
any value | |
| * previously set in the time field is invalid or restri
cted by | | * previously set in the time field is invalid or restri
cted by | |
| * leniency, this will be set to an error status. | | * leniency, this will be set to an error status. | |
| * @deprecated ICU 2.6. Use roll(UCalendarDateFields field, UBool up, U
ErrorCode& status) instead. | | * @deprecated ICU 2.6. Use roll(UCalendarDateFields field, UBool up, U
ErrorCode& status) instead. | |
| | | | |
| skipping to change at line 574 | | skipping to change at line 623 | |
| #endif /* U_HIDE_DEPRECATED_API */ | | #endif /* U_HIDE_DEPRECATED_API */ | |
| | | | |
| /** | | /** | |
| * Time Field Rolling function. Rolls (up/down) a single unit of time o
n the given | | * Time Field Rolling function. Rolls (up/down) a single unit of time o
n the given | |
| * time field. For example, to roll the current date up by one day, cal
l | | * time field. For example, to roll the current date up by one day, cal
l | |
| * roll(Calendar::DATE, true). When rolling on the year or Calendar::YE
AR field, it | | * roll(Calendar::DATE, true). When rolling on the year or Calendar::YE
AR field, it | |
| * will roll the year value in the range between getMinimum(Calendar::Y
EAR) and the | | * will roll the year value in the range between getMinimum(Calendar::Y
EAR) and the | |
| * value returned by getMaximum(Calendar::YEAR). When rolling on the mo
nth or | | * value returned by getMaximum(Calendar::YEAR). When rolling on the mo
nth or | |
| * Calendar::MONTH field, other fields like date might conflict and, ne
ed to be | | * Calendar::MONTH field, other fields like date might conflict and, ne
ed to be | |
| * changed. For instance, rolling the month up on the date 01/31/96 wil
l result in | | * changed. For instance, rolling the month up on the date 01/31/96 wil
l result in | |
|
| * 02/29/96. Rolling up always means rolling forward in time; e.g., rol | | * 02/29/96. Rolling up always means rolling forward in time (unless th | |
| ling the year | | e limit of the | |
| * up on "100 BC" will result in "99 BC", for Gregorian calendar. When | | * field is reached, in which case it may pin or wrap), so for Gregoria | |
| rolling on the | | n calendar, | |
| * hour-in-day or Calendar::HOUR_OF_DAY field, it will roll the hour va | | * starting with 100 BC and rolling the year up results in 99 BC. | |
| lue in the range | | * When eras have a definite beginning and end (as in the Chinese calen | |
| * between 0 and 23, which is zero-based. | | dar, or as in | |
| | | * most eras in the Japanese calendar) then rolling the year past eithe | |
| | | r limit of the | |
| | | * era will cause the year to wrap around. When eras only have a limit | |
| | | at one end, | |
| | | * then attempting to roll the year past that limit will result in pinn | |
| | | ing the year | |
| | | * at that limit. Note that for most calendars in which era 0 years mov | |
| | | e forward in | |
| | | * time (such as Buddhist, Hebrew, or Islamic), it is possible for add | |
| | | or roll to | |
| | | * result in negative years for era 0 (that is the only way to represen | |
| | | t years before | |
| | | * the calendar epoch). | |
| | | * When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it w | |
| | | ill roll the | |
| | | * hour value in the range between 0 and 23, which is zero-based. | |
| * <P> | | * <P> | |
| * NOTE: Do not use this method -- use roll(UCalendarDateFields, int, U
ErrorCode&) instead. | | * NOTE: Do not use this method -- use roll(UCalendarDateFields, int, U
ErrorCode&) instead. | |
| * | | * | |
| * @param field The time field. | | * @param field The time field. | |
| * @param up Indicates if the value of the specified time field is
to be rolled | | * @param up Indicates if the value of the specified time field is
to be rolled | |
| * up or rolled down. Use true if rolling up, false othe
rwise. | | * up or rolled down. Use true if rolling up, false othe
rwise. | |
| * @param status Output param set to success/failure code on exit. If
any value | | * @param status Output param set to success/failure code on exit. If
any value | |
| * previously set in the time field is invalid or restri
cted by | | * previously set in the time field is invalid or restri
cted by | |
| * leniency, this will be set to an error status. | | * leniency, this will be set to an error status. | |
| * @stable ICU 2.6. | | * @stable ICU 2.6. | |
| */ | | */ | |
| inline void roll(UCalendarDateFields field, UBool up, UErrorCode& statu
s); | | inline void roll(UCalendarDateFields field, UBool up, UErrorCode& statu
s); | |
| | | | |
| /** | | /** | |
| * Time Field Rolling function. Rolls by the given amount on the given | | * Time Field Rolling function. Rolls by the given amount on the given | |
| * time field. For example, to roll the current date up by one day, cal
l | | * time field. For example, to roll the current date up by one day, cal
l | |
| * roll(Calendar::DATE, +1, status). When rolling on the month or | | * roll(Calendar::DATE, +1, status). When rolling on the month or | |
| * Calendar::MONTH field, other fields like date might conflict and, ne
ed to be | | * Calendar::MONTH field, other fields like date might conflict and, ne
ed to be | |
| * changed. For instance, rolling the month up on the date 01/31/96 wil
l result in | | * changed. For instance, rolling the month up on the date 01/31/96 wil
l result in | |
|
| * 02/29/96. Rolling by a positive value always means rolling forward | | * 02/29/96. Rolling by a positive value always means rolling forward i | |
| in time; | | n time (unless | |
| * e.g., rolling the year by +1 on "100 BC" will result in "99 BC", for | | * the limit of the field is reached, in which case it may pin or wrap) | |
| Gregorian | | , so for | |
| * calendar. When rolling on the hour-in-day or Calendar::HOUR_OF_DAY f | | * Gregorian calendar, starting with 100 BC and rolling the year by + 1 | |
| ield, it will | | results in 99 BC. | |
| * roll the hour value in the range between 0 and 23, which is zero-bas | | * When eras have a definite beginning and end (as in the Chinese calen | |
| ed. | | dar, or as in | |
| | | * most eras in the Japanese calendar) then rolling the year past eithe | |
| | | r limit of the | |
| | | * era will cause the year to wrap around. When eras only have a limit | |
| | | at one end, | |
| | | * then attempting to roll the year past that limit will result in pinn | |
| | | ing the year | |
| | | * at that limit. Note that for most calendars in which era 0 years mov | |
| | | e forward in | |
| | | * time (such as Buddhist, Hebrew, or Islamic), it is possible for add | |
| | | or roll to | |
| | | * result in negative years for era 0 (that is the only way to represen | |
| | | t years before | |
| | | * the calendar epoch). | |
| | | * When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it w | |
| | | ill roll the | |
| | | * hour value in the range between 0 and 23, which is zero-based. | |
| * <P> | | * <P> | |
| * The only difference between roll() and add() is that roll() does not
change | | * The only difference between roll() and add() is that roll() does not
change | |
| * the value of more significant fields when it reaches the minimum or
maximum | | * the value of more significant fields when it reaches the minimum or
maximum | |
| * of its range, whereas add() does. | | * of its range, whereas add() does. | |
| * | | * | |
| * @param field The time field. | | * @param field The time field. | |
| * @param amount Indicates amount to roll. | | * @param amount Indicates amount to roll. | |
| * @param status Output param set to success/failure code on exit. If
any value | | * @param status Output param set to success/failure code on exit. If
any value | |
| * previously set in the time field is invalid, this wil
l be set to | | * previously set in the time field is invalid, this wil
l be set to | |
| * an error status. | | * an error status. | |
| * @deprecated ICU 2.6. Use roll(UCalendarDateFields field, int32_t amo
unt, UErrorCode& status) instead. | | * @deprecated ICU 2.6. Use roll(UCalendarDateFields field, int32_t amo
unt, UErrorCode& status) instead. | |
| */ | | */ | |
| virtual void roll(EDateFields field, int32_t amount, UErrorCode& status
); | | virtual void roll(EDateFields field, int32_t amount, UErrorCode& status
); | |
| | | | |
| /** | | /** | |
| * Time Field Rolling function. Rolls by the given amount on the given | | * Time Field Rolling function. Rolls by the given amount on the given | |
| * time field. For example, to roll the current date up by one day, cal
l | | * time field. For example, to roll the current date up by one day, cal
l | |
| * roll(Calendar::DATE, +1, status). When rolling on the month or | | * roll(Calendar::DATE, +1, status). When rolling on the month or | |
| * Calendar::MONTH field, other fields like date might conflict and, ne
ed to be | | * Calendar::MONTH field, other fields like date might conflict and, ne
ed to be | |
| * changed. For instance, rolling the month up on the date 01/31/96 wil
l result in | | * changed. For instance, rolling the month up on the date 01/31/96 wil
l result in | |
|
| * 02/29/96. Rolling by a positive value always means rolling forward | | * 02/29/96. Rolling by a positive value always means rolling forward i | |
| in time; | | n time (unless | |
| * e.g., rolling the year by +1 on "100 BC" will result in "99 BC", for | | * the limit of the field is reached, in which case it may pin or wrap) | |
| Gregorian | | , so for | |
| * calendar. When rolling on the hour-in-day or Calendar::HOUR_OF_DAY f | | * Gregorian calendar, starting with 100 BC and rolling the year by + 1 | |
| ield, it will | | results in 99 BC. | |
| * roll the hour value in the range between 0 and 23, which is zero-bas | | * When eras have a definite beginning and end (as in the Chinese calen | |
| ed. | | dar, or as in | |
| | | * most eras in the Japanese calendar) then rolling the year past eithe | |
| | | r limit of the | |
| | | * era will cause the year to wrap around. When eras only have a limit | |
| | | at one end, | |
| | | * then attempting to roll the year past that limit will result in pinn | |
| | | ing the year | |
| | | * at that limit. Note that for most calendars in which era 0 years mov | |
| | | e forward in | |
| | | * time (such as Buddhist, Hebrew, or Islamic), it is possible for add | |
| | | or roll to | |
| | | * result in negative years for era 0 (that is the only way to represen | |
| | | t years before | |
| | | * the calendar epoch). | |
| | | * When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it w | |
| | | ill roll the | |
| | | * hour value in the range between 0 and 23, which is zero-based. | |
| * <P> | | * <P> | |
| * The only difference between roll() and add() is that roll() does not
change | | * The only difference between roll() and add() is that roll() does not
change | |
| * the value of more significant fields when it reaches the minimum or
maximum | | * the value of more significant fields when it reaches the minimum or
maximum | |
| * of its range, whereas add() does. | | * of its range, whereas add() does. | |
| * | | * | |
| * @param field The time field. | | * @param field The time field. | |
| * @param amount Indicates amount to roll. | | * @param amount Indicates amount to roll. | |
| * @param status Output param set to success/failure code on exit. If
any value | | * @param status Output param set to success/failure code on exit. If
any value | |
| * previously set in the time field is invalid, this wil
l be set to | | * previously set in the time field is invalid, this wil
l be set to | |
| * an error status. | | * an error status. | |
| | | | |
End of changes. 12 change blocks. |
| 36 lines changed or deleted | | 158 lines changed or added | |
|
| coll.h | | coll.h | |
| | | | |
| skipping to change at line 209 | | skipping to change at line 209 | |
| * Two characters are considered "identical" when they have the same un
icode | | * Two characters are considered "identical" when they have the same un
icode | |
| * spellings.<br> | | * spellings.<br> | |
| * For example, "ä" == "ä". | | * For example, "ä" == "ä". | |
| * | | * | |
| * UCollationStrength is also used to determine the strength of sort ke
ys | | * UCollationStrength is also used to determine the strength of sort ke
ys | |
| * generated from Collator objects. | | * generated from Collator objects. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| enum ECollationStrength | | enum ECollationStrength | |
| { | | { | |
|
| PRIMARY = 0, | | PRIMARY = UCOL_PRIMARY, // 0 | |
| SECONDARY = 1, | | SECONDARY = UCOL_SECONDARY, // 1 | |
| TERTIARY = 2, | | TERTIARY = UCOL_TERTIARY, // 2 | |
| QUATERNARY = 3, | | QUATERNARY = UCOL_QUATERNARY, // 3 | |
| IDENTICAL = 15 | | IDENTICAL = UCOL_IDENTICAL // 15 | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * LESS is returned if source string is compared to be less than target | | * LESS is returned if source string is compared to be less than target | |
| * string in the compare() method. | | * string in the compare() method. | |
| * EQUAL is returned if source string is compared to be equal to target | | * EQUAL is returned if source string is compared to be equal to target | |
| * string in the compare() method. | | * string in the compare() method. | |
| * GREATER is returned if source string is compared to be greater than | | * GREATER is returned if source string is compared to be greater than | |
| * target string in the compare() method. | | * target string in the compare() method. | |
| * @see Collator#compare | | * @see Collator#compare | |
| * @deprecated ICU 2.6. Use C enum UCollationResult defined in ucol.h | | * @deprecated ICU 2.6. Use C enum UCollationResult defined in ucol.h | |
| */ | | */ | |
| enum EComparisonResult | | enum EComparisonResult | |
| { | | { | |
|
| LESS = -1, | | LESS = UCOL_LESS, // -1 | |
| EQUAL = 0, | | EQUAL = UCOL_EQUAL, // 0 | |
| GREATER = 1 | | GREATER = UCOL_GREATER // 1 | |
| }; | | }; | |
| | | | |
| // Collator public destructor ----------------------------------------- | | // Collator public destructor ----------------------------------------- | |
| | | | |
| /** | | /** | |
| * Destructor | | * Destructor | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual ~Collator(); | | virtual ~Collator(); | |
| | | | |
| // Collator public methods -------------------------------------------- | | // Collator public methods -------------------------------------------- | |
| | | | |
| /** | | /** | |
|
| * Returns true if "other" is the same as "this" | | * Returns TRUE if "other" is the same as "this". | |
| | | * | |
| | | * The base class implementation returns TRUE if "other" has the same t | |
| | | ype/class as "this": | |
| | | * <code>typeid(*this) == typeid(other)</code>. | |
| | | * | |
| | | * Subclass implementations should do something like the following: | |
| | | * <pre> | |
| | | * if (this == &other) { return TRUE; } | |
| | | * if (!Collator::operator==(other)) { return FALSE; } // not the sa | |
| | | me class | |
| | | * | |
| | | * const MyCollator &o = (const MyCollator&)other; | |
| | | * (compare this vs. o's subclass fields) | |
| | | * </pre> | |
| * @param other Collator object to be compared | | * @param other Collator object to be compared | |
|
| * @return true if other is the same as this. | | * @return TRUE if other is the same as this. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual UBool operator==(const Collator& other) const; | | virtual UBool operator==(const Collator& other) const; | |
| | | | |
| /** | | /** | |
| * Returns true if "other" is not the same as "this". | | * Returns true if "other" is not the same as "this". | |
|
| | | * Calls ! operator==(const Collator&) const which works for all subcla
sses. | |
| * @param other Collator object to be compared | | * @param other Collator object to be compared | |
|
| * @return true if other is not the same as this. | | * @return TRUE if other is not the same as this. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual UBool operator!=(const Collator& other) const; | | virtual UBool operator!=(const Collator& other) const; | |
| | | | |
| /** | | /** | |
|
| * Makes a shallow copy of the current object. | | * Makes a copy of this object. | |
| * @return a copy of this object | | * @return a copy of this object, owned by the caller | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual Collator* clone(void) const = 0; | | virtual Collator* clone(void) const = 0; | |
| | | | |
| /** | | /** | |
| * Creates the Collator object for the current default locale. | | * Creates the Collator object for the current default locale. | |
| * The default locale is determined by Locale::getDefault. | | * The default locale is determined by Locale::getDefault. | |
| * The UErrorCode& err parameter is used to return status information t
o the user. | | * The UErrorCode& err parameter is used to return status information t
o the user. | |
| * To check whether the construction succeeded or not, you should check
the | | * To check whether the construction succeeded or not, you should check
the | |
| * value of U_SUCCESS(err). If you wish more detailed information, you
can | | * value of U_SUCCESS(err). If you wish more detailed information, you
can | |
| | | | |
| skipping to change at line 407 | | skipping to change at line 420 | |
| */ | | */ | |
| virtual UCollationResult compare(const UnicodeString& source, | | virtual UCollationResult compare(const UnicodeString& source, | |
| const UnicodeString& target, | | const UnicodeString& target, | |
| int32_t length, | | int32_t length, | |
| UErrorCode &status) const = 0; | | UErrorCode &status) const = 0; | |
| | | | |
| /** | | /** | |
| * The comparison function compares the character data stored in two | | * The comparison function compares the character data stored in two | |
| * different string arrays. Returns information about whether a string
array | | * different string arrays. Returns information about whether a string
array | |
| * is less than, greater than or equal to another string array. | | * is less than, greater than or equal to another string array. | |
|
| | | * <p>Example of use: | |
| | | * <pre> | |
| | | * . UChar ABC[] = {0x41, 0x42, 0x43, 0}; // = "ABC" | |
| | | * . UChar abc[] = {0x61, 0x62, 0x63, 0}; // = "abc" | |
| | | * . UErrorCode status = U_ZERO_ERROR; | |
| | | * . Collator *myCollation = | |
| | | * . Collator::createInstance(Locale::US, statu | |
| | | s); | |
| | | * . if (U_FAILURE(status)) return; | |
| | | * . myCollation->setStrength(Collator::PRIMARY); | |
| | | * . // result would be Collator::EQUAL ("abc" == "ABC") | |
| | | * . // (no primary difference between "abc" and "ABC") | |
| | | * . Collator::EComparisonResult result = | |
| | | * . myCollation->compare(abc, 3, ABC, 3); | |
| | | * . myCollation->setStrength(Collator::TERTIARY); | |
| | | * . // result would be Collator::LESS ("abc" <<< "ABC") | |
| | | * . // (with tertiary difference between "abc" and "ABC") | |
| | | * . result = myCollation->compare(abc, 3, ABC, 3); | |
| | | * </pre> | |
| * @param source the source string array to be compared with. | | * @param source the source string array to be compared with. | |
| * @param sourceLength the length of the source string array. If this
value | | * @param sourceLength the length of the source string array. If this
value | |
| * is equal to -1, the string array is null-terminated. | | * is equal to -1, the string array is null-terminated. | |
| * @param target the string that is to be compared with the source stri
ng. | | * @param target the string that is to be compared with the source stri
ng. | |
| * @param targetLength the length of the target string array. If this
value | | * @param targetLength the length of the target string array. If this
value | |
| * is equal to -1, the string array is null-terminated. | | * is equal to -1, the string array is null-terminated. | |
| * @return Returns a byte value. GREATER if source is greater than targ
et; | | * @return Returns a byte value. GREATER if source is greater than targ
et; | |
| * EQUAL if source is equal to target; LESS if source is less t
han | | * EQUAL if source is equal to target; LESS if source is less t
han | |
| * target | | * target | |
| * @deprecated ICU 2.6 use the overload with UErrorCode & | | * @deprecated ICU 2.6 use the overload with UErrorCode & | |
| | | | |
| skipping to change at line 487 | | skipping to change at line 518 | |
| * string from the chars in the sort key. The generated sort key handl
es | | * string from the chars in the sort key. The generated sort key handl
es | |
| * only a limited number of ignorable characters. | | * only a limited number of ignorable characters. | |
| * <p>Use CollationKey::equals or CollationKey::compare to compare the | | * <p>Use CollationKey::equals or CollationKey::compare to compare the | |
| * generated sort keys. | | * generated sort keys. | |
| * If the source string is null, a null collation key will be returned. | | * If the source string is null, a null collation key will be returned. | |
| * @param source the source string to be transformed into a sort key. | | * @param source the source string to be transformed into a sort key. | |
| * @param key the collation key to be filled in | | * @param key the collation key to be filled in | |
| * @param status the error code status. | | * @param status the error code status. | |
| * @return the collation key of the string based on the collation rules
. | | * @return the collation key of the string based on the collation rules
. | |
| * @see CollationKey#compare | | * @see CollationKey#compare | |
|
| * @deprecated ICU 2.8 Use getSortKey(...) instead | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual CollationKey& getCollationKey(const UnicodeString& source, | | virtual CollationKey& getCollationKey(const UnicodeString& source, | |
| CollationKey& key, | | CollationKey& key, | |
| UErrorCode& status) const = 0; | | UErrorCode& status) const = 0; | |
| | | | |
| /** | | /** | |
| * Transforms the string into a series of characters that can be compar
ed | | * Transforms the string into a series of characters that can be compar
ed | |
| * with CollationKey::compareTo. It is not possible to restore the orig
inal | | * with CollationKey::compareTo. It is not possible to restore the orig
inal | |
| * string from the chars in the sort key. The generated sort key handl
es | | * string from the chars in the sort key. The generated sort key handl
es | |
| * only a limited number of ignorable characters. | | * only a limited number of ignorable characters. | |
| * <p>Use CollationKey::equals or CollationKey::compare to compare the | | * <p>Use CollationKey::equals or CollationKey::compare to compare the | |
| * generated sort keys. | | * generated sort keys. | |
| * <p>If the source string is null, a null collation key will be return
ed. | | * <p>If the source string is null, a null collation key will be return
ed. | |
| * @param source the source string to be transformed into a sort key. | | * @param source the source string to be transformed into a sort key. | |
| * @param sourceLength length of the collation key | | * @param sourceLength length of the collation key | |
| * @param key the collation key to be filled in | | * @param key the collation key to be filled in | |
| * @param status the error code status. | | * @param status the error code status. | |
| * @return the collation key of the string based on the collation rules
. | | * @return the collation key of the string based on the collation rules
. | |
| * @see CollationKey#compare | | * @see CollationKey#compare | |
|
| * @deprecated ICU 2.8 Use getSortKey(...) instead | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual CollationKey& getCollationKey(const UChar*source, | | virtual CollationKey& getCollationKey(const UChar*source, | |
| int32_t sourceLength, | | int32_t sourceLength, | |
| CollationKey& key, | | CollationKey& key, | |
| UErrorCode& status) const = 0; | | UErrorCode& status) const = 0; | |
| /** | | /** | |
| * Generates the hash code for the collation object | | * Generates the hash code for the collation object | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual int32_t hashCode(void) const = 0; | | virtual int32_t hashCode(void) const = 0; | |
| | | | |
| skipping to change at line 531 | | skipping to change at line 562 | |
| * | | * | |
| * @param type can be either requested, valid or actual locale. For mor
e | | * @param type can be either requested, valid or actual locale. For mor
e | |
| * information see the definition of ULocDataLocaleType in | | * information see the definition of ULocDataLocaleType in | |
| * uloc.h | | * uloc.h | |
| * @param status the error code status. | | * @param status the error code status. | |
| * @return locale where the collation data lives. If the collator | | * @return locale where the collation data lives. If the collator | |
| * was instantiated from rules, locale is empty. | | * was instantiated from rules, locale is empty. | |
| * @deprecated ICU 2.8 This API is under consideration for revision | | * @deprecated ICU 2.8 This API is under consideration for revision | |
| * in ICU 3.0. | | * in ICU 3.0. | |
| */ | | */ | |
|
| virtual const Locale getLocale(ULocDataLocaleType type, UErrorCode& sta
tus) const = 0; | | virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) c
onst = 0; | |
| | | | |
| /** | | /** | |
| * Convenience method for comparing two strings based on the collation
rules. | | * Convenience method for comparing two strings based on the collation
rules. | |
| * @param source the source string to be compared with. | | * @param source the source string to be compared with. | |
| * @param target the target string to be compared with. | | * @param target the target string to be compared with. | |
| * @return true if the first string is greater than the second one, | | * @return true if the first string is greater than the second one, | |
| * according to the collation rules. false, otherwise. | | * according to the collation rules. false, otherwise. | |
| * @see Collator#compare | | * @see Collator#compare | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| | | | |
| skipping to change at line 569 | | skipping to change at line 600 | |
| * @param source the source string to be compared with. | | * @param source the source string to be compared with. | |
| * @param target the target string to be compared with. | | * @param target the target string to be compared with. | |
| * @return true if the strings are equal according to the collation rul
es. | | * @return true if the strings are equal according to the collation rul
es. | |
| * false, otherwise. | | * false, otherwise. | |
| * @see Collator#compare | | * @see Collator#compare | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| UBool equals(const UnicodeString& source, const UnicodeString& target)
const; | | UBool equals(const UnicodeString& source, const UnicodeString& target)
const; | |
| | | | |
| /** | | /** | |
|
| * Determines the minimum strength that will be use in comparison or | | * Determines the minimum strength that will be used in comparison or | |
| * transformation. | | * transformation. | |
| * <p>E.g. with strength == SECONDARY, the tertiary difference is ignor
ed | | * <p>E.g. with strength == SECONDARY, the tertiary difference is ignor
ed | |
| * <p>E.g. with strength == PRIMARY, the secondary and tertiary differe
nce | | * <p>E.g. with strength == PRIMARY, the secondary and tertiary differe
nce | |
| * are ignored. | | * are ignored. | |
| * @return the current comparison level. | | * @return the current comparison level. | |
| * @see Collator#setStrength | | * @see Collator#setStrength | |
| * @deprecated ICU 2.6 Use getAttribute(UCOL_STRENGTH...) instead | | * @deprecated ICU 2.6 Use getAttribute(UCOL_STRENGTH...) instead | |
| */ | | */ | |
|
| virtual ECollationStrength getStrength(void) const = 0; | | virtual ECollationStrength getStrength(void) const; | |
| | | | |
| /** | | /** | |
| * Sets the minimum strength to be used in comparison or transformation
. | | * Sets the minimum strength to be used in comparison or transformation
. | |
| * <p>Example of use: | | * <p>Example of use: | |
| * <pre> | | * <pre> | |
| * \code | | * \code | |
| * UErrorCode status = U_ZERO_ERROR; | | * UErrorCode status = U_ZERO_ERROR; | |
| * Collator*myCollation = Collator::createInstance(Locale::US, status)
; | | * Collator*myCollation = Collator::createInstance(Locale::US, status)
; | |
| * if (U_FAILURE(status)) return; | | * if (U_FAILURE(status)) return; | |
| * myCollation->setStrength(Collator::PRIMARY); | | * myCollation->setStrength(Collator::PRIMARY); | |
| * // result will be "abc" == "ABC" | | * // result will be "abc" == "ABC" | |
| * // tertiary differences will be ignored | | * // tertiary differences will be ignored | |
| * Collator::ComparisonResult result = myCollation->compare("abc", "AB
C"); | | * Collator::ComparisonResult result = myCollation->compare("abc", "AB
C"); | |
| * \endcode | | * \endcode | |
| * </pre> | | * </pre> | |
| * @see Collator#getStrength | | * @see Collator#getStrength | |
| * @param newStrength the new comparison level. | | * @param newStrength the new comparison level. | |
| * @deprecated ICU 2.6 Use setAttribute(UCOL_STRENGTH...) instead | | * @deprecated ICU 2.6 Use setAttribute(UCOL_STRENGTH...) instead | |
| */ | | */ | |
|
| virtual void setStrength(ECollationStrength newStrength) = 0; | | virtual void setStrength(ECollationStrength newStrength); | |
| | | | |
| /** | | /** | |
| * Retrieves the reordering codes for this collator. | | * Retrieves the reordering codes for this collator. | |
| * @param dest The array to fill with the script ordering. | | * @param dest The array to fill with the script ordering. | |
| * @param destCapacity The length of dest. If it is 0, then dest may be
NULL and the function | | * @param destCapacity The length of dest. If it is 0, then dest may be
NULL and the function | |
| * will only return the length of the result without writing any of th
e result string (pre-flighting). | | * will only return the length of the result without writing any of th
e result string (pre-flighting). | |
| * @param status A reference to an error code value, which must not ind
icate | | * @param status A reference to an error code value, which must not ind
icate | |
| * a failure before the function call. | | * a failure before the function call. | |
| * @return The length of the script ordering array. | | * @return The length of the script ordering array. | |
| * @see ucol_setReorderCodes | | * @see ucol_setReorderCodes | |
| * @see Collator#getEquivalentReorderCodes | | * @see Collator#getEquivalentReorderCodes | |
| * @see Collator#setReorderCodes | | * @see Collator#setReorderCodes | |
| * @see UScriptCode | | * @see UScriptCode | |
| * @see UColReorderCode | | * @see UColReorderCode | |
| * @stable ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
|
| virtual int32_t U_EXPORT2 getReorderCodes(int32_t *dest, | | virtual int32_t getReorderCodes(int32_t *dest, | |
| int32_t destCapacity, | | int32_t destCapacity, | |
| UErrorCode& status) const; | | UErrorCode& status) const; | |
| | | | |
| /** | | /** | |
| * Sets the ordering of scripts for this collator. | | * Sets the ordering of scripts for this collator. | |
| * | | * | |
| * <p>The reordering codes are a combination of script codes and reorde
r codes. | | * <p>The reordering codes are a combination of script codes and reorde
r codes. | |
| * @param reorderCodes An array of script codes in the new order. This
can be NULL if the | | * @param reorderCodes An array of script codes in the new order. This
can be NULL if the | |
| * length is also set to 0. An empty array will clear any reordering co
des on the collator. | | * length is also set to 0. An empty array will clear any reordering co
des on the collator. | |
| * @param reorderCodesLength The length of reorderCodes. | | * @param reorderCodesLength The length of reorderCodes. | |
| * @param status error code | | * @param status error code | |
| * @see Collator#getReorderCodes | | * @see Collator#getReorderCodes | |
| * @see Collator#getEquivalentReorderCodes | | * @see Collator#getEquivalentReorderCodes | |
| * @see UScriptCode | | * @see UScriptCode | |
| * @see UColReorderCode | | * @see UColReorderCode | |
| * @stable ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
|
| virtual void U_EXPORT2 setReorderCodes(const int32_t* reorderCodes, | | virtual void setReorderCodes(const int32_t* reorderCodes, | |
| int32_t reorderCodesLength, | | int32_t reorderCodesLength, | |
| UErrorCode& status) ; | | UErrorCode& status) ; | |
| | | | |
| /** | | /** | |
| * Retrieves the reorder codes that are grouped with the given reorder
code. Some reorder | | * Retrieves the reorder codes that are grouped with the given reorder
code. Some reorder | |
| * codes will be grouped and must reorder together. | | * codes will be grouped and must reorder together. | |
| * @param reorderCode The reorder code to determine equivalence for. | | * @param reorderCode The reorder code to determine equivalence for. | |
| * @param dest The array to fill with the script equivalene reordering
codes. | | * @param dest The array to fill with the script equivalene reordering
codes. | |
| * @param destCapacity The length of dest. If it is 0, then dest may be
NULL and the | | * @param destCapacity The length of dest. If it is 0, then dest may be
NULL and the | |
| * function will only return the length of the result without writing a
ny of the result | | * function will only return the length of the result without writing a
ny of the result | |
| * string (pre-flighting). | | * string (pre-flighting). | |
| * @param status A reference to an error code value, which must not ind
icate | | * @param status A reference to an error code value, which must not ind
icate | |
| | | | |
| skipping to change at line 852 | | skipping to change at line 883 | |
| | | | |
| /** | | /** | |
| * Universal attribute getter | | * Universal attribute getter | |
| * @param attr attribute type | | * @param attr attribute type | |
| * @param status to indicate whether the operation went on smoothly or | | * @param status to indicate whether the operation went on smoothly or | |
| * there were errors | | * there were errors | |
| * @return attribute value | | * @return attribute value | |
| * @stable ICU 2.2 | | * @stable ICU 2.2 | |
| */ | | */ | |
| virtual UColAttributeValue getAttribute(UColAttribute attr, | | virtual UColAttributeValue getAttribute(UColAttribute attr, | |
|
| UErrorCode &status) = 0; | | UErrorCode &status) const = 0; | |
| | | | |
| /** | | /** | |
| * Sets the variable top to a collation element value of a string suppl
ied. | | * Sets the variable top to a collation element value of a string suppl
ied. | |
| * @param varTop one or more (if contraction) UChars to which the varia
ble top should be set | | * @param varTop one or more (if contraction) UChars to which the varia
ble top should be set | |
| * @param len length of variable top string. If -1 it is considered to
be zero terminated. | | * @param len length of variable top string. If -1 it is considered to
be zero terminated. | |
| * @param status error code. If error code is set, the return value is
undefined. Errors set by this function are: <br> | | * @param status error code. If error code is set, the return value is
undefined. Errors set by this function are: <br> | |
| * U_CE_NOT_FOUND_ERROR if more than one character was passed and th
ere is no such a contraction<br> | | * U_CE_NOT_FOUND_ERROR if more than one character was passed and th
ere is no such a contraction<br> | |
| * U_PRIMARY_TOO_LONG_ERROR if the primary for the variable top has
more than two bytes | | * U_PRIMARY_TOO_LONG_ERROR if the primary for the variable top has
more than two bytes | |
| * @return a 32 bit value containing the value of the variable top in u
pper 16 bits. Lower 16 bits are undefined | | * @return a 32 bit value containing the value of the variable top in u
pper 16 bits. Lower 16 bits are undefined | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| | | | |
| skipping to change at line 875 | | skipping to change at line 906 | |
| | | | |
| /** | | /** | |
| * Sets the variable top to a collation element value of a string suppl
ied. | | * Sets the variable top to a collation element value of a string suppl
ied. | |
| * @param varTop an UnicodeString size 1 or more (if contraction) of UC
hars to which the variable top should be set | | * @param varTop an UnicodeString size 1 or more (if contraction) of UC
hars to which the variable top should be set | |
| * @param status error code. If error code is set, the return value is
undefined. Errors set by this function are: <br> | | * @param status error code. If error code is set, the return value is
undefined. Errors set by this function are: <br> | |
| * U_CE_NOT_FOUND_ERROR if more than one character was passed and th
ere is no such a contraction<br> | | * U_CE_NOT_FOUND_ERROR if more than one character was passed and th
ere is no such a contraction<br> | |
| * U_PRIMARY_TOO_LONG_ERROR if the primary for the variable top has
more than two bytes | | * U_PRIMARY_TOO_LONG_ERROR if the primary for the variable top has
more than two bytes | |
| * @return a 32 bit value containing the value of the variable top in u
pper 16 bits. Lower 16 bits are undefined | | * @return a 32 bit value containing the value of the variable top in u
pper 16 bits. Lower 16 bits are undefined | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| virtual uint32_t setVariableTop(const UnicodeString varTop, UErrorCode
&status) = 0; | | virtual uint32_t setVariableTop(const UnicodeString &varTop, UErrorCode
&status) = 0; | |
| | | | |
| /** | | /** | |
| * Sets the variable top to a collation element value supplied. Variabl
e top is set to the upper 16 bits. | | * Sets the variable top to a collation element value supplied. Variabl
e top is set to the upper 16 bits. | |
| * Lower 16 bits are ignored. | | * Lower 16 bits are ignored. | |
| * @param varTop CE value, as returned by setVariableTop or ucol)getVar
iableTop | | * @param varTop CE value, as returned by setVariableTop or ucol)getVar
iableTop | |
| * @param status error code (not changed by function) | | * @param status error code (not changed by function) | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| virtual void setVariableTop(const uint32_t varTop, UErrorCode &status)
= 0; | | virtual void setVariableTop(uint32_t varTop, UErrorCode &status) = 0; | |
| | | | |
| /** | | /** | |
| * Gets the variable top value of a Collator. | | * Gets the variable top value of a Collator. | |
| * Lower 16 bits are undefined and should be ignored. | | * Lower 16 bits are undefined and should be ignored. | |
| * @param status error code (not changed by function). If error code is
set, the return value is undefined. | | * @param status error code (not changed by function). If error code is
set, the return value is undefined. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual uint32_t getVariableTop(UErrorCode &status) const = 0; | | virtual uint32_t getVariableTop(UErrorCode &status) const = 0; | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 906 | | skipping to change at line 937 | |
| * tailored in this collator. | | * tailored in this collator. | |
| * @param status error code of the operation | | * @param status error code of the operation | |
| * @return a pointer to a UnicodeSet object containing all the | | * @return a pointer to a UnicodeSet object containing all the | |
| * code points and sequences that may sort differently than | | * code points and sequences that may sort differently than | |
| * in the UCA. The object must be disposed of by using delete | | * in the UCA. The object must be disposed of by using delete | |
| * @stable ICU 2.4 | | * @stable ICU 2.4 | |
| */ | | */ | |
| virtual UnicodeSet *getTailoredSet(UErrorCode &status) const; | | virtual UnicodeSet *getTailoredSet(UErrorCode &status) const; | |
| | | | |
| /** | | /** | |
|
| * Thread safe cloning operation | | * Same as clone(). | |
| * @return pointer to the new clone, user should remove it. | | * The base class implementation simply calls clone(). | |
| * @stable ICU 2.2 | | * @return a copy of this object, owned by the caller | |
| | | * @see clone() | |
| | | * @deprecated ICU 50 no need to have two methods for cloning | |
| */ | | */ | |
|
| virtual Collator* safeClone(void) = 0; | | virtual Collator* safeClone(void) const; | |
| | | | |
| /** | | /** | |
| * Get the sort key as an array of bytes from an UnicodeString. | | * Get the sort key as an array of bytes from an UnicodeString. | |
| * Sort key byte arrays are zero-terminated and can be compared using | | * Sort key byte arrays are zero-terminated and can be compared using | |
| * strcmp(). | | * strcmp(). | |
| * @param source string to be processed. | | * @param source string to be processed. | |
| * @param result buffer to store result in. If NULL, number of bytes ne
eded | | * @param result buffer to store result in. If NULL, number of bytes ne
eded | |
| * will be returned. | | * will be returned. | |
| * @param resultLength length of the result buffer. If if not enough th
e | | * @param resultLength length of the result buffer. If if not enough th
e | |
| * buffer will be filled to capacity. | | * buffer will be filled to capacity. | |
| | | | |
End of changes. 21 change blocks. |
| 32 lines changed or deleted | | 68 lines changed or added | |
|
| decimfmt.h | | decimfmt.h | |
| | | | |
| skipping to change at line 43 | | skipping to change at line 43 | |
| #if !UCONFIG_NO_FORMATTING | | #if !UCONFIG_NO_FORMATTING | |
| | | | |
| #include "unicode/dcfmtsym.h" | | #include "unicode/dcfmtsym.h" | |
| #include "unicode/numfmt.h" | | #include "unicode/numfmt.h" | |
| #include "unicode/locid.h" | | #include "unicode/locid.h" | |
| #include "unicode/fpositer.h" | | #include "unicode/fpositer.h" | |
| #include "unicode/stringpiece.h" | | #include "unicode/stringpiece.h" | |
| #include "unicode/curramt.h" | | #include "unicode/curramt.h" | |
| | | | |
| /** | | /** | |
|
| * \def UNUM_DECIMFORMAT_INTERNAL_SIZE | | * \def UNUM_DECIMALFORMAT_INTERNAL_SIZE | |
| * @internal | | * @internal | |
| */ | | */ | |
| #if UCONFIG_FORMAT_FASTPATHS_49 | | #if UCONFIG_FORMAT_FASTPATHS_49 | |
| #define UNUM_DECIMALFORMAT_INTERNAL_SIZE 16 | | #define UNUM_DECIMALFORMAT_INTERNAL_SIZE 16 | |
| #endif | | #endif | |
| | | | |
| U_NAMESPACE_BEGIN | | U_NAMESPACE_BEGIN | |
| | | | |
| class DigitList; | | class DigitList; | |
| class ChoiceFormat; | | class ChoiceFormat; | |
| class CurrencyPluralInfo; | | class CurrencyPluralInfo; | |
| class Hashtable; | | class Hashtable; | |
| class UnicodeSet; | | class UnicodeSet; | |
| class FieldPositionHandler; | | class FieldPositionHandler; | |
| | | | |
| /** | | /** | |
|
| | | * enum bitset for boolean fields. Similar to Java EnumSet<>. | |
| | | * Needs to range check. Not specific to decimal format. | |
| | | * @internal | |
| | | */ | |
| | | template<typename T, uint32_t minValue, uint32_t limitValue> | |
| | | class EnumSet { | |
| | | public: | |
| | | EnumSet() : fBools(0) {} | |
| | | EnumSet(const EnumSet<T,minValue,limitValue>& other) : fBools(other.fBo | |
| | | ols) {} | |
| | | ~EnumSet() {} | |
| | | void clear() { fBools=0; } | |
| | | void add(T toAdd) { set(toAdd, 1); } | |
| | | void remove(T toRemove) { set(toRemove, 0); } | |
| | | int32_t contains(T toCheck) const { return get(toCheck); } | |
| | | void set(T toSet, int32_t v) { fBools=(fBools&(~flag(toSet)))|(v?(flag( | |
| | | toSet)):0); } | |
| | | int32_t get(T toCheck) const { return (fBools & flag(toCheck))?1:0; } | |
| | | UBool isValidEnum(T toCheck) const { return (toCheck>=minValue&&toChec | |
| | | k<limitValue); } | |
| | | UBool isValidValue(int32_t v) const { return (v==0||v==1); } | |
| | | const EnumSet<T,minValue,limitValue>& operator=(const EnumSet<T,minValu | |
| | | e,limitValue>& other) { | |
| | | fBools = other.fBools; | |
| | | return *this; | |
| | | } | |
| | | | |
| | | uint32_t getAll() const { | |
| | | return fBools; | |
| | | } | |
| | | | |
| | | private: | |
| | | uint32_t flag(T toCheck) const { return (1<<(toCheck-minValue)); } | |
| | | private: | |
| | | uint32_t fBools; | |
| | | }; | |
| | | | |
| | | /** | |
| * DecimalFormat is a concrete subclass of NumberFormat that formats decima
l | | * DecimalFormat is a concrete subclass of NumberFormat that formats decima
l | |
| * numbers. It has a variety of features designed to make it possible to pa
rse | | * numbers. It has a variety of features designed to make it possible to pa
rse | |
| * and format numbers in any locale, including support for Western, Arabic,
or | | * and format numbers in any locale, including support for Western, Arabic,
or | |
| * Indic digits. It also supports different flavors of numbers, including | | * Indic digits. It also supports different flavors of numbers, including | |
| * integers ("123"), fixed-point numbers ("123.4"), scientific notation | | * integers ("123"), fixed-point numbers ("123.4"), scientific notation | |
| * ("1.23E4"), percentages ("12%"), and currency amounts ("$123", "USD123", | | * ("1.23E4"), percentages ("12%"), and currency amounts ("$123", "USD123", | |
| * "123 US dollars"). All of these flavors can be easily localized. | | * "123 US dollars"). All of these flavors can be easily localized. | |
| * | | * | |
| * <p>To obtain a NumberFormat for a specific locale (including the default | | * <p>To obtain a NumberFormat for a specific locale (including the default | |
| * locale) call one of NumberFormat's factory methods such as | | * locale) call one of NumberFormat's factory methods such as | |
| | | | |
| skipping to change at line 759 | | skipping to change at line 793 | |
| * @param style style of decimal format | | * @param style style of decimal format | |
| * @param status Output param set to success/failure code. I
f the | | * @param status Output param set to success/failure code. I
f the | |
| * pattern is invalid this will be set to a fa
ilure code. | | * pattern is invalid this will be set to a fa
ilure code. | |
| * @internal ICU 4.2 | | * @internal ICU 4.2 | |
| */ | | */ | |
| DecimalFormat( const UnicodeString& pattern, | | DecimalFormat( const UnicodeString& pattern, | |
| DecimalFormatSymbols* symbolsToAdopt, | | DecimalFormatSymbols* symbolsToAdopt, | |
| UNumberFormatStyle style, | | UNumberFormatStyle style, | |
| UErrorCode& status); | | UErrorCode& status); | |
| | | | |
|
| | | /** | |
| | | * Set an integer attribute on this DecimalFormat. | |
| | | * May return U_UNSUPPORTED_ERROR if this instance does not support | |
| | | * the specified attribute. | |
| | | * @param attr the attribute to set | |
| | | * @param newvalue new value | |
| | | * @param status the error type | |
| | | * @return *this - for chaining | |
| | | * @internal ICU 50 | |
| | | */ | |
| | | virtual DecimalFormat& setAttribute( UNumberFormatAttribute attr, | |
| | | int32_t newvalue, | |
| | | UErrorCode &status); | |
| | | | |
| | | /** | |
| | | * Get an integer | |
| | | * May return U_UNSUPPORTED_ERROR if this instance does not support | |
| | | * the specified attribute. | |
| | | * @param attr the attribute to set | |
| | | * @param status the error type | |
| | | * @return the attribute value. Undefined if there is an error. | |
| | | * @internal ICU 50 | |
| | | */ | |
| | | virtual int32_t getAttribute( UNumberFormatAttribute attr, | |
| | | UErrorCode &status) const; | |
| | | | |
| #if UCONFIG_HAVE_PARSEALLINPUT | | #if UCONFIG_HAVE_PARSEALLINPUT | |
| /** | | /** | |
| * @internal | | * @internal | |
| */ | | */ | |
| void setParseAllInput(UNumberFormatAttributeValue value); | | void setParseAllInput(UNumberFormatAttributeValue value); | |
| #endif | | #endif | |
| | | | |
| #endif /* U_HIDE_INTERNAL_API */ | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 876 | | skipping to change at line 936 | |
| virtual UnicodeString& format(double number, | | virtual UnicodeString& format(double number, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
| FieldPosition& pos) const; | | FieldPosition& pos) const; | |
| | | | |
| /** | | /** | |
| * Format a double or long number using base-10 representation. | | * Format a double or long number using base-10 representation. | |
| * | | * | |
| * @param number The value to be formatted. | | * @param number The value to be formatted. | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
|
| | | * @param pos On input: an alignment field, if desired. | |
| | | * On output: the offsets of the alignment field. | |
| | | * @param status | |
| | | * @return Reference to 'appendTo' parameter. | |
| | | * @internal | |
| | | */ | |
| | | virtual UnicodeString& format(double number, | |
| | | UnicodeString& appendTo, | |
| | | FieldPosition& pos, | |
| | | UErrorCode &status) const; | |
| | | | |
| | | /** | |
| | | * Format a double or long number using base-10 representation. | |
| | | * | |
| | | * @param number The value to be formatted. | |
| | | * @param appendTo Output parameter to receive result. | |
| | | * Result is appended to existing contents. | |
| * @param posIter On return, can be used to iterate over positions | | * @param posIter On return, can be used to iterate over positions | |
| * of fields generated by this format call. | | * of fields generated by this format call. | |
| * Can be NULL. | | * Can be NULL. | |
| * @param status Output param filled with success/failure status. | | * @param status Output param filled with success/failure status. | |
| * @return Reference to 'appendTo' parameter. | | * @return Reference to 'appendTo' parameter. | |
| * @stable 4.4 | | * @stable 4.4 | |
| */ | | */ | |
| virtual UnicodeString& format(double number, | | virtual UnicodeString& format(double number, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
| FieldPositionIterator* posIter, | | FieldPositionIterator* posIter, | |
| | | | |
| skipping to change at line 909 | | skipping to change at line 986 | |
| virtual UnicodeString& format(int32_t number, | | virtual UnicodeString& format(int32_t number, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
| FieldPosition& pos) const; | | FieldPosition& pos) const; | |
| | | | |
| /** | | /** | |
| * Format a long number using base-10 representation. | | * Format a long number using base-10 representation. | |
| * | | * | |
| * @param number The value to be formatted. | | * @param number The value to be formatted. | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
|
| | | * @param pos On input: an alignment field, if desired. | |
| | | * On output: the offsets of the alignment field. | |
| | | * @return Reference to 'appendTo' parameter. | |
| | | * @internal | |
| | | */ | |
| | | virtual UnicodeString& format(int32_t number, | |
| | | UnicodeString& appendTo, | |
| | | FieldPosition& pos, | |
| | | UErrorCode &status) const; | |
| | | | |
| | | /** | |
| | | * Format a long number using base-10 representation. | |
| | | * | |
| | | * @param number The value to be formatted. | |
| | | * @param appendTo Output parameter to receive result. | |
| | | * Result is appended to existing contents. | |
| * @param posIter On return, can be used to iterate over positions | | * @param posIter On return, can be used to iterate over positions | |
| * of fields generated by this format call. | | * of fields generated by this format call. | |
| * Can be NULL. | | * Can be NULL. | |
| * @param status Output param filled with success/failure status. | | * @param status Output param filled with success/failure status. | |
| * @return Reference to 'appendTo' parameter. | | * @return Reference to 'appendTo' parameter. | |
| * @stable 4.4 | | * @stable 4.4 | |
| */ | | */ | |
| virtual UnicodeString& format(int32_t number, | | virtual UnicodeString& format(int32_t number, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
| FieldPositionIterator* posIter, | | FieldPositionIterator* posIter, | |
| | | | |
| skipping to change at line 942 | | skipping to change at line 1035 | |
| virtual UnicodeString& format(int64_t number, | | virtual UnicodeString& format(int64_t number, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
| FieldPosition& pos) const; | | FieldPosition& pos) const; | |
| | | | |
| /** | | /** | |
| * Format an int64 number using base-10 representation. | | * Format an int64 number using base-10 representation. | |
| * | | * | |
| * @param number The value to be formatted. | | * @param number The value to be formatted. | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
|
| | | * @param pos On input: an alignment field, if desired. | |
| | | * On output: the offsets of the alignment field. | |
| | | * @return Reference to 'appendTo' parameter. | |
| | | * @internal | |
| | | */ | |
| | | virtual UnicodeString& format(int64_t number, | |
| | | UnicodeString& appendTo, | |
| | | FieldPosition& pos, | |
| | | UErrorCode &status) const; | |
| | | | |
| | | /** | |
| | | * Format an int64 number using base-10 representation. | |
| | | * | |
| | | * @param number The value to be formatted. | |
| | | * @param appendTo Output parameter to receive result. | |
| | | * Result is appended to existing contents. | |
| * @param posIter On return, can be used to iterate over positions | | * @param posIter On return, can be used to iterate over positions | |
| * of fields generated by this format call. | | * of fields generated by this format call. | |
| * Can be NULL. | | * Can be NULL. | |
| * @param status Output param filled with success/failure status. | | * @param status Output param filled with success/failure status. | |
| * @return Reference to 'appendTo' parameter. | | * @return Reference to 'appendTo' parameter. | |
| * @stable 4.4 | | * @stable 4.4 | |
| */ | | */ | |
| virtual UnicodeString& format(int64_t number, | | virtual UnicodeString& format(int64_t number, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
| FieldPositionIterator* posIter, | | FieldPositionIterator* posIter, | |
| | | | |
| skipping to change at line 1948 | | skipping to change at line 2057 | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
| * @param handler Records information about field positions. | | * @param handler Records information about field positions. | |
| * @param digits the digits to be formatted. | | * @param digits the digits to be formatted. | |
| * @param isInteger if TRUE format the digits as Integer. | | * @param isInteger if TRUE format the digits as Integer. | |
| * @return Reference to 'appendTo' parameter. | | * @return Reference to 'appendTo' parameter. | |
| */ | | */ | |
| UnicodeString& subformat(UnicodeString& appendTo, | | UnicodeString& subformat(UnicodeString& appendTo, | |
| FieldPositionHandler& handler, | | FieldPositionHandler& handler, | |
| DigitList& digits, | | DigitList& digits, | |
|
| UBool isInteger) const; | | UBool isInteger, | |
| | | UErrorCode &status) const; | |
| | | | |
| void parse(const UnicodeString& text, | | void parse(const UnicodeString& text, | |
| Formattable& result, | | Formattable& result, | |
| ParsePosition& pos, | | ParsePosition& pos, | |
| UChar* currency) const; | | UChar* currency) const; | |
| | | | |
| enum { | | enum { | |
| fgStatusInfinite, | | fgStatusInfinite, | |
| fgStatusLength // Leave last in list. | | fgStatusLength // Leave last in list. | |
| } StatusFlags; | | } StatusFlags; | |
| | | | |
| skipping to change at line 2102 | | skipping to change at line 2212 | |
| void deleteHashForAffixPattern(); | | void deleteHashForAffixPattern(); | |
| void deleteHashForAffix(Hashtable*& table); | | void deleteHashForAffix(Hashtable*& table); | |
| | | | |
| void copyHashForAffixPattern(const Hashtable* source, | | void copyHashForAffixPattern(const Hashtable* source, | |
| Hashtable* target, UErrorCode& status); | | Hashtable* target, UErrorCode& status); | |
| void copyHashForAffix(const Hashtable* source, | | void copyHashForAffix(const Hashtable* source, | |
| Hashtable* target, UErrorCode& status); | | Hashtable* target, UErrorCode& status); | |
| | | | |
| UnicodeString& _format(int64_t number, | | UnicodeString& _format(int64_t number, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
|
| FieldPositionHandler& handler) const; | | FieldPositionHandler& handler, | |
| | | UErrorCode &status) const; | |
| UnicodeString& _format(double number, | | UnicodeString& _format(double number, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
|
| FieldPositionHandler& handler) const; | | FieldPositionHandler& handler, | |
| | | UErrorCode &status) const; | |
| UnicodeString& _format(const DigitList &number, | | UnicodeString& _format(const DigitList &number, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
| FieldPositionHandler& handler, | | FieldPositionHandler& handler, | |
| UErrorCode &status) const; | | UErrorCode &status) const; | |
| | | | |
| // currency sign count | | // currency sign count | |
| enum { | | enum { | |
| fgCurrencySignCountZero, | | fgCurrencySignCountZero, | |
| fgCurrencySignCountInSymbolFormat, | | fgCurrencySignCountInSymbolFormat, | |
| fgCurrencySignCountInISOFormat, | | fgCurrencySignCountInISOFormat, | |
| | | | |
| skipping to change at line 2153 | | skipping to change at line 2265 | |
| DecimalFormatSymbols* fSymbols; | | DecimalFormatSymbols* fSymbols; | |
| | | | |
| UBool fUseSignificantDigits; | | UBool fUseSignificantDigits; | |
| int32_t fMinSignificantDigits; | | int32_t fMinSignificantDigits; | |
| int32_t fMaxSignificantDigits; | | int32_t fMaxSignificantDigits; | |
| | | | |
| UBool fUseExponentialNotation; | | UBool fUseExponentialNotation; | |
| int8_t fMinExponentDigits; | | int8_t fMinExponentDigits; | |
| UBool fExponentSignAlwaysShown; | | UBool fExponentSignAlwaysShown; | |
| | | | |
|
| | | EnumSet<UNumberFormatAttribute, | |
| | | UNUM_MAX_NONBOOLEAN_ATTRIBUTE+1, | |
| | | UNUM_LIMIT_BOOLEAN_ATTRIBUTE> | |
| | | fBoolFlags; | |
| | | | |
| DigitList* fRoundingIncrement; // NULL if no rounding inc
rement specified. | | DigitList* fRoundingIncrement; // NULL if no rounding inc
rement specified. | |
| ERoundingMode fRoundingMode; | | ERoundingMode fRoundingMode; | |
| | | | |
| UChar32 fPad; | | UChar32 fPad; | |
| int32_t fFormatWidth; | | int32_t fFormatWidth; | |
| EPadPosition fPadPosition; | | EPadPosition fPadPosition; | |
| | | | |
| /* | | /* | |
| * Following are used for currency format | | * Following are used for currency format | |
| */ | | */ | |
| | | | |
| skipping to change at line 2350 | | skipping to change at line 2467 | |
| UnicodeString& appendTo) const { | | UnicodeString& appendTo) const { | |
| FieldPosition pos(0); | | FieldPosition pos(0); | |
| return format((int64_t)number, appendTo, pos); | | return format((int64_t)number, appendTo, pos); | |
| } | | } | |
| | | | |
| #ifndef U_HIDE_INTERNAL_API | | #ifndef U_HIDE_INTERNAL_API | |
| inline const UnicodeString & | | inline const UnicodeString & | |
| DecimalFormat::getConstSymbol(DecimalFormatSymbols::ENumberFormatSymbol sym
bol) const { | | DecimalFormat::getConstSymbol(DecimalFormatSymbols::ENumberFormatSymbol sym
bol) const { | |
| return fSymbols->getConstSymbol(symbol); | | return fSymbols->getConstSymbol(symbol); | |
| } | | } | |
|
| | | | |
| #endif | | #endif | |
| | | | |
| U_NAMESPACE_END | | U_NAMESPACE_END | |
| | | | |
| #endif /* #if !UCONFIG_NO_FORMATTING */ | | #endif /* #if !UCONFIG_NO_FORMATTING */ | |
| | | | |
| #endif // _DECIMFMT | | #endif // _DECIMFMT | |
| //eof | | //eof | |
| | | | |
End of changes. 11 change blocks. |
| 4 lines changed or deleted | | 126 lines changed or added | |
|
| icuplug.h | | icuplug.h | |
| /* | | /* | |
| ***************************************************************************
*** | | ***************************************************************************
*** | |
| * | | * | |
|
| * Copyright (C) 2009-2011, International Business Machines | | * Copyright (C) 2009-2012, International Business Machines | |
| * Corporation and others. All Rights Reserved. | | * Corporation and others. All Rights Reserved. | |
| * | | * | |
| ***************************************************************************
*** | | ***************************************************************************
*** | |
| * | | * | |
| * FILE NAME : icuplug.h | | * FILE NAME : icuplug.h | |
| * | | * | |
| * Date Name Description | | * Date Name Description | |
| * 10/29/2009 sl New. | | * 10/29/2009 sl New. | |
| ***************************************************************************
*** | | ***************************************************************************
*** | |
| */ | | */ | |
| | | | |
| skipping to change at line 193 | | skipping to change at line 193 | |
| /* === Needed for Implementing === */ | | /* === Needed for Implementing === */ | |
| | | | |
| /** | | /** | |
| * Request that this plugin not be unloaded at cleanup time. | | * Request that this plugin not be unloaded at cleanup time. | |
| * This is appropriate for plugins which cannot be cleaned up. | | * This is appropriate for plugins which cannot be cleaned up. | |
| * @see u_cleanup() | | * @see u_cleanup() | |
| * @param plug plugin | | * @param plug plugin | |
| * @param dontUnload set true if this plugin can't be unloaded | | * @param dontUnload set true if this plugin can't be unloaded | |
| * @internal ICU 4.4 Technology Preview | | * @internal ICU 4.4 Technology Preview | |
| */ | | */ | |
|
| U_CAPI void U_EXPORT2 | | U_INTERNAL void U_EXPORT2 | |
| uplug_setPlugNoUnload(UPlugData *plug, UBool dontUnload); | | uplug_setPlugNoUnload(UPlugData *plug, UBool dontUnload); | |
| | | | |
| /** | | /** | |
| * Set the level of this plugin. | | * Set the level of this plugin. | |
| * @param plug plugin data handle | | * @param plug plugin data handle | |
| * @param level the level of this plugin | | * @param level the level of this plugin | |
| * @internal ICU 4.4 Technology Preview | | * @internal ICU 4.4 Technology Preview | |
| */ | | */ | |
|
| U_CAPI void U_EXPORT2 | | U_INTERNAL void U_EXPORT2 | |
| uplug_setPlugLevel(UPlugData *plug, UPlugLevel level); | | uplug_setPlugLevel(UPlugData *plug, UPlugLevel level); | |
| | | | |
| /** | | /** | |
| * Get the level of this plugin. | | * Get the level of this plugin. | |
| * @param plug plugin data handle | | * @param plug plugin data handle | |
| * @return the level of this plugin | | * @return the level of this plugin | |
| * @internal ICU 4.4 Technology Preview | | * @internal ICU 4.4 Technology Preview | |
| */ | | */ | |
|
| U_CAPI UPlugLevel U_EXPORT2 | | U_INTERNAL UPlugLevel U_EXPORT2 | |
| uplug_getPlugLevel(UPlugData *plug); | | uplug_getPlugLevel(UPlugData *plug); | |
| | | | |
| /** | | /** | |
| * Get the lowest level of plug which can currently load. | | * Get the lowest level of plug which can currently load. | |
| * For example, if UPLUG_LEVEL_LOW is returned, then low level plugins may
load | | * For example, if UPLUG_LEVEL_LOW is returned, then low level plugins may
load | |
| * if UPLUG_LEVEL_HIGH is returned, then only high level plugins may load. | | * if UPLUG_LEVEL_HIGH is returned, then only high level plugins may load. | |
| * @return the lowest level of plug which can currently load | | * @return the lowest level of plug which can currently load | |
| * @internal ICU 4.4 Technology Preview | | * @internal ICU 4.4 Technology Preview | |
| */ | | */ | |
|
| U_CAPI UPlugLevel U_EXPORT2 | | U_INTERNAL UPlugLevel U_EXPORT2 | |
| uplug_getCurrentLevel(void); | | uplug_getCurrentLevel(void); | |
| | | | |
| /** | | /** | |
| * Get plug load status | | * Get plug load status | |
| * @return The error code of this plugin's load attempt. | | * @return The error code of this plugin's load attempt. | |
| * @internal ICU 4.4 Technology Preview | | * @internal ICU 4.4 Technology Preview | |
| */ | | */ | |
|
| U_CAPI UErrorCode U_EXPORT2 | | U_INTERNAL UErrorCode U_EXPORT2 | |
| uplug_getPlugLoadStatus(UPlugData *plug); | | uplug_getPlugLoadStatus(UPlugData *plug); | |
| | | | |
| /** | | /** | |
| * Set the human-readable name of this plugin. | | * Set the human-readable name of this plugin. | |
| * @param plug plugin data handle | | * @param plug plugin data handle | |
| * @param name the name of this plugin. The first UPLUG_NAME_MAX characters
willi be copied into a new buffer. | | * @param name the name of this plugin. The first UPLUG_NAME_MAX characters
willi be copied into a new buffer. | |
| * @internal ICU 4.4 Technology Preview | | * @internal ICU 4.4 Technology Preview | |
| */ | | */ | |
|
| U_CAPI void U_EXPORT2 | | U_INTERNAL void U_EXPORT2 | |
| uplug_setPlugName(UPlugData *plug, const char *name); | | uplug_setPlugName(UPlugData *plug, const char *name); | |
| | | | |
| /** | | /** | |
| * Get the human-readable name of this plugin. | | * Get the human-readable name of this plugin. | |
| * @param plug plugin data handle | | * @param plug plugin data handle | |
| * @return the name of this plugin | | * @return the name of this plugin | |
| * @internal ICU 4.4 Technology Preview | | * @internal ICU 4.4 Technology Preview | |
| */ | | */ | |
|
| U_CAPI const char * U_EXPORT2 | | U_INTERNAL const char * U_EXPORT2 | |
| uplug_getPlugName(UPlugData *plug); | | uplug_getPlugName(UPlugData *plug); | |
| | | | |
| /** | | /** | |
| * Return the symbol name for this plugin, if known. | | * Return the symbol name for this plugin, if known. | |
| * @param plug plugin data handle | | * @param plug plugin data handle | |
| * @return the symbol name, or NULL | | * @return the symbol name, or NULL | |
| * @internal ICU 4.4 Technology Preview | | * @internal ICU 4.4 Technology Preview | |
| */ | | */ | |
|
| U_CAPI const char * U_EXPORT2 | | U_INTERNAL const char * U_EXPORT2 | |
| uplug_getSymbolName(UPlugData *plug); | | uplug_getSymbolName(UPlugData *plug); | |
| | | | |
| /** | | /** | |
| * Return the library name for this plugin, if known. | | * Return the library name for this plugin, if known. | |
| * @param plug plugin data handle | | * @param plug plugin data handle | |
| * @param status error code | | * @param status error code | |
| * @return the library name, or NULL | | * @return the library name, or NULL | |
| * @internal ICU 4.4 Technology Preview | | * @internal ICU 4.4 Technology Preview | |
| */ | | */ | |
|
| U_CAPI const char * U_EXPORT2 | | U_INTERNAL const char * U_EXPORT2 | |
| uplug_getLibraryName(UPlugData *plug, UErrorCode *status); | | uplug_getLibraryName(UPlugData *plug, UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Return the library used for this plugin, if known. | | * Return the library used for this plugin, if known. | |
| * Plugins could use this to load data out of their | | * Plugins could use this to load data out of their | |
| * @param plug plugin data handle | | * @param plug plugin data handle | |
| * @return the library, or NULL | | * @return the library, or NULL | |
| * @internal ICU 4.4 Technology Preview | | * @internal ICU 4.4 Technology Preview | |
| */ | | */ | |
|
| U_CAPI void * U_EXPORT2 | | U_INTERNAL void * U_EXPORT2 | |
| uplug_getLibrary(UPlugData *plug); | | uplug_getLibrary(UPlugData *plug); | |
| | | | |
| /** | | /** | |
| * Return the plugin-specific context data. | | * Return the plugin-specific context data. | |
| * @param plug plugin data handle | | * @param plug plugin data handle | |
| * @return the context, or NULL if not set | | * @return the context, or NULL if not set | |
| * @internal ICU 4.4 Technology Preview | | * @internal ICU 4.4 Technology Preview | |
| */ | | */ | |
|
| U_CAPI void * U_EXPORT2 | | U_INTERNAL void * U_EXPORT2 | |
| uplug_getContext(UPlugData *plug); | | uplug_getContext(UPlugData *plug); | |
| | | | |
| /** | | /** | |
| * Set the plugin-specific context data. | | * Set the plugin-specific context data. | |
| * @param plug plugin data handle | | * @param plug plugin data handle | |
| * @param context new context to set | | * @param context new context to set | |
| * @internal ICU 4.4 Technology Preview | | * @internal ICU 4.4 Technology Preview | |
| */ | | */ | |
|
| U_CAPI void U_EXPORT2 | | U_INTERNAL void U_EXPORT2 | |
| uplug_setContext(UPlugData *plug, void *context); | | uplug_setContext(UPlugData *plug, void *context); | |
| | | | |
| /** | | /** | |
| * Get the configuration string, if available. | | * Get the configuration string, if available. | |
| * The string is in the platform default codepage. | | * The string is in the platform default codepage. | |
| * @param plug plugin data handle | | * @param plug plugin data handle | |
| * @return configuration string, or else null. | | * @return configuration string, or else null. | |
| * @internal ICU 4.4 Technology Preview | | * @internal ICU 4.4 Technology Preview | |
| */ | | */ | |
|
| U_CAPI const char * U_EXPORT2 | | U_INTERNAL const char * U_EXPORT2 | |
| uplug_getConfiguration(UPlugData *plug); | | uplug_getConfiguration(UPlugData *plug); | |
| | | | |
| /** | | /** | |
| * Return all currently installed plugins, from newest to oldest | | * Return all currently installed plugins, from newest to oldest | |
| * Usage Example: | | * Usage Example: | |
| * \code | | * \code | |
| * UPlugData *plug = NULL; | | * UPlugData *plug = NULL; | |
| * while(plug=uplug_nextPlug(plug)) { | | * while(plug=uplug_nextPlug(plug)) { | |
| * ... do something with 'plug' ... | | * ... do something with 'plug' ... | |
| * } | | * } | |
| * \endcode | | * \endcode | |
| * Not thread safe- do not call while plugs are added or removed. | | * Not thread safe- do not call while plugs are added or removed. | |
| * @param prior pass in 'NULL' to get the first (most recent) plug, | | * @param prior pass in 'NULL' to get the first (most recent) plug, | |
| * otherwise pass the value returned on a prior call to uplug_nextPlug | | * otherwise pass the value returned on a prior call to uplug_nextPlug | |
| * @return the next oldest plugin, or NULL if no more. | | * @return the next oldest plugin, or NULL if no more. | |
| * @internal ICU 4.4 Technology Preview | | * @internal ICU 4.4 Technology Preview | |
| */ | | */ | |
|
| U_CAPI UPlugData* U_EXPORT2 | | U_INTERNAL UPlugData* U_EXPORT2 | |
| uplug_nextPlug(UPlugData *prior); | | uplug_nextPlug(UPlugData *prior); | |
| | | | |
| /** | | /** | |
| * Inject a plugin as if it were loaded from a library. | | * Inject a plugin as if it were loaded from a library. | |
| * This is useful for testing plugins. | | * This is useful for testing plugins. | |
| * Note that it will have a 'NULL' library pointer associated | | * Note that it will have a 'NULL' library pointer associated | |
| * with it, and therefore no llibrary will be closed at cleanup time. | | * with it, and therefore no llibrary will be closed at cleanup time. | |
| * Low level plugins may not be able to load, as ordering can't be enforced
. | | * Low level plugins may not be able to load, as ordering can't be enforced
. | |
| * @param entrypoint entrypoint to install | | * @param entrypoint entrypoint to install | |
| * @param config user specified configuration string, if available, or NULL
. | | * @param config user specified configuration string, if available, or NULL
. | |
| * @param status error result | | * @param status error result | |
| * @return the new UPlugData associated with this plugin, or NULL if error. | | * @return the new UPlugData associated with this plugin, or NULL if error. | |
| * @internal ICU 4.4 Technology Preview | | * @internal ICU 4.4 Technology Preview | |
| */ | | */ | |
|
| U_CAPI UPlugData* U_EXPORT2 | | U_INTERNAL UPlugData* U_EXPORT2 | |
| uplug_loadPlugFromEntrypoint(UPlugEntrypoint *entrypoint, const char *confi
g, UErrorCode *status); | | uplug_loadPlugFromEntrypoint(UPlugEntrypoint *entrypoint, const char *confi
g, UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Inject a plugin from a library, as if the information came from a config
file. | | * Inject a plugin from a library, as if the information came from a config
file. | |
| * Low level plugins may not be able to load, and ordering can't be enforce
d. | | * Low level plugins may not be able to load, and ordering can't be enforce
d. | |
| * @param libName DLL name to load | | * @param libName DLL name to load | |
| * @param sym symbol of plugin (UPlugEntrypoint function) | | * @param sym symbol of plugin (UPlugEntrypoint function) | |
| * @param config configuration string, or NULL | | * @param config configuration string, or NULL | |
| * @param status error result | | * @param status error result | |
| * @return the new UPlugData associated with this plugin, or NULL if error. | | * @return the new UPlugData associated with this plugin, or NULL if error. | |
| * @internal ICU 4.4 Technology Preview | | * @internal ICU 4.4 Technology Preview | |
| */ | | */ | |
|
| U_CAPI UPlugData* U_EXPORT2 | | U_INTERNAL UPlugData* U_EXPORT2 | |
| uplug_loadPlugFromLibrary(const char *libName, const char *sym, const char
*config, UErrorCode *status); | | uplug_loadPlugFromLibrary(const char *libName, const char *sym, const char
*config, UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Remove a plugin. | | * Remove a plugin. | |
| * Will request the plugin to be unloaded, and close the library if needed | | * Will request the plugin to be unloaded, and close the library if needed | |
| * @param plug plugin handle to close | | * @param plug plugin handle to close | |
| * @param status error result | | * @param status error result | |
| * @internal ICU 4.4 Technology Preview | | * @internal ICU 4.4 Technology Preview | |
| */ | | */ | |
|
| U_CAPI void U_EXPORT2 | | U_INTERNAL void U_EXPORT2 | |
| uplug_removePlug(UPlugData *plug, UErrorCode *status); | | uplug_removePlug(UPlugData *plug, UErrorCode *status); | |
| #endif /* U_HIDE_INTERNAL_API */ | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 18 change blocks. |
| 18 lines changed or deleted | | 18 lines changed or added | |
|
| locdspnm.h | | locdspnm.h | |
| /* | | /* | |
| ***************************************************************************
*** | | ***************************************************************************
*** | |
|
| * Copyright (C) 2010-2011, International Business Machines Corporation and | | * Copyright (C) 2010-2012, International Business Machines Corporation and | |
| * others. All Rights Reserved. | | * others. All Rights Reserved. | |
| ***************************************************************************
*** | | ***************************************************************************
*** | |
| */ | | */ | |
| | | | |
| #ifndef LOCDSPNM_H | | #ifndef LOCDSPNM_H | |
| #define LOCDSPNM_H | | #define LOCDSPNM_H | |
| | | | |
| #include "unicode/utypes.h" | | #include "unicode/utypes.h" | |
| | | | |
| /** | | /** | |
| * \file | | * \file | |
| * \brief C++ API: Provides display names of Locale and its components. | | * \brief C++ API: Provides display names of Locale and its components. | |
| */ | | */ | |
| | | | |
| #if !UCONFIG_NO_FORMATTING | | #if !UCONFIG_NO_FORMATTING | |
| | | | |
| #include "unicode/locid.h" | | #include "unicode/locid.h" | |
| #include "unicode/uscript.h" | | #include "unicode/uscript.h" | |
| #include "unicode/uldnames.h" | | #include "unicode/uldnames.h" | |
|
| | | #include "unicode/udisplaycontext.h" | |
| | | | |
| U_NAMESPACE_BEGIN | | U_NAMESPACE_BEGIN | |
| | | | |
| /** | | /** | |
| * Returns display names of Locales and components of Locales. For | | * Returns display names of Locales and components of Locales. For | |
| * more information on language, script, region, variant, key, and | | * more information on language, script, region, variant, key, and | |
| * values, see Locale. | | * values, see Locale. | |
| * @stable ICU 4.4 | | * @stable ICU 4.4 | |
| */ | | */ | |
| class U_I18N_API LocaleDisplayNames : public UObject { | | class U_I18N_API LocaleDisplayNames : public UObject { | |
| | | | |
| skipping to change at line 61 | | skipping to change at line 62 | |
| * Returns an instance of LocaleDisplayNames that returns names | | * Returns an instance of LocaleDisplayNames that returns names | |
| * formatted for the provided locale, using the provided | | * formatted for the provided locale, using the provided | |
| * dialectHandling. | | * dialectHandling. | |
| * | | * | |
| * @param locale the display locale | | * @param locale the display locale | |
| * @param dialectHandling how to select names for locales | | * @param dialectHandling how to select names for locales | |
| * @return a LocaleDisplayNames instance | | * @return a LocaleDisplayNames instance | |
| * @stable ICU 4.4 | | * @stable ICU 4.4 | |
| */ | | */ | |
| static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& local
e, | | static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& local
e, | |
|
| UDialectHandling dia | | UDialectHandling dialectHandling); | |
| lectHandling); | | | |
| | | #ifndef U_HIDE_INTERNAL_API | |
| | | /** | |
| | | * Returns an instance of LocaleDisplayNames that returns names formatt | |
| | | ed | |
| | | * for the provided locale, using the provided UDisplayContext settings | |
| | | . | |
| | | * | |
| | | * @param locale the display locale | |
| | | * @param contexts List of one or more context settings (e.g. for diale | |
| | | ct | |
| | | * handling, capitalization, etc. | |
| | | * @param length Number of items in the contexts list | |
| | | * @return a LocaleDisplayNames instance | |
| | | * @internal ICU 50 technology preview | |
| | | */ | |
| | | static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& local | |
| | | e, | |
| | | UDisplayContext *contexts, int32_t length); | |
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| // getters for state | | // getters for state | |
| /** | | /** | |
| * Returns the locale used to determine the display names. This is | | * Returns the locale used to determine the display names. This is | |
| * not necessarily the same locale passed to {@link #createInstance}. | | * not necessarily the same locale passed to {@link #createInstance}. | |
| * @return the display locale | | * @return the display locale | |
| * @stable ICU 4.4 | | * @stable ICU 4.4 | |
| */ | | */ | |
| virtual const Locale& getLocale() const = 0; | | virtual const Locale& getLocale() const = 0; | |
| | | | |
| /** | | /** | |
| * Returns the dialect handling used in the display names. | | * Returns the dialect handling used in the display names. | |
| * @return the dialect handling enum | | * @return the dialect handling enum | |
| * @stable ICU 4.4 | | * @stable ICU 4.4 | |
| */ | | */ | |
| virtual UDialectHandling getDialectHandling() const = 0; | | virtual UDialectHandling getDialectHandling() const = 0; | |
| | | | |
|
| | | /** | |
| | | * Returns the UDisplayContext value for the specified UDisplayContextT | |
| | | ype. | |
| | | * @param type the UDisplayContextType whose value to return | |
| | | * @return the UDisplayContext for the specified type. | |
| | | * @internal ICU 50 technology preview | |
| | | */ | |
| | | virtual UDisplayContext getContext(UDisplayContextType type) const = 0; | |
| | | | |
| // names for entire locales | | // names for entire locales | |
| /** | | /** | |
| * Returns the display name of the provided locale. | | * Returns the display name of the provided locale. | |
| * @param locale the locale whose display name to return | | * @param locale the locale whose display name to return | |
| * @param result receives the locale's display name | | * @param result receives the locale's display name | |
| * @return the display name of the provided locale | | * @return the display name of the provided locale | |
| * @stable ICU 4.4 | | * @stable ICU 4.4 | |
| */ | | */ | |
| virtual UnicodeString& localeDisplayName(const Locale& locale, | | virtual UnicodeString& localeDisplayName(const Locale& locale, | |
|
| UnicodeString& result) const =
0; | | UnicodeString& result) const = 0; | |
| | | | |
| /** | | /** | |
| * Returns the display name of the provided locale id. | | * Returns the display name of the provided locale id. | |
| * @param localeId the id of the locale whose display name to return | | * @param localeId the id of the locale whose display name to return | |
| * @param result receives the locale's display name | | * @param result receives the locale's display name | |
| * @return the display name of the provided locale | | * @return the display name of the provided locale | |
| * @stable ICU 4.4 | | * @stable ICU 4.4 | |
| */ | | */ | |
| virtual UnicodeString& localeDisplayName(const char* localeId, | | virtual UnicodeString& localeDisplayName(const char* localeId, | |
|
| UnicodeString& result) const =
0; | | UnicodeString& result) const = 0; | |
| | | | |
| // names for components of a locale id | | // names for components of a locale id | |
| /** | | /** | |
| * Returns the display name of the provided language code. | | * Returns the display name of the provided language code. | |
| * @param lang the language code | | * @param lang the language code | |
| * @param result receives the language code's display name | | * @param result receives the language code's display name | |
| * @return the display name of the provided language code | | * @return the display name of the provided language code | |
| * @stable ICU 4.4 | | * @stable ICU 4.4 | |
| */ | | */ | |
| virtual UnicodeString& languageDisplayName(const char* lang, | | virtual UnicodeString& languageDisplayName(const char* lang, | |
|
| UnicodeString& result) const
= 0; | | UnicodeString& result) const = 0; | |
| | | | |
| /** | | /** | |
| * Returns the display name of the provided script code. | | * Returns the display name of the provided script code. | |
| * @param script the script code | | * @param script the script code | |
| * @param result receives the script code's display name | | * @param result receives the script code's display name | |
| * @return the display name of the provided script code | | * @return the display name of the provided script code | |
| * @stable ICU 4.4 | | * @stable ICU 4.4 | |
| */ | | */ | |
| virtual UnicodeString& scriptDisplayName(const char* script, | | virtual UnicodeString& scriptDisplayName(const char* script, | |
|
| UnicodeString& result) const =
0; | | UnicodeString& result) const = 0; | |
| | | | |
| /** | | /** | |
| * Returns the display name of the provided script code. | | * Returns the display name of the provided script code. | |
| * @param scriptCode the script code number | | * @param scriptCode the script code number | |
| * @param result receives the script code's display name | | * @param result receives the script code's display name | |
| * @return the display name of the provided script code | | * @return the display name of the provided script code | |
| * @stable ICU 4.4 | | * @stable ICU 4.4 | |
| */ | | */ | |
| virtual UnicodeString& scriptDisplayName(UScriptCode scriptCode, | | virtual UnicodeString& scriptDisplayName(UScriptCode scriptCode, | |
|
| UnicodeString& result) const =
0; | | UnicodeString& result) const = 0; | |
| | | | |
| /** | | /** | |
| * Returns the display name of the provided region code. | | * Returns the display name of the provided region code. | |
| * @param region the region code | | * @param region the region code | |
| * @param result receives the region code's display name | | * @param result receives the region code's display name | |
| * @return the display name of the provided region code | | * @return the display name of the provided region code | |
| * @stable ICU 4.4 | | * @stable ICU 4.4 | |
| */ | | */ | |
| virtual UnicodeString& regionDisplayName(const char* region, | | virtual UnicodeString& regionDisplayName(const char* region, | |
|
| UnicodeString& result) const =
0; | | UnicodeString& result) const = 0; | |
| | | | |
| /** | | /** | |
| * Returns the display name of the provided variant. | | * Returns the display name of the provided variant. | |
| * @param variant the variant string | | * @param variant the variant string | |
| * @param result receives the variant's display name | | * @param result receives the variant's display name | |
| * @return the display name of the provided variant | | * @return the display name of the provided variant | |
| * @stable ICU 4.4 | | * @stable ICU 4.4 | |
| */ | | */ | |
| virtual UnicodeString& variantDisplayName(const char* variant, | | virtual UnicodeString& variantDisplayName(const char* variant, | |
|
| UnicodeString& result) const =
0; | | UnicodeString& result) const = 0; | |
| | | | |
| /** | | /** | |
| * Returns the display name of the provided locale key. | | * Returns the display name of the provided locale key. | |
| * @param key the locale key name | | * @param key the locale key name | |
| * @param result receives the locale key's display name | | * @param result receives the locale key's display name | |
| * @return the display name of the provided locale key | | * @return the display name of the provided locale key | |
| * @stable ICU 4.4 | | * @stable ICU 4.4 | |
| */ | | */ | |
| virtual UnicodeString& keyDisplayName(const char* key, | | virtual UnicodeString& keyDisplayName(const char* key, | |
|
| UnicodeString& result) const = 0; | | UnicodeString& result) const = 0; | |
| | | | |
| /** | | /** | |
| * Returns the display name of the provided value (used with the provid
ed key). | | * Returns the display name of the provided value (used with the provid
ed key). | |
| * @param key the locale key name | | * @param key the locale key name | |
| * @param value the locale key's value | | * @param value the locale key's value | |
| * @param result receives the value's display name | | * @param result receives the value's display name | |
| * @return the display name of the provided value | | * @return the display name of the provided value | |
| * @stable ICU 4.4 | | * @stable ICU 4.4 | |
| */ | | */ | |
| virtual UnicodeString& keyValueDisplayName(const char* key, const char*
value, | | virtual UnicodeString& keyValueDisplayName(const char* key, const char*
value, | |
|
| UnicodeString& result) const
= 0; | | UnicodeString& result) const = 0; | |
| | | | |
| private: | | private: | |
| // No ICU "poor man's RTTI" for this class nor its subclasses. | | // No ICU "poor man's RTTI" for this class nor its subclasses. | |
| virtual UClassID getDynamicClassID() const; | | virtual UClassID getDynamicClassID() const; | |
| }; | | }; | |
| | | | |
| inline LocaleDisplayNames* LocaleDisplayNames::createInstance(const Locale&
locale) { | | inline LocaleDisplayNames* LocaleDisplayNames::createInstance(const Locale&
locale) { | |
| return LocaleDisplayNames::createInstance(locale, ULDN_STANDARD_NAMES); | | return LocaleDisplayNames::createInstance(locale, ULDN_STANDARD_NAMES); | |
| } | | } | |
| | | | |
| | | | |
End of changes. 13 change blocks. |
| 12 lines changed or deleted | | 41 lines changed or added | |
|
| numfmt.h | | numfmt.h | |
| | | | |
| skipping to change at line 360 | | skipping to change at line 360 | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
| * @param pos On input: an alignment field, if desired. | | * @param pos On input: an alignment field, if desired. | |
| * On output: the offsets of the alignment field. | | * On output: the offsets of the alignment field. | |
| * @return Reference to 'appendTo' parameter. | | * @return Reference to 'appendTo' parameter. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual UnicodeString& format(double number, | | virtual UnicodeString& format(double number, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
| FieldPosition& pos) const = 0; | | FieldPosition& pos) const = 0; | |
| /** | | /** | |
|
| | | * Format a double number. By default, the parent function simply | |
| | | * calls the base class and does not return an error status. | |
| | | * Therefore, the status may be ignored in some subclasses. | |
| | | * | |
| | | * @param number The value to be formatted. | |
| | | * @param appendTo Output parameter to receive result. | |
| | | * Result is appended to existing contents. | |
| | | * @param pos On input: an alignment field, if desired. | |
| | | * On output: the offsets of the alignment field. | |
| | | * @param status error status | |
| | | * @return Reference to 'appendTo' parameter. | |
| | | * @internal | |
| | | */ | |
| | | virtual UnicodeString& format(double number, | |
| | | UnicodeString& appendTo, | |
| | | FieldPosition& pos, | |
| | | UErrorCode &status) const; | |
| | | /** | |
| * Format a double number. Subclasses must implement | | * Format a double number. Subclasses must implement | |
| * this method. | | * this method. | |
| * | | * | |
| * @param number The value to be formatted. | | * @param number The value to be formatted. | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
| * @param posIter On return, can be used to iterate over positions | | * @param posIter On return, can be used to iterate over positions | |
| * of fields generated by this format call. | | * of fields generated by this format call. | |
| * Can be NULL. | | * Can be NULL. | |
| * @param status Output param filled with success/failure status. | | * @param status Output param filled with success/failure status. | |
| | | | |
| skipping to change at line 394 | | skipping to change at line 412 | |
| * @param pos On input: an alignment field, if desired. | | * @param pos On input: an alignment field, if desired. | |
| * On output: the offsets of the alignment field. | | * On output: the offsets of the alignment field. | |
| * @return Reference to 'appendTo' parameter. | | * @return Reference to 'appendTo' parameter. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual UnicodeString& format(int32_t number, | | virtual UnicodeString& format(int32_t number, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
| FieldPosition& pos) const = 0; | | FieldPosition& pos) const = 0; | |
| | | | |
| /** | | /** | |
|
| | | * Format a long number. Concrete subclasses may override | |
| | | * this function to provide status return. | |
| | | * | |
| | | * @param number The value to be formatted. | |
| | | * @param appendTo Output parameter to receive result. | |
| | | * Result is appended to existing contents. | |
| | | * @param pos On input: an alignment field, if desired. | |
| | | * On output: the offsets of the alignment field. | |
| | | * @param status the output status. | |
| | | * @return Reference to 'appendTo' parameter. | |
| | | * @internal | |
| | | */ | |
| | | virtual UnicodeString& format(int32_t number, | |
| | | UnicodeString& appendTo, | |
| | | FieldPosition& pos, | |
| | | UErrorCode &status) const; | |
| | | | |
| | | /** | |
| * Format an int32 number. Subclasses must implement | | * Format an int32 number. Subclasses must implement | |
| * this method. | | * this method. | |
| * | | * | |
| * @param number The value to be formatted. | | * @param number The value to be formatted. | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
| * @param posIter On return, can be used to iterate over positions | | * @param posIter On return, can be used to iterate over positions | |
| * of fields generated by this format call. | | * of fields generated by this format call. | |
| * Can be NULL. | | * Can be NULL. | |
| * @param status Output param filled with success/failure status. | | * @param status Output param filled with success/failure status. | |
| | | | |
| skipping to change at line 427 | | skipping to change at line 463 | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
| * @param pos On input: an alignment field, if desired. | | * @param pos On input: an alignment field, if desired. | |
| * On output: the offsets of the alignment field. | | * On output: the offsets of the alignment field. | |
| * @return Reference to 'appendTo' parameter. | | * @return Reference to 'appendTo' parameter. | |
| * @stable ICU 2.8 | | * @stable ICU 2.8 | |
| */ | | */ | |
| virtual UnicodeString& format(int64_t number, | | virtual UnicodeString& format(int64_t number, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
| FieldPosition& pos) const; | | FieldPosition& pos) const; | |
|
| | | | |
| | | /** | |
| | | * Format an int64 number. (Not abstract to retain compatibility | |
| | | * with earlier releases, however subclasses should override this | |
| | | * method as it just delegates to format(int32_t number...); | |
| | | * | |
| | | * @param number The value to be formatted. | |
| | | * @param appendTo Output parameter to receive result. | |
| | | * Result is appended to existing contents. | |
| | | * @param pos On input: an alignment field, if desired. | |
| | | * On output: the offsets of the alignment field. | |
| | | * @return Reference to 'appendTo' parameter. | |
| | | * @internal | |
| | | */ | |
| | | virtual UnicodeString& format(int64_t number, | |
| | | UnicodeString& appendTo, | |
| | | FieldPosition& pos, | |
| | | UErrorCode& status) const; | |
| /** | | /** | |
| * Format an int64 number. Subclasses must implement | | * Format an int64 number. Subclasses must implement | |
| * this method. | | * this method. | |
| * | | * | |
| * @param number The value to be formatted. | | * @param number The value to be formatted. | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
| * @param posIter On return, can be used to iterate over positions | | * @param posIter On return, can be used to iterate over positions | |
| * of fields generated by this format call. | | * of fields generated by this format call. | |
| * Can be NULL. | | * Can be NULL. | |
| | | | |
| skipping to change at line 544 | | skipping to change at line 598 | |
| * returned. | | * returned. | |
| * <P> | | * <P> | |
| * This is a pure virtual which concrete subclasses must implement. | | * This is a pure virtual which concrete subclasses must implement. | |
| * | | * | |
| * @param text The text to be parsed. | | * @param text The text to be parsed. | |
| * @param result Formattable to be set to the parse result. | | * @param result Formattable to be set to the parse result. | |
| * If parse fails, return contents are undefined. | | * If parse fails, return contents are undefined. | |
| * @param parsePosition The position to start parsing at on input. | | * @param parsePosition The position to start parsing at on input. | |
| * On output, moved to after the last successfully | | * On output, moved to after the last successfully | |
| * parse character. On parse failure, does not cha
nge. | | * parse character. On parse failure, does not cha
nge. | |
|
| * @return A Formattable object of numeric type. The call | | | |
| er | | | |
| * owns this an must delete it. NULL on failure. | | | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual void parse(const UnicodeString& text, | | virtual void parse(const UnicodeString& text, | |
| Formattable& result, | | Formattable& result, | |
| ParsePosition& parsePosition) const = 0; | | ParsePosition& parsePosition) const = 0; | |
| | | | |
| /** | | /** | |
| * Parse a string as a numeric value, and return a Formattable | | * Parse a string as a numeric value, and return a Formattable | |
| * numeric object. This method parses integers only if IntegerOnly | | * numeric object. This method parses integers only if IntegerOnly | |
| * is set. | | * is set. | |
| * | | * | |
| * @param text The text to be parsed. | | * @param text The text to be parsed. | |
| * @param result Formattable to be set to the parse result. | | * @param result Formattable to be set to the parse result. | |
| * If parse fails, return contents are undefined. | | * If parse fails, return contents are undefined. | |
| * @param status Output parameter set to a failure error code | | * @param status Output parameter set to a failure error code | |
| * when a failure occurs. | | * when a failure occurs. | |
|
| * @return A Formattable object of numeric type. The call | | | |
| er | | | |
| * owns this an must delete it. NULL on failure. | | | |
| * @see NumberFormat::isParseIntegerOnly | | * @see NumberFormat::isParseIntegerOnly | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| virtual void parse( const UnicodeString& text, | | virtual void parse(const UnicodeString& text, | |
| Formattable& result, | | Formattable& result, | |
| UErrorCode& status) const; | | UErrorCode& status) const; | |
| | | | |
| /* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since
it is virtual */ | | /* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since
it is virtual */ | |
| /** | | /** | |
| * Parses text from the given string as a currency amount. Unlike | | * Parses text from the given string as a currency amount. Unlike | |
| * the parse() method, this method will attempt to parse a generic | | * the parse() method, this method will attempt to parse a generic | |
| * currency name, searching for a match of this object's locale's | | * currency name, searching for a match of this object's locale's | |
| * currency display names, or for a 3-letter ISO currency code. | | * currency display names, or for a 3-letter ISO currency code. | |
| * This method will fail if this format is not a currency format, | | * This method will fail if this format is not a currency format, | |
| * that is, if it does not contain the currency pattern symbol | | * that is, if it does not contain the currency pattern symbol | |
| * (U+00A4) in its prefix or suffix. | | * (U+00A4) in its prefix or suffix. | |
| | | | |
End of changes. 6 change blocks. |
| 9 lines changed or deleted | | 57 lines changed or added | |
|
| platform.h | | platform.h | |
| | | | |
| skipping to change at line 39 | | skipping to change at line 39 | |
| * This file used to be generated by autoconf/configure. | | * This file used to be generated by autoconf/configure. | |
| * Starting with ICU 49, platform.h is a normal source file, | | * Starting with ICU 49, platform.h is a normal source file, | |
| * to simplify cross-compiling and working with non-autoconf/make build sys
tems. | | * to simplify cross-compiling and working with non-autoconf/make build sys
tems. | |
| * | | * | |
| * When a value in this file does not work on a platform, then please | | * When a value in this file does not work on a platform, then please | |
| * try to derive it from the U_PLATFORM value | | * try to derive it from the U_PLATFORM value | |
| * (for which we might need a new value constant in rare cases) | | * (for which we might need a new value constant in rare cases) | |
| * and/or from other macros that are predefined by the compiler | | * and/or from other macros that are predefined by the compiler | |
| * or defined in standard (POSIX or platform or compiler) headers. | | * or defined in standard (POSIX or platform or compiler) headers. | |
| * | | * | |
|
| * As a temporary workaround, you can add an explicit #define for some macr
os | | * As a temporary workaround, you can add an explicit <code>#define</code>
for some macros | |
| * before it is first tested, or add an equivalent -D macro definition | | * before it is first tested, or add an equivalent -D macro definition | |
| * to the compiler's command line. | | * to the compiler's command line. | |
| * | | * | |
| * Note: Some compilers provide ways to show the predefined macros. | | * Note: Some compilers provide ways to show the predefined macros. | |
| * For example, with gcc you can compile an empty .c file and have the comp
iler | | * For example, with gcc you can compile an empty .c file and have the comp
iler | |
| * print the predefined macros with | | * print the predefined macros with | |
| * \code | | * \code | |
| * gcc -E -dM -x c /dev/null | sort | | * gcc -E -dM -x c /dev/null | sort | |
| * \endcode | | * \endcode | |
| * (You can provide an actual empty .c file rather than /dev/null. | | * (You can provide an actual empty .c file rather than /dev/null. | |
| * <code>-x c++</code> is for C++.) | | * <code>-x c++</code> is for C++.) | |
| */ | | */ | |
| | | | |
| /** | | /** | |
|
| | | * Define some things so that they can be documented. | |
| | | * @internal | |
| | | */ | |
| | | #ifdef U_IN_DOXYGEN | |
| | | /* | |
| | | * Problem: "platform.h:335: warning: documentation for unknown define U_HA | |
| | | VE_STD_STRING found." means that U_HAVE_STD_STRING is not documented. | |
| | | * Solution: #define any defines for non @internal API here, so that they a | |
| | | re visible in the docs. If you just set PREDEFINED in Doxyfile.in, they w | |
| | | on't be documented. | |
| | | */ | |
| | | | |
| | | /* None for now. */ | |
| | | #endif | |
| | | | |
| | | /** | |
| * \def U_PLATFORM | | * \def U_PLATFORM | |
| * The U_PLATFORM macro defines the platform we're on. | | * The U_PLATFORM macro defines the platform we're on. | |
| * | | * | |
| * We used to define one different, value-less macro per platform. | | * We used to define one different, value-less macro per platform. | |
| * That made it hard to know the set of relevant platforms and macros, | | * That made it hard to know the set of relevant platforms and macros, | |
| * and hard to deal with variants of platforms. | | * and hard to deal with variants of platforms. | |
| * | | * | |
| * Starting with ICU 49, we define platforms as numeric macros, | | * Starting with ICU 49, we define platforms as numeric macros, | |
| * with ranges of values for related platforms and their variants. | | * with ranges of values for related platforms and their variants. | |
| * The U_PLATFORM macro is set to one of these values. | | * The U_PLATFORM macro is set to one of these values. | |
| | | | |
| skipping to change at line 134 | | skipping to change at line 147 | |
| #elif defined(__CYGWIN__) | | #elif defined(__CYGWIN__) | |
| # define U_PLATFORM U_PF_CYGWIN | | # define U_PLATFORM U_PF_CYGWIN | |
| #elif defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64
) | | #elif defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64
) | |
| # define U_PLATFORM U_PF_WINDOWS | | # define U_PLATFORM U_PF_WINDOWS | |
| #elif defined(__ANDROID__) | | #elif defined(__ANDROID__) | |
| # define U_PLATFORM U_PF_ANDROID | | # define U_PLATFORM U_PF_ANDROID | |
| /* Android wchar_t support depends on the API level. */ | | /* Android wchar_t support depends on the API level. */ | |
| # include <android/api-level.h> | | # include <android/api-level.h> | |
| #elif defined(linux) || defined(__linux__) || defined(__linux) | | #elif defined(linux) || defined(__linux__) || defined(__linux) | |
| # define U_PLATFORM U_PF_LINUX | | # define U_PLATFORM U_PF_LINUX | |
|
| #elif defined(BSD) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) | | #elif defined(BSD) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) |
| defined(__NetBSD__) || defined(__OpenBSD__) || defined(__MirBSD__) | |
| # define U_PLATFORM U_PF_BSD | | # define U_PLATFORM U_PF_BSD | |
| #elif defined(sun) || defined(__sun) | | #elif defined(sun) || defined(__sun) | |
| /* Check defined(__SVR4) || defined(__svr4__) to distinguish Solaris fr
om SunOS? */ | | /* Check defined(__SVR4) || defined(__svr4__) to distinguish Solaris fr
om SunOS? */ | |
| # define U_PLATFORM U_PF_SOLARIS | | # define U_PLATFORM U_PF_SOLARIS | |
| # if defined(__GNUC__) | | # if defined(__GNUC__) | |
| /* Solaris/GCC needs this header file to get the proper endianness.
Normally, this | | /* Solaris/GCC needs this header file to get the proper endianness.
Normally, this | |
| * header file is included with stddef.h but on Solairs/GCC, the GC
C version of stddef.h | | * header file is included with stddef.h but on Solairs/GCC, the GC
C version of stddef.h | |
| * is included which does not include this header file. | | * is included which does not include this header file. | |
| */ | | */ | |
| # include <sys/isa_defs.h> | | # include <sys/isa_defs.h> | |
| | | | |
| skipping to change at line 271 | | skipping to change at line 284 | |
| #elif U_PLATFORM_USES_ONLY_WIN32_API | | #elif U_PLATFORM_USES_ONLY_WIN32_API | |
| # if defined(__BORLANDC__) || (defined(_MSC_VER) && _MSC_VER>=1600) | | # if defined(__BORLANDC__) || (defined(_MSC_VER) && _MSC_VER>=1600) | |
| /* Windows Visual Studio 9 and below do not have stdint.h & inttype
s.h, but VS 2010 adds them. */ | | /* Windows Visual Studio 9 and below do not have stdint.h & inttype
s.h, but VS 2010 adds them. */ | |
| # define U_HAVE_STDINT_H 1 | | # define U_HAVE_STDINT_H 1 | |
| # else | | # else | |
| # define U_HAVE_STDINT_H 0 | | # define U_HAVE_STDINT_H 0 | |
| # endif | | # endif | |
| #elif U_PLATFORM == U_PF_SOLARIS | | #elif U_PLATFORM == U_PF_SOLARIS | |
| /* Solaris has inttypes.h but not stdint.h. */ | | /* Solaris has inttypes.h but not stdint.h. */ | |
| # define U_HAVE_STDINT_H 0 | | # define U_HAVE_STDINT_H 0 | |
|
| | | #elif U_PLATFORM == U_PF_AIX && !defined(_AIX51) && defined(_POWER) | |
| | | /* PPC AIX <= 4.3 has inttypes.h but not stdint.h. */ | |
| | | # define U_HAVE_STDINT_H 0 | |
| #else | | #else | |
| # define U_HAVE_STDINT_H 1 | | # define U_HAVE_STDINT_H 1 | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| * \def U_HAVE_INTTYPES_H | | * \def U_HAVE_INTTYPES_H | |
| * Defines whether inttypes.h is available. It is a C99 standard header. | | * Defines whether inttypes.h is available. It is a C99 standard header. | |
| * We include inttypes.h where it is available but stdint.h is not. | | * We include inttypes.h where it is available but stdint.h is not. | |
| * @internal | | * @internal | |
| */ | | */ | |
| #ifdef U_HAVE_INTTYPES_H | | #ifdef U_HAVE_INTTYPES_H | |
| /* Use the predefined value. */ | | /* Use the predefined value. */ | |
| #elif U_PLATFORM == U_PF_SOLARIS | | #elif U_PLATFORM == U_PF_SOLARIS | |
| /* Solaris has inttypes.h but not stdint.h. */ | | /* Solaris has inttypes.h but not stdint.h. */ | |
| # define U_HAVE_INTTYPES_H 1 | | # define U_HAVE_INTTYPES_H 1 | |
|
| | | #elif U_PLATFORM == U_PF_AIX && !defined(_AIX51) && defined(_POWER) | |
| | | /* PPC AIX <= 4.3 has inttypes.h but not stdint.h. */ | |
| | | # define U_HAVE_INTTYPES_H 1 | |
| #else | | #else | |
| /* Most platforms have both inttypes.h and stdint.h, or neither. */ | | /* Most platforms have both inttypes.h and stdint.h, or neither. */ | |
| # define U_HAVE_INTTYPES_H U_HAVE_STDINT_H | | # define U_HAVE_INTTYPES_H U_HAVE_STDINT_H | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| * \def U_IOSTREAM_SOURCE | | * \def U_IOSTREAM_SOURCE | |
| * Defines what support for C++ streams is available. | | * Defines what support for C++ streams is available. | |
| * | | * | |
| * If U_IOSTREAM_SOURCE is set to 199711, then <iostream> is availabl
e | | * If U_IOSTREAM_SOURCE is set to 199711, then <iostream> is availabl
e | |
| | | | |
| skipping to change at line 334 | | skipping to change at line 353 | |
| # define U_HAVE_STD_STRING 0 | | # define U_HAVE_STD_STRING 0 | |
| #else | | #else | |
| # define U_HAVE_STD_STRING 1 | | # define U_HAVE_STD_STRING 1 | |
| #endif | | #endif | |
| | | | |
| /*=========================================================================
==*/ | | /*=========================================================================
==*/ | |
| /** @{ Compiler and environment features
*/ | | /** @{ Compiler and environment features
*/ | |
| /*=========================================================================
==*/ | | /*=========================================================================
==*/ | |
| | | | |
| /** | | /** | |
|
| | | * \def U_GCC_MAJOR_MINOR | |
| | | * Indicates whether the compiler is gcc (test for != 0), | |
| | | * and if so, contains its major (times 100) and minor version numbers. | |
| | | * If the compiler is not gcc, then U_GCC_MAJOR_MINOR == 0. | |
| | | * | |
| | | * For example, for testing for whether we have gcc, and whether it's 4.6 o | |
| | | r higher, | |
| | | * use "#if U_GCC_MAJOR_MINOR >= 406". | |
| | | * @internal | |
| | | */ | |
| | | #ifdef __GNUC__ | |
| | | # define U_GCC_MAJOR_MINOR (__GNUC__ * 100 + __GNUC_MINOR__) | |
| | | #else | |
| | | # define U_GCC_MAJOR_MINOR 0 | |
| | | #endif | |
| | | | |
| | | /** | |
| * \def U_IS_BIG_ENDIAN | | * \def U_IS_BIG_ENDIAN | |
| * Determines the endianness of the platform. | | * Determines the endianness of the platform. | |
| * @internal | | * @internal | |
| */ | | */ | |
| #ifdef U_IS_BIG_ENDIAN | | #ifdef U_IS_BIG_ENDIAN | |
| /* Use the predefined value. */ | | /* Use the predefined value. */ | |
| #elif defined(BYTE_ORDER) && defined(BIG_ENDIAN) | | #elif defined(BYTE_ORDER) && defined(BIG_ENDIAN) | |
| # define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN) | | # define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN) | |
| #elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) | | #elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) | |
| /* gcc */ | | /* gcc */ | |
| | | | |
| skipping to change at line 355 | | skipping to change at line 390 | |
| #elif defined(__BIG_ENDIAN__) || defined(_BIG_ENDIAN) | | #elif defined(__BIG_ENDIAN__) || defined(_BIG_ENDIAN) | |
| # define U_IS_BIG_ENDIAN 1 | | # define U_IS_BIG_ENDIAN 1 | |
| #elif defined(__LITTLE_ENDIAN__) || defined(_LITTLE_ENDIAN) | | #elif defined(__LITTLE_ENDIAN__) || defined(_LITTLE_ENDIAN) | |
| # define U_IS_BIG_ENDIAN 0 | | # define U_IS_BIG_ENDIAN 0 | |
| #elif U_PLATFORM == U_PF_OS390 || U_PLATFORM == U_PF_OS400 || defined(__s39
0__) || defined(__s390x__) | | #elif U_PLATFORM == U_PF_OS390 || U_PLATFORM == U_PF_OS400 || defined(__s39
0__) || defined(__s390x__) | |
| /* These platforms do not appear to predefine any endianness macros. */ | | /* These platforms do not appear to predefine any endianness macros. */ | |
| # define U_IS_BIG_ENDIAN 1 | | # define U_IS_BIG_ENDIAN 1 | |
| #elif defined(_PA_RISC1_0) || defined(_PA_RISC1_1) || defined(_PA_RISC2_0) | | #elif defined(_PA_RISC1_0) || defined(_PA_RISC1_1) || defined(_PA_RISC2_0) | |
| /* HPPA do not appear to predefine any endianness macros. */ | | /* HPPA do not appear to predefine any endianness macros. */ | |
| # define U_IS_BIG_ENDIAN 1 | | # define U_IS_BIG_ENDIAN 1 | |
|
| | | #elif defined(sparc) || defined(__sparc) || defined(__sparc__) | |
| | | /* Some sparc based systems (e.g. Linux) do not predefine any endiannes | |
| | | s macros. */ | |
| | | # define U_IS_BIG_ENDIAN 1 | |
| #else | | #else | |
| # define U_IS_BIG_ENDIAN 0 | | # define U_IS_BIG_ENDIAN 0 | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| * \def U_HAVE_PLACEMENT_NEW | | * \def U_HAVE_PLACEMENT_NEW | |
| * Determines whether to override placement new and delete for STL. | | * Determines whether to override placement new and delete for STL. | |
| * @stable ICU 2.6 | | * @stable ICU 2.6 | |
| */ | | */ | |
| #ifdef U_HAVE_PLACEMENT_NEW | | #ifdef U_HAVE_PLACEMENT_NEW | |
| | | | |
| skipping to change at line 386 | | skipping to change at line 424 | |
| * @stable ICU 3.4 | | * @stable ICU 3.4 | |
| */ | | */ | |
| #ifdef U_HAVE_DEBUG_LOCATION_NEW | | #ifdef U_HAVE_DEBUG_LOCATION_NEW | |
| /* Use the predefined value. */ | | /* Use the predefined value. */ | |
| #elif defined(_MSC_VER) | | #elif defined(_MSC_VER) | |
| # define U_HAVE_DEBUG_LOCATION_NEW 1 | | # define U_HAVE_DEBUG_LOCATION_NEW 1 | |
| #else | | #else | |
| # define U_HAVE_DEBUG_LOCATION_NEW 0 | | # define U_HAVE_DEBUG_LOCATION_NEW 0 | |
| #endif | | #endif | |
| | | | |
|
| | | /* Compatibility with non clang compilers */ | |
| | | #ifndef __has_attribute | |
| | | # define __has_attribute(x) 0 | |
| | | #endif | |
| | | | |
| | | /** | |
| | | * \def U_MALLOC_ATTR | |
| | | * Attribute to mark functions as malloc-like | |
| | | * @internal | |
| | | */ | |
| | | #if defined(__GNUC__) && __GNUC__>=3 | |
| | | # define U_MALLOC_ATTR __attribute__ ((__malloc__)) | |
| | | #else | |
| | | # define U_MALLOC_ATTR | |
| | | #endif | |
| | | | |
| | | /** | |
| | | * \def U_ALLOC_SIZE_ATTR | |
| | | * Attribute to specify the size of the allocated buffer for malloc-like fu | |
| | | nctions | |
| | | * @internal | |
| | | */ | |
| | | #if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ | |
| | | >= 3))) || __has_attribute(alloc_size) | |
| | | # define U_ALLOC_SIZE_ATTR(X) __attribute__ ((alloc_size(X))) | |
| | | # define U_ALLOC_SIZE_ATTR2(X,Y) __attribute__ ((alloc_size(X,Y))) | |
| | | #else | |
| | | # define U_ALLOC_SIZE_ATTR(X) | |
| | | # define U_ALLOC_SIZE_ATTR2(X,Y) | |
| | | #endif | |
| | | | |
| /** @} */ | | /** @} */ | |
| | | | |
| /*=========================================================================
==*/ | | /*=========================================================================
==*/ | |
| /** @{ Character data types
*/ | | /** @{ Character data types
*/ | |
| /*=========================================================================
==*/ | | /*=========================================================================
==*/ | |
| | | | |
| /** | | /** | |
| * U_CHARSET_FAMILY is equal to this value when the platform is an ASCII ba
sed platform. | | * U_CHARSET_FAMILY is equal to this value when the platform is an ASCII ba
sed platform. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| | | | |
| skipping to change at line 600 | | skipping to change at line 667 | |
| */ | | */ | |
| #ifdef U_HAVE_CHAR16_T | | #ifdef U_HAVE_CHAR16_T | |
| /* Use the predefined value. */ | | /* Use the predefined value. */ | |
| #else | | #else | |
| /* | | /* | |
| * Notes: | | * Notes: | |
| * Visual Studio 10 (_MSC_VER>=1600) defines char16_t but | | * Visual Studio 10 (_MSC_VER>=1600) defines char16_t but | |
| * does not support u"abc" string literals. | | * does not support u"abc" string literals. | |
| * gcc 4.4 defines the __CHAR16_TYPE__ macro to a usable type but | | * gcc 4.4 defines the __CHAR16_TYPE__ macro to a usable type but | |
| * does not support u"abc" string literals. | | * does not support u"abc" string literals. | |
|
| | | * C++11 requires support for UTF-16 literals | |
| */ | | */ | |
|
| # define U_HAVE_CHAR16_T 0 | | # if (defined(__cplusplus) && __cplusplus >= 201103L) | |
| | | # define U_HAVE_CHAR16_T 1 | |
| | | # else | |
| | | # define U_HAVE_CHAR16_T 0 | |
| | | # endif | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| * @{ | | * @{ | |
| * \def U_DECLARE_UTF16 | | * \def U_DECLARE_UTF16 | |
| * Do not use this macro because it is not defined on all platforms. | | * Do not use this macro because it is not defined on all platforms. | |
| * Use the UNICODE_STRING or U_STRING_DECL macros instead. | | * Use the UNICODE_STRING or U_STRING_DECL macros instead. | |
| * @internal | | * @internal | |
| */ | | */ | |
| #ifdef U_DECLARE_UTF16 | | #ifdef U_DECLARE_UTF16 | |
| /* Use the predefined value. */ | | /* Use the predefined value. */ | |
|
| #elif (defined(__xlC__) && defined(__IBM_UTF_LITERAL) && U_SIZEOF_WCHAR_T ! | | #elif U_HAVE_CHAR16_T \ | |
| = 2) \ | | || (defined(__xlC__) && defined(__IBM_UTF_LITERAL) && U_SIZEOF_WCHAR_T | |
| | | != 2) \ | |
| || (defined(__HP_aCC) && __HP_aCC >= 035000) \ | | || (defined(__HP_aCC) && __HP_aCC >= 035000) \ | |
|
| || (defined(__HP_cc) && __HP_cc >= 111106) \ | | || (defined(__HP_cc) && __HP_cc >= 111106) | |
| || U_HAVE_CHAR16_T | | | |
| # define U_DECLARE_UTF16(string) u ## string | | # define U_DECLARE_UTF16(string) u ## string | |
|
| #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) | | | |
| /* || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x580) */ | | | |
| /* Sun's C compiler has issues with this notation, and it's unreliable. */ | | | |
| # define U_DECLARE_UTF16(string) U ## string | | | |
| #elif U_SIZEOF_WCHAR_T == 2 \ | | #elif U_SIZEOF_WCHAR_T == 2 \ | |
| && (U_CHARSET_FAMILY == 0 || (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <=
U_PF_OS400 && defined(__UCS2__))) | | && (U_CHARSET_FAMILY == 0 || (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <=
U_PF_OS400 && defined(__UCS2__))) | |
| # define U_DECLARE_UTF16(string) L ## string | | # define U_DECLARE_UTF16(string) L ## string | |
| #else | | #else | |
| /* Leave U_DECLARE_UTF16 undefined. See unistr.h. */ | | /* Leave U_DECLARE_UTF16 undefined. See unistr.h. */ | |
| #endif | | #endif | |
| | | | |
| /** @} */ | | /** @} */ | |
| | | | |
| /*=========================================================================
==*/ | | /*=========================================================================
==*/ | |
| | | | |
End of changes. 13 change blocks. |
| 11 lines changed or deleted | | 86 lines changed or added | |
|
| plurfmt.h | | plurfmt.h | |
| | | | |
| skipping to change at line 151 | | skipping to change at line 151 | |
| * </p> | | * </p> | |
| * | | * | |
| * ported from Java | | * ported from Java | |
| * @stable ICU 4.0 | | * @stable ICU 4.0 | |
| */ | | */ | |
| | | | |
| class U_I18N_API PluralFormat : public Format { | | class U_I18N_API PluralFormat : public Format { | |
| public: | | public: | |
| | | | |
| /** | | /** | |
|
| * Creates a new <code>PluralFormat</code> for the default locale. | | * Creates a new cardinal-number <code>PluralFormat</code> for the defa
ult locale. | |
| * This locale will be used to get the set of plural rules and for stan
dard | | * This locale will be used to get the set of plural rules and for stan
dard | |
| * number formatting. | | * number formatting. | |
| * @param status output param set to success/failure code on exit, whi
ch | | * @param status output param set to success/failure code on exit, whi
ch | |
| * must not indicate a failure before the function call. | | * must not indicate a failure before the function call. | |
| * @stable ICU 4.0 | | * @stable ICU 4.0 | |
| */ | | */ | |
| PluralFormat(UErrorCode& status); | | PluralFormat(UErrorCode& status); | |
| | | | |
| /** | | /** | |
|
| * Creates a new <code>PluralFormat</code> for a given locale. | | * Creates a new cardinal-number <code>PluralFormat</code> for a given
locale. | |
| * @param locale the <code>PluralFormat</code> will be configured with | | * @param locale the <code>PluralFormat</code> will be configured with | |
| * rules for this locale. This locale will also be used f
or | | * rules for this locale. This locale will also be used f
or | |
| * standard number formatting. | | * standard number formatting. | |
| * @param status output param set to success/failure code on exit, whic
h | | * @param status output param set to success/failure code on exit, whic
h | |
| * must not indicate a failure before the function call. | | * must not indicate a failure before the function call. | |
| * @stable ICU 4.0 | | * @stable ICU 4.0 | |
| */ | | */ | |
| PluralFormat(const Locale& locale, UErrorCode& status); | | PluralFormat(const Locale& locale, UErrorCode& status); | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 196 | | skipping to change at line 196 | |
| * locale. | | * locale. | |
| * @param rules defines the behavior of the <code>PluralFormat</code> | | * @param rules defines the behavior of the <code>PluralFormat</code> | |
| * object. | | * object. | |
| * @param status output param set to success/failure code on exit, whi
ch | | * @param status output param set to success/failure code on exit, whi
ch | |
| * must not indicate a failure before the function call. | | * must not indicate a failure before the function call. | |
| * @stable ICU 4.0 | | * @stable ICU 4.0 | |
| */ | | */ | |
| PluralFormat(const Locale& locale, const PluralRules& rules, UErrorCode
& status); | | PluralFormat(const Locale& locale, const PluralRules& rules, UErrorCode
& status); | |
| | | | |
| /** | | /** | |
|
| * Creates a new <code>PluralFormat</code> for a given pattern string. | | * Creates a new <code>PluralFormat</code> for the plural type. | |
| | | * The standard number formatting will be done using the given locale. | |
| | | * @param locale the default number formatting will be done using this | |
| | | * locale. | |
| | | * @param type The plural type (e.g., cardinal or ordinal). | |
| | | * @param status output param set to success/failure code on exit, whi | |
| | | ch | |
| | | * must not indicate a failure before the function call. | |
| | | * @draft ICU 50 | |
| | | */ | |
| | | PluralFormat(const Locale& locale, UPluralType type, UErrorCode& status | |
| | | ); | |
| | | | |
| | | /** | |
| | | * Creates a new cardinal-number <code>PluralFormat</code> for a given | |
| | | pattern string. | |
| * The default locale will be used to get the set of plural rules and f
or | | * The default locale will be used to get the set of plural rules and f
or | |
| * standard number formatting. | | * standard number formatting. | |
| * @param pattern the pattern for this <code>PluralFormat</code>. | | * @param pattern the pattern for this <code>PluralFormat</code>. | |
| * errors are returned to status if the pattern is inva
lid. | | * errors are returned to status if the pattern is inva
lid. | |
| * @param status output param set to success/failure code on exit, wh
ich | | * @param status output param set to success/failure code on exit, wh
ich | |
| * must not indicate a failure before the function call
. | | * must not indicate a failure before the function call
. | |
| * @stable ICU 4.0 | | * @stable ICU 4.0 | |
| */ | | */ | |
| PluralFormat(const UnicodeString& pattern, UErrorCode& status); | | PluralFormat(const UnicodeString& pattern, UErrorCode& status); | |
| | | | |
| /** | | /** | |
|
| * Creates a new <code>PluralFormat</code> for a given pattern string a
nd | | * Creates a new cardinal-number <code>PluralFormat</code> for a given
pattern string and | |
| * locale. | | * locale. | |
| * The locale will be used to get the set of plural rules and for | | * The locale will be used to get the set of plural rules and for | |
| * standard number formatting. | | * standard number formatting. | |
| * @param locale the <code>PluralFormat</code> will be configured wit
h | | * @param locale the <code>PluralFormat</code> will be configured wit
h | |
| * rules for this locale. This locale will also be used
for | | * rules for this locale. This locale will also be used
for | |
| * standard number formatting. | | * standard number formatting. | |
| * @param pattern the pattern for this <code>PluralFormat</code>. | | * @param pattern the pattern for this <code>PluralFormat</code>. | |
| * errors are returned to status if the pattern is inva
lid. | | * errors are returned to status if the pattern is inva
lid. | |
| * @param status output param set to success/failure code on exit, wh
ich | | * @param status output param set to success/failure code on exit, wh
ich | |
| * must not indicate a failure before the function call
. | | * must not indicate a failure before the function call
. | |
| | | | |
| skipping to change at line 258 | | skipping to change at line 270 | |
| * @param status output param set to success/failure code on exit, whi
ch | | * @param status output param set to success/failure code on exit, whi
ch | |
| * must not indicate a failure before the function call. | | * must not indicate a failure before the function call. | |
| * @stable ICU 4.0 | | * @stable ICU 4.0 | |
| */ | | */ | |
| PluralFormat(const Locale& locale, | | PluralFormat(const Locale& locale, | |
| const PluralRules& rules, | | const PluralRules& rules, | |
| const UnicodeString& pattern, | | const UnicodeString& pattern, | |
| UErrorCode& status); | | UErrorCode& status); | |
| | | | |
| /** | | /** | |
|
| | | * Creates a new <code>PluralFormat</code> for a plural type, a | |
| | | * pattern and a locale. | |
| | | * @param locale the <code>PluralFormat</code> will be configured with | |
| | | * rules for this locale. This locale will also be used | |
| | | for | |
| | | * standard number formatting. | |
| | | * @param type The plural type (e.g., cardinal or ordinal). | |
| | | * @param pattern the pattern for this <code>PluralFormat</code>. | |
| | | * errors are returned to status if the pattern is inval | |
| | | id. | |
| | | * @param status output param set to success/failure code on exit, whi | |
| | | ch | |
| | | * must not indicate a failure before the function call. | |
| | | * @draft ICU 50 | |
| | | */ | |
| | | PluralFormat(const Locale& locale, | |
| | | UPluralType type, | |
| | | const UnicodeString& pattern, | |
| | | UErrorCode& status); | |
| | | | |
| | | /** | |
| * copy constructor. | | * copy constructor. | |
| * @stable ICU 4.0 | | * @stable ICU 4.0 | |
| */ | | */ | |
| PluralFormat(const PluralFormat& other); | | PluralFormat(const PluralFormat& other); | |
| | | | |
| /** | | /** | |
| * Destructor. | | * Destructor. | |
| * @stable ICU 4.0 | | * @stable ICU 4.0 | |
| */ | | */ | |
| virtual ~PluralFormat(); | | virtual ~PluralFormat(); | |
| | | | |
| skipping to change at line 361 | | skipping to change at line 391 | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
| FieldPosition& pos, | | FieldPosition& pos, | |
| UErrorCode& status) const; | | UErrorCode& status) const; | |
| | | | |
| /** | | /** | |
| * Sets the locale used by this <code>PluraFormat</code> object. | | * Sets the locale used by this <code>PluraFormat</code> object. | |
| * Note: Calling this method resets this <code>PluraFormat</code> objec
t, | | * Note: Calling this method resets this <code>PluraFormat</code> objec
t, | |
| * i.e., a pattern that was applied previously will be removed, | | * i.e., a pattern that was applied previously will be removed, | |
| * and the NumberFormat is set to the default number format for | | * and the NumberFormat is set to the default number format for | |
| * the locale. The resulting format behaves the same as one | | * the locale. The resulting format behaves the same as one | |
|
| * constructed from {@link #PluralFormat(const Locale& locale, UErr | | * constructed from {@link #PluralFormat(const Locale& locale, UPlu | |
| orCode& status)}. | | ralType type, UErrorCode& status)} | |
| | | * with UPLURAL_TYPE_CARDINAL. | |
| * @param locale the <code>locale</code> to use to configure the forma
tter. | | * @param locale the <code>locale</code> to use to configure the forma
tter. | |
| * @param status output param set to success/failure code on exit, whi
ch | | * @param status output param set to success/failure code on exit, whi
ch | |
| * must not indicate a failure before the function call. | | * must not indicate a failure before the function call. | |
|
| * @stable ICU 4.0 | | * @deprecated ICU 50 This method clears the pattern and might create | |
| | | * a different kind of PluralRules instance; | |
| | | * use one of the constructors to create a new instance ins | |
| | | tead. | |
| */ | | */ | |
| void setLocale(const Locale& locale, UErrorCode& status); | | void setLocale(const Locale& locale, UErrorCode& status); | |
| | | | |
| /** | | /** | |
| * Sets the number format used by this formatter. You only need to | | * Sets the number format used by this formatter. You only need to | |
| * call this if you want a different number format than the default | | * call this if you want a different number format than the default | |
| * formatter for the locale. | | * formatter for the locale. | |
| * @param format the number format to use. | | * @param format the number format to use. | |
| * @param status output param set to success/failure code on exit, wh
ich | | * @param status output param set to success/failure code on exit, wh
ich | |
| * must not indicate a failure before the function call
. | | * must not indicate a failure before the function call
. | |
| | | | |
| skipping to change at line 481 | | skipping to change at line 514 | |
| */ | | */ | |
| static UClassID U_EXPORT2 getStaticClassID(void); | | static UClassID U_EXPORT2 getStaticClassID(void); | |
| | | | |
| /** | | /** | |
| * ICU "poor man's RTTI", returns a UClassID for the actual class. | | * ICU "poor man's RTTI", returns a UClassID for the actual class. | |
| * | | * | |
| * @stable ICU 4.0 | | * @stable ICU 4.0 | |
| */ | | */ | |
| virtual UClassID getDynamicClassID() const; | | virtual UClassID getDynamicClassID() const; | |
| | | | |
|
| #if defined(__xlC__) || (U_PLATFORM == U_PF_OS390) || (U_PLATFORM ==U_PF_OS
400) | | #if (defined(__xlC__) && (__xlC__ < 0x0C00)) || (U_PLATFORM == U_PF_OS390)
|| (U_PLATFORM ==U_PF_OS400) | |
| // Work around a compiler bug on xlC 11.1 on AIX 7.1 that would | | // Work around a compiler bug on xlC 11.1 on AIX 7.1 that would | |
| // prevent PluralSelectorAdapter from implementing private PluralSelector. | | // prevent PluralSelectorAdapter from implementing private PluralSelector. | |
| // xlC error message: | | // xlC error message: | |
| // 1540-0300 (S) The "private" member "class icu_49::PluralFormat::PluralSe
lector" cannot be accessed. | | // 1540-0300 (S) The "private" member "class icu_49::PluralFormat::PluralSe
lector" cannot be accessed. | |
| public: | | public: | |
| #else | | #else | |
| private: | | private: | |
| #endif | | #endif | |
| /** | | /** | |
| * @internal | | * @internal | |
| | | | |
| skipping to change at line 534 | | skipping to change at line 567 | |
| // End of xlC bug workaround, keep remaining definitions private. | | // End of xlC bug workaround, keep remaining definitions private. | |
| private: | | private: | |
| #endif | | #endif | |
| Locale locale; | | Locale locale; | |
| MessagePattern msgPattern; | | MessagePattern msgPattern; | |
| NumberFormat* numberFormat; | | NumberFormat* numberFormat; | |
| double offset; | | double offset; | |
| PluralSelectorAdapter pluralRulesWrapper; | | PluralSelectorAdapter pluralRulesWrapper; | |
| | | | |
| PluralFormat(); // default constructor not implemented | | PluralFormat(); // default constructor not implemented | |
|
| void init(const PluralRules* rules, UErrorCode& status); | | void init(const PluralRules* rules, UPluralType type, UErrorCode& statu
s); | |
| /** | | /** | |
| * Copies dynamically allocated values (pointer fields). | | * Copies dynamically allocated values (pointer fields). | |
| * Others are copied using their copy constructors and assignment opera
tors. | | * Others are copied using their copy constructors and assignment opera
tors. | |
| */ | | */ | |
| void copyObjects(const PluralFormat& other); | | void copyObjects(const PluralFormat& other); | |
| | | | |
| /** | | /** | |
| * Finds the PluralFormat sub-message for the given number, or the "oth
er" sub-message. | | * Finds the PluralFormat sub-message for the given number, or the "oth
er" sub-message. | |
| * @param pattern A MessagePattern. | | * @param pattern A MessagePattern. | |
| * @param partIndex the index of the first PluralFormat argument style
part. | | * @param partIndex the index of the first PluralFormat argument style
part. | |
| | | | |
End of changes. 9 change blocks. |
| 9 lines changed or deleted | | 49 lines changed or added | |
|
| smpdtfmt.h | | smpdtfmt.h | |
| | | | |
| skipping to change at line 37 | | skipping to change at line 37 | |
| #include "unicode/utypes.h" | | #include "unicode/utypes.h" | |
| | | | |
| /** | | /** | |
| * \file | | * \file | |
| * \brief C++ API: Format and parse dates in a language-independent manner. | | * \brief C++ API: Format and parse dates in a language-independent manner. | |
| */ | | */ | |
| | | | |
| #if !UCONFIG_NO_FORMATTING | | #if !UCONFIG_NO_FORMATTING | |
| | | | |
| #include "unicode/datefmt.h" | | #include "unicode/datefmt.h" | |
|
| | | #include "unicode/udisplaycontext.h" | |
| | | | |
| U_NAMESPACE_BEGIN | | U_NAMESPACE_BEGIN | |
| | | | |
| class DateFormatSymbols; | | class DateFormatSymbols; | |
| class DateFormat; | | class DateFormat; | |
| class MessageFormat; | | class MessageFormat; | |
| class FieldPositionHandler; | | class FieldPositionHandler; | |
| class TimeZoneFormat; | | class TimeZoneFormat; | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 84 | | skipping to change at line 85 | |
| * u extended year (Number) 4601 | | * u extended year (Number) 4601 | |
| * U cyclic year name (Text,NumFallback) ren-chen (29) | | * U cyclic year name (Text,NumFallback) ren-chen (29) | |
| * Q Quarter (Text & Number) Q2 & 02 | | * Q Quarter (Text & Number) Q2 & 02 | |
| * M month in year (Text & Number) July & 07 | | * M month in year (Text & Number) July & 07 | |
| * d day in month (Number) 10 | | * d day in month (Number) 10 | |
| * h hour in am/pm (1~12) (Number) 12 | | * h hour in am/pm (1~12) (Number) 12 | |
| * H hour in day (0~23) (Number) 0 | | * H hour in day (0~23) (Number) 0 | |
| * m minute in hour (Number) 30 | | * m minute in hour (Number) 30 | |
| * s second in minute (Number) 55 | | * s second in minute (Number) 55 | |
| * S fractional second (Number) 978 | | * S fractional second (Number) 978 | |
|
| | | * (maximum resolution of SSS; truncated if shorter, zero-padded i
f longer) | |
| * E day of week (Text) Tuesday | | * E day of week (Text) Tuesday | |
| * e day of week (local 1~7) (Text & Number) Tues & 2 | | * e day of week (local 1~7) (Text & Number) Tues & 2 | |
| * D day in year (Number) 189 | | * D day in year (Number) 189 | |
| * F day of week in month (Number) 2 (2nd Wed in July) | | * F day of week in month (Number) 2 (2nd Wed in July) | |
| * w week in year (Number) 27 | | * w week in year (Number) 27 | |
| * W week in month (Number) 2 | | * W week in month (Number) 2 | |
| * a am/pm marker (Text) PM | | * a am/pm marker (Text) PM | |
| * k hour in day (1~24) (Number) 24 | | * k hour in day (1~24) (Number) 24 | |
| * K hour in am/pm (0~11) (Number) 0 | | * K hour in am/pm (0~11) (Number) 0 | |
| * z time zone (Text) PST | | * z time zone (Text) PST | |
| | | | |
| skipping to change at line 402 | | skipping to change at line 404 | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
| * @param pos The formatting position. On input: an alignment fie
ld, | | * @param pos The formatting position. On input: an alignment fie
ld, | |
| * if desired. On output: the offsets of the alignment
field. | | * if desired. On output: the offsets of the alignment
field. | |
| * @return Reference to 'appendTo' parameter. | | * @return Reference to 'appendTo' parameter. | |
| * @stable ICU 2.1 | | * @stable ICU 2.1 | |
| */ | | */ | |
| virtual UnicodeString& format( Calendar& cal, | | virtual UnicodeString& format( Calendar& cal, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
| FieldPosition& pos) const; | | FieldPosition& pos) const; | |
| | | | |
|
| /* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since | | | |
| it is virtual */ | | | |
| /** | | | |
| * Format a date or time, which is the standard millis since 24:00 GMT, | | | |
| Jan | | | |
| * 1, 1970. Overrides DateFormat pure virtual method. | | | |
| * <P> | | | |
| * Example: using the US locale: "yyyy.MM.dd e 'at' HH:mm:ss zzz" ->> | | | |
| * 1996.07.10 AD at 15:08:56 PDT | | | |
| * | | | |
| * @param cal Calendar set to the date and time to be formatted | | | |
| * into a date/time string. | | | |
| * @param types Array of UDateFormatContextTypes for which the corr | | | |
| esponding | | | |
| * value specified in the next parameter should overri | | | |
| de the | | | |
| * formatter's default value for this call (this does | | | |
| not | | | |
| * change the default value). | | | |
| * @param values Array of UDateFormatContextValues corresponding 1-1 | | | |
| to the | | | |
| * UDateFormatContextTypes in the previous parameter. | | | |
| * @param typesAndValuesCount Number of elements in the types and value | | | |
| s | | | |
| * arrays. | | | |
| * @param appendTo Output parameter to receive result. | | | |
| * Result is appended to existing contents. | | | |
| * @param pos The formatting position. On input: an alignment fie | | | |
| ld, | | | |
| * if desired. On output: the offsets of the alignment | | | |
| field. | | | |
| * @return Reference to 'appendTo' parameter. | | | |
| * @draft ICU 49 | | | |
| */ | | | |
| virtual UnicodeString& format( Calendar& cal, | | | |
| const UDateFormatContextType* types, | | | |
| const UDateFormatContextValue* values, | | | |
| int32_t typesAndValuesCount, | | | |
| UnicodeString& appendTo, | | | |
| FieldPosition& pos) const; | | | |
| | | | |
| /** | | /** | |
| * Format a date or time, which is the standard millis since 24:00 GMT,
Jan | | * Format a date or time, which is the standard millis since 24:00 GMT,
Jan | |
| * 1, 1970. Overrides DateFormat pure virtual method. | | * 1, 1970. Overrides DateFormat pure virtual method. | |
| * <P> | | * <P> | |
| * Example: using the US locale: "yyyy.MM.dd e 'at' HH:mm:ss zzz" ->> | | * Example: using the US locale: "yyyy.MM.dd e 'at' HH:mm:ss zzz" ->> | |
| * 1996.07.10 AD at 15:08:56 PDT | | * 1996.07.10 AD at 15:08:56 PDT | |
| * | | * | |
| * @param cal Calendar set to the date and time to be formatted | | * @param cal Calendar set to the date and time to be formatted | |
| * into a date/time string. | | * into a date/time string. | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| | | | |
| skipping to change at line 584 | | skipping to change at line 554 | |
| * on output to the parsed date/time. When the calendar ty
pe is | | * on output to the parsed date/time. When the calendar ty
pe is | |
| * different from the internal calendar held by this Simpl
eDateFormat | | * different from the internal calendar held by this Simpl
eDateFormat | |
| * instance, the internal calendar will be cloned to a wor
k | | * instance, the internal calendar will be cloned to a wor
k | |
| * calendar set to the same milliseconds and time zone as
the | | * calendar set to the same milliseconds and time zone as
the | |
| * cal parameter, field values will be parsed based on the
work | | * cal parameter, field values will be parsed based on the
work | |
| * calendar, then the result (milliseconds and time zone)
will | | * calendar, then the result (milliseconds and time zone)
will | |
| * be set in this calendar. | | * be set in this calendar. | |
| * @param pos On input, the position at which to start parsing; on | | * @param pos On input, the position at which to start parsing; on | |
| * output, the position at which parsing terminated, or th
e | | * output, the position at which parsing terminated, or th
e | |
| * start position if the parse failed. | | * start position if the parse failed. | |
|
| * @return A valid UDate if the input could be parsed. | | | |
| * @stable ICU 2.1 | | * @stable ICU 2.1 | |
| */ | | */ | |
| virtual void parse( const UnicodeString& text, | | virtual void parse( const UnicodeString& text, | |
| Calendar& cal, | | Calendar& cal, | |
| ParsePosition& pos) const; | | ParsePosition& pos) const; | |
| | | | |
| /** | | /** | |
| * Parse a date/time string starting at the given parse position. For | | * Parse a date/time string starting at the given parse position. For | |
| * example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Da
te | | * example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Da
te | |
| * that is equivalent to Date(837039928046). | | * that is equivalent to Date(837039928046). | |
| | | | |
| skipping to change at line 807 | | skipping to change at line 776 | |
| * Set the calendar to be used by this date format. Initially, the defa
ult | | * Set the calendar to be used by this date format. Initially, the defa
ult | |
| * calendar for the specified or default locale is used. The caller sh
ould | | * calendar for the specified or default locale is used. The caller sh
ould | |
| * not delete the Calendar object after it is adopted by this call. | | * not delete the Calendar object after it is adopted by this call. | |
| * Adopting a new calendar will change to the default symbols. | | * Adopting a new calendar will change to the default symbols. | |
| * | | * | |
| * @param calendarToAdopt Calendar object to be adopted. | | * @param calendarToAdopt Calendar object to be adopted. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual void adoptCalendar(Calendar* calendarToAdopt); | | virtual void adoptCalendar(Calendar* calendarToAdopt); | |
| | | | |
|
| /* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since
it is virtual */ | | /* Cannot use #ifndef U_HIDE_INTERNAL_API for the following draft metho
d since it is virtual */ | |
| /** | | /** | |
|
| * Set the formatter's default value for a particular context type, | | * Set a particular UDisplayContext value in the formatter, such as | |
| * such as UDAT_CAPITALIZATION. | | * UDISPCTX_CAPITALIZATION_FOR_STANDALONE. | |
| * @param type The context type for which the default value should be s | | * @param value The UDisplayContext value to set. | |
| et. | | | |
| * @param value The default value to set for the specified context type | | | |
| . | | | |
| * @param status Input/output status. If at entry this indicates a fail
ure | | * @param status Input/output status. If at entry this indicates a fail
ure | |
| * status, the function will do nothing; otherwise this w
ill be | | * status, the function will do nothing; otherwise this w
ill be | |
| * updated with any new status from the function. | | * updated with any new status from the function. | |
|
| * @draft ICU 49 | | * @internal ICU 50 technology preview | |
| */ | | */ | |
|
| virtual void setDefaultContext(UDateFormatContextType type, UDateFormat | | virtual void setContext(UDisplayContext value, UErrorCode& status); | |
| ContextValue value, | | | |
| UErrorCode& status); | | | |
| | | | |
|
| /* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since
it is virtual */ | | /* Cannot use #ifndef U_HIDE_INTERNAL_API for the following draft metho
d since it is virtual */ | |
| /** | | /** | |
|
| * Get the formatter's default value for a particular context type, | | * Get the formatter's UDisplayContext value for the specified UDisplay | |
| * such as UDAT_CAPITALIZATION. | | ContextType, | |
| * @param type The context type for which the default value should be o | | * such as UDISPCTX_TYPE_CAPITALIZATION. | |
| btained. | | * @param type The UDisplayContextType whose value to return | |
| * @param status Input/output status. If at entry this indicates a fail
ure | | * @param status Input/output status. If at entry this indicates a fail
ure | |
| * status, the function will do nothing; otherwise this w
ill be | | * status, the function will do nothing; otherwise this w
ill be | |
| * updated with any new status from the function. | | * updated with any new status from the function. | |
|
| * @return The current default value for the specified context type. | | * @return The UDisplayContextValue for the specified type. | |
| * @draft ICU 49 | | * @internal ICU 50 technology preview | |
| */ | | */ | |
|
| virtual int32_t getDefaultContext(UDateFormatContextType type, UErrorCo
de& status) const; | | virtual UDisplayContext getContext(UDisplayContextType type, UErrorCode
& status) const; | |
| | | | |
|
| #ifndef U_HIDE_INTERNAL_API | | /* Cannot use #ifndef U_HIDE_INTERNAL_API for the following methods sin
ce they are virtual */ | |
| /** | | /** | |
| * Sets the TimeZoneFormat to be used by this date/time formatter. | | * Sets the TimeZoneFormat to be used by this date/time formatter. | |
| * The caller should not delete the TimeZoneFormat object after | | * The caller should not delete the TimeZoneFormat object after | |
| * it is adopted by this call. | | * it is adopted by this call. | |
| * @param timeZoneFormatToAdopt The TimeZoneFormat object to be adopted
. | | * @param timeZoneFormatToAdopt The TimeZoneFormat object to be adopted
. | |
| * @internal ICU 49 technology preview | | * @internal ICU 49 technology preview | |
| */ | | */ | |
| virtual void adoptTimeZoneFormat(TimeZoneFormat* timeZoneFormatToAdopt)
; | | virtual void adoptTimeZoneFormat(TimeZoneFormat* timeZoneFormatToAdopt)
; | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 857 | | skipping to change at line 824 | |
| * @internal ICU 49 technology preview | | * @internal ICU 49 technology preview | |
| */ | | */ | |
| virtual void setTimeZoneFormat(const TimeZoneFormat& newTimeZoneFormat)
; | | virtual void setTimeZoneFormat(const TimeZoneFormat& newTimeZoneFormat)
; | |
| | | | |
| /** | | /** | |
| * Gets the time zone format object associated with this date/time form
atter. | | * Gets the time zone format object associated with this date/time form
atter. | |
| * @return the time zone format associated with this date/time formatte
r. | | * @return the time zone format associated with this date/time formatte
r. | |
| * @internal ICU 49 technology preview | | * @internal ICU 49 technology preview | |
| */ | | */ | |
| virtual const TimeZoneFormat* getTimeZoneFormat(void) const; | | virtual const TimeZoneFormat* getTimeZoneFormat(void) const; | |
|
| #endif /* U_HIDE_INTERNAL_API */ | | | |
| | | | |
| #ifndef U_HIDE_INTERNAL_API | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
| * This is for ICU internal use only. Please do not use. | | * This is for ICU internal use only. Please do not use. | |
| * Check whether the 'field' is smaller than all the fields covered in | | * Check whether the 'field' is smaller than all the fields covered in | |
| * pattern, return TRUE if it is. The sequence of calendar field, | | * pattern, return TRUE if it is. The sequence of calendar field, | |
| * from large to small is: ERA, YEAR, MONTH, DATE, AM_PM, HOUR, MINUTE,
... | | * from large to small is: ERA, YEAR, MONTH, DATE, AM_PM, HOUR, MINUTE,
... | |
| * @param field the calendar field need to check against | | * @param field the calendar field need to check against | |
| * @return TRUE if the 'field' is smaller than all the fields | | * @return TRUE if the 'field' is smaller than all the fields | |
| * covered in pattern. FALSE otherwise. | | * covered in pattern. FALSE otherwise. | |
| | | | |
| skipping to change at line 927 | | skipping to change at line 893 | |
| * This is an internal method, called by DateFormat. It should never f
ail. | | * This is an internal method, called by DateFormat. It should never f
ail. | |
| * @param locale the given locale. | | * @param locale the given locale. | |
| * @param status Output param set to success/failure code on | | * @param status Output param set to success/failure code on | |
| * exit. | | * exit. | |
| */ | | */ | |
| SimpleDateFormat(const Locale& locale, UErrorCode& status); // Use defa
ult pattern | | SimpleDateFormat(const Locale& locale, UErrorCode& status); // Use defa
ult pattern | |
| | | | |
| /** | | /** | |
| * Hook called by format(... FieldPosition& ...) and format(...FieldPos
itionIterator&...) | | * Hook called by format(... FieldPosition& ...) and format(...FieldPos
itionIterator&...) | |
| */ | | */ | |
|
| UnicodeString& _format(Calendar& cal, UDateFormatContextValue capitaliz | | UnicodeString& _format(Calendar& cal, UnicodeString& appendTo, FieldPos | |
| ationContext, | | itionHandler& handler, UErrorCode& status) const; | |
| UnicodeString& appendTo, FieldPositionHandler& h | | | |
| andler, UErrorCode& status) const; | | | |
| | | | |
| /** | | /** | |
| * Called by format() to format a single field. | | * Called by format() to format a single field. | |
| * | | * | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
| * @param ch The format character we encountered in the pattern. | | * @param ch The format character we encountered in the pattern. | |
| * @param count Number of characters in the current pattern symbol
(e.g., | | * @param count Number of characters in the current pattern symbol
(e.g., | |
| * "yyyy" in the pattern would result in a call to thi
s function | | * "yyyy" in the pattern would result in a call to thi
s function | |
| * with ch equal to 'y' and count equal to 4) | | * with ch equal to 'y' and count equal to 4) | |
| * @param capitalizationContext Capitalization context for this date fo
rmat. | | * @param capitalizationContext Capitalization context for this date fo
rmat. | |
| * @param fieldNum Zero-based numbering of current field within the ov
erall format. | | * @param fieldNum Zero-based numbering of current field within the ov
erall format. | |
| * @param handler Records information about field positions. | | * @param handler Records information about field positions. | |
| * @param cal Calendar to use | | * @param cal Calendar to use | |
| * @param status Receives a status code, which will be U_ZERO_ERROR
if the operation | | * @param status Receives a status code, which will be U_ZERO_ERROR
if the operation | |
| * succeeds. | | * succeeds. | |
| */ | | */ | |
| void subFormat(UnicodeString &appendTo, | | void subFormat(UnicodeString &appendTo, | |
| UChar ch, | | UChar ch, | |
| int32_t count, | | int32_t count, | |
|
| UDateFormatContextValue capitalizationContext, | | UDisplayContext capitalizationContext, | |
| int32_t fieldNum, | | int32_t fieldNum, | |
| FieldPositionHandler& handler, | | FieldPositionHandler& handler, | |
| Calendar& cal, | | Calendar& cal, | |
| UErrorCode& status) const; // in case of illegal argumen
t | | UErrorCode& status) const; // in case of illegal argumen
t | |
| | | | |
| /** | | /** | |
| * Used by subFormat() to format a numeric value. | | * Used by subFormat() to format a numeric value. | |
| * Appends to toAppendTo a string representation of "value" | | * Appends to toAppendTo a string representation of "value" | |
| * having a number of digits between "minDigits" and | | * having a number of digits between "minDigits" and | |
| * "maxDigits". Uses the DateFormat's NumberFormat. | | * "maxDigits". Uses the DateFormat's NumberFormat. | |
| | | | |
| skipping to change at line 1253 | | skipping to change at line 1218 | |
| int32_t hash; | | int32_t hash; | |
| NSOverride *next; | | NSOverride *next; | |
| } NSOverride; | | } NSOverride; | |
| | | | |
| NumberFormat **fNumberFormatters; | | NumberFormat **fNumberFormatters; | |
| | | | |
| NSOverride *fOverrideList; | | NSOverride *fOverrideList; | |
| | | | |
| UBool fHaveDefaultCentury; | | UBool fHaveDefaultCentury; | |
| | | | |
|
| UDateFormatContextValue fDefaultCapitalizationContext; | | UDisplayContext fCapitalizationContext; | |
| }; | | }; | |
| | | | |
| inline UDate | | inline UDate | |
| SimpleDateFormat::get2DigitYearStart(UErrorCode& /*status*/) const | | SimpleDateFormat::get2DigitYearStart(UErrorCode& /*status*/) const | |
| { | | { | |
| return fDefaultCenturyStart; | | return fDefaultCenturyStart; | |
| } | | } | |
| | | | |
| inline UnicodeString& | | inline UnicodeString& | |
| SimpleDateFormat::format(const Formattable& obj, | | SimpleDateFormat::format(const Formattable& obj, | |
| | | | |
End of changes. 17 change blocks. |
| 69 lines changed or deleted | | 21 lines changed or added | |
|
| sortkey.h | | sortkey.h | |
| /* | | /* | |
| **************************************************************************
*** | | **************************************************************************
*** | |
|
| * Copyright (C) 1996-2011, International Business Machines Corporation and
others. | | * Copyright (C) 1996-2012, International Business Machines Corporation and
others. | |
| * All Rights Reserved. | | * All Rights Reserved. | |
| **************************************************************************
*** | | **************************************************************************
*** | |
| * | | * | |
| * File sortkey.h | | * File sortkey.h | |
| * | | * | |
| * Created by: Helena Shih | | * Created by: Helena Shih | |
| * | | * | |
| * Modification History: | | * Modification History: | |
| * | | * | |
| * Date Name Description | | * Date Name Description | |
| | | | |
| skipping to change at line 95 | | skipping to change at line 95 | |
| * CollationKeys for the same set of strings. Locales have specific | | * CollationKeys for the same set of strings. Locales have specific | |
| * collation rules, and the way in which secondary and tertiary differences | | * collation rules, and the way in which secondary and tertiary differences | |
| * are taken into account, for example, will result in different CollationK
eys | | * are taken into account, for example, will result in different CollationK
eys | |
| * for same strings. | | * for same strings. | |
| * <p> | | * <p> | |
| | | | |
| * @see Collator | | * @see Collator | |
| * @see RuleBasedCollator | | * @see RuleBasedCollator | |
| * @version 1.3 12/18/96 | | * @version 1.3 12/18/96 | |
| * @author Helena Shih | | * @author Helena Shih | |
|
| * @deprecated ICU 2.8 Use Collator::getSortKey(...) instead | | * @stable ICU 2.0 | |
| */ | | */ | |
| class U_I18N_API CollationKey : public UObject { | | class U_I18N_API CollationKey : public UObject { | |
| public: | | public: | |
| /** | | /** | |
| * This creates an empty collation key based on the null string. An emp
ty | | * This creates an empty collation key based on the null string. An emp
ty | |
| * collation key contains no sorting information. When comparing two em
pty | | * collation key contains no sorting information. When comparing two em
pty | |
| * collation keys, the result is Collator::EQUAL. Comparing empty colla
tion key | | * collation keys, the result is Collator::EQUAL. Comparing empty colla
tion key | |
| * with non-empty collation key is always Collator::LESS. | | * with non-empty collation key is always Collator::LESS. | |
|
| * @deprecated ICU 2.8 Use Collator::getSortKey(...) instead | | * @stable ICU 2.0 | |
| */ | | */ | |
| CollationKey(); | | CollationKey(); | |
| | | | |
| /** | | /** | |
| * Creates a collation key based on the collation key values. | | * Creates a collation key based on the collation key values. | |
| * @param values the collation key values | | * @param values the collation key values | |
| * @param count number of collation key values, including trailing nulls
. | | * @param count number of collation key values, including trailing nulls
. | |
|
| * @deprecated ICU 2.8 Use Collator::getSortKey(...) instead | | * @stable ICU 2.0 | |
| */ | | */ | |
| CollationKey(const uint8_t* values, | | CollationKey(const uint8_t* values, | |
| int32_t count); | | int32_t count); | |
| | | | |
| /** | | /** | |
| * Copy constructor. | | * Copy constructor. | |
| * @param other the object to be copied. | | * @param other the object to be copied. | |
|
| * @deprecated ICU 2.8 Use Collator::getSortKey(...) instead | | * @stable ICU 2.0 | |
| */ | | */ | |
| CollationKey(const CollationKey& other); | | CollationKey(const CollationKey& other); | |
| | | | |
| /** | | /** | |
| * Sort key destructor. | | * Sort key destructor. | |
|
| * @deprecated ICU 2.8 Use Collator::getSortKey(...) instead | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual ~CollationKey(); | | virtual ~CollationKey(); | |
| | | | |
| /** | | /** | |
| * Assignment operator | | * Assignment operator | |
| * @param other the object to be copied. | | * @param other the object to be copied. | |
|
| * @deprecated ICU 2.8 Use Collator::getSortKey(...) instead | | * @stable ICU 2.0 | |
| */ | | */ | |
| const CollationKey& operator=(const CollationKey& other); | | const CollationKey& operator=(const CollationKey& other); | |
| | | | |
| /** | | /** | |
| * Compare if two collation keys are the same. | | * Compare if two collation keys are the same. | |
| * @param source the collation key to compare to. | | * @param source the collation key to compare to. | |
| * @return Returns true if two collation keys are equal, false otherwise
. | | * @return Returns true if two collation keys are equal, false otherwise
. | |
|
| * @deprecated ICU 2.8 Use Collator::getSortKey(...) instead | | * @stable ICU 2.0 | |
| */ | | */ | |
| UBool operator==(const CollationKey& source) const; | | UBool operator==(const CollationKey& source) const; | |
| | | | |
| /** | | /** | |
| * Compare if two collation keys are not the same. | | * Compare if two collation keys are not the same. | |
| * @param source the collation key to compare to. | | * @param source the collation key to compare to. | |
| * @return Returns TRUE if two collation keys are different, FALSE other
wise. | | * @return Returns TRUE if two collation keys are different, FALSE other
wise. | |
|
| * @deprecated ICU 2.8 Use Collator::getSortKey(...) instead | | * @stable ICU 2.0 | |
| */ | | */ | |
| UBool operator!=(const CollationKey& source) const; | | UBool operator!=(const CollationKey& source) const; | |
| | | | |
| /** | | /** | |
| * Test to see if the key is in an invalid state. The key will be in an | | * Test to see if the key is in an invalid state. The key will be in an | |
| * invalid state if it couldn't allocate memory for some operation. | | * invalid state if it couldn't allocate memory for some operation. | |
| * @return Returns TRUE if the key is in an invalid, FALSE otherwise. | | * @return Returns TRUE if the key is in an invalid, FALSE otherwise. | |
|
| * @deprecated ICU 2.8 Use Collator::getSortKey(...) instead | | * @stable ICU 2.0 | |
| */ | | */ | |
| UBool isBogus(void) const; | | UBool isBogus(void) const; | |
| | | | |
| /** | | /** | |
| * Returns a pointer to the collation key values. The storage is owned | | * Returns a pointer to the collation key values. The storage is owned | |
| * by the collation key and the pointer will become invalid if the key | | * by the collation key and the pointer will become invalid if the key | |
| * is deleted. | | * is deleted. | |
| * @param count the output parameter of number of collation key values, | | * @param count the output parameter of number of collation key values, | |
| * including any trailing nulls. | | * including any trailing nulls. | |
| * @return a pointer to the collation key values. | | * @return a pointer to the collation key values. | |
|
| * @deprecated ICU 2.8 Use Collator::getSortKey(...) instead | | * @stable ICU 2.0 | |
| */ | | */ | |
| const uint8_t* getByteArray(int32_t& count) const; | | const uint8_t* getByteArray(int32_t& count) const; | |
| | | | |
| #ifdef U_USE_COLLATION_KEY_DEPRECATES | | #ifdef U_USE_COLLATION_KEY_DEPRECATES | |
| /** | | /** | |
| * Extracts the collation key values into a new array. The caller owns | | * Extracts the collation key values into a new array. The caller owns | |
| * this storage and should free it. | | * this storage and should free it. | |
| * @param count the output parameter of number of collation key values, | | * @param count the output parameter of number of collation key values, | |
| * including any trailing nulls. | | * including any trailing nulls. | |
| * @obsolete ICU 2.6. Use getByteArray instead since this API will be re
moved in that release. | | * @obsolete ICU 2.6. Use getByteArray instead since this API will be re
moved in that release. | |
| | | | |
| skipping to change at line 202 | | skipping to change at line 202 | |
| Collator::EComparisonResult compareTo(const CollationKey& target) const
; | | Collator::EComparisonResult compareTo(const CollationKey& target) const
; | |
| | | | |
| /** | | /** | |
| * Convenience method which does a string(bit-wise) comparison of the | | * Convenience method which does a string(bit-wise) comparison of the | |
| * two collation keys. | | * two collation keys. | |
| * @param target target collation key to be compared with | | * @param target target collation key to be compared with | |
| * @param status error code | | * @param status error code | |
| * @return Returns UCOL_LESS if sourceKey < targetKey, | | * @return Returns UCOL_LESS if sourceKey < targetKey, | |
| * UCOL_GREATER if sourceKey > targetKey and UCOL_EQUAL | | * UCOL_GREATER if sourceKey > targetKey and UCOL_EQUAL | |
| * otherwise. | | * otherwise. | |
|
| * @deprecated ICU 2.8 Use Collator::getSortKey(...) instead | | * @stable ICU 2.6 | |
| */ | | */ | |
| UCollationResult compareTo(const CollationKey& target, UErrorCode &stat
us) const; | | UCollationResult compareTo(const CollationKey& target, UErrorCode &stat
us) const; | |
| | | | |
| /** | | /** | |
| * Creates an integer that is unique to the collation key. NOTE: this | | * Creates an integer that is unique to the collation key. NOTE: this | |
| * is not the same as String.hashCode. | | * is not the same as String.hashCode. | |
| * <p>Example of use: | | * <p>Example of use: | |
| * <pre> | | * <pre> | |
| * . UErrorCode status = U_ZERO_ERROR; | | * . UErrorCode status = U_ZERO_ERROR; | |
| * . Collator *myCollation = Collator::createInstance(Locale::US, sta
tus); | | * . Collator *myCollation = Collator::createInstance(Locale::US, sta
tus); | |
| | | | |
| skipping to change at line 224 | | skipping to change at line 224 | |
| * . CollationKey key1, key2; | | * . CollationKey key1, key2; | |
| * . UErrorCode status1 = U_ZERO_ERROR, status2 = U_ZERO_ERROR; | | * . UErrorCode status1 = U_ZERO_ERROR, status2 = U_ZERO_ERROR; | |
| * . myCollation->getCollationKey("abc", key1, status1); | | * . myCollation->getCollationKey("abc", key1, status1); | |
| * . if (U_FAILURE(status1)) { delete myCollation; return; } | | * . if (U_FAILURE(status1)) { delete myCollation; return; } | |
| * . myCollation->getCollationKey("ABC", key2, status2); | | * . myCollation->getCollationKey("ABC", key2, status2); | |
| * . if (U_FAILURE(status2)) { delete myCollation; return; } | | * . if (U_FAILURE(status2)) { delete myCollation; return; } | |
| * . // key1.hashCode() != key2.hashCode() | | * . // key1.hashCode() != key2.hashCode() | |
| * </pre> | | * </pre> | |
| * @return the hash value based on the string's collation order. | | * @return the hash value based on the string's collation order. | |
| * @see UnicodeString#hashCode | | * @see UnicodeString#hashCode | |
|
| * @deprecated ICU 2.8 Use Collator::getSortKey(...) instead | | * @stable ICU 2.0 | |
| */ | | */ | |
| int32_t hashCode(void) const; | | int32_t hashCode(void) const; | |
| | | | |
| /** | | /** | |
| * ICU "poor man's RTTI", returns a UClassID for the actual class. | | * ICU "poor man's RTTI", returns a UClassID for the actual class. | |
|
| * @deprecated ICU 2.8 Use Collator::getSortKey(...) instead | | * @stable ICU 2.2 | |
| */ | | */ | |
| virtual UClassID getDynamicClassID() const; | | virtual UClassID getDynamicClassID() const; | |
| | | | |
| /** | | /** | |
| * ICU "poor man's RTTI", returns a UClassID for this class. | | * ICU "poor man's RTTI", returns a UClassID for this class. | |
|
| * @deprecated ICU 2.8 Use Collator::getSortKey(...) instead | | * @stable ICU 2.2 | |
| */ | | */ | |
| static UClassID U_EXPORT2 getStaticClassID(); | | static UClassID U_EXPORT2 getStaticClassID(); | |
| | | | |
| private: | | private: | |
| /** | | /** | |
|
| * Returns an array of the collation key values as 16-bit integers. | | * Replaces the current bytes buffer with a new one of newCapacity | |
| * The caller owns the storage and must delete it. | | * and copies length bytes from the old buffer to the new one. | |
| * @param values Output param of the collation key values. | | * @return the new buffer, or NULL if the allocation failed | |
| * @param capacity Size of the values array. | | */ | |
| * @param count output parameter of the number of collation key values | | uint8_t *reallocate(int32_t newCapacity, int32_t length); | |
| * @return a pointer to an array of 16-bit collation key values. | | | |
| */ | | | |
| void adopt(uint8_t *values, int32_t capacity, int32_t count); | | | |
| /** | | /** | |
| * Set a new length for a new sort key in the existing fBytes. | | * Set a new length for a new sort key in the existing fBytes. | |
| */ | | */ | |
| void setLength(int32_t newLength); | | void setLength(int32_t newLength); | |
| | | | |
|
| /* | | uint8_t *getBytes() { | |
| * Creates a collation key with a string. | | return (fFlagAndLength >= 0) ? fUnion.fStackBuffer : fUnion.fFields | |
| */ | | .fBytes; | |
| | | } | |
| | | const uint8_t *getBytes() const { | |
| | | return (fFlagAndLength >= 0) ? fUnion.fStackBuffer : fUnion.fFields | |
| | | .fBytes; | |
| | | } | |
| | | int32_t getCapacity() const { | |
| | | return (fFlagAndLength >= 0) ? (int32_t)sizeof(fUnion) : fUnion.fFi | |
| | | elds.fCapacity; | |
| | | } | |
| | | int32_t getLength() const { return fFlagAndLength & 0x7fffffff; } | |
| | | | |
| /** | | /** | |
|
| * If this CollationKey has capacity less than newSize, | | | |
| * its internal capacity will be increased to newSize. | | | |
| * @param newSize minimum size this CollationKey has to have | | | |
| * @return this CollationKey | | | |
| */ | | | |
| CollationKey& ensureCapacity(int32_t newSize); | | | |
| /** | | | |
| * Set the CollationKey to a "bogus" or invalid state | | * Set the CollationKey to a "bogus" or invalid state | |
| * @return this CollationKey | | * @return this CollationKey | |
| */ | | */ | |
| CollationKey& setToBogus(void); | | CollationKey& setToBogus(void); | |
| /** | | /** | |
| * Resets this CollationKey to an empty state | | * Resets this CollationKey to an empty state | |
| * @return this CollationKey | | * @return this CollationKey | |
| */ | | */ | |
| CollationKey& reset(void); | | CollationKey& reset(void); | |
| | | | |
| /** | | /** | |
| * Allow private access to RuleBasedCollator | | * Allow private access to RuleBasedCollator | |
| */ | | */ | |
| friend class RuleBasedCollator; | | friend class RuleBasedCollator; | |
|
| | | friend class CollationKeyByteSink; | |
| | | | |
| | | // Class fields. sizeof(CollationKey) is intended to be 48 bytes | |
| | | // on a machine with 64-bit pointers. | |
| | | // We use a union to maximize the size of the internal buffer, | |
| | | // similar to UnicodeString but not as tight and complex. | |
| | | | |
| | | // (implicit) *vtable; | |
| | | /** | |
| | | * Sort key length and flag. | |
| | | * Bit 31 is set if the buffer is heap-allocated. | |
| | | * Bits 30..0 contain the sort key length. | |
| | | */ | |
| | | int32_t fFlagAndLength; | |
| /** | | /** | |
|
| * Bogus status | | * Unique hash value of this CollationKey. | |
| */ | | * Special value 2 if the key is bogus. | |
| UBool fBogus; | | | |
| /** | | | |
| * Size of fBytes used to store the sortkey. i.e. up till the | | | |
| * null-termination. | | | |
| */ | | | |
| int32_t fCount; | | | |
| /** | | | |
| * Full size of the fBytes | | | |
| */ | | | |
| int32_t fCapacity; | | | |
| /** | | | |
| * Unique hash value of this CollationKey | | | |
| */ | | */ | |
|
| int32_t fHashCode; | | mutable int32_t fHashCode; | |
| /** | | /** | |
|
| * Array to store the sortkey | | * fUnion provides 32 bytes for the internal buffer or for | |
| */ | | * pointer+capacity. | |
| uint8_t* fBytes; | | */ | |
| | | union StackBufferOrFields { | |
| | | /** fStackBuffer is used iff fFlagAndLength>=0, else fFields is use | |
| | | d */ | |
| | | uint8_t fStackBuffer[32]; | |
| | | struct { | |
| | | uint8_t *fBytes; | |
| | | int32_t fCapacity; | |
| | | } fFields; | |
| | | } fUnion; | |
| }; | | }; | |
| | | | |
| inline UBool | | inline UBool | |
| CollationKey::operator!=(const CollationKey& other) const | | CollationKey::operator!=(const CollationKey& other) const | |
| { | | { | |
| return !(*this == other); | | return !(*this == other); | |
| } | | } | |
| | | | |
| inline UBool | | inline UBool | |
| CollationKey::isBogus() const | | CollationKey::isBogus() const | |
| { | | { | |
|
| return fBogus; | | return fHashCode == 2; // kBogusHashCode | |
| } | | } | |
| | | | |
| inline const uint8_t* | | inline const uint8_t* | |
| CollationKey::getByteArray(int32_t &count) const | | CollationKey::getByteArray(int32_t &count) const | |
| { | | { | |
|
| count = fCount; | | count = getLength(); | |
| return fBytes; | | return getBytes(); | |
| } | | } | |
| | | | |
| U_NAMESPACE_END | | U_NAMESPACE_END | |
| | | | |
| #endif /* U_HIDE_DEPRECATED_API */ | | #endif /* U_HIDE_DEPRECATED_API */ | |
| #endif /* #if !UCONFIG_NO_COLLATION */ | | #endif /* #if !UCONFIG_NO_COLLATION */ | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 24 change blocks. |
| 55 lines changed or deleted | | 65 lines changed or added | |
|
| tblcoll.h | | tblcoll.h | |
| | | | |
| skipping to change at line 225 | | skipping to change at line 225 | |
| | | | |
| /** | | /** | |
| * Returns true if argument is the same as this object. | | * Returns true if argument is the same as this object. | |
| * @param other Collator object to be compared. | | * @param other Collator object to be compared. | |
| * @return true if arguments is the same as this object. | | * @return true if arguments is the same as this object. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual UBool operator==(const Collator& other) const; | | virtual UBool operator==(const Collator& other) const; | |
| | | | |
| /** | | /** | |
|
| * Returns true if argument is not the same as this object. | | * Makes a copy of this object. | |
| * @param other Collator object to be compared | | * @return a copy of this object, owned by the caller | |
| * @return returns true if argument is not the same as this object. | | | |
| * @stable ICU 2.0 | | | |
| */ | | | |
| virtual UBool operator!=(const Collator& other) const; | | | |
| | | | |
| /** | | | |
| * Makes a deep copy of the object. | | | |
| * The caller owns the returned object. | | | |
| * @return the cloned object. | | | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual Collator* clone(void) const; | | virtual Collator* clone(void) const; | |
| | | | |
| /** | | /** | |
| * Creates a collation element iterator for the source string. The call
er of | | * Creates a collation element iterator for the source string. The call
er of | |
| * this method is responsible for the memory management of the return | | * this method is responsible for the memory management of the return | |
| * pointer. | | * pointer. | |
| * @param source the string over which the CollationElementIterator wil
l | | * @param source the string over which the CollationElementIterator wil
l | |
| * iterate. | | * iterate. | |
| | | | |
| skipping to change at line 265 | | skipping to change at line 256 | |
| * method is responsible for the memory management of the returned poin
ter. | | * method is responsible for the memory management of the returned poin
ter. | |
| * @param source the CharacterIterator which produces the characters ov
er | | * @param source the CharacterIterator which produces the characters ov
er | |
| * which the CollationElementItgerator will iterate. | | * which the CollationElementItgerator will iterate. | |
| * @return the collation element iterator of the source using this as t
he | | * @return the collation element iterator of the source using this as t
he | |
| * based Collator. | | * based Collator. | |
| * @stable ICU 2.2 | | * @stable ICU 2.2 | |
| */ | | */ | |
| virtual CollationElementIterator* createCollationElementIterator( | | virtual CollationElementIterator* createCollationElementIterator( | |
| const CharacterIterator& source) c
onst; | | const CharacterIterator& source) c
onst; | |
| | | | |
|
| /** | | // Make deprecated versions of Collator::compare() visible. | |
| * Compares a range of character data stored in two different strings b | | using Collator::compare; | |
| ased | | | |
| * on the collation rules. Returns information about whether a string i | | | |
| s | | | |
| * less than, greater than or equal to another string in a language. | | | |
| * This can be overriden in a subclass. | | | |
| * @param source the source string. | | | |
| * @param target the target string to be compared with the source strin | | | |
| g. | | | |
| * @return the comparison result. GREATER if the source string is great | | | |
| er | | | |
| * than the target string, LESS if the source is less than the | | | |
| * target. Otherwise, returns EQUAL. | | | |
| * @deprecated ICU 2.6 Use overload with UErrorCode& | | | |
| */ | | | |
| virtual EComparisonResult compare(const UnicodeString& source, | | | |
| const UnicodeString& target) const; | | | |
| | | | |
| /** | | /** | |
| * The comparison function compares the character data stored in two | | * The comparison function compares the character data stored in two | |
| * different strings. Returns information about whether a string is less | | * different strings. Returns information about whether a string is less | |
| * than, greater than or equal to another string. | | * than, greater than or equal to another string. | |
| * @param source the source string to be compared with. | | * @param source the source string to be compared with. | |
| * @param target the string that is to be compared with the source strin
g. | | * @param target the string that is to be compared with the source strin
g. | |
| * @param status possible error code | | * @param status possible error code | |
| * @return Returns an enum value. UCOL_GREATER if source is greater | | * @return Returns an enum value. UCOL_GREATER if source is greater | |
| * than target; UCOL_EQUAL if source is equal to target; UCOL_LESS if so
urce is less | | * than target; UCOL_EQUAL if source is equal to target; UCOL_LESS if so
urce is less | |
| * than target | | * than target | |
| * @stable ICU 2.6 | | * @stable ICU 2.6 | |
| **/ | | **/ | |
| virtual UCollationResult compare(const UnicodeString& source, | | virtual UCollationResult compare(const UnicodeString& source, | |
| const UnicodeString& target, | | const UnicodeString& target, | |
| UErrorCode &status) const; | | UErrorCode &status) const; | |
| | | | |
| /** | | /** | |
|
| * Compares a range of character data stored in two different strings b | | | |
| ased | | | |
| * on the collation rules up to the specified length. Returns informati | | | |
| on | | | |
| * about whether a string is less than, greater than or equal to anothe | | | |
| r | | | |
| * string in a language. This can be overriden in a subclass. | | | |
| * @param source the source string. | | | |
| * @param target the target string to be compared with the source strin | | | |
| g. | | | |
| * @param length compares up to the specified length | | | |
| * @return the comparison result. GREATER if the source string is great | | | |
| er | | | |
| * than the target string, LESS if the source is less than the | | | |
| * target. Otherwise, returns EQUAL. | | | |
| * @deprecated ICU 2.6 Use overload with UErrorCode& | | | |
| */ | | | |
| virtual EComparisonResult compare(const UnicodeString& source, | | | |
| const UnicodeString& target, | | | |
| int32_t length) const; | | | |
| | | | |
| /** | | | |
| * Does the same thing as compare but limits the comparison to a specifi
ed | | * Does the same thing as compare but limits the comparison to a specifi
ed | |
| * length | | * length | |
| * @param source the source string to be compared with. | | * @param source the source string to be compared with. | |
| * @param target the string that is to be compared with the source strin
g. | | * @param target the string that is to be compared with the source strin
g. | |
| * @param length the length the comparison is limited to | | * @param length the length the comparison is limited to | |
| * @param status possible error code | | * @param status possible error code | |
| * @return Returns an enum value. UCOL_GREATER if source (up to the spec
ified | | * @return Returns an enum value. UCOL_GREATER if source (up to the spec
ified | |
| * length) is greater than target; UCOL_EQUAL if source (up to s
pecified | | * length) is greater than target; UCOL_EQUAL if source (up to s
pecified | |
| * length) is equal to target; UCOL_LESS if source (up to the sp
ecified | | * length) is equal to target; UCOL_LESS if source (up to the sp
ecified | |
| * length) is less than target. | | * length) is less than target. | |
| * @stable ICU 2.6 | | * @stable ICU 2.6 | |
| */ | | */ | |
| virtual UCollationResult compare(const UnicodeString& source, | | virtual UCollationResult compare(const UnicodeString& source, | |
| const UnicodeString& target, | | const UnicodeString& target, | |
| int32_t length, | | int32_t length, | |
| UErrorCode &status) const; | | UErrorCode &status) const; | |
| | | | |
| /** | | /** | |
|
| * The comparison function compares the character data stored in two | | | |
| * different string arrays. Returns information about whether a string | | | |
| array | | | |
| * is less than, greater than or equal to another string array. | | | |
| * <p>Example of use: | | | |
| * <pre> | | | |
| * . UChar ABC[] = {0x41, 0x42, 0x43, 0}; // = "ABC" | | | |
| * . UChar abc[] = {0x61, 0x62, 0x63, 0}; // = "abc" | | | |
| * . UErrorCode status = U_ZERO_ERROR; | | | |
| * . Collator *myCollation = | | | |
| * . Collator::createInstance(Locale::US, statu | | | |
| s); | | | |
| * . if (U_FAILURE(status)) return; | | | |
| * . myCollation->setStrength(Collator::PRIMARY); | | | |
| * . // result would be Collator::EQUAL ("abc" == "ABC") | | | |
| * . // (no primary difference between "abc" and "ABC") | | | |
| * . Collator::EComparisonResult result = | | | |
| * . myCollation->compare(abc, 3, ABC, 3); | | | |
| * . myCollation->setStrength(Collator::TERTIARY); | | | |
| * . // result would be Collator::LESS ("abc" <<< "ABC") | | | |
| * . // (with tertiary difference between "abc" and "ABC") | | | |
| * . result = myCollation->compare(abc, 3, ABC, 3); | | | |
| * </pre> | | | |
| * @param source the source string array to be compared with. | | | |
| * @param sourceLength the length of the source string array. If this v | | | |
| alue | | | |
| * is equal to -1, the string array is null-terminated. | | | |
| * @param target the string that is to be compared with the source stri | | | |
| ng. | | | |
| * @param targetLength the length of the target string array. If this v | | | |
| alue | | | |
| * is equal to -1, the string array is null-terminated. | | | |
| * @return Returns a byte value. GREATER if source is greater than targ | | | |
| et; | | | |
| * EQUAL if source is equal to target; LESS if source is less t | | | |
| han | | | |
| * target | | | |
| * @deprecated ICU 2.6 Use overload with UErrorCode& | | | |
| */ | | | |
| virtual EComparisonResult compare(const UChar* source, int32_t sourceLe | | | |
| ngth, | | | |
| const UChar* target, int32_t targetLe | | | |
| ngth) | | | |
| const; | | | |
| | | | |
| /** | | | |
| * The comparison function compares the character data stored in two | | * The comparison function compares the character data stored in two | |
| * different string arrays. Returns information about whether a string a
rray | | * different string arrays. Returns information about whether a string a
rray | |
| * is less than, greater than or equal to another string array. | | * is less than, greater than or equal to another string array. | |
| * @param source the source string array to be compared with. | | * @param source the source string array to be compared with. | |
| * @param sourceLength the length of the source string array. If this v
alue | | * @param sourceLength the length of the source string array. If this v
alue | |
| * is equal to -1, the string array is null-terminated. | | * is equal to -1, the string array is null-terminated. | |
| * @param target the string that is to be compared with the source strin
g. | | * @param target the string that is to be compared with the source strin
g. | |
| * @param targetLength the length of the target string array. If this v
alue | | * @param targetLength the length of the target string array. If this v
alue | |
| * is equal to -1, the string array is null-terminated. | | * is equal to -1, the string array is null-terminated. | |
| * @param status possible error code | | * @param status possible error code | |
| | | | |
| skipping to change at line 413 | | skipping to change at line 338 | |
| /** | | /** | |
| * Transforms a specified region of the string into a series of characte
rs | | * Transforms a specified region of the string into a series of characte
rs | |
| * that can be compared with CollationKey.compare. Use a CollationKey wh
en | | * that can be compared with CollationKey.compare. Use a CollationKey wh
en | |
| * you need to do repeated comparisions on the same string. For a single | | * you need to do repeated comparisions on the same string. For a single | |
| * comparison the compare method will be faster. | | * comparison the compare method will be faster. | |
| * @param source the source string. | | * @param source the source string. | |
| * @param key the transformed key of the source string. | | * @param key the transformed key of the source string. | |
| * @param status the error code status. | | * @param status the error code status. | |
| * @return the transformed key. | | * @return the transformed key. | |
| * @see CollationKey | | * @see CollationKey | |
|
| * @deprecated ICU 2.8 Use getSortKey(...) instead | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual CollationKey& getCollationKey(const UnicodeString& source, | | virtual CollationKey& getCollationKey(const UnicodeString& source, | |
| CollationKey& key, | | CollationKey& key, | |
| UErrorCode& status) const; | | UErrorCode& status) const; | |
| | | | |
| /** | | /** | |
| * Transforms a specified region of the string into a series of characte
rs | | * Transforms a specified region of the string into a series of characte
rs | |
| * that can be compared with CollationKey.compare. Use a CollationKey wh
en | | * that can be compared with CollationKey.compare. Use a CollationKey wh
en | |
| * you need to do repeated comparisions on the same string. For a single | | * you need to do repeated comparisions on the same string. For a single | |
| * comparison the compare method will be faster. | | * comparison the compare method will be faster. | |
| * @param source the source string. | | * @param source the source string. | |
| * @param sourceLength the length of the source string. | | * @param sourceLength the length of the source string. | |
| * @param key the transformed key of the source string. | | * @param key the transformed key of the source string. | |
| * @param status the error code status. | | * @param status the error code status. | |
| * @return the transformed key. | | * @return the transformed key. | |
| * @see CollationKey | | * @see CollationKey | |
|
| * @deprecated ICU 2.8 Use getSortKey(...) instead | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual CollationKey& getCollationKey(const UChar *source, | | virtual CollationKey& getCollationKey(const UChar *source, | |
| int32_t sourceLength, | | int32_t sourceLength, | |
| CollationKey& key, | | CollationKey& key, | |
| UErrorCode& status) const; | | UErrorCode& status) const; | |
| | | | |
| /** | | /** | |
| * Generates the hash code for the rule-based collation object. | | * Generates the hash code for the rule-based collation object. | |
| * @return the hash code. | | * @return the hash code. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| | | | |
| skipping to change at line 454 | | skipping to change at line 379 | |
| /** | | /** | |
| * Gets the locale of the Collator | | * Gets the locale of the Collator | |
| * @param type can be either requested, valid or actual locale. For more | | * @param type can be either requested, valid or actual locale. For more | |
| * information see the definition of ULocDataLocaleType in | | * information see the definition of ULocDataLocaleType in | |
| * uloc.h | | * uloc.h | |
| * @param status the error code status. | | * @param status the error code status. | |
| * @return locale where the collation data lives. If the collator | | * @return locale where the collation data lives. If the collator | |
| * was instantiated from rules, locale is empty. | | * was instantiated from rules, locale is empty. | |
| * @deprecated ICU 2.8 likely to change in ICU 3.0, based on feedback | | * @deprecated ICU 2.8 likely to change in ICU 3.0, based on feedback | |
| */ | | */ | |
|
| virtual const Locale getLocale(ULocDataLocaleType type, UErrorCode& sta
tus) const; | | virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) c
onst; | |
| | | | |
| /** | | /** | |
|
| * Gets the table-based rules for the collation object. | | * Gets the tailoring rules for this collator. | |
| * @return returns the collation rules that the table collation object | | * @return the collation tailoring from which this collator was created | |
| was | | | |
| * created from. | | | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| const UnicodeString& getRules(void) const; | | const UnicodeString& getRules(void) const; | |
| | | | |
| /** | | /** | |
| * Gets the version information for a Collator. | | * Gets the version information for a Collator. | |
| * @param info the version # information, the result will be filled in | | * @param info the version # information, the result will be filled in | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual void getVersion(UVersionInfo info) const; | | virtual void getVersion(UVersionInfo info) const; | |
| | | | |
| skipping to change at line 533 | | skipping to change at line 457 | |
| * @param status for catching errors | | * @param status for catching errors | |
| * @return size of the image | | * @return size of the image | |
| * @see ucol_openBinary | | * @see ucol_openBinary | |
| * @stable ICU 3.4 | | * @stable ICU 3.4 | |
| */ | | */ | |
| int32_t cloneBinary(uint8_t *buffer, int32_t capacity, UErrorCode &stat
us); | | int32_t cloneBinary(uint8_t *buffer, int32_t capacity, UErrorCode &stat
us); | |
| | | | |
| /** | | /** | |
| * Returns current rules. Delta defines whether full rules are returned
or | | * Returns current rules. Delta defines whether full rules are returned
or | |
| * just the tailoring. | | * just the tailoring. | |
|
| | | * | |
| | | * getRules(void) should normally be used instead. | |
| | | * See http://userguide.icu-project.org/collation/customization#TOC-Bui | |
| | | lding-on-Existing-Locales | |
| * @param delta one of UCOL_TAILORING_ONLY, UCOL_FULL_RULES. | | * @param delta one of UCOL_TAILORING_ONLY, UCOL_FULL_RULES. | |
| * @param buffer UnicodeString to store the result rules | | * @param buffer UnicodeString to store the result rules | |
| * @stable ICU 2.2 | | * @stable ICU 2.2 | |
|
| | | * @see UCOL_FULL_RULES | |
| */ | | */ | |
| void getRules(UColRuleOption delta, UnicodeString &buffer); | | void getRules(UColRuleOption delta, UnicodeString &buffer); | |
| | | | |
| /** | | /** | |
| * Universal attribute setter | | * Universal attribute setter | |
| * @param attr attribute type | | * @param attr attribute type | |
| * @param value attribute value | | * @param value attribute value | |
| * @param status to indicate whether the operation went on smoothly or
there were errors | | * @param status to indicate whether the operation went on smoothly or
there were errors | |
| * @stable ICU 2.2 | | * @stable ICU 2.2 | |
| */ | | */ | |
| | | | |
| skipping to change at line 557 | | skipping to change at line 485 | |
| UErrorCode &status); | | UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Universal attribute getter. | | * Universal attribute getter. | |
| * @param attr attribute type | | * @param attr attribute type | |
| * @param status to indicate whether the operation went on smoothly or
there were errors | | * @param status to indicate whether the operation went on smoothly or
there were errors | |
| * @return attribute value | | * @return attribute value | |
| * @stable ICU 2.2 | | * @stable ICU 2.2 | |
| */ | | */ | |
| virtual UColAttributeValue getAttribute(UColAttribute attr, | | virtual UColAttributeValue getAttribute(UColAttribute attr, | |
|
| UErrorCode &status); | | UErrorCode &status) const; | |
| | | | |
| /** | | /** | |
| * Sets the variable top to a collation element value of a string suppl
ied. | | * Sets the variable top to a collation element value of a string suppl
ied. | |
| * @param varTop one or more (if contraction) UChars to which the varia
ble top should be set | | * @param varTop one or more (if contraction) UChars to which the varia
ble top should be set | |
| * @param len length of variable top string. If -1 it is considered to
be zero terminated. | | * @param len length of variable top string. If -1 it is considered to
be zero terminated. | |
| * @param status error code. If error code is set, the return value is
undefined. Errors set by this function are: <br> | | * @param status error code. If error code is set, the return value is
undefined. Errors set by this function are: <br> | |
| * U_CE_NOT_FOUND_ERROR if more than one character was passed and th
ere is no such a contraction<br> | | * U_CE_NOT_FOUND_ERROR if more than one character was passed and th
ere is no such a contraction<br> | |
| * U_PRIMARY_TOO_LONG_ERROR if the primary for the variable top has
more than two bytes | | * U_PRIMARY_TOO_LONG_ERROR if the primary for the variable top has
more than two bytes | |
| * @return a 32 bit value containing the value of the variable top in u
pper 16 bits. Lower 16 bits are undefined | | * @return a 32 bit value containing the value of the variable top in u
pper 16 bits. Lower 16 bits are undefined | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| | | | |
| skipping to change at line 580 | | skipping to change at line 508 | |
| | | | |
| /** | | /** | |
| * Sets the variable top to a collation element value of a string suppl
ied. | | * Sets the variable top to a collation element value of a string suppl
ied. | |
| * @param varTop an UnicodeString size 1 or more (if contraction) of UC
hars to which the variable top should be set | | * @param varTop an UnicodeString size 1 or more (if contraction) of UC
hars to which the variable top should be set | |
| * @param status error code. If error code is set, the return value is
undefined. Errors set by this function are: <br> | | * @param status error code. If error code is set, the return value is
undefined. Errors set by this function are: <br> | |
| * U_CE_NOT_FOUND_ERROR if more than one character was passed and th
ere is no such a contraction<br> | | * U_CE_NOT_FOUND_ERROR if more than one character was passed and th
ere is no such a contraction<br> | |
| * U_PRIMARY_TOO_LONG_ERROR if the primary for the variable top has
more than two bytes | | * U_PRIMARY_TOO_LONG_ERROR if the primary for the variable top has
more than two bytes | |
| * @return a 32 bit value containing the value of the variable top in u
pper 16 bits. Lower 16 bits are undefined | | * @return a 32 bit value containing the value of the variable top in u
pper 16 bits. Lower 16 bits are undefined | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| virtual uint32_t setVariableTop(const UnicodeString varTop, UErrorCode
&status); | | virtual uint32_t setVariableTop(const UnicodeString &varTop, UErrorCode
&status); | |
| | | | |
| /** | | /** | |
| * Sets the variable top to a collation element value supplied. Variabl
e top is set to the upper 16 bits. | | * Sets the variable top to a collation element value supplied. Variabl
e top is set to the upper 16 bits. | |
| * Lower 16 bits are ignored. | | * Lower 16 bits are ignored. | |
| * @param varTop CE value, as returned by setVariableTop or ucol)getVar
iableTop | | * @param varTop CE value, as returned by setVariableTop or ucol)getVar
iableTop | |
| * @param status error code (not changed by function) | | * @param status error code (not changed by function) | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| virtual void setVariableTop(const uint32_t varTop, UErrorCode &status); | | virtual void setVariableTop(uint32_t varTop, UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Gets the variable top value of a Collator. | | * Gets the variable top value of a Collator. | |
| * Lower 16 bits are undefined and should be ignored. | | * Lower 16 bits are undefined and should be ignored. | |
| * @param status error code (not changed by function). If error code is
set, the return value is undefined. | | * @param status error code (not changed by function). If error code is
set, the return value is undefined. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual uint32_t getVariableTop(UErrorCode &status) const; | | virtual uint32_t getVariableTop(UErrorCode &status) const; | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 611 | | skipping to change at line 539 | |
| * this collator. | | * this collator. | |
| * @param status error code of the operation | | * @param status error code of the operation | |
| * @return a pointer to a UnicodeSet object containing all the | | * @return a pointer to a UnicodeSet object containing all the | |
| * code points and sequences that may sort differently than | | * code points and sequences that may sort differently than | |
| * in the UCA. The object must be disposed of by using delete | | * in the UCA. The object must be disposed of by using delete | |
| * @stable ICU 2.4 | | * @stable ICU 2.4 | |
| */ | | */ | |
| virtual UnicodeSet *getTailoredSet(UErrorCode &status) const; | | virtual UnicodeSet *getTailoredSet(UErrorCode &status) const; | |
| | | | |
| /** | | /** | |
|
| * Thread safe cloning operation. | | | |
| * @return pointer to the new clone, user should remove it. | | | |
| * @stable ICU 2.2 | | | |
| */ | | | |
| virtual Collator* safeClone(void); | | | |
| | | | |
| /** | | | |
| * Get the sort key as an array of bytes from an UnicodeString. | | * Get the sort key as an array of bytes from an UnicodeString. | |
| * @param source string to be processed. | | * @param source string to be processed. | |
| * @param result buffer to store result in. If NULL, number of bytes ne
eded | | * @param result buffer to store result in. If NULL, number of bytes ne
eded | |
| * will be returned. | | * will be returned. | |
| * @param resultLength length of the result buffer. If if not enough th
e | | * @param resultLength length of the result buffer. If if not enough th
e | |
| * buffer will be filled to capacity. | | * buffer will be filled to capacity. | |
| * @return Number of bytes needed for storing the sort key | | * @return Number of bytes needed for storing the sort key | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual int32_t getSortKey(const UnicodeString& source, uint8_t *result
, | | virtual int32_t getSortKey(const UnicodeString& source, uint8_t *result
, | |
| | | | |
| skipping to change at line 646 | | skipping to change at line 567 | |
| * will be returned. | | * will be returned. | |
| * @param resultLength length of the result buffer. If if not enough th
e | | * @param resultLength length of the result buffer. If if not enough th
e | |
| * buffer will be filled to capacity. | | * buffer will be filled to capacity. | |
| * @return Number of bytes needed for storing the sort key | | * @return Number of bytes needed for storing the sort key | |
| * @stable ICU 2.2 | | * @stable ICU 2.2 | |
| */ | | */ | |
| virtual int32_t getSortKey(const UChar *source, int32_t sourceLength, | | virtual int32_t getSortKey(const UChar *source, int32_t sourceLength, | |
| uint8_t *result, int32_t resultLength) const
; | | uint8_t *result, int32_t resultLength) const
; | |
| | | | |
| /** | | /** | |
|
| * Determines the minimum strength that will be use in comparison or | | | |
| * transformation. | | | |
| * <p>E.g. with strength == SECONDARY, the tertiary difference is ignore | | | |
| d | | | |
| * <p>E.g. with strength == PRIMARY, the secondary and tertiary differen | | | |
| ce | | | |
| * are ignored. | | | |
| * @return the current comparison level. | | | |
| * @see RuleBasedCollator#setStrength | | | |
| * @deprecated ICU 2.6 Use getAttribute(UCOL_STRENGTH...) instead | | | |
| */ | | | |
| virtual ECollationStrength getStrength(void) const; | | | |
| | | | |
| /** | | | |
| * Sets the minimum strength to be used in comparison or transformation. | | | |
| * @see RuleBasedCollator#getStrength | | | |
| * @param newStrength the new comparison level. | | | |
| * @deprecated ICU 2.6 Use setAttribute(UCOL_STRENGTH...) instead | | | |
| */ | | | |
| virtual void setStrength(ECollationStrength newStrength); | | | |
| | | | |
| /** | | | |
| * Retrieves the reordering codes for this collator. | | * Retrieves the reordering codes for this collator. | |
| * @param dest The array to fill with the script ordering. | | * @param dest The array to fill with the script ordering. | |
| * @param destCapacity The length of dest. If it is 0, then dest may be
NULL and the function | | * @param destCapacity The length of dest. If it is 0, then dest may be
NULL and the function | |
| * will only return the length of the result without writing any of th
e result string (pre-flighting). | | * will only return the length of the result without writing any of th
e result string (pre-flighting). | |
| * @param status A reference to an error code value, which must not ind
icate | | * @param status A reference to an error code value, which must not ind
icate | |
| * a failure before the function call. | | * a failure before the function call. | |
| * @return The length of the script ordering array. | | * @return The length of the script ordering array. | |
| * @see ucol_setReorderCodes | | * @see ucol_setReorderCodes | |
| * @see Collator#getEquivalentReorderCodes | | * @see Collator#getEquivalentReorderCodes | |
| * @see Collator#setReorderCodes | | * @see Collator#setReorderCodes | |
| * @stable ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
|
| virtual int32_t U_EXPORT2 getReorderCodes(int32_t *dest, | | virtual int32_t getReorderCodes(int32_t *dest, | |
| int32_t destCapacity, | | int32_t destCapacity, | |
| UErrorCode& status) const; | | UErrorCode& status) const; | |
| | | | |
| /** | | /** | |
| * Sets the ordering of scripts for this collator. | | * Sets the ordering of scripts for this collator. | |
| * @param reorderCodes An array of script codes in the new order. This
can be NULL if the | | * @param reorderCodes An array of script codes in the new order. This
can be NULL if the | |
| * length is also set to 0. An empty array will clear any reordering co
des on the collator. | | * length is also set to 0. An empty array will clear any reordering co
des on the collator. | |
| * @param reorderCodesLength The length of reorderCodes. | | * @param reorderCodesLength The length of reorderCodes. | |
| * @param status error code | | * @param status error code | |
| * @see Collator#getReorderCodes | | * @see Collator#getReorderCodes | |
| * @see Collator#getEquivalentReorderCodes | | * @see Collator#getEquivalentReorderCodes | |
| * @stable ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
|
| virtual void U_EXPORT2 setReorderCodes(const int32_t* reorderCodes, | | virtual void setReorderCodes(const int32_t* reorderCodes, | |
| int32_t reorderCodesLength, | | int32_t reorderCodesLength, | |
| UErrorCode& status) ; | | UErrorCode& status) ; | |
| | | | |
| /** | | /** | |
| * Retrieves the reorder codes that are grouped with the given reorder
code. Some reorder | | * Retrieves the reorder codes that are grouped with the given reorder
code. Some reorder | |
| * codes will be grouped and must reorder together. | | * codes will be grouped and must reorder together. | |
| * @param reorderCode The reorder code to determine equivalence for. | | * @param reorderCode The reorder code to determine equivalence for. | |
| * @param dest The array to fill with the script equivalene reordering
codes. | | * @param dest The array to fill with the script equivalene reordering
codes. | |
| * @param destCapacity The length of dest. If it is 0, then dest may be
NULL and the | | * @param destCapacity The length of dest. If it is 0, then dest may be
NULL and the | |
| * function will only return the length of the result without writing a
ny of the result | | * function will only return the length of the result without writing a
ny of the result | |
| * string (pre-flighting). | | * string (pre-flighting). | |
| * @param status A reference to an error code value, which must not ind
icate | | * @param status A reference to an error code value, which must not ind
icate | |
| | | | |
| skipping to change at line 877 | | skipping to change at line 778 | |
| /** | | /** | |
| * Used internally by registraton to define the requested and valid loca
les. | | * Used internally by registraton to define the requested and valid loca
les. | |
| * @param requestedLocale the requsted locale | | * @param requestedLocale the requsted locale | |
| * @param validLocale the valid locale | | * @param validLocale the valid locale | |
| * @param actualLocale the actual locale | | * @param actualLocale the actual locale | |
| * @internal | | * @internal | |
| */ | | */ | |
| virtual void setLocales(const Locale& requestedLocale, const Locale& va
lidLocale, const Locale& actualLocale); | | virtual void setLocales(const Locale& requestedLocale, const Locale& va
lidLocale, const Locale& actualLocale); | |
| | | | |
| private: | | private: | |
|
| | | | |
| // if not owned and not a write through alias, copy the ucollator | | // if not owned and not a write through alias, copy the ucollator | |
| void checkOwned(void); | | void checkOwned(void); | |
| | | | |
| // utility to init rule string used by checkOwned and construct | | // utility to init rule string used by checkOwned and construct | |
| void setRuleStringFromCollator(); | | void setRuleStringFromCollator(); | |
| | | | |
|
| /** | | public: | |
| * Converts C's UCollationResult to EComparisonResult | | | |
| * @param result member of the enum UComparisonResult | | | |
| * @return EComparisonResult equivalent of UCollationResult | | | |
| * @deprecated ICU 2.6. We will not need it. | | | |
| */ | | | |
| Collator::EComparisonResult getEComparisonResult( | | | |
| const UCollationResult &result) | | | |
| const; | | | |
| | | | |
| /** | | | |
| * Converts C's UCollationStrength to ECollationStrength | | | |
| * @param strength member of the enum UCollationStrength | | | |
| * @return ECollationStrength equivalent of UCollationStrength | | | |
| */ | | | |
| Collator::ECollationStrength getECollationStrength( | | | |
| const UCollationStrength &strength) | | | |
| const; | | | |
| | | | |
| /** | | | |
| * Converts C++'s ECollationStrength to UCollationStrength | | | |
| * @param strength member of the enum ECollationStrength | | | |
| * @return UCollationStrength equivalent of ECollationStrength | | | |
| */ | | | |
| UCollationStrength getUCollationStrength( | | | |
| const Collator::ECollationStrength &strength) const; | | | |
| public: | | | |
| /** Get the short definition string for a collator. This internal API h
arvests the collator's | | /** Get the short definition string for a collator. This internal API h
arvests the collator's | |
| * locale and the attribute set and produces a string that can be used
for opening | | * locale and the attribute set and produces a string that can be used
for opening | |
| * a collator with the same properties using the ucol_openFromShortStr
ing API. | | * a collator with the same properties using the ucol_openFromShortStr
ing API. | |
| * This string will be normalized. | | * This string will be normalized. | |
| * The structure and the syntax of the string is defined in the "Namin
g collators" | | * The structure and the syntax of the string is defined in the "Namin
g collators" | |
| * section of the users guide: | | * section of the users guide: | |
| * http://icu-project.org/userguide/Collate_Concepts.html#Naming_Colla
tors | | * http://icu-project.org/userguide/Collate_Concepts.html#Naming_Colla
tors | |
| * This function supports preflighting. | | * This function supports preflighting. | |
| * | | * | |
| * This is internal, and intended to be used with delegate converters. | | * This is internal, and intended to be used with delegate converters. | |
| | | | |
| skipping to change at line 965 | | skipping to change at line 841 | |
| setRuleStringFromCollator(); | | setRuleStringFromCollator(); | |
| } | | } | |
| | | | |
| #ifndef U_HIDE_INTERNAL_API | | #ifndef U_HIDE_INTERNAL_API | |
| inline const UCollator * RuleBasedCollator::getUCollator() | | inline const UCollator * RuleBasedCollator::getUCollator() | |
| { | | { | |
| return ucollator; | | return ucollator; | |
| } | | } | |
| #endif | | #endif | |
| | | | |
|
| inline Collator::EComparisonResult RuleBasedCollator::getEComparisonResult( | | | |
| const UCollationResult &result) | | | |
| const | | | |
| { | | | |
| switch (result) | | | |
| { | | | |
| case UCOL_LESS : | | | |
| return Collator::LESS; | | | |
| case UCOL_EQUAL : | | | |
| return Collator::EQUAL; | | | |
| default : | | | |
| return Collator::GREATER; | | | |
| } | | | |
| } | | | |
| | | | |
| inline Collator::ECollationStrength RuleBasedCollator::getECollationStrengt | | | |
| h( | | | |
| const UCollationStrength &strength) | | | |
| const | | | |
| { | | | |
| switch (strength) | | | |
| { | | | |
| case UCOL_PRIMARY : | | | |
| return Collator::PRIMARY; | | | |
| case UCOL_SECONDARY : | | | |
| return Collator::SECONDARY; | | | |
| case UCOL_TERTIARY : | | | |
| return Collator::TERTIARY; | | | |
| case UCOL_QUATERNARY : | | | |
| return Collator::QUATERNARY; | | | |
| default : | | | |
| return Collator::IDENTICAL; | | | |
| } | | | |
| } | | | |
| | | | |
| inline UCollationStrength RuleBasedCollator::getUCollationStrength( | | | |
| const Collator::ECollationStrength &strength) | | | |
| const | | | |
| { | | | |
| switch (strength) | | | |
| { | | | |
| case Collator::PRIMARY : | | | |
| return UCOL_PRIMARY; | | | |
| case Collator::SECONDARY : | | | |
| return UCOL_SECONDARY; | | | |
| case Collator::TERTIARY : | | | |
| return UCOL_TERTIARY; | | | |
| case Collator::QUATERNARY : | | | |
| return UCOL_QUATERNARY; | | | |
| default : | | | |
| return UCOL_IDENTICAL; | | | |
| } | | | |
| } | | | |
| | | | |
| U_NAMESPACE_END | | U_NAMESPACE_END | |
| | | | |
| #endif /* #if !UCONFIG_NO_COLLATION */ | | #endif /* #if !UCONFIG_NO_COLLATION */ | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 20 change blocks. |
| 224 lines changed or deleted | | 24 lines changed or added | |
|
| tzfmt.h | | tzfmt.h | |
| | | | |
| skipping to change at line 28 | | skipping to change at line 28 | |
| #ifndef U_HIDE_INTERNAL_API | | #ifndef U_HIDE_INTERNAL_API | |
| | | | |
| #include "unicode/format.h" | | #include "unicode/format.h" | |
| #include "unicode/timezone.h" | | #include "unicode/timezone.h" | |
| #include "unicode/tznames.h" | | #include "unicode/tznames.h" | |
| | | | |
| U_CDECL_BEGIN | | U_CDECL_BEGIN | |
| /** | | /** | |
| * Constants for time zone display format style used by format/parse APIs | | * Constants for time zone display format style used by format/parse APIs | |
| * in TimeZoneFormat. | | * in TimeZoneFormat. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| typedef enum UTimeZoneFormatStyle { | | typedef enum UTimeZoneFormatStyle { | |
| /** | | /** | |
| * Generic location format, such as "United States Time (New York)", "I
taly Time" | | * Generic location format, such as "United States Time (New York)", "I
taly Time" | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZFMT_STYLE_GENERIC_LOCATION, | | UTZFMT_STYLE_GENERIC_LOCATION, | |
| /** | | /** | |
| * Generic long non-location format, such as "Eastern Time". | | * Generic long non-location format, such as "Eastern Time". | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZFMT_STYLE_GENERIC_LONG, | | UTZFMT_STYLE_GENERIC_LONG, | |
| /** | | /** | |
| * Generic short non-location format, such as "ET". | | * Generic short non-location format, such as "ET". | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZFMT_STYLE_GENERIC_SHORT, | | UTZFMT_STYLE_GENERIC_SHORT, | |
| /** | | /** | |
| * Specific long format, such as "Eastern Standard Time". | | * Specific long format, such as "Eastern Standard Time". | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZFMT_STYLE_SPECIFIC_LONG, | | UTZFMT_STYLE_SPECIFIC_LONG, | |
| /** | | /** | |
| * Specific short format, such as "EST", "PDT". | | * Specific short format, such as "EST", "PDT". | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZFMT_STYLE_SPECIFIC_SHORT, | | UTZFMT_STYLE_SPECIFIC_SHORT, | |
| /** | | /** | |
| * RFC822 format, such as "-0500" | | * RFC822 format, such as "-0500" | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZFMT_STYLE_RFC822, | | UTZFMT_STYLE_RFC822, | |
| /** | | /** | |
| * Localized GMT offset format, such as "GMT-05:00", "UTC+0100" | | * Localized GMT offset format, such as "GMT-05:00", "UTC+0100" | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZFMT_STYLE_LOCALIZED_GMT, | | UTZFMT_STYLE_LOCALIZED_GMT, | |
| /** | | /** | |
| * ISO 8601 format (extended), such as "-05:00", "Z"(UTC) | | * ISO 8601 format (extended), such as "-05:00", "Z"(UTC) | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZFMT_STYLE_ISO8601 | | UTZFMT_STYLE_ISO8601 | |
| } UTimeZoneFormatStyle; | | } UTimeZoneFormatStyle; | |
| | | | |
| /** | | /** | |
| * Constants for GMT offset pattern types. | | * Constants for GMT offset pattern types. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| typedef enum UTimeZoneFormatGMTOffsetPatternType { | | typedef enum UTimeZoneFormatGMTOffsetPatternType { | |
| /** | | /** | |
| * Positive offset with hour and minute fields | | * Positive offset with hour and minute fields | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZFMT_PAT_POSITIVE_HM, | | UTZFMT_PAT_POSITIVE_HM, | |
| /** | | /** | |
| * Positive offset with hour, minute and second fields | | * Positive offset with hour, minute and second fields | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZFMT_PAT_POSITIVE_HMS, | | UTZFMT_PAT_POSITIVE_HMS, | |
| /** | | /** | |
| * Negative offset with hour and minute fields | | * Negative offset with hour and minute fields | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZFMT_PAT_NEGATIVE_HM, | | UTZFMT_PAT_NEGATIVE_HM, | |
| /** | | /** | |
| * Negative offset with hour, minute and second fields | | * Negative offset with hour, minute and second fields | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZFMT_PAT_NEGATIVE_HMS | | UTZFMT_PAT_NEGATIVE_HMS | |
| } UTimeZoneFormatGMTOffsetPatternType; | | } UTimeZoneFormatGMTOffsetPatternType; | |
| | | | |
| /** | | /** | |
| * Constants for time types used by TimeZoneFormat APIs for | | * Constants for time types used by TimeZoneFormat APIs for | |
| * receiving time type (standard time, daylight time or unknown). | | * receiving time type (standard time, daylight time or unknown). | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| typedef enum UTimeZoneFormatTimeType { | | typedef enum UTimeZoneFormatTimeType { | |
| /** | | /** | |
| * Unknown | | * Unknown | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZFMT_TIME_TYPE_UNKNOWN, | | UTZFMT_TIME_TYPE_UNKNOWN, | |
| /** | | /** | |
| * Standard time | | * Standard time | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZFMT_TIME_TYPE_STANDARD, | | UTZFMT_TIME_TYPE_STANDARD, | |
| /** | | /** | |
| * Daylight saving time | | * Daylight saving time | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZFMT_TIME_TYPE_DAYLIGHT | | UTZFMT_TIME_TYPE_DAYLIGHT | |
| } UTimeZoneFormatTimeType; | | } UTimeZoneFormatTimeType; | |
| | | | |
| /** | | /** | |
| * Constants for parse option flags, used for specifying optional parse beh
avior. | | * Constants for parse option flags, used for specifying optional parse beh
avior. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| typedef enum UTimeZoneFormatParseOption { | | typedef enum UTimeZoneFormatParseOption { | |
| /** | | /** | |
| * No option. | | * No option. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZFMT_PARSE_OPTION_NONE = 0x00, | | UTZFMT_PARSE_OPTION_NONE = 0x00, | |
| /** | | /** | |
| * When a time zone display name is not found within a set of display n
ames | | * When a time zone display name is not found within a set of display n
ames | |
| * used for the specified style, look for the name from display names u
sed | | * used for the specified style, look for the name from display names u
sed | |
| * by other styles. | | * by other styles. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZFMT_PARSE_OPTION_ALL_STYLES = 0x01 | | UTZFMT_PARSE_OPTION_ALL_STYLES = 0x01 | |
| } UTimeZoneFormatParseOption; | | } UTimeZoneFormatParseOption; | |
| | | | |
| U_CDECL_END | | U_CDECL_END | |
| | | | |
|
| typedef void *UMTX; | | | |
| | | | |
| U_NAMESPACE_BEGIN | | U_NAMESPACE_BEGIN | |
| | | | |
| class TimeZoneGenericNames; | | class TimeZoneGenericNames; | |
| class UVector; | | class UVector; | |
| | | | |
| /** | | /** | |
| * <code>TimeZoneFormat</code> supports time zone display name formatting a
nd parsing. | | * <code>TimeZoneFormat</code> supports time zone display name formatting a
nd parsing. | |
| * An instance of TimeZoneFormat works as a subformatter of {@link SimpleDa
teFormat}, | | * An instance of TimeZoneFormat works as a subformatter of {@link SimpleDa
teFormat}, | |
| * but you can also directly get a new instance of <code>TimeZoneFormat</co
de> and | | * but you can also directly get a new instance of <code>TimeZoneFormat</co
de> and | |
| * formatting/parsing time zone display names. | | * formatting/parsing time zone display names. | |
| * <p> | | * <p> | |
| * ICU implements the time zone display names defined by <a href="http://ww
w.unicode.org/reports/tr35/">UTS#35 | | * ICU implements the time zone display names defined by <a href="http://ww
w.unicode.org/reports/tr35/">UTS#35 | |
| * Unicode Locale Data Markup Language (LDML)</a>. {@link TimeZoneNames} re
presents the | | * Unicode Locale Data Markup Language (LDML)</a>. {@link TimeZoneNames} re
presents the | |
| * time zone display name data model and this class implements the algorith
m for actual | | * time zone display name data model and this class implements the algorith
m for actual | |
| * formatting and parsing. | | * formatting and parsing. | |
| * | | * | |
| * @see SimpleDateFormat | | * @see SimpleDateFormat | |
| * @see TimeZoneNames | | * @see TimeZoneNames | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| class U_I18N_API TimeZoneFormat : public Format { | | class U_I18N_API TimeZoneFormat : public Format { | |
| public: | | public: | |
| /** | | /** | |
| * Copy constructor. | | * Copy constructor. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| TimeZoneFormat(const TimeZoneFormat& other); | | TimeZoneFormat(const TimeZoneFormat& other); | |
| | | | |
| /** | | /** | |
| * Destructor. | | * Destructor. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| virtual ~TimeZoneFormat(); | | virtual ~TimeZoneFormat(); | |
| | | | |
| /** | | /** | |
| * Assignment operator. | | * Assignment operator. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| TimeZoneFormat& operator=(const TimeZoneFormat& other); | | TimeZoneFormat& operator=(const TimeZoneFormat& other); | |
| | | | |
| /** | | /** | |
| * Return true if the given Format objects are semantically equal. | | * Return true if the given Format objects are semantically equal. | |
| * Objects of different subclasses are considered unequal. | | * Objects of different subclasses are considered unequal. | |
| * @param other The object to be compared with. | | * @param other The object to be compared with. | |
| * @return Return TRUE if the given Format objects are semantically equ
al. | | * @return Return TRUE if the given Format objects are semantically equ
al. | |
| * Objects of different subclasses are considered unequa
l. | | * Objects of different subclasses are considered unequa
l. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| virtual UBool operator==(const Format& other) const; | | virtual UBool operator==(const Format& other) const; | |
| | | | |
| /** | | /** | |
| * Clone this object polymorphically. The caller is responsible | | * Clone this object polymorphically. The caller is responsible | |
| * for deleting the result when done. | | * for deleting the result when done. | |
| * @return A copy of the object | | * @return A copy of the object | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| virtual Format* clone() const; | | virtual Format* clone() const; | |
| | | | |
| /** | | /** | |
| * Creates an instance of <code>TimeZoneFormat</code> for the given loc
ale. | | * Creates an instance of <code>TimeZoneFormat</code> for the given loc
ale. | |
| * @param locale The locale. | | * @param locale The locale. | |
| * @param status Recevies the status. | | * @param status Recevies the status. | |
| * @return An instance of <code>TimeZoneFormat</code> for the given loc
ale, | | * @return An instance of <code>TimeZoneFormat</code> for the given loc
ale, | |
| * owned by the caller. | | * owned by the caller. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| static TimeZoneFormat* U_EXPORT2 createInstance(const Locale& locale, U
ErrorCode& status); | | static TimeZoneFormat* U_EXPORT2 createInstance(const Locale& locale, U
ErrorCode& status); | |
| | | | |
| /** | | /** | |
| * Returns the time zone display name data used by this instance. | | * Returns the time zone display name data used by this instance. | |
| * @return The time zone display name data. | | * @return The time zone display name data. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| const TimeZoneNames* getTimeZoneNames() const; | | const TimeZoneNames* getTimeZoneNames() const; | |
| | | | |
| /** | | /** | |
| * Sets the time zone display name data to this format instnace. | | * Sets the time zone display name data to this format instnace. | |
| * The caller should not delete the TimeZoenNames object after it is ad
opted | | * The caller should not delete the TimeZoenNames object after it is ad
opted | |
| * by this call. | | * by this call. | |
| * @param tznames TimeZoneNames object to be adopted. | | * @param tznames TimeZoneNames object to be adopted. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| void adoptTimeZoneNames(TimeZoneNames *tznames); | | void adoptTimeZoneNames(TimeZoneNames *tznames); | |
| | | | |
| /** | | /** | |
| * Sets the time zone display name data to this format instnace. | | * Sets the time zone display name data to this format instnace. | |
| * @param tznames TimeZoneNames object to be set. | | * @param tznames TimeZoneNames object to be set. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| void setTimeZoneNames(const TimeZoneNames &tznames); | | void setTimeZoneNames(const TimeZoneNames &tznames); | |
| | | | |
| /** | | /** | |
| * Returns the localized GMT format pattern. | | * Returns the localized GMT format pattern. | |
| * @param pattern Receives the localized GMT format pattern. | | * @param pattern Receives the localized GMT format pattern. | |
| * @return A reference to the result pattern. | | * @return A reference to the result pattern. | |
| * @see #setGMTPattern | | * @see #setGMTPattern | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UnicodeString& getGMTPattern(UnicodeString& pattern) const; | | UnicodeString& getGMTPattern(UnicodeString& pattern) const; | |
| | | | |
| /** | | /** | |
| * Sets the localized GMT format pattern. The pattern must contain | | * Sets the localized GMT format pattern. The pattern must contain | |
| * a single argument {0}, for example "GMT {0}". | | * a single argument {0}, for example "GMT {0}". | |
| * @param pattern The localized GMT format pattern to be used by this o
bject. | | * @param pattern The localized GMT format pattern to be used by this o
bject. | |
| * @param status Recieves the status. | | * @param status Recieves the status. | |
| * @see #getGMTPattern | | * @see #getGMTPattern | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| void setGMTPattern(const UnicodeString& pattern, UErrorCode& status); | | void setGMTPattern(const UnicodeString& pattern, UErrorCode& status); | |
| | | | |
| /** | | /** | |
| * Returns the offset pattern used for localized GMT format. | | * Returns the offset pattern used for localized GMT format. | |
| * @param type The offset pattern type enum. | | * @param type The offset pattern type enum. | |
| * @param pattern Receives the offset pattern. | | * @param pattern Receives the offset pattern. | |
| * @return A reference to the result pattern. | | * @return A reference to the result pattern. | |
| * @see #setGMTOffsetPattern | | * @see #setGMTOffsetPattern | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UnicodeString& getGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType
type, UnicodeString& pattern) const; | | UnicodeString& getGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType
type, UnicodeString& pattern) const; | |
| | | | |
| /** | | /** | |
| * Sets the offset pattern for the given offset type. | | * Sets the offset pattern for the given offset type. | |
| * @param type The offset pattern type enum. | | * @param type The offset pattern type enum. | |
| * @param pattern The offset pattern used for localized GMT format for
the type. | | * @param pattern The offset pattern used for localized GMT format for
the type. | |
| * @param status Receives the status. | | * @param status Receives the status. | |
| * @see #getGMTOffsetPattern | | * @see #getGMTOffsetPattern | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| void setGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType type, cons
t UnicodeString& pattern, UErrorCode& status); | | void setGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType type, cons
t UnicodeString& pattern, UErrorCode& status); | |
| | | | |
| /** | | /** | |
|
| * Returns the decimal digit characters used for localized GMT format i | | * Returns the decimal digit characters used for localized GMT format. | |
| n a single string | | * The return string contains exactly 10 code points (may include Unico | |
| * containing from 0 to 9 in the ascending order. | | de | |
| | | * supplementary character) representing digit 0 to digit 9 in the asce | |
| | | nding | |
| | | * order. | |
| * @param digits Receives the decimal digits used for localized GMT for
mat. | | * @param digits Receives the decimal digits used for localized GMT for
mat. | |
| * @see #setGMTOffsetDigits | | * @see #setGMTOffsetDigits | |
|
| | | * @draft ICU 50 | |
| */ | | */ | |
| UnicodeString& getGMTOffsetDigits(UnicodeString& digits) const; | | UnicodeString& getGMTOffsetDigits(UnicodeString& digits) const; | |
| | | | |
| /** | | /** | |
| * Sets the decimal digit characters used for localized GMT format. | | * Sets the decimal digit characters used for localized GMT format. | |
|
| | | * The input <code>digits</code> must contain exactly 10 code points | |
| | | * (Unicode supplementary characters are also allowed) representing | |
| | | * digit 0 to digit 9 in the ascending order. When the input <code>digi | |
| | | ts</code> | |
| | | * does not satisfy the condition, <code>U_ILLEGAL_ARGUMENT_ERROR</code | |
| | | > | |
| | | * will be set to the return status. | |
| * @param digits The decimal digits used for localized GMT format. | | * @param digits The decimal digits used for localized GMT format. | |
| * @param status Receives the status. | | * @param status Receives the status. | |
| * @see #getGMTOffsetDigits | | * @see #getGMTOffsetDigits | |
|
| | | * @draft ICU 50 | |
| */ | | */ | |
| void setGMTOffsetDigits(const UnicodeString& digits, UErrorCode& status
); | | void setGMTOffsetDigits(const UnicodeString& digits, UErrorCode& status
); | |
| | | | |
| /** | | /** | |
| * Returns the localized GMT format string for GMT(UTC) itself (GMT off
set is 0). | | * Returns the localized GMT format string for GMT(UTC) itself (GMT off
set is 0). | |
| * @param gmtZeroFormat Receives the localized GMT string string for GM
T(UTC) itself. | | * @param gmtZeroFormat Receives the localized GMT string string for GM
T(UTC) itself. | |
| * @return A reference to the result GMT string. | | * @return A reference to the result GMT string. | |
| * @see #setGMTZeroFormat | | * @see #setGMTZeroFormat | |
|
| | | * @draft ICU 50 | |
| */ | | */ | |
| UnicodeString& getGMTZeroFormat(UnicodeString& gmtZeroFormat) const; | | UnicodeString& getGMTZeroFormat(UnicodeString& gmtZeroFormat) const; | |
| | | | |
| /** | | /** | |
| * Sets the localized GMT format string for GMT(UTC) itself (GMT offset
is 0). | | * Sets the localized GMT format string for GMT(UTC) itself (GMT offset
is 0). | |
| * @param gmtZeroFormat The localized GMT format string for GMT(UTC). | | * @param gmtZeroFormat The localized GMT format string for GMT(UTC). | |
| * @param status Receives the status. | | * @param status Receives the status. | |
| * @see #getGMTZeroFormat | | * @see #getGMTZeroFormat | |
|
| | | * @draft ICU 50 | |
| */ | | */ | |
| void setGMTZeroFormat(const UnicodeString& gmtZeroFormat, UErrorCode& s
tatus); | | void setGMTZeroFormat(const UnicodeString& gmtZeroFormat, UErrorCode& s
tatus); | |
| | | | |
| /** | | /** | |
| * Returns the bitwise flags of UTimeZoneFormatParseOption representing
the default parse | | * Returns the bitwise flags of UTimeZoneFormatParseOption representing
the default parse | |
| * options used by this object. | | * options used by this object. | |
| * @return the default parse options. | | * @return the default parse options. | |
| * @see ParseOption | | * @see ParseOption | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
|
| int32_t getDefaultParseOptions(void) const; | | uint32_t getDefaultParseOptions(void) const; | |
| | | | |
| /** | | /** | |
| * Sets the default parse options. | | * Sets the default parse options. | |
| * <p><b>Note</b>: By default, an instance of <code>TimeZoneFormat</cod
e> | | * <p><b>Note</b>: By default, an instance of <code>TimeZoneFormat</cod
e> | |
| * created by {@link #createInstance} has no parse options set (UTZFMT_
PARSE_OPTION_NONE). | | * created by {@link #createInstance} has no parse options set (UTZFMT_
PARSE_OPTION_NONE). | |
| * To specify multipe options, use bitwise flags of UTimeZoneFormatPars
eOption. | | * To specify multipe options, use bitwise flags of UTimeZoneFormatPars
eOption. | |
| * @see #UTimeZoneFormatParseOption | | * @see #UTimeZoneFormatParseOption | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
|
| void setDefaultParseOptions(int32_t flags); | | void setDefaultParseOptions(uint32_t flags); | |
| | | | |
| /** | | /** | |
| * Returns the RFC822 style time zone string for the given offset. | | * Returns the RFC822 style time zone string for the given offset. | |
| * For example, "-0800". | | * For example, "-0800". | |
| * @param offset The offset from GMT(UTC) in milliseconds. | | * @param offset The offset from GMT(UTC) in milliseconds. | |
| * @param result Recevies the RFC822 style GMT(UTC) offset format. | | * @param result Recevies the RFC822 style GMT(UTC) offset format. | |
| * @return A reference to the result. | | * @return A reference to the result. | |
|
| | | * @param status Receives the status | |
| * @see #parseOffsetRFC822 | | * @see #parseOffsetRFC822 | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UnicodeString& formatOffsetRFC822(int32_t offset, UnicodeString& result
, UErrorCode& status) const; | | UnicodeString& formatOffsetRFC822(int32_t offset, UnicodeString& result
, UErrorCode& status) const; | |
| | | | |
| /** | | /** | |
| * Returns the ISO 8601 style time zone string for the given offset. | | * Returns the ISO 8601 style time zone string for the given offset. | |
| * For example, "-08:00" and "Z". | | * For example, "-08:00" and "Z". | |
| * @param offset The offset from GMT(UTC) in milliseconds. | | * @param offset The offset from GMT(UTC) in milliseconds. | |
|
| * @param result Recevies the ISO 8601 style GMT(UTC) offset format. | | * @param result Receives the ISO 8601 style GMT(UTC) offset format. | |
| | | * @param status Receives the status | |
| * @return A reference to the result. | | * @return A reference to the result. | |
| * @see #parseOffsetISO8601 | | * @see #parseOffsetISO8601 | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UnicodeString& formatOffsetISO8601(int32_t offset, UnicodeString& resul
t, UErrorCode& status) const; | | UnicodeString& formatOffsetISO8601(int32_t offset, UnicodeString& resul
t, UErrorCode& status) const; | |
| | | | |
| /** | | /** | |
| * Returns the localized GMT(UTC) offset format for the given offset. | | * Returns the localized GMT(UTC) offset format for the given offset. | |
| * The localized GMT offset is defined by; | | * The localized GMT offset is defined by; | |
| * <ul> | | * <ul> | |
| * <li>GMT format pattern (e.g. "GMT {0}" - see {@link #getGMTPattern}) | | * <li>GMT format pattern (e.g. "GMT {0}" - see {@link #getGMTPattern}) | |
| * <li>Offset time pattern (e.g. "+HH:mm" - see {@link #getGMTOffsetPat
tern}) | | * <li>Offset time pattern (e.g. "+HH:mm" - see {@link #getGMTOffsetPat
tern}) | |
| * <li>Offset digits (e.g. "0123456789" - see {@link #getGMTOffsetDigit
s}) | | * <li>Offset digits (e.g. "0123456789" - see {@link #getGMTOffsetDigit
s}) | |
| * <li>GMT zero format (e.g. "GMT" - see {@link #getGMTZeroFormat}) | | * <li>GMT zero format (e.g. "GMT" - see {@link #getGMTZeroFormat}) | |
| * </ul> | | * </ul> | |
| * @param offset the offset from GMT(UTC) in milliseconds. | | * @param offset the offset from GMT(UTC) in milliseconds. | |
|
| | | * @param status Receives the status | |
| * @param result Receives the localized GMT format string. | | * @param result Receives the localized GMT format string. | |
| * @return A reference to the result. | | * @return A reference to the result. | |
| * @see #parseOffsetLocalizedGMT | | * @see #parseOffsetLocalizedGMT | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UnicodeString& formatOffsetLocalizedGMT(int32_t offset, UnicodeString&
result, UErrorCode& status) const; | | UnicodeString& formatOffsetLocalizedGMT(int32_t offset, UnicodeString&
result, UErrorCode& status) const; | |
| | | | |
|
| | | using Format::format; | |
| | | | |
| /** | | /** | |
| * Returns the display name of the time zone at the given date for the
style. | | * Returns the display name of the time zone at the given date for the
style. | |
| * @param style The style (e.g. <code>UTZFMT_STYLE_GENERIC_LONG</code>,
<code>UTZFMT_STYLE_LOCALIZED_GMT</code>...) | | * @param style The style (e.g. <code>UTZFMT_STYLE_GENERIC_LONG</code>,
<code>UTZFMT_STYLE_LOCALIZED_GMT</code>...) | |
| * @param tz The time zone. | | * @param tz The time zone. | |
| * @param date The date. | | * @param date The date. | |
| * @param name Receives the display name. | | * @param name Receives the display name. | |
| * @param timeType the output argument for receiving the time type (sta
ndard/daylight/unknown) | | * @param timeType the output argument for receiving the time type (sta
ndard/daylight/unknown) | |
| * used for the display name, or NULL if the information is not necessa
ry. | | * used for the display name, or NULL if the information is not necessa
ry. | |
| * @return A reference to the result | | * @return A reference to the result | |
| * @see #UTimeZoneFormatStyle | | * @see #UTimeZoneFormatStyle | |
| * @see #UTimeZoneFormatTimeType | | * @see #UTimeZoneFormatTimeType | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| virtual UnicodeString& format(UTimeZoneFormatStyle style, const TimeZon
e& tz, UDate date, | | virtual UnicodeString& format(UTimeZoneFormatStyle style, const TimeZon
e& tz, UDate date, | |
| UnicodeString& name, UTimeZoneFormatTimeType* timeType = NULL) cons
t; | | UnicodeString& name, UTimeZoneFormatTimeType* timeType = NULL) cons
t; | |
| | | | |
| /** | | /** | |
| * Returns offset from GMT(UTC) in milliseconds for the given RFC822 | | * Returns offset from GMT(UTC) in milliseconds for the given RFC822 | |
| * style time zone string. When the given string is not an RFC822 time
zone | | * style time zone string. When the given string is not an RFC822 time
zone | |
| * string, this method sets the current position as the error index | | * string, this method sets the current position as the error index | |
| * to <code>ParsePosition pos</code> and returns 0. | | * to <code>ParsePosition pos</code> and returns 0. | |
| * @param text The text contains RFC822 style time zone string (e.g. "-
0800") | | * @param text The text contains RFC822 style time zone string (e.g. "-
0800") | |
| * at the position. | | * at the position. | |
| * @param pos The ParsePosition object. | | * @param pos The ParsePosition object. | |
| * @return The offset from GMT(UTC) in milliseconds for the given RFC82
2 style | | * @return The offset from GMT(UTC) in milliseconds for the given RFC82
2 style | |
| * time zone string. | | * time zone string. | |
| * @see #formatOffsetRFC822 | | * @see #formatOffsetRFC822 | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| int32_t parseOffsetRFC822(const UnicodeString& text, ParsePosition& pos
) const; | | int32_t parseOffsetRFC822(const UnicodeString& text, ParsePosition& pos
) const; | |
| | | | |
| /** | | /** | |
| * Returns offset from GMT(UTC) in milliseconds for the given ISO 8601 | | * Returns offset from GMT(UTC) in milliseconds for the given ISO 8601 | |
| * style time zone string. When the given string is not an ISO 8601 tim
e zone | | * style time zone string. When the given string is not an ISO 8601 tim
e zone | |
| * string, this method sets the current position as the error index | | * string, this method sets the current position as the error index | |
| * to <code>ParsePosition pos</code> and returns 0. | | * to <code>ParsePosition pos</code> and returns 0. | |
|
| * @param text The text contains RFC822 style time zone string (e.g. "-
08:00", "Z") | | * @param text The text contains ISO8601 style time zone string (e.g. "
-08:00", "Z") | |
| * at the position. | | * at the position. | |
| * @param pos The ParsePosition object. | | * @param pos The ParsePosition object. | |
| * @return The offset from GMT(UTC) in milliseconds for the given ISO 8
601 style | | * @return The offset from GMT(UTC) in milliseconds for the given ISO 8
601 style | |
| * time zone string. | | * time zone string. | |
| * @see #formatOffsetISO8601 | | * @see #formatOffsetISO8601 | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| int32_t parseOffsetISO8601(const UnicodeString& text, ParsePosition& po
s) const; | | int32_t parseOffsetISO8601(const UnicodeString& text, ParsePosition& po
s) const; | |
| | | | |
| /** | | /** | |
| * Returns offset from GMT(UTC) in milliseconds for the given localized
GMT | | * Returns offset from GMT(UTC) in milliseconds for the given localized
GMT | |
| * offset format string. When the given string cannot be parsed, this m
ethod | | * offset format string. When the given string cannot be parsed, this m
ethod | |
| * sets the current position as the error index to <code>ParsePosition
pos</code> | | * sets the current position as the error index to <code>ParsePosition
pos</code> | |
| * and returns 0. | | * and returns 0. | |
| * @param text The text contains a localized GMT offset string at the p
osition. | | * @param text The text contains a localized GMT offset string at the p
osition. | |
| * @param pos The ParsePosition object. | | * @param pos The ParsePosition object. | |
| * @return The offset from GMT(UTC) in milliseconds for the given local
ized GMT | | * @return The offset from GMT(UTC) in milliseconds for the given local
ized GMT | |
| * offset format string. | | * offset format string. | |
| * @see #formatOffsetLocalizedGMT | | * @see #formatOffsetLocalizedGMT | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| int32_t parseOffsetLocalizedGMT(const UnicodeString& text, ParsePositio
n& pos) const; | | int32_t parseOffsetLocalizedGMT(const UnicodeString& text, ParsePositio
n& pos) const; | |
| | | | |
| /** | | /** | |
| * Returns a <code>TimeZone</code> by parsing the time zone string acco
rding to | | * Returns a <code>TimeZone</code> by parsing the time zone string acco
rding to | |
| * the given parse position, the specified format style and parse optio
ns. | | * the given parse position, the specified format style and parse optio
ns. | |
| * | | * | |
| * @param text The text contains a time zone string at the position. | | * @param text The text contains a time zone string at the position. | |
| * @param style The format style | | * @param style The format style | |
| * @param pos The position. | | * @param pos The position. | |
| * @param parseOptions The parse options repesented by bitwise flags of
UTimeZoneFormatParseOption. | | * @param parseOptions The parse options repesented by bitwise flags of
UTimeZoneFormatParseOption. | |
| * @param timeType The output argument for receiving the time type (sta
ndard/daylight/unknown), | | * @param timeType The output argument for receiving the time type (sta
ndard/daylight/unknown), | |
| * or NULL if the information is not necessary. | | * or NULL if the information is not necessary. | |
| * @return A <code>TimeZone</code>, or null if the input could not be p
arsed. | | * @return A <code>TimeZone</code>, or null if the input could not be p
arsed. | |
| * @see UTimeZoneFormatStyle | | * @see UTimeZoneFormatStyle | |
| * @see UTimeZoneFormatParseOption | | * @see UTimeZoneFormatParseOption | |
| * @see UTimeZoneFormatTimeType | | * @see UTimeZoneFormatTimeType | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| virtual TimeZone* parse(UTimeZoneFormatStyle style, const UnicodeString
& text, ParsePosition& pos, | | virtual TimeZone* parse(UTimeZoneFormatStyle style, const UnicodeString
& text, ParsePosition& pos, | |
| int32_t parseOptions, UTimeZoneFormatTimeType* timeType = NULL) con
st; | | int32_t parseOptions, UTimeZoneFormatTimeType* timeType = NULL) con
st; | |
| | | | |
| /** | | /** | |
| * Returns a <code>TimeZone</code> by parsing the time zone string acco
rding to | | * Returns a <code>TimeZone</code> by parsing the time zone string acco
rding to | |
| * the given parse position, the specified format style and the default
parse options. | | * the given parse position, the specified format style and the default
parse options. | |
| * | | * | |
| * @param text The text contains a time zone string at the position. | | * @param text The text contains a time zone string at the position. | |
| * @param style The format style | | * @param style The format style | |
| * @param pos The position. | | * @param pos The position. | |
| * @param timeType The output argument for receiving the time type (sta
ndard/daylight/unknown), | | * @param timeType The output argument for receiving the time type (sta
ndard/daylight/unknown), | |
| * or NULL if the information is not necessary. | | * or NULL if the information is not necessary. | |
| * @return A <code>TimeZone</code>, or null if the input could not be p
arsed. | | * @return A <code>TimeZone</code>, or null if the input could not be p
arsed. | |
| * @see UTimeZoneFormatStyle | | * @see UTimeZoneFormatStyle | |
| * @see UTimeZoneFormatParseOption | | * @see UTimeZoneFormatParseOption | |
| * @see UTimeZoneFormatTimeType | | * @see UTimeZoneFormatTimeType | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| TimeZone* parse(UTimeZoneFormatStyle style, const UnicodeString& text,
ParsePosition& pos, | | TimeZone* parse(UTimeZoneFormatStyle style, const UnicodeString& text,
ParsePosition& pos, | |
| UTimeZoneFormatTimeType* timeType = NULL) const; | | UTimeZoneFormatTimeType* timeType = NULL) const; | |
| | | | |
| /* ---------------------------------------------- | | /* ---------------------------------------------- | |
| * Format APIs | | * Format APIs | |
| * ---------------------------------------------- */ | | * ---------------------------------------------- */ | |
| | | | |
| /** | | /** | |
| * Format an object to produce a time zone display string using localiz
ed GMT offset format. | | * Format an object to produce a time zone display string using localiz
ed GMT offset format. | |
| * This method handles Formattable objects with a <code>TimeZone</code>
. If a the Formattable | | * This method handles Formattable objects with a <code>TimeZone</code>
. If a the Formattable | |
| * object type is not a <code>TimeZone</code>, then it returns a failin
g UErrorCode. | | * object type is not a <code>TimeZone</code>, then it returns a failin
g UErrorCode. | |
| * @param obj The object to format. Must be a <code>TimeZone</code>. | | * @param obj The object to format. Must be a <code>TimeZone</code>. | |
| * @param appendTo Output parameter to receive result. Result is append
ed to existing contents. | | * @param appendTo Output parameter to receive result. Result is append
ed to existing contents. | |
| * @param pos On input: an alignment field, if desired. On output: the
offsets of the alignment field. | | * @param pos On input: an alignment field, if desired. On output: the
offsets of the alignment field. | |
| * @param status Output param filled with success/failure status. | | * @param status Output param filled with success/failure status. | |
| * @return Reference to 'appendTo' parameter. | | * @return Reference to 'appendTo' parameter. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| virtual UnicodeString& format(const Formattable& obj, UnicodeString& ap
pendTo, | | virtual UnicodeString& format(const Formattable& obj, UnicodeString& ap
pendTo, | |
| FieldPosition& pos, UErrorCode& status) const; | | FieldPosition& pos, UErrorCode& status) const; | |
| | | | |
| /** | | /** | |
| * Parse a string to produce an object. This methods handles parsing of | | * Parse a string to produce an object. This methods handles parsing of | |
| * time zone display strings into Formattable objects with <code>TimeZo
ne</code>. | | * time zone display strings into Formattable objects with <code>TimeZo
ne</code>. | |
| * @param source The string to be parsed into an object. | | * @param source The string to be parsed into an object. | |
| * @param result Formattable to be set to the parse result. If parse fa
ils, return contents are undefined. | | * @param result Formattable to be set to the parse result. If parse fa
ils, return contents are undefined. | |
| * @param parse_pos The position to start parsing at. Upon return this
param is set to the position after the | | * @param parse_pos The position to start parsing at. Upon return this
param is set to the position after the | |
| * last character successfully parsed. If the source i
s not parsed successfully, this param | | * last character successfully parsed. If the source i
s not parsed successfully, this param | |
| * will remain unchanged. | | * will remain unchanged. | |
| * @return A newly created Formattable* object, or NULL on failure. Th
e caller owns this and should | | * @return A newly created Formattable* object, or NULL on failure. Th
e caller owns this and should | |
| * delete it when done. | | * delete it when done. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| virtual void parseObject(const UnicodeString& source, Formattable& resu
lt, ParsePosition& parse_pos) const; | | virtual void parseObject(const UnicodeString& source, Formattable& resu
lt, ParsePosition& parse_pos) const; | |
| | | | |
| /** | | /** | |
| * ICU "poor man's RTTI", returns a UClassID for this class. | | * ICU "poor man's RTTI", returns a UClassID for this class. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| static UClassID U_EXPORT2 getStaticClassID(void); | | static UClassID U_EXPORT2 getStaticClassID(void); | |
| | | | |
| /** | | /** | |
| * ICU "poor man's RTTI", returns a UClassID for the actual class. | | * ICU "poor man's RTTI", returns a UClassID for the actual class. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| virtual UClassID getDynamicClassID() const; | | virtual UClassID getDynamicClassID() const; | |
| | | | |
| protected: | | protected: | |
| /** | | /** | |
| * Constructs a TimeZoneFormat object for the specified locale. | | * Constructs a TimeZoneFormat object for the specified locale. | |
| * @param locale the locale | | * @param locale the locale | |
| * @param status receives the status. | | * @param status receives the status. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| TimeZoneFormat(const Locale& locale, UErrorCode& status); | | TimeZoneFormat(const Locale& locale, UErrorCode& status); | |
| | | | |
| private: | | private: | |
|
| /* mutex */ | | | |
| UMTX fLock; | | | |
| | | | |
| /* Locale of this object */ | | /* Locale of this object */ | |
| Locale fLocale; | | Locale fLocale; | |
| | | | |
| /* Stores the region (could be implicit default) */ | | /* Stores the region (could be implicit default) */ | |
| char fTargetRegion[ULOC_COUNTRY_CAPACITY]; | | char fTargetRegion[ULOC_COUNTRY_CAPACITY]; | |
| | | | |
| /* TimeZoneNames object used by this formatter */ | | /* TimeZoneNames object used by this formatter */ | |
| TimeZoneNames* fTimeZoneNames; | | TimeZoneNames* fTimeZoneNames; | |
| | | | |
| /* TimeZoneGenericNames object used by this formatter - lazily instanti
ated */ | | /* TimeZoneGenericNames object used by this formatter - lazily instanti
ated */ | |
| | | | |
| skipping to change at line 545 | | skipping to change at line 556 | |
| /* Array of offset patterns used by Localized GMT format - e.g. "+HH:mm
" */ | | /* Array of offset patterns used by Localized GMT format - e.g. "+HH:mm
" */ | |
| UnicodeString fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HMS + 1]; | | UnicodeString fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HMS + 1]; | |
| | | | |
| /* Localized decimal digits used by Localized GMT format */ | | /* Localized decimal digits used by Localized GMT format */ | |
| UChar32 fGMTOffsetDigits[10]; | | UChar32 fGMTOffsetDigits[10]; | |
| | | | |
| /* Localized GMT zero format - e.g. "GMT" */ | | /* Localized GMT zero format - e.g. "GMT" */ | |
| UnicodeString fGMTZeroFormat; | | UnicodeString fGMTZeroFormat; | |
| | | | |
| /* Bit flags representing parse options */ | | /* Bit flags representing parse options */ | |
|
| int32_t fDefParseOptionFlags; | | uint32_t fDefParseOptionFlags; | |
| | | | |
| /* Constant parts of GMT format pattern, populated from localized GMT f
ormat pattern*/ | | /* Constant parts of GMT format pattern, populated from localized GMT f
ormat pattern*/ | |
| UnicodeString fGMTPatternPrefix; /* Substring before {0} */ | | UnicodeString fGMTPatternPrefix; /* Substring before {0} */ | |
| UnicodeString fGMTPatternSuffix; /* Substring after {0} */ | | UnicodeString fGMTPatternSuffix; /* Substring after {0} */ | |
| | | | |
| /* Compiled offset patterns generated from fGMTOffsetPatterns[] */ | | /* Compiled offset patterns generated from fGMTOffsetPatterns[] */ | |
| UVector* fGMTOffsetPatternItems[UTZFMT_PAT_NEGATIVE_HMS + 1]; | | UVector* fGMTOffsetPatternItems[UTZFMT_PAT_NEGATIVE_HMS + 1]; | |
| | | | |
| /** | | /** | |
| * Returns the time zone's specific format string. | | * Returns the time zone's specific format string. | |
| | | | |
End of changes. 67 change blocks. |
| 64 lines changed or deleted | | 78 lines changed or added | |
|
| tznames.h | | tznames.h | |
| | | | |
| skipping to change at line 26 | | skipping to change at line 26 | |
| #if !UCONFIG_NO_FORMATTING | | #if !UCONFIG_NO_FORMATTING | |
| #ifndef U_HIDE_INTERNAL_API | | #ifndef U_HIDE_INTERNAL_API | |
| | | | |
| #include "unicode/uloc.h" | | #include "unicode/uloc.h" | |
| #include "unicode/unistr.h" | | #include "unicode/unistr.h" | |
| | | | |
| U_CDECL_BEGIN | | U_CDECL_BEGIN | |
| | | | |
| /** | | /** | |
| * Constants for time zone display name types. | | * Constants for time zone display name types. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| typedef enum UTimeZoneNameType { | | typedef enum UTimeZoneNameType { | |
| /** | | /** | |
| * Unknown display name type. | | * Unknown display name type. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZNM_UNKNOWN = 0x00, | | UTZNM_UNKNOWN = 0x00, | |
| /** | | /** | |
| * Long display name, such as "Eastern Time". | | * Long display name, such as "Eastern Time". | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZNM_LONG_GENERIC = 0x01, | | UTZNM_LONG_GENERIC = 0x01, | |
| /** | | /** | |
| * Long display name for standard time, such as "Eastern Standard Time"
. | | * Long display name for standard time, such as "Eastern Standard Time"
. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZNM_LONG_STANDARD = 0x02, | | UTZNM_LONG_STANDARD = 0x02, | |
| /** | | /** | |
| * Long display name for daylight saving time, such as "Eastern Dayligh
t Time". | | * Long display name for daylight saving time, such as "Eastern Dayligh
t Time". | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZNM_LONG_DAYLIGHT = 0x04, | | UTZNM_LONG_DAYLIGHT = 0x04, | |
| /** | | /** | |
| * Short display name, such as "ET". | | * Short display name, such as "ET". | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZNM_SHORT_GENERIC = 0x08, | | UTZNM_SHORT_GENERIC = 0x08, | |
| /** | | /** | |
| * Short display name for standard time, such as "EST". | | * Short display name for standard time, such as "EST". | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZNM_SHORT_STANDARD = 0x10, | | UTZNM_SHORT_STANDARD = 0x10, | |
| /** | | /** | |
| * Short display name for daylight saving time, such as "EDT". | | * Short display name for daylight saving time, such as "EDT". | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UTZNM_SHORT_DAYLIGHT = 0x20 | | UTZNM_SHORT_DAYLIGHT = 0x20 | |
| } UTimeZoneNameType; | | } UTimeZoneNameType; | |
| | | | |
| U_CDECL_END | | U_CDECL_END | |
| | | | |
| U_NAMESPACE_BEGIN | | U_NAMESPACE_BEGIN | |
| | | | |
| class UVector; | | class UVector; | |
| struct MatchInfo; | | struct MatchInfo; | |
| | | | |
| skipping to change at line 114 | | skipping to change at line 114 | |
| * For example, time zone "Europe/London" has English long name for standar
d time "Greenwich Mean Time", which is also | | * For example, time zone "Europe/London" has English long name for standar
d time "Greenwich Mean Time", which is also | |
| * shared with other time zones. However, the long name for daylight saving
time is "British Summer Time", which is only | | * shared with other time zones. However, the long name for daylight saving
time is "British Summer Time", which is only | |
| * used for "Europe/London". | | * used for "Europe/London". | |
| * | | * | |
| * <p> | | * <p> | |
| * {@link #getTimeZoneDisplayName} is designed for accessing a name only us
ed by a single time zone. | | * {@link #getTimeZoneDisplayName} is designed for accessing a name only us
ed by a single time zone. | |
| * But is not necessarily mean that a subclass implementation use the same
model with CLDR. A subclass implementation | | * But is not necessarily mean that a subclass implementation use the same
model with CLDR. A subclass implementation | |
| * may provide time zone names only through {@link #getTimeZoneDisplayName}
, or only through {@link #getMetaZoneDisplayName}, | | * may provide time zone names only through {@link #getTimeZoneDisplayName}
, or only through {@link #getMetaZoneDisplayName}, | |
| * or both. | | * or both. | |
| * | | * | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| class U_I18N_API TimeZoneNames : public UObject { | | class U_I18N_API TimeZoneNames : public UObject { | |
| public: | | public: | |
| /** | | /** | |
| * Destructor. | | * Destructor. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| virtual ~TimeZoneNames(); | | virtual ~TimeZoneNames(); | |
| | | | |
| /** | | /** | |
| * Return true if the given TimeZoneNames objects are emantically equal
. | | * Return true if the given TimeZoneNames objects are emantically equal
. | |
| * @param other the object to be compared with. | | * @param other the object to be compared with. | |
| * @return Return TRUE if the given Format objects are semantically equ
al. | | * @return Return TRUE if the given Format objects are semantically equ
al. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| virtual UBool operator==(const TimeZoneNames& other) const = 0; | | virtual UBool operator==(const TimeZoneNames& other) const = 0; | |
| | | | |
| /** | | /** | |
| * Return true if the given TimeZoneNames objects are not semantically | | * Return true if the given TimeZoneNames objects are not semantically | |
| * equal. | | * equal. | |
| * @param other the object to be compared with. | | * @param other the object to be compared with. | |
| * @return Return TRUE if the given Format objects are not semantically
equal. | | * @return Return TRUE if the given Format objects are not semantically
equal. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| UBool operator!=(const TimeZoneNames& other) const { return !operator==
(other); } | | UBool operator!=(const TimeZoneNames& other) const { return !operator==
(other); } | |
| | | | |
| /** | | /** | |
| * Clone this object polymorphically. The caller is responsible | | * Clone this object polymorphically. The caller is responsible | |
| * for deleting the result when done. | | * for deleting the result when done. | |
| * @return A copy of the object | | * @return A copy of the object | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| virtual TimeZoneNames* clone() const = 0; | | virtual TimeZoneNames* clone() const = 0; | |
| | | | |
| /** | | /** | |
| * Returns an instance of <code>TimeZoneDisplayNames</code> for the spe
cified locale. | | * Returns an instance of <code>TimeZoneDisplayNames</code> for the spe
cified locale. | |
| * | | * | |
| * @param locale The locale. | | * @param locale The locale. | |
| * @param status Recevies the status. | | * @param status Recevies the status. | |
| * @return An instance of <code>TimeZoneDisplayNames</code> | | * @return An instance of <code>TimeZoneDisplayNames</code> | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| static TimeZoneNames* U_EXPORT2 createInstance(const Locale& locale, UE
rrorCode& status); | | static TimeZoneNames* U_EXPORT2 createInstance(const Locale& locale, UE
rrorCode& status); | |
| | | | |
| /** | | /** | |
| * Returns an enumeration of all available meta zone IDs. | | * Returns an enumeration of all available meta zone IDs. | |
| * @param status Recevies the status. | | * @param status Recevies the status. | |
| * @return an enumeration object, owned by the caller. | | * @return an enumeration object, owned by the caller. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| virtual StringEnumeration* getAvailableMetaZoneIDs(UErrorCode& status)
const = 0; | | virtual StringEnumeration* getAvailableMetaZoneIDs(UErrorCode& status)
const = 0; | |
| | | | |
| /** | | /** | |
| * Returns an enumeration of all available meta zone IDs used by the gi
ven time zone. | | * Returns an enumeration of all available meta zone IDs used by the gi
ven time zone. | |
| * @param tzID The canoical tiem zone ID. | | * @param tzID The canoical tiem zone ID. | |
| * @param status Recevies the status. | | * @param status Recevies the status. | |
| * @return an enumeration object, owned by the caller. | | * @return an enumeration object, owned by the caller. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| virtual StringEnumeration* getAvailableMetaZoneIDs(const UnicodeString&
tzID, UErrorCode& status) const = 0; | | virtual StringEnumeration* getAvailableMetaZoneIDs(const UnicodeString&
tzID, UErrorCode& status) const = 0; | |
| | | | |
| /** | | /** | |
| * Returns the meta zone ID for the given canonical time zone ID at the
given date. | | * Returns the meta zone ID for the given canonical time zone ID at the
given date. | |
| * @param tzID The canonical time zone ID. | | * @param tzID The canonical time zone ID. | |
| * @param date The date. | | * @param date The date. | |
| * @param mzID Receives the meta zone ID for the given time zone ID at
the given date. If the time zone does not have a | | * @param mzID Receives the meta zone ID for the given time zone ID at
the given date. If the time zone does not have a | |
| * corresponding meta zone at the given date or the implementa
tion does not support meta zones, "bogus" state | | * corresponding meta zone at the given date or the implementa
tion does not support meta zones, "bogus" state | |
| * is set. | | * is set. | |
| * @return A reference to the result. | | * @return A reference to the result. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| virtual UnicodeString& getMetaZoneID(const UnicodeString& tzID, UDate d
ate, UnicodeString& mzID) const = 0; | | virtual UnicodeString& getMetaZoneID(const UnicodeString& tzID, UDate d
ate, UnicodeString& mzID) const = 0; | |
| | | | |
| /** | | /** | |
| * Returns the reference zone ID for the given meta zone ID for the reg
ion. | | * Returns the reference zone ID for the given meta zone ID for the reg
ion. | |
| * @param mzID The meta zone ID. | | * @param mzID The meta zone ID. | |
| * @param region The region. | | * @param region The region. | |
| * @param tzID Receives the reference zone ID ("golden zone" in the LDM
L specification) for the given time zone ID for the | | * @param tzID Receives the reference zone ID ("golden zone" in the LDM
L specification) for the given time zone ID for the | |
| * region. If the meta zone is unknown or the implementation d
oes not support meta zones, "bogus" state | | * region. If the meta zone is unknown or the implementation d
oes not support meta zones, "bogus" state | |
| * is set. | | * is set. | |
| * @return A reference to the result. | | * @return A reference to the result. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| virtual UnicodeString& getReferenceZoneID(const UnicodeString& mzID, co
nst char* region, UnicodeString& tzID) const = 0; | | virtual UnicodeString& getReferenceZoneID(const UnicodeString& mzID, co
nst char* region, UnicodeString& tzID) const = 0; | |
| | | | |
| /** | | /** | |
| * Returns the display name of the meta zone. | | * Returns the display name of the meta zone. | |
| * @param mzID The meta zone ID. | | * @param mzID The meta zone ID. | |
| * @param type The display name type. See {@link #UTimeZoneNameType}. | | * @param type The display name type. See {@link #UTimeZoneNameType}. | |
| * @param name Receives the display name of the meta zone. When this ob
ject does not have a localized display name for the given | | * @param name Receives the display name of the meta zone. When this ob
ject does not have a localized display name for the given | |
| * meta zone with the specified type or the implementation does
not provide any display names associated | | * meta zone with the specified type or the implementation does
not provide any display names associated | |
| * with meta zones, "bogus" state is set. | | * with meta zones, "bogus" state is set. | |
| * @return A reference to the result. | | * @return A reference to the result. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| virtual UnicodeString& getMetaZoneDisplayName(const UnicodeString& mzID
, UTimeZoneNameType type, UnicodeString& name) const = 0; | | virtual UnicodeString& getMetaZoneDisplayName(const UnicodeString& mzID
, UTimeZoneNameType type, UnicodeString& name) const = 0; | |
| | | | |
| /** | | /** | |
| * Returns the display name of the time zone. Unlike {@link #getDisplay
Name}, | | * Returns the display name of the time zone. Unlike {@link #getDisplay
Name}, | |
| * this method does not get a name from a meta zone used by the time zo
ne. | | * this method does not get a name from a meta zone used by the time zo
ne. | |
| * @param tzID The canonical time zone ID. | | * @param tzID The canonical time zone ID. | |
| * @param type The display name type. See {@link #UTimeZoneNameType}. | | * @param type The display name type. See {@link #UTimeZoneNameType}. | |
| * @param name Receives the display name for the time zone. When this o
bject does not have a localized display name for the given | | * @param name Receives the display name for the time zone. When this o
bject does not have a localized display name for the given | |
| * time zone with the specified type, "bogus" state is set. | | * time zone with the specified type, "bogus" state is set. | |
| * @return A reference to the result. | | * @return A reference to the result. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| virtual UnicodeString& getTimeZoneDisplayName(const UnicodeString& tzID
, UTimeZoneNameType type, UnicodeString& name) const = 0; | | virtual UnicodeString& getTimeZoneDisplayName(const UnicodeString& tzID
, UTimeZoneNameType type, UnicodeString& name) const = 0; | |
| | | | |
| /** | | /** | |
| * Returns the exemplar location name for the given time zone. When thi
s object does not have a localized location | | * Returns the exemplar location name for the given time zone. When thi
s object does not have a localized location | |
| * name, the default implementation may still returns a programmaticall
y generated name with the logic described | | * name, the default implementation may still returns a programmaticall
y generated name with the logic described | |
| * below. | | * below. | |
| * <ol> | | * <ol> | |
| * <li>Check if the ID contains "/". If not, return null. | | * <li>Check if the ID contains "/". If not, return null. | |
| * <li>Check if the ID does not start with "Etc/" or "SystemV/". If it
does, return null. | | * <li>Check if the ID does not start with "Etc/" or "SystemV/". If it
does, return null. | |
| * <li>Extract a substring after the last occurrence of "/". | | * <li>Extract a substring after the last occurrence of "/". | |
| * <li>Replace "_" with " ". | | * <li>Replace "_" with " ". | |
| * </ol> | | * </ol> | |
| * For example, "New York" is returned for the time zone ID "America/Ne
w_York" when this object does not have the | | * For example, "New York" is returned for the time zone ID "America/Ne
w_York" when this object does not have the | |
| * localized location name. | | * localized location name. | |
| * | | * | |
| * @param tzID The canonical time zone ID | | * @param tzID The canonical time zone ID | |
| * @param name Receives the exemplar location name for the given time z
one, or "bogus" state is set when a localized | | * @param name Receives the exemplar location name for the given time z
one, or "bogus" state is set when a localized | |
| * location name is not available and the fallback logic descr
ibed above cannot extract location from the ID. | | * location name is not available and the fallback logic descr
ibed above cannot extract location from the ID. | |
| * @return A reference to the result. | | * @return A reference to the result. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| virtual UnicodeString& getExemplarLocationName(const UnicodeString& tzI
D, UnicodeString& name) const; | | virtual UnicodeString& getExemplarLocationName(const UnicodeString& tzI
D, UnicodeString& name) const; | |
| | | | |
| /** | | /** | |
| * Returns the display name of the time zone at the given date. | | * Returns the display name of the time zone at the given date. | |
| * <p> | | * <p> | |
| * <b>Note:</b> This method calls the subclass's {@link #getTimeZoneDis
playName} first. When the | | * <b>Note:</b> This method calls the subclass's {@link #getTimeZoneDis
playName} first. When the | |
| * result is bogus, this method calls {@link #getMetaZoneID} to get the
meta zone ID mapped from the | | * result is bogus, this method calls {@link #getMetaZoneID} to get the
meta zone ID mapped from the | |
| * time zone, then calls {@link #getMetaZoneDisplayName}. | | * time zone, then calls {@link #getMetaZoneDisplayName}. | |
| * | | * | |
| * @param tzID The canonical time zone ID. | | * @param tzID The canonical time zone ID. | |
| * @param type The display name type. See {@link #UTimeZoneNameType}. | | * @param type The display name type. See {@link #UTimeZoneNameType}. | |
| * @param date The date. | | * @param date The date. | |
| * @param name Receives the display name for the time zone at the given
date. When this object does not have a localized display | | * @param name Receives the display name for the time zone at the given
date. When this object does not have a localized display | |
| * name for the time zone with the specified type and date, "b
ogus" state is set. | | * name for the time zone with the specified type and date, "b
ogus" state is set. | |
| * @return A reference to the result. | | * @return A reference to the result. | |
|
| * @internal ICU 49 technology preview | | * @draft ICU 50 | |
| */ | | */ | |
| virtual UnicodeString& getDisplayName(const UnicodeString& tzID, UTimeZ
oneNameType type, UDate date, UnicodeString& name) const; | | virtual UnicodeString& getDisplayName(const UnicodeString& tzID, UTimeZ
oneNameType type, UDate date, UnicodeString& name) const; | |
| | | | |
| /** | | /** | |
| * <code>MatchInfoCollection</code> represents a collection of time zon
e name matches used by | | * <code>MatchInfoCollection</code> represents a collection of time zon
e name matches used by | |
| * {@link TimeZoneNames#find}. | | * {@link TimeZoneNames#find}. | |
|
| * @internal ICU 49 technology preview | | * @internal | |
| */ | | */ | |
| class U_I18N_API MatchInfoCollection : public UMemory { | | class U_I18N_API MatchInfoCollection : public UMemory { | |
| public: | | public: | |
| /** | | /** | |
| * Constructor. | | * Constructor. | |
|
| * @internal ICU 49 technology preview | | * @internal | |
| */ | | */ | |
| MatchInfoCollection(); | | MatchInfoCollection(); | |
| /** | | /** | |
| * Destructor. | | * Destructor. | |
|
| * @internal ICU 49 technology preview | | * @internal | |
| */ | | */ | |
| virtual ~MatchInfoCollection(); | | virtual ~MatchInfoCollection(); | |
| | | | |
| /** | | /** | |
| * Adds a zone match. | | * Adds a zone match. | |
| * @param nameType The name type. | | * @param nameType The name type. | |
| * @param matchLength The match length. | | * @param matchLength The match length. | |
| * @param tzID The time zone ID. | | * @param tzID The time zone ID. | |
| * @param status Receives the status | | * @param status Receives the status | |
|
| * @internal ICU 49 technology preview | | * @internal | |
| */ | | */ | |
| void addZone(UTimeZoneNameType nameType, int32_t matchLength, | | void addZone(UTimeZoneNameType nameType, int32_t matchLength, | |
| const UnicodeString& tzID, UErrorCode& status); | | const UnicodeString& tzID, UErrorCode& status); | |
| | | | |
| /** | | /** | |
| * Adds a meata zone match. | | * Adds a meata zone match. | |
| * @param nameType The name type. | | * @param nameType The name type. | |
| * @param matchLength The match length. | | * @param matchLength The match length. | |
| * @param mzID The metazone ID. | | * @param mzID The metazone ID. | |
| * @param status Receives the status | | * @param status Receives the status | |
|
| * @internal ICU 49 technology preview | | * @internal | |
| */ | | */ | |
| void addMetaZone(UTimeZoneNameType nameType, int32_t matchLength, | | void addMetaZone(UTimeZoneNameType nameType, int32_t matchLength, | |
| const UnicodeString& mzID, UErrorCode& status); | | const UnicodeString& mzID, UErrorCode& status); | |
| | | | |
| /** | | /** | |
| * Returns the number of entries available in this object. | | * Returns the number of entries available in this object. | |
| * @return The number of entries. | | * @return The number of entries. | |
|
| * @internal ICU 49 technology preview | | * @internal | |
| */ | | */ | |
| int32_t size() const; | | int32_t size() const; | |
| | | | |
| /** | | /** | |
| * Returns the time zone name type of a match at the specified inde
x. | | * Returns the time zone name type of a match at the specified inde
x. | |
| * @param idx The index | | * @param idx The index | |
| * @return The time zone name type. If the specified idx is out of
range, | | * @return The time zone name type. If the specified idx is out of
range, | |
| * it returns UTZNM_UNKNOWN. | | * it returns UTZNM_UNKNOWN. | |
| * @see UTimeZoneNameType | | * @see UTimeZoneNameType | |
|
| * @internal ICU 49 technology preview | | * @internal | |
| */ | | */ | |
| UTimeZoneNameType getNameTypeAt(int32_t idx) const; | | UTimeZoneNameType getNameTypeAt(int32_t idx) const; | |
| | | | |
| /** | | /** | |
| * Returns the match length of a match at the specified index. | | * Returns the match length of a match at the specified index. | |
| * @param idx The index | | * @param idx The index | |
|
| * @param status Receives the status | | | |
| * @return The match length. If the specified idx is out of range, | | * @return The match length. If the specified idx is out of range, | |
| * it returns 0. | | * it returns 0. | |
|
| * @internal ICU 49 technology preview | | * @internal | |
| */ | | */ | |
| int32_t getMatchLengthAt(int32_t idx) const; | | int32_t getMatchLengthAt(int32_t idx) const; | |
| | | | |
| /** | | /** | |
| * Gets the zone ID of a match at the specified index. | | * Gets the zone ID of a match at the specified index. | |
| * @param idx The index | | * @param idx The index | |
| * @param tzID Receives the zone ID. | | * @param tzID Receives the zone ID. | |
| * @return TRUE if the zone ID was set to tzID. | | * @return TRUE if the zone ID was set to tzID. | |
|
| * @internal ICU 49 technology preview | | * @internal | |
| */ | | */ | |
| UBool getTimeZoneIDAt(int32_t idx, UnicodeString& tzID) const; | | UBool getTimeZoneIDAt(int32_t idx, UnicodeString& tzID) const; | |
| | | | |
| /** | | /** | |
| * Gets the metazone ID of a match at the specified index. | | * Gets the metazone ID of a match at the specified index. | |
| * @param idx The index | | * @param idx The index | |
| * @param mzID Receives the metazone ID | | * @param mzID Receives the metazone ID | |
|
| * @param status Receives the status. | | | |
| * @return TRUE if the meta zone ID was set to mzID. | | * @return TRUE if the meta zone ID was set to mzID. | |
|
| * @internal ICU 49 technology preview | | * @internal | |
| */ | | */ | |
| UBool getMetaZoneIDAt(int32_t idx, UnicodeString& mzID) const; | | UBool getMetaZoneIDAt(int32_t idx, UnicodeString& mzID) const; | |
| | | | |
| private: | | private: | |
| UVector* fMatches; // vector of MatchEntry | | UVector* fMatches; // vector of MatchEntry | |
| | | | |
| UVector* matches(UErrorCode& status); | | UVector* matches(UErrorCode& status); | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Finds time zone name prefix matches for the input text at the | | * Finds time zone name prefix matches for the input text at the | |
| * given offset and returns a collection of the matches. | | * given offset and returns a collection of the matches. | |
| * @param text The text. | | * @param text The text. | |
| * @param start The starting offset within the text. | | * @param start The starting offset within the text. | |
| * @param types The set of name types represented by bitwise flags of U
TimeZoneNameType enums, | | * @param types The set of name types represented by bitwise flags of U
TimeZoneNameType enums, | |
| * or UTZNM_UNKNOWN for all name types. | | * or UTZNM_UNKNOWN for all name types. | |
| * @param status Receives the status. | | * @param status Receives the status. | |
| * @return A collection of matches (owned by the caller), or NULL if no
matches are found. | | * @return A collection of matches (owned by the caller), or NULL if no
matches are found. | |
| * @see UTimeZoneNameType | | * @see UTimeZoneNameType | |
| * @see MatchInfoCollection | | * @see MatchInfoCollection | |
|
| * @internal ICU 49 technology preview | | * @internal | |
| */ | | */ | |
| virtual MatchInfoCollection* find(const UnicodeString& text, int32_t st
art, uint32_t types, UErrorCode& status) const = 0; | | virtual MatchInfoCollection* find(const UnicodeString& text, int32_t st
art, uint32_t types, UErrorCode& status) const = 0; | |
| | | | |
| private: | | private: | |
| // No ICU "poor man's RTTI" for this class nor its subclasses. | | // No ICU "poor man's RTTI" for this class nor its subclasses. | |
| virtual UClassID getDynamicClassID() const; | | virtual UClassID getDynamicClassID() const; | |
| }; | | }; | |
| | | | |
| U_NAMESPACE_END | | U_NAMESPACE_END | |
| | | | |
| | | | |
End of changes. 35 change blocks. |
| 35 lines changed or deleted | | 33 lines changed or added | |
|
| ucal.h | | ucal.h | |
| | | | |
| skipping to change at line 125 | | skipping to change at line 125 | |
| * 23:59 on Dec 31, 1969 < 24:00 on Jan 1, 1970 < 24:01:00 o
n Jan 1, 1970 | | * 23:59 on Dec 31, 1969 < 24:00 on Jan 1, 1970 < 24:01:00 o
n Jan 1, 1970 | |
| * | | * | |
| * <li> Although historically not precise, midnight also belongs to "am
", | | * <li> Although historically not precise, midnight also belongs to "am
", | |
| * and noon belongs to "pm", so on the same day, | | * and noon belongs to "pm", so on the same day, | |
| * 12:00 am (midnight) < 12:01 am, and 12:00 pm (noon) < 12:
01 pm | | * 12:00 am (midnight) < 12:01 am, and 12:00 pm (noon) < 12:
01 pm | |
| * </ol> | | * </ol> | |
| * | | * | |
| * <p> | | * <p> | |
| * The date or time format strings are not part of the definition of a | | * The date or time format strings are not part of the definition of a | |
| * calendar, as those must be modifiable or overridable by the user at | | * calendar, as those must be modifiable or overridable by the user at | |
|
| * runtime. Use {@link DateFormat} | | * runtime. Use {@link icu::DateFormat} | |
| * to format dates. | | * to format dates. | |
| * | | * | |
| * <p> | | * <p> | |
| * <code>Calendar</code> provides an API for field "rolling", where fields | | * <code>Calendar</code> provides an API for field "rolling", where fields | |
| * can be incremented or decremented, but wrap around. For example, rolling
the | | * can be incremented or decremented, but wrap around. For example, rolling
the | |
| * month up in the date <code>December 12, <b>1996</b></code> results in | | * month up in the date <code>December 12, <b>1996</b></code> results in | |
| * <code>January 12, <b>1996</b></code>. | | * <code>January 12, <b>1996</b></code>. | |
| * | | * | |
| * <p> | | * <p> | |
| * <code>Calendar</code> also provides a date arithmetic function for | | * <code>Calendar</code> also provides a date arithmetic function for | |
| | | | |
| skipping to change at line 567 | | skipping to change at line 567 | |
| * done by region. | | * done by region. | |
| * @param rawOffset An offset from GMT in milliseconds, ignoring the | | * @param rawOffset An offset from GMT in milliseconds, ignoring the | |
| * effect of daylight savings time, if any. When NULL, | | * effect of daylight savings time, if any. When NULL, | |
| * no filtering done by zone offset. | | * no filtering done by zone offset. | |
| * @param ec A pointer to an UErrorCode to receive any errors | | * @param ec A pointer to an UErrorCode to receive any errors | |
| * @return an enumeration object that the caller must dispose of | | * @return an enumeration object that the caller must dispose of | |
| * using enum_close(), or NULL upon failure. In case of failure, | | * using enum_close(), or NULL upon failure. In case of failure, | |
| * *ec will indicate the error. | | * *ec will indicate the error. | |
| * @stable ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
|
| U_DRAFT UEnumeration* U_EXPORT2 | | U_STABLE UEnumeration* U_EXPORT2 | |
| ucal_openTimeZoneIDEnumeration(USystemTimeZoneType zoneType, const char* re
gion, | | ucal_openTimeZoneIDEnumeration(USystemTimeZoneType zoneType, const char* re
gion, | |
| const int32_t* rawOffset, UErrorCode* ec); | | const int32_t* rawOffset, UErrorCode* ec); | |
| | | | |
| /** | | /** | |
| * Create an enumeration over all time zones. | | * Create an enumeration over all time zones. | |
| * | | * | |
| * @param ec input/output error code | | * @param ec input/output error code | |
| * | | * | |
| * @return an enumeration object that the caller must dispose of using | | * @return an enumeration object that the caller must dispose of using | |
| * uenum_close(), or NULL upon failure. In case of failure *ec will | | * uenum_close(), or NULL upon failure. In case of failure *ec will | |
| | | | |
| skipping to change at line 1067 | | skipping to change at line 1067 | |
| * @return TRUE if cal1 and cal2 are equivalent, FALSE otherwise. | | * @return TRUE if cal1 and cal2 are equivalent, FALSE otherwise. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| U_STABLE UBool U_EXPORT2 | | U_STABLE UBool U_EXPORT2 | |
| ucal_equivalentTo(const UCalendar* cal1, | | ucal_equivalentTo(const UCalendar* cal1, | |
| const UCalendar* cal2); | | const UCalendar* cal2); | |
| | | | |
| /** | | /** | |
| * Add a specified signed amount to a particular field in a UCalendar. | | * Add a specified signed amount to a particular field in a UCalendar. | |
| * This can modify more significant fields in the calendar. | | * This can modify more significant fields in the calendar. | |
|
| | | * Adding a positive value always means moving forward in time, so for the | |
| | | Gregorian calendar, | |
| | | * starting with 100 BC and adding +1 to year results in 99 BC (even though | |
| | | this actually reduces | |
| | | * the numeric value of the field itself). | |
| * @param cal The UCalendar to which to add. | | * @param cal The UCalendar to which to add. | |
| * @param field The field to which to add the signed value; one of UCAL_ERA
, UCAL_YEAR, UCAL_MONTH, | | * @param field The field to which to add the signed value; one of UCAL_ERA
, UCAL_YEAR, UCAL_MONTH, | |
| * UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL
_DAY_OF_WEEK, | | * UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL
_DAY_OF_WEEK, | |
| * UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL
_MINUTE, UCAL_SECOND, | | * UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL
_MINUTE, UCAL_SECOND, | |
| * UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET. | | * UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET. | |
| * @param amount The signed amount to add to field. If the amount causes th
e value | | * @param amount The signed amount to add to field. If the amount causes th
e value | |
| * to exceed to maximum or minimum values for that field, other fields are
modified | | * to exceed to maximum or minimum values for that field, other fields are
modified | |
| * to preserve the magnitude of the change. | | * to preserve the magnitude of the change. | |
| * @param status A pointer to an UErrorCode to receive any errors | | * @param status A pointer to an UErrorCode to receive any errors | |
| * @see ucal_roll | | * @see ucal_roll | |
| | | | |
| skipping to change at line 1088 | | skipping to change at line 1091 | |
| */ | | */ | |
| U_STABLE void U_EXPORT2 | | U_STABLE void U_EXPORT2 | |
| ucal_add(UCalendar* cal, | | ucal_add(UCalendar* cal, | |
| UCalendarDateFields field, | | UCalendarDateFields field, | |
| int32_t amount, | | int32_t amount, | |
| UErrorCode* status); | | UErrorCode* status); | |
| | | | |
| /** | | /** | |
| * Add a specified signed amount to a particular field in a UCalendar. | | * Add a specified signed amount to a particular field in a UCalendar. | |
| * This will not modify more significant fields in the calendar. | | * This will not modify more significant fields in the calendar. | |
|
| | | * Rolling by a positive value always means moving forward in time (unless | |
| | | the limit of the | |
| | | * field is reached, in which case it may pin or wrap), so for Gregorian ca | |
| | | lendar, | |
| | | * starting with 100 BC and rolling the year by +1 results in 99 BC. | |
| | | * When eras have a definite beginning and end (as in the Chinese calendar, | |
| | | or as in most eras in the | |
| | | * Japanese calendar) then rolling the year past either limit of the era wi | |
| | | ll cause the year to wrap around. | |
| | | * When eras only have a limit at one end, then attempting to roll the year | |
| | | past that limit will result in | |
| | | * pinning the year at that limit. Note that for most calendars in which er | |
| | | a 0 years move forward in time | |
| | | * (such as Buddhist, Hebrew, or Islamic), it is possible for add or roll t | |
| | | o result in negative years for | |
| | | * era 0 (that is the only way to represent years before the calendar epoch | |
| | | ). | |
| * @param cal The UCalendar to which to add. | | * @param cal The UCalendar to which to add. | |
| * @param field The field to which to add the signed value; one of UCAL_ERA
, UCAL_YEAR, UCAL_MONTH, | | * @param field The field to which to add the signed value; one of UCAL_ERA
, UCAL_YEAR, UCAL_MONTH, | |
| * UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL
_DAY_OF_WEEK, | | * UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL
_DAY_OF_WEEK, | |
| * UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL
_MINUTE, UCAL_SECOND, | | * UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL
_MINUTE, UCAL_SECOND, | |
| * UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET. | | * UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET. | |
| * @param amount The signed amount to add to field. If the amount causes th
e value | | * @param amount The signed amount to add to field. If the amount causes th
e value | |
| * to exceed to maximum or minimum values for that field, the field is pinn
ed to a permissible | | * to exceed to maximum or minimum values for that field, the field is pinn
ed to a permissible | |
| * value. | | * value. | |
| * @param status A pointer to an UErrorCode to receive any errors | | * @param status A pointer to an UErrorCode to receive any errors | |
| * @see ucal_add | | * @see ucal_add | |
| | | | |
| skipping to change at line 1416 | | skipping to change at line 1428 | |
| * @param cal The UCalendar to compare and update. | | * @param cal The UCalendar to compare and update. | |
| * @param target The target date to compare to the current calendar setting
. | | * @param target The target date to compare to the current calendar setting
. | |
| * @param field The field to compare; one of UCAL_ERA, UCAL_YEAR, UCAL_MONT
H, | | * @param field The field to compare; one of UCAL_ERA, UCAL_YEAR, UCAL_MONT
H, | |
| * UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL
_DAY_OF_WEEK, | | * UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL
_DAY_OF_WEEK, | |
| * UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL
_MINUTE, UCAL_SECOND, | | * UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL
_MINUTE, UCAL_SECOND, | |
| * UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET. | | * UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET. | |
| * @param status A pointer to an UErrorCode to receive any errors | | * @param status A pointer to an UErrorCode to receive any errors | |
| * @return The date difference for the specified field. | | * @return The date difference for the specified field. | |
| * @stable ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
|
| U_DRAFT int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| ucal_getFieldDifference(UCalendar* cal, | | ucal_getFieldDifference(UCalendar* cal, | |
| UDate target, | | UDate target, | |
| UCalendarDateFields field, | | UCalendarDateFields field, | |
| UErrorCode* status); | | UErrorCode* status); | |
| | | | |
|
| | | #ifndef U_HIDE_DRAFT_API | |
| | | /** | |
| | | * Time zone transition types for ucal_getTimeZoneTransitionDate | |
| | | * @draft ICU 50 | |
| | | */ | |
| | | enum UTimeZoneTransitionType { | |
| | | /** | |
| | | * Get the next transition after the current date, | |
| | | * i.e. excludes the current date | |
| | | * @draft ICU 50 | |
| | | */ | |
| | | UCAL_TZ_TRANSITION_NEXT, | |
| | | /** | |
| | | * Get the next transition on or after the current date, | |
| | | * i.e. may include the current date | |
| | | * @draft ICU 50 | |
| | | */ | |
| | | UCAL_TZ_TRANSITION_NEXT_INCLUSIVE, | |
| | | /** | |
| | | * Get the previous transition before the current date, | |
| | | * i.e. excludes the current date | |
| | | * @draft ICU 50 | |
| | | */ | |
| | | UCAL_TZ_TRANSITION_PREVIOUS, | |
| | | /** | |
| | | * Get the previous transition on or before the current date, | |
| | | * i.e. may include the current date | |
| | | * @draft ICU 50 | |
| | | */ | |
| | | UCAL_TZ_TRANSITION_PREVIOUS_INCLUSIVE | |
| | | }; | |
| | | | |
| | | /** @draft ICU 50 */ | |
| | | typedef enum UTimeZoneTransitionType UTimeZoneTransitionType; | |
| | | | |
| | | /** | |
| | | * Get the UDate for the next/previous time zone transition relative to | |
| | | * the calendar's current date, in the time zone to which the calendar | |
| | | * is currently set. If there is no known time zone transition of the | |
| | | * requested type relative to the calendar's date, the function returns | |
| | | * FALSE. | |
| | | * @param cal The UCalendar to query. | |
| | | * @param type The type of transition desired. | |
| | | * @param transition A pointer to a UDate to be set to the transition time. | |
| | | * If the function returns FALSE, the value set is unspecified. | |
| | | * @param status A pointer to a UErrorCode to receive any errors. | |
| | | * @return TRUE if a valid transition time is set in *transition, FALSE | |
| | | * otherwise. | |
| | | * @draft ICU 50 | |
| | | */ | |
| | | U_DRAFT UBool U_EXPORT2 | |
| | | ucal_getTimeZoneTransitionDate(const UCalendar* cal, UTimeZoneTransitionTyp | |
| | | e type, | |
| | | UDate* transition, UErrorCode* status); | |
| | | | |
| | | #endif /* U_HIDE_DRAFT_API */ | |
| | | | |
| #endif /* #if !UCONFIG_NO_FORMATTING */ | | #endif /* #if !UCONFIG_NO_FORMATTING */ | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 6 change blocks. |
| 3 lines changed or deleted | | 82 lines changed or added | |
|
| uchar.h | | uchar.h | |
| /* | | /* | |
| ********************************************************************** | | ********************************************************************** | |
|
| * Copyright (C) 1997-2011, International Business Machines | | * Copyright (C) 1997-2012, International Business Machines | |
| * Corporation and others. All Rights Reserved. | | * Corporation and others. All Rights Reserved. | |
| ********************************************************************** | | ********************************************************************** | |
| * | | * | |
| * File UCHAR.H | | * File UCHAR.H | |
| * | | * | |
| * Modification History: | | * Modification History: | |
| * | | * | |
| * Date Name Description | | * Date Name Description | |
| * 04/02/97 aliu Creation. | | * 04/02/97 aliu Creation. | |
| * 03/29/99 helena Updated for C APIs. | | * 03/29/99 helena Updated for C APIs. | |
| | | | |
| skipping to change at line 42 | | skipping to change at line 42 | |
| /*=========================================================================
=*/ | | /*=========================================================================
=*/ | |
| /** | | /** | |
| * Unicode version number, default for the current ICU version. | | * Unicode version number, default for the current ICU version. | |
| * The actual Unicode Character Database (UCD) data is stored in uprops.dat | | * The actual Unicode Character Database (UCD) data is stored in uprops.dat | |
| * and may be generated from UCD files from a different Unicode version. | | * and may be generated from UCD files from a different Unicode version. | |
| * Call u_getUnicodeVersion to get the actual Unicode version of the data. | | * Call u_getUnicodeVersion to get the actual Unicode version of the data. | |
| * | | * | |
| * @see u_getUnicodeVersion | | * @see u_getUnicodeVersion | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| #define U_UNICODE_VERSION "6.1" | | #define U_UNICODE_VERSION "6.2" | |
| | | | |
| /** | | /** | |
| * \file | | * \file | |
| * \brief C API: Unicode Properties | | * \brief C API: Unicode Properties | |
| * | | * | |
| * This C API provides low-level access to the Unicode Character Database. | | * This C API provides low-level access to the Unicode Character Database. | |
| * In addition to raw property values, some convenience functions calculate | | * In addition to raw property values, some convenience functions calculate | |
| * derived properties, for example for Java-style programming. | | * derived properties, for example for Java-style programming. | |
| * | | * | |
| * Unicode assigns each code point (not just assigned character) values for | | * Unicode assigns each code point (not just assigned character) values for | |
| | | | |
| skipping to change at line 553 | | skipping to change at line 553 | |
| /** String property Unicode_1_Name. | | /** String property Unicode_1_Name. | |
| This property is of little practical value. | | This property is of little practical value. | |
| Beginning with ICU 49, ICU APIs return an empty string for this pro
perty. | | Beginning with ICU 49, ICU APIs return an empty string for this pro
perty. | |
| Corresponds to u_charName(U_UNICODE_10_CHAR_NAME). @deprecated ICU
49 */ | | Corresponds to u_charName(U_UNICODE_10_CHAR_NAME). @deprecated ICU
49 */ | |
| UCHAR_UNICODE_1_NAME=0x400B, | | UCHAR_UNICODE_1_NAME=0x400B, | |
| /** String property Uppercase_Mapping. | | /** String property Uppercase_Mapping. | |
| Corresponds to u_strToUpper in ustring.h. @stable ICU 2.4 */ | | Corresponds to u_strToUpper in ustring.h. @stable ICU 2.4 */ | |
| UCHAR_UPPERCASE_MAPPING=0x400C, | | UCHAR_UPPERCASE_MAPPING=0x400C, | |
| /** One more than the last constant for string Unicode properties. @sta
ble ICU 2.4 */ | | /** One more than the last constant for string Unicode properties. @sta
ble ICU 2.4 */ | |
| UCHAR_STRING_LIMIT=0x400D, | | UCHAR_STRING_LIMIT=0x400D, | |
|
| | | | |
| #ifndef U_HIDE_DRAFT_API | | | |
| /** Provisional property Script_Extensions (new in Unicode 6.0). | | /** Provisional property Script_Extensions (new in Unicode 6.0). | |
| As a provisional property, it may be modified or removed | | As a provisional property, it may be modified or removed | |
| in future versions of the Unicode Standard, and thus in ICU. | | in future versions of the Unicode Standard, and thus in ICU. | |
| Some characters are commonly used in multiple scripts. | | Some characters are commonly used in multiple scripts. | |
| For more information, see UAX #24: http://www.unicode.org/reports/t
r24/. | | For more information, see UAX #24: http://www.unicode.org/reports/t
r24/. | |
| Corresponds to uscript_hasScript and uscript_getScriptExtensions in
uscript.h. | | Corresponds to uscript_hasScript and uscript_getScriptExtensions in
uscript.h. | |
|
| @draft ICU 4.6 */ | | @stable ICU 4.6 */ | |
| UCHAR_SCRIPT_EXTENSIONS=0x7000, | | UCHAR_SCRIPT_EXTENSIONS=0x7000, | |
|
| /** First constant for Unicode properties with unusual value types. @dr
aft ICU 4.6 */ | | /** First constant for Unicode properties with unusual value types. @st
able ICU 4.6 */ | |
| UCHAR_OTHER_PROPERTY_START=UCHAR_SCRIPT_EXTENSIONS, | | UCHAR_OTHER_PROPERTY_START=UCHAR_SCRIPT_EXTENSIONS, | |
| /** One more than the last constant for Unicode properties with unusual
value types. | | /** One more than the last constant for Unicode properties with unusual
value types. | |
|
| * @draft ICU 4.6 */ | | * @stable ICU 4.6 */ | |
| UCHAR_OTHER_PROPERTY_LIMIT=0x7001, | | UCHAR_OTHER_PROPERTY_LIMIT=0x7001, | |
|
| #endif /* U_HIDE_DRAFT_API */ | | | |
| | | | |
| /** Represents a nonexistent or invalid property or property value. @st
able ICU 2.4 */ | | /** Represents a nonexistent or invalid property or property value. @st
able ICU 2.4 */ | |
| UCHAR_INVALID_CODE = -1 | | UCHAR_INVALID_CODE = -1 | |
| } UProperty; | | } UProperty; | |
| | | | |
| /** | | /** | |
| * Data for enumerated Unicode general category types. | | * Data for enumerated Unicode general category types. | |
| * See http://www.unicode.org/Public/UNIDATA/UnicodeData.html . | | * See http://www.unicode.org/Public/UNIDATA/UnicodeData.html . | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| typedef enum UCharCategory | | typedef enum UCharCategory | |
| | | | |
| skipping to change at line 1652 | | skipping to change at line 1648 | |
| U_GCB_CR = 2, /*[CR]*/ | | U_GCB_CR = 2, /*[CR]*/ | |
| U_GCB_EXTEND = 3, /*[EX]*/ | | U_GCB_EXTEND = 3, /*[EX]*/ | |
| U_GCB_L = 4, /*[L]*/ | | U_GCB_L = 4, /*[L]*/ | |
| U_GCB_LF = 5, /*[LF]*/ | | U_GCB_LF = 5, /*[LF]*/ | |
| U_GCB_LV = 6, /*[LV]*/ | | U_GCB_LV = 6, /*[LV]*/ | |
| U_GCB_LVT = 7, /*[LVT]*/ | | U_GCB_LVT = 7, /*[LVT]*/ | |
| U_GCB_T = 8, /*[T]*/ | | U_GCB_T = 8, /*[T]*/ | |
| U_GCB_V = 9, /*[V]*/ | | U_GCB_V = 9, /*[V]*/ | |
| U_GCB_SPACING_MARK = 10, /*[SM]*/ /* from here on: new in Unicode 5.
1/ICU 4.0 */ | | U_GCB_SPACING_MARK = 10, /*[SM]*/ /* from here on: new in Unicode 5.
1/ICU 4.0 */ | |
| U_GCB_PREPEND = 11, /*[PP]*/ | | U_GCB_PREPEND = 11, /*[PP]*/ | |
|
| U_GCB_COUNT = 12 | | U_GCB_REGIONAL_INDICATOR = 12, /*[RI]*/ /* new in Unicode 6.2/ICU 50 * | |
| | | / | |
| | | U_GCB_COUNT = 13 | |
| } UGraphemeClusterBreak; | | } UGraphemeClusterBreak; | |
| | | | |
| /** | | /** | |
| * Word Break constants. | | * Word Break constants. | |
| * (UWordBreak is a pre-existing enum type in ubrk.h for word break status
tags.) | | * (UWordBreak is a pre-existing enum type in ubrk.h for word break status
tags.) | |
| * | | * | |
| * @see UCHAR_WORD_BREAK | | * @see UCHAR_WORD_BREAK | |
| * @stable ICU 3.4 | | * @stable ICU 3.4 | |
| */ | | */ | |
| typedef enum UWordBreakValues { | | typedef enum UWordBreakValues { | |
| | | | |
| skipping to change at line 1682 | | skipping to change at line 1679 | |
| U_WB_KATAKANA = 3, /*[KA]*/ | | U_WB_KATAKANA = 3, /*[KA]*/ | |
| U_WB_MIDLETTER = 4, /*[ML]*/ | | U_WB_MIDLETTER = 4, /*[ML]*/ | |
| U_WB_MIDNUM = 5, /*[MN]*/ | | U_WB_MIDNUM = 5, /*[MN]*/ | |
| U_WB_NUMERIC = 6, /*[NU]*/ | | U_WB_NUMERIC = 6, /*[NU]*/ | |
| U_WB_EXTENDNUMLET = 7, /*[EX]*/ | | U_WB_EXTENDNUMLET = 7, /*[EX]*/ | |
| U_WB_CR = 8, /*[CR]*/ /* from here on: new in Unicode 5.
1/ICU 4.0 */ | | U_WB_CR = 8, /*[CR]*/ /* from here on: new in Unicode 5.
1/ICU 4.0 */ | |
| U_WB_EXTEND = 9, /*[Extend]*/ | | U_WB_EXTEND = 9, /*[Extend]*/ | |
| U_WB_LF = 10, /*[LF]*/ | | U_WB_LF = 10, /*[LF]*/ | |
| U_WB_MIDNUMLET =11, /*[MB]*/ | | U_WB_MIDNUMLET =11, /*[MB]*/ | |
| U_WB_NEWLINE =12, /*[NL]*/ | | U_WB_NEWLINE =12, /*[NL]*/ | |
|
| U_WB_COUNT = 13 | | U_WB_REGIONAL_INDICATOR = 13, /*[RI]*/ /* new in Unicode 6.2/ICU 50 * | |
| | | / | |
| | | U_WB_COUNT = 14 | |
| } UWordBreakValues; | | } UWordBreakValues; | |
| | | | |
| /** | | /** | |
| * Sentence Break constants. | | * Sentence Break constants. | |
| * | | * | |
| * @see UCHAR_SENTENCE_BREAK | | * @see UCHAR_SENTENCE_BREAK | |
| * @stable ICU 3.4 | | * @stable ICU 3.4 | |
| */ | | */ | |
| typedef enum USentenceBreak { | | typedef enum USentenceBreak { | |
| /* | | /* | |
| | | | |
| skipping to change at line 1770 | | skipping to change at line 1768 | |
| U_LB_NEXT_LINE = 29, /*[NL]*/ /* from here on: new in Unicode 4
/ICU 2.6 */ | | U_LB_NEXT_LINE = 29, /*[NL]*/ /* from here on: new in Unicode 4
/ICU 2.6 */ | |
| U_LB_WORD_JOINER = 30, /*[WJ]*/ | | U_LB_WORD_JOINER = 30, /*[WJ]*/ | |
| U_LB_H2 = 31, /*[H2]*/ /* from here on: new in Unicode 4
.1/ICU 3.4 */ | | U_LB_H2 = 31, /*[H2]*/ /* from here on: new in Unicode 4
.1/ICU 3.4 */ | |
| U_LB_H3 = 32, /*[H3]*/ | | U_LB_H3 = 32, /*[H3]*/ | |
| U_LB_JL = 33, /*[JL]*/ | | U_LB_JL = 33, /*[JL]*/ | |
| U_LB_JT = 34, /*[JT]*/ | | U_LB_JT = 34, /*[JT]*/ | |
| U_LB_JV = 35, /*[JV]*/ | | U_LB_JV = 35, /*[JV]*/ | |
| U_LB_CLOSE_PARENTHESIS = 36, /*[CP]*/ /* new in Unicode 5.2/ICU 4.4 */ | | U_LB_CLOSE_PARENTHESIS = 36, /*[CP]*/ /* new in Unicode 5.2/ICU 4.4 */ | |
| U_LB_CONDITIONAL_JAPANESE_STARTER = 37,/*[CJ]*/ /* new in Unicode 6.1/I
CU 49 */ | | U_LB_CONDITIONAL_JAPANESE_STARTER = 37,/*[CJ]*/ /* new in Unicode 6.1/I
CU 49 */ | |
| U_LB_HEBREW_LETTER = 38, /*[HL]*/ /* new in Unicode 6.1/ICU 49 */ | | U_LB_HEBREW_LETTER = 38, /*[HL]*/ /* new in Unicode 6.1/ICU 49 */ | |
|
| U_LB_COUNT = 39 | | U_LB_REGIONAL_INDICATOR = 39,/*[RI]*/ /* new in Unicode 6.2/ICU 50 */ | |
| | | U_LB_COUNT = 40 | |
| } ULineBreak; | | } ULineBreak; | |
| | | | |
| /** | | /** | |
| * Numeric Type constants. | | * Numeric Type constants. | |
| * | | * | |
| * @see UCHAR_NUMERIC_TYPE | | * @see UCHAR_NUMERIC_TYPE | |
| * @stable ICU 2.2 | | * @stable ICU 2.2 | |
| */ | | */ | |
| typedef enum UNumericType { | | typedef enum UNumericType { | |
| /* | | /* | |
| | | | |
End of changes. 10 change blocks. |
| 12 lines changed or deleted | | 13 lines changed or added | |
|
| ucol.h | | ucol.h | |
| | | | |
| skipping to change at line 239 | | skipping to change at line 239 | |
| * These values can be now found in the UColAttributeValue enum. | | * These values can be now found in the UColAttributeValue enum. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| **/ | | **/ | |
| typedef UColAttributeValue UCollationStrength; | | typedef UColAttributeValue UCollationStrength; | |
| | | | |
| /** Attributes that collation service understands. All the attributes can t
ake UCOL_DEFAULT | | /** Attributes that collation service understands. All the attributes can t
ake UCOL_DEFAULT | |
| * value, as well as the values specific to each one. | | * value, as well as the values specific to each one. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| typedef enum { | | typedef enum { | |
|
| /** Attribute for direction of secondary weights - used in French. | | /** Attribute for direction of secondary weights - used in Canadian Fr
ench. | |
| * Acceptable values are UCOL_ON, which results in secondary weights | | * Acceptable values are UCOL_ON, which results in secondary weights | |
| * being considered backwards and UCOL_OFF which treats secondary | | * being considered backwards and UCOL_OFF which treats secondary | |
|
| * weights in the order they appear.*/ | | * weights in the order they appear. | |
| | | * @stable ICU 2.0 | |
| | | */ | |
| UCOL_FRENCH_COLLATION, | | UCOL_FRENCH_COLLATION, | |
| /** Attribute for handling variable elements. | | /** Attribute for handling variable elements. | |
| * Acceptable values are UCOL_NON_IGNORABLE (default) | | * Acceptable values are UCOL_NON_IGNORABLE (default) | |
| * which treats all the codepoints with non-ignorable | | * which treats all the codepoints with non-ignorable | |
| * primary weights in the same way, | | * primary weights in the same way, | |
| * and UCOL_SHIFTED which causes codepoints with primary | | * and UCOL_SHIFTED which causes codepoints with primary | |
| * weights that are equal or below the variable top value | | * weights that are equal or below the variable top value | |
| * to be ignored on primary level and moved to the quaternary | | * to be ignored on primary level and moved to the quaternary | |
|
| * level.*/ | | * level. | |
| | | * @stable ICU 2.0 | |
| | | */ | |
| UCOL_ALTERNATE_HANDLING, | | UCOL_ALTERNATE_HANDLING, | |
| /** Controls the ordering of upper and lower case letters. | | /** Controls the ordering of upper and lower case letters. | |
| * Acceptable values are UCOL_OFF (default), which orders | | * Acceptable values are UCOL_OFF (default), which orders | |
| * upper and lower case letters in accordance to their tertiary | | * upper and lower case letters in accordance to their tertiary | |
| * weights, UCOL_UPPER_FIRST which forces upper case letters to | | * weights, UCOL_UPPER_FIRST which forces upper case letters to | |
| * sort before lower case letters, and UCOL_LOWER_FIRST which does | | * sort before lower case letters, and UCOL_LOWER_FIRST which does | |
|
| * the opposite. */ | | * the opposite. | |
| | | * @stable ICU 2.0 | |
| | | */ | |
| UCOL_CASE_FIRST, | | UCOL_CASE_FIRST, | |
| /** Controls whether an extra case level (positioned before the third | | /** Controls whether an extra case level (positioned before the third | |
| * level) is generated or not. Acceptable values are UCOL_OFF (default
), | | * level) is generated or not. Acceptable values are UCOL_OFF (default
), | |
| * when case level is not generated, and UCOL_ON which causes the case | | * when case level is not generated, and UCOL_ON which causes the case | |
| * level to be generated. Contents of the case level are affected by | | * level to be generated. Contents of the case level are affected by | |
| * the value of UCOL_CASE_FIRST attribute. A simple way to ignore | | * the value of UCOL_CASE_FIRST attribute. A simple way to ignore | |
| * accent differences in a string is to set the strength to UCOL_PRIMA
RY | | * accent differences in a string is to set the strength to UCOL_PRIMA
RY | |
|
| * and enable case level. */ | | * and enable case level. | |
| | | * @stable ICU 2.0 | |
| | | */ | |
| UCOL_CASE_LEVEL, | | UCOL_CASE_LEVEL, | |
| /** Controls whether the normalization check and necessary normalizati
ons | | /** Controls whether the normalization check and necessary normalizati
ons | |
| * are performed. When set to UCOL_OFF (default) no normalization chec
k | | * are performed. When set to UCOL_OFF (default) no normalization chec
k | |
| * is performed. The correctness of the result is guaranteed only if t
he | | * is performed. The correctness of the result is guaranteed only if t
he | |
| * input data is in so-called FCD form (see users manual for more info
). | | * input data is in so-called FCD form (see users manual for more info
). | |
| * When set to UCOL_ON, an incremental check is performed to see wheth
er | | * When set to UCOL_ON, an incremental check is performed to see wheth
er | |
| * the input data is in the FCD form. If the data is not in the FCD fo
rm, | | * the input data is in the FCD form. If the data is not in the FCD fo
rm, | |
|
| * incremental NFD normalization is performed. */ | | * incremental NFD normalization is performed. | |
| | | * @stable ICU 2.0 | |
| | | */ | |
| UCOL_NORMALIZATION_MODE, | | UCOL_NORMALIZATION_MODE, | |
|
| /** An alias for UCOL_NORMALIZATION_MODE attribute */ | | /** An alias for UCOL_NORMALIZATION_MODE attribute. | |
| | | * @stable ICU 2.0 | |
| | | */ | |
| UCOL_DECOMPOSITION_MODE = UCOL_NORMALIZATION_MODE, | | UCOL_DECOMPOSITION_MODE = UCOL_NORMALIZATION_MODE, | |
| /** The strength attribute. Can be either UCOL_PRIMARY, UCOL_SECONDARY
, | | /** The strength attribute. Can be either UCOL_PRIMARY, UCOL_SECONDARY
, | |
| * UCOL_TERTIARY, UCOL_QUATERNARY or UCOL_IDENTICAL. The usual strengt
h | | * UCOL_TERTIARY, UCOL_QUATERNARY or UCOL_IDENTICAL. The usual strengt
h | |
| * for most locales (except Japanese) is tertiary. Quaternary strength | | * for most locales (except Japanese) is tertiary. Quaternary strength | |
| * is useful when combined with shifted setting for alternate handling | | * is useful when combined with shifted setting for alternate handling | |
| * attribute and for JIS x 4061 collation, when it is used to distingu
ish | | * attribute and for JIS x 4061 collation, when it is used to distingu
ish | |
| * between Katakana and Hiragana (this is achieved by setting the | | * between Katakana and Hiragana (this is achieved by setting the | |
| * UCOL_HIRAGANA_QUATERNARY mode to on. Otherwise, quaternary level | | * UCOL_HIRAGANA_QUATERNARY mode to on. Otherwise, quaternary level | |
| * is affected only by the number of non ignorable code points in | | * is affected only by the number of non ignorable code points in | |
| * the string. Identical strength is rarely useful, as it amounts | | * the string. Identical strength is rarely useful, as it amounts | |
|
| * to codepoints of the NFD form of the string. */ | | * to codepoints of the NFD form of the string. | |
| | | * @stable ICU 2.0 | |
| | | */ | |
| UCOL_STRENGTH, | | UCOL_STRENGTH, | |
| /** When turned on, this attribute positions Hiragana before all | | /** When turned on, this attribute positions Hiragana before all | |
| * non-ignorables on quaternary level This is a sneaky way to produce
JIS | | * non-ignorables on quaternary level This is a sneaky way to produce
JIS | |
|
| * sort order */ | | * sort order. | |
| | | * | |
| | | * This attribute is an implementation detail of the CLDR Japanese tai | |
| | | loring. | |
| | | * The implementation might change to use a different mechanism | |
| | | * to achieve the same Japanese sort order. | |
| | | * Since ICU 50, this attribute is not settable any more via API funct | |
| | | ions. | |
| | | * @deprecated ICU 50 Implementation detail, cannot be set via API, mi | |
| | | ght be removed from implementation. | |
| | | */ | |
| UCOL_HIRAGANA_QUATERNARY_MODE, | | UCOL_HIRAGANA_QUATERNARY_MODE, | |
| /** When turned on, this attribute generates a collation key | | /** When turned on, this attribute generates a collation key | |
| * for the numeric value of substrings of digits. | | * for the numeric value of substrings of digits. | |
| * This is a way to get '100' to sort AFTER '2'. Note that the longest | | * This is a way to get '100' to sort AFTER '2'. Note that the longest | |
| * digit substring that can be treated as a single collation element i
s | | * digit substring that can be treated as a single collation element i
s | |
| * 254 digits (not counting leading zeros). If a digit substring is | | * 254 digits (not counting leading zeros). If a digit substring is | |
| * longer than that, the digits beyond the limit will be treated as a | | * longer than that, the digits beyond the limit will be treated as a | |
|
| * separate digit substring associated with a separate collation eleme | | * separate digit substring associated with a separate collation eleme | |
| nt. */ | | nt. | |
| | | * @stable ICU 2.8 | |
| | | */ | |
| UCOL_NUMERIC_COLLATION, | | UCOL_NUMERIC_COLLATION, | |
|
| | | /** | |
| | | * The number of UColAttribute constants. | |
| | | * @stable ICU 2.0 | |
| | | */ | |
| UCOL_ATTRIBUTE_COUNT | | UCOL_ATTRIBUTE_COUNT | |
| } UColAttribute; | | } UColAttribute; | |
| | | | |
| /** Options for retrieving the rule string | | /** Options for retrieving the rule string | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| typedef enum { | | typedef enum { | |
|
| /** Retrieve tailoring only */ | | /** | |
| | | * Retrieves the tailoring rules only. | |
| | | * Same as calling the version of getRules() without UColRuleOption. | |
| | | * @stable ICU 2.0 | |
| | | */ | |
| UCOL_TAILORING_ONLY, | | UCOL_TAILORING_ONLY, | |
|
| /** Retrieve UCA rules and tailoring */ | | /** | |
| | | * Retrieves the "UCA rules" concatenated with the tailoring rules. | |
| | | * The "UCA rules" are an <i>approximation</i> of the root collator's sor | |
| | | t order. | |
| | | * They are almost never used or useful at runtime and can be removed fro | |
| | | m the data. | |
| | | * See http://userguide.icu-project.org/collation/customization#TOC-Build | |
| | | ing-on-Existing-Locales | |
| | | * @stable ICU 2.0 | |
| | | */ | |
| UCOL_FULL_RULES | | UCOL_FULL_RULES | |
| } UColRuleOption ; | | } UColRuleOption ; | |
| | | | |
| /** | | /** | |
| * Open a UCollator for comparing strings. | | * Open a UCollator for comparing strings. | |
| * The UCollator pointer is used in all the calls to the Collation | | * The UCollator pointer is used in all the calls to the Collation | |
| * service. After finished, collator must be disposed of by calling | | * service. After finished, collator must be disposed of by calling | |
| * {@link #ucol_close }. | | * {@link #ucol_close }. | |
| * @param loc The locale containing the required collation rules. | | * @param loc The locale containing the required collation rules. | |
| * Special values for locales can be passed in - | | * Special values for locales can be passed in - | |
| | | | |
| skipping to change at line 498 | | skipping to change at line 535 | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| U_STABLE UCollationResult U_EXPORT2 | | U_STABLE UCollationResult U_EXPORT2 | |
| ucol_strcoll( const UCollator *coll, | | ucol_strcoll( const UCollator *coll, | |
| const UChar *source, | | const UChar *source, | |
| int32_t sourceLength, | | int32_t sourceLength, | |
| const UChar *target, | | const UChar *target, | |
| int32_t targetLength); | | int32_t targetLength); | |
| | | | |
| /** | | /** | |
|
| | | * Compare two strings in UTF-8. | |
| | | * The strings will be compared using the options already specified. | |
| | | * Note: When input string contains malformed a UTF-8 byte sequence, | |
| | | * this function treats these bytes as REPLACEMENT CHARACTER (U+FFFD). | |
| | | * @param coll The UCollator containing the comparison rules. | |
| | | * @param source The source UTF-8 string. | |
| | | * @param sourceLength The length of source, or -1 if null-terminated. | |
| | | * @param target The target UTF-8 string. | |
| | | * @param targetLength The length of target, or -1 if null-terminated. | |
| | | * @param status A pointer to an UErrorCode to receive any errors | |
| | | * @return The result of comparing the strings; one of UCOL_EQUAL, | |
| | | * UCOL_GREATER, UCOL_LESS | |
| | | * @see ucol_greater | |
| | | * @see ucol_greaterOrEqual | |
| | | * @see ucol_equal | |
| | | * @draft ICU 50 | |
| | | */ | |
| | | U_DRAFT UCollationResult U_EXPORT2 | |
| | | ucol_strcollUTF8( | |
| | | const UCollator *coll, | |
| | | const char *source, | |
| | | int32_t sourceLength, | |
| | | const char *target, | |
| | | int32_t targetLength, | |
| | | UErrorCode *status); | |
| | | | |
| | | /** | |
| * Determine if one string is greater than another. | | * Determine if one string is greater than another. | |
| * This function is equivalent to {@link #ucol_strcoll } == UCOL_GREATER | | * This function is equivalent to {@link #ucol_strcoll } == UCOL_GREATER | |
| * @param coll The UCollator containing the comparison rules. | | * @param coll The UCollator containing the comparison rules. | |
| * @param source The source string. | | * @param source The source string. | |
| * @param sourceLength The length of source, or -1 if null-terminated. | | * @param sourceLength The length of source, or -1 if null-terminated. | |
| * @param target The target string. | | * @param target The target string. | |
| * @param targetLength The length of target, or -1 if null-terminated. | | * @param targetLength The length of target, or -1 if null-terminated. | |
| * @return TRUE if source is greater than target, FALSE otherwise. | | * @return TRUE if source is greater than target, FALSE otherwise. | |
| * @see ucol_strcoll | | * @see ucol_strcoll | |
| * @see ucol_greaterOrEqual | | * @see ucol_greaterOrEqual | |
| | | | |
| skipping to change at line 613 | | skipping to change at line 677 | |
| * will only return the length of the result without writing any of the res
ult string (pre-flighting). | | * will only return the length of the result without writing any of the res
ult string (pre-flighting). | |
| * @param pErrorCode Must be a valid pointer to an error code value, which
must not indicate a | | * @param pErrorCode Must be a valid pointer to an error code value, which
must not indicate a | |
| * failure before the function call. | | * failure before the function call. | |
| * @return The number of reordering codes written to the dest array. | | * @return The number of reordering codes written to the dest array. | |
| * @see ucol_setReorderCodes | | * @see ucol_setReorderCodes | |
| * @see ucol_getEquivalentReorderCodes | | * @see ucol_getEquivalentReorderCodes | |
| * @see UScriptCode | | * @see UScriptCode | |
| * @see UColReorderCode | | * @see UColReorderCode | |
| * @stable ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
|
| U_DRAFT int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| ucol_getReorderCodes(const UCollator* coll, | | ucol_getReorderCodes(const UCollator* coll, | |
| int32_t* dest, | | int32_t* dest, | |
| int32_t destCapacity, | | int32_t destCapacity, | |
| UErrorCode *pErrorCode); | | UErrorCode *pErrorCode); | |
| /** | | /** | |
| * Sets the reordering codes for this collator. | | * Sets the reordering codes for this collator. | |
| * Collation reordering allows scripts and some other defined blocks of cha
racters | | * Collation reordering allows scripts and some other defined blocks of cha
racters | |
| * to be moved relative to each other as a block. This reordering is done o
n top of | | * to be moved relative to each other as a block. This reordering is done o
n top of | |
| * the DUCET/CLDR standard collation order. Reordering can specify groups t
o be placed | | * the DUCET/CLDR standard collation order. Reordering can specify groups t
o be placed | |
| * at the start and/or the end of the collation order. These groups are spe
cified using | | * at the start and/or the end of the collation order. These groups are spe
cified using | |
| | | | |
| skipping to change at line 653 | | skipping to change at line 717 | |
| * length is also set to 0. An empty array will clear any reordering codes
on the collator. | | * length is also set to 0. An empty array will clear any reordering codes
on the collator. | |
| * @param reorderCodesLength The length of reorderCodes. | | * @param reorderCodesLength The length of reorderCodes. | |
| * @param pErrorCode Must be a valid pointer to an error code value, which
must not indicate a | | * @param pErrorCode Must be a valid pointer to an error code value, which
must not indicate a | |
| * failure before the function call. | | * failure before the function call. | |
| * @see ucol_getReorderCodes | | * @see ucol_getReorderCodes | |
| * @see ucol_getEquivalentReorderCodes | | * @see ucol_getEquivalentReorderCodes | |
| * @see UScriptCode | | * @see UScriptCode | |
| * @see UColReorderCode | | * @see UColReorderCode | |
| * @stable ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
|
| U_DRAFT void U_EXPORT2 | | U_STABLE void U_EXPORT2 | |
| ucol_setReorderCodes(UCollator* coll, | | ucol_setReorderCodes(UCollator* coll, | |
| const int32_t* reorderCodes, | | const int32_t* reorderCodes, | |
| int32_t reorderCodesLength, | | int32_t reorderCodesLength, | |
| UErrorCode *pErrorCode); | | UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Retrieves the reorder codes that are grouped with the given reorder code
. Some reorder | | * Retrieves the reorder codes that are grouped with the given reorder code
. Some reorder | |
| * codes will be grouped and must reorder together. | | * codes will be grouped and must reorder together. | |
| * @param reorderCode The reorder code to determine equivalence for. | | * @param reorderCode The reorder code to determine equivalence for. | |
| * @param dest The array to fill with the script ordering. | | * @param dest The array to fill with the script ordering. | |
| | | | |
| skipping to change at line 675 | | skipping to change at line 739 | |
| * will only return the length of the result without writing any of the res
ult string (pre-flighting). | | * will only return the length of the result without writing any of the res
ult string (pre-flighting). | |
| * @param pErrorCode Must be a valid pointer to an error code value, which
must not indicate | | * @param pErrorCode Must be a valid pointer to an error code value, which
must not indicate | |
| * a failure before the function call. | | * a failure before the function call. | |
| * @return The number of reordering codes written to the dest array. | | * @return The number of reordering codes written to the dest array. | |
| * @see ucol_setReorderCodes | | * @see ucol_setReorderCodes | |
| * @see ucol_getReorderCodes | | * @see ucol_getReorderCodes | |
| * @see UScriptCode | | * @see UScriptCode | |
| * @see UColReorderCode | | * @see UColReorderCode | |
| * @stable ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
|
| U_DRAFT int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| ucol_getEquivalentReorderCodes(int32_t reorderCode, | | ucol_getEquivalentReorderCodes(int32_t reorderCode, | |
| int32_t* dest, | | int32_t* dest, | |
| int32_t destCapacity, | | int32_t destCapacity, | |
| UErrorCode *pErrorCode); | | UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Get the display name for a UCollator. | | * Get the display name for a UCollator. | |
| * The display name is suitable for presentation to a user. | | * The display name is suitable for presentation to a user. | |
| * @param objLoc The locale of the collator in question. | | * @param objLoc The locale of the collator in question. | |
| * @param dispLoc The locale for display. | | * @param dispLoc The locale for display. | |
| | | | |
| skipping to change at line 820 | | skipping to change at line 884 | |
| * than resultCapacity, the returned full name will be truncated and | | * than resultCapacity, the returned full name will be truncated and | |
| * an error code will be returned. | | * an error code will be returned. | |
| * @stable ICU 3.0 | | * @stable ICU 3.0 | |
| */ | | */ | |
| U_STABLE int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| ucol_getFunctionalEquivalent(char* result, int32_t resultCapacity, | | ucol_getFunctionalEquivalent(char* result, int32_t resultCapacity, | |
| const char* keyword, const char* locale, | | const char* keyword, const char* locale, | |
| UBool* isAvailable, UErrorCode* status); | | UBool* isAvailable, UErrorCode* status); | |
| | | | |
| /** | | /** | |
|
| * Get the collation rules from a UCollator. | | * Get the collation tailoring rules from a UCollator. | |
| * The rules will follow the rule syntax. | | * The rules will follow the rule syntax. | |
| * @param coll The UCollator to query. | | * @param coll The UCollator to query. | |
| * @param length | | * @param length | |
|
| * @return The collation rules. | | * @return The collation tailoring rules. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| U_STABLE const UChar* U_EXPORT2 | | U_STABLE const UChar* U_EXPORT2 | |
| ucol_getRules( const UCollator *coll, | | ucol_getRules( const UCollator *coll, | |
| int32_t *length); | | int32_t *length); | |
| | | | |
| /** Get the short definition string for a collator. This API harvests the c
ollator's | | /** Get the short definition string for a collator. This API harvests the c
ollator's | |
| * locale and the attribute set and produces a string that can be used for
opening | | * locale and the attribute set and produces a string that can be used for
opening | |
| * a collator with the same properties using the ucol_openFromShortString
API. | | * a collator with the same properties using the ucol_openFromShortString
API. | |
| * This string will be normalized. | | * This string will be normalized. | |
| | | | |
| skipping to change at line 915 | | skipping to change at line 979 | |
| ucol_getSortKey(const UCollator *coll, | | ucol_getSortKey(const UCollator *coll, | |
| const UChar *source, | | const UChar *source, | |
| int32_t sourceLength, | | int32_t sourceLength, | |
| uint8_t *result, | | uint8_t *result, | |
| int32_t resultLength); | | int32_t resultLength); | |
| | | | |
| /** Gets the next count bytes of a sort key. Caller needs | | /** Gets the next count bytes of a sort key. Caller needs | |
| * to preserve state array between calls and to provide | | * to preserve state array between calls and to provide | |
| * the same type of UCharIterator set with the same string. | | * the same type of UCharIterator set with the same string. | |
| * The destination buffer provided must be big enough to store | | * The destination buffer provided must be big enough to store | |
|
| * the number of requested bytes. Generated sortkey is not | | * the number of requested bytes. | |
| * compatible with sortkeys generated using ucol_getSortKey | | * | |
| * API, since we don't do any compression. If uncompressed | | * The generated sort key may or may not be compatible with | |
| * sortkeys are required, this API can be used. | | * sort keys generated using ucol_getSortKey(). | |
| * @param coll The UCollator containing the collation rules. | | * @param coll The UCollator containing the collation rules. | |
| * @param iter UCharIterator containing the string we need | | * @param iter UCharIterator containing the string we need | |
| * the sort key to be calculated for. | | * the sort key to be calculated for. | |
| * @param state Opaque state of sortkey iteration. | | * @param state Opaque state of sortkey iteration. | |
| * @param dest Buffer to hold the resulting sortkey part | | * @param dest Buffer to hold the resulting sortkey part | |
| * @param count number of sort key bytes required. | | * @param count number of sort key bytes required. | |
| * @param status error code indicator. | | * @param status error code indicator. | |
| * @return the actual number of bytes of a sortkey. It can be | | * @return the actual number of bytes of a sortkey. It can be | |
| * smaller than count if we have reached the end of | | * smaller than count if we have reached the end of | |
| * the sort key. | | * the sort key. | |
| | | | |
| skipping to change at line 1165 | | skipping to change at line 1229 | |
| | | | |
| /** default memory size for the new clone. It needs to be this large for os
/400 large pointers | | /** default memory size for the new clone. It needs to be this large for os
/400 large pointers | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| #define U_COL_SAFECLONE_BUFFERSIZE 528 | | #define U_COL_SAFECLONE_BUFFERSIZE 528 | |
| | | | |
| /** | | /** | |
| * Returns current rules. Delta defines whether full rules are returned or
just the tailoring. | | * Returns current rules. Delta defines whether full rules are returned or
just the tailoring. | |
| * Returns number of UChars needed to store rules. If buffer is NULL or buf
ferLen is not enough | | * Returns number of UChars needed to store rules. If buffer is NULL or buf
ferLen is not enough | |
| * to store rules, will store up to available space. | | * to store rules, will store up to available space. | |
|
| | | * | |
| | | * ucol_getRules() should normally be used instead. | |
| | | * See http://userguide.icu-project.org/collation/customization#TOC-Buildin | |
| | | g-on-Existing-Locales | |
| * @param coll collator to get the rules from | | * @param coll collator to get the rules from | |
| * @param delta one of UCOL_TAILORING_ONLY, UCOL_FULL_RULES. | | * @param delta one of UCOL_TAILORING_ONLY, UCOL_FULL_RULES. | |
| * @param buffer buffer to store the result in. If NULL, you'll get no rule
s. | | * @param buffer buffer to store the result in. If NULL, you'll get no rule
s. | |
|
| * @param bufferLen lenght of buffer to store rules in. If less then needed
you'll get only the part that fits in. | | * @param bufferLen length of buffer to store rules in. If less than needed
you'll get only the part that fits in. | |
| * @return current rules | | * @return current rules | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
|
| | | * @see UCOL_FULL_RULES | |
| */ | | */ | |
| U_STABLE int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| ucol_getRulesEx(const UCollator *coll, UColRuleOption delta, UChar *buffer,
int32_t bufferLen); | | ucol_getRulesEx(const UCollator *coll, UColRuleOption delta, UChar *buffer,
int32_t bufferLen); | |
| | | | |
| #ifndef U_HIDE_DEPRECATED_API | | #ifndef U_HIDE_DEPRECATED_API | |
| /** | | /** | |
| * gets the locale name of the collator. If the collator | | * gets the locale name of the collator. If the collator | |
| * is instantiated from the rules, then this function returns | | * is instantiated from the rules, then this function returns | |
| * NULL. | | * NULL. | |
| * @param coll The UCollator for which the locale is needed | | * @param coll The UCollator for which the locale is needed | |
| | | | |
End of changes. 23 change blocks. |
| 23 lines changed or deleted | | 98 lines changed or added | |
|
| udat.h | | udat.h | |
| | | | |
| skipping to change at line 18 | | skipping to change at line 18 | |
| #ifndef UDAT_H | | #ifndef UDAT_H | |
| #define UDAT_H | | #define UDAT_H | |
| | | | |
| #include "unicode/utypes.h" | | #include "unicode/utypes.h" | |
| | | | |
| #if !UCONFIG_NO_FORMATTING | | #if !UCONFIG_NO_FORMATTING | |
| | | | |
| #include "unicode/localpointer.h" | | #include "unicode/localpointer.h" | |
| #include "unicode/ucal.h" | | #include "unicode/ucal.h" | |
| #include "unicode/unum.h" | | #include "unicode/unum.h" | |
|
| | | #include "unicode/udisplaycontext.h" | |
| /** | | /** | |
| * \file | | * \file | |
| * \brief C API: DateFormat | | * \brief C API: DateFormat | |
| * | | * | |
| * <h2> Date Format C API</h2> | | * <h2> Date Format C API</h2> | |
| * | | * | |
| * Date Format C API consists of functions that convert dates and | | * Date Format C API consists of functions that convert dates and | |
| * times from their internal representations to textual form and back again
in a | | * times from their internal representations to textual form and back again
in a | |
| * language-independent manner. Converting from the internal representation
(milliseconds | | * language-independent manner. Converting from the internal representation
(milliseconds | |
| * since midnight, January 1, 1970) to text is known as "formatting," and c
onverting | | * since midnight, January 1, 1970) to text is known as "formatting," and c
onverting | |
| | | | |
| skipping to change at line 169 | | skipping to change at line 170 | |
| UDAT_FULL_RELATIVE = UDAT_FULL | UDAT_RELATIVE, | | UDAT_FULL_RELATIVE = UDAT_FULL | UDAT_RELATIVE, | |
| | | | |
| UDAT_LONG_RELATIVE = UDAT_LONG | UDAT_RELATIVE, | | UDAT_LONG_RELATIVE = UDAT_LONG | UDAT_RELATIVE, | |
| | | | |
| UDAT_MEDIUM_RELATIVE = UDAT_MEDIUM | UDAT_RELATIVE, | | UDAT_MEDIUM_RELATIVE = UDAT_MEDIUM | UDAT_RELATIVE, | |
| | | | |
| UDAT_SHORT_RELATIVE = UDAT_SHORT | UDAT_RELATIVE, | | UDAT_SHORT_RELATIVE = UDAT_SHORT | UDAT_RELATIVE, | |
| | | | |
| /** No style */ | | /** No style */ | |
| UDAT_NONE = -1, | | UDAT_NONE = -1, | |
|
| /** for internal API use only */ | | | |
| UDAT_IGNORE = -2 | | | |
| | | | |
|
| } UDateFormatStyle; | | | |
| | | | |
| /* Cannot use #ifndef U_HIDE_DRAFT_API for UDateFormatContextType and UDate | | | |
| FormatContextValue | | | |
| * since a SimpleDateFormat virtual method & data member depends on them */ | | | |
| /** Date format context types | | | |
| * @draft ICU 49 | | | |
| */ | | | |
| typedef enum UDateFormatContextType { | | | |
| /** | | /** | |
|
| * Type (key) for specifying the capitalization context for which a dat | | * Use the pattern given in the parameter to udat_open | |
| e | | * @see udat_open | |
| * is to be formatted (possible values are in UDateFormatContextValue). | | * @draft ICU 50 | |
| * @draft ICU 49 | | | |
| */ | | */ | |
|
| UDAT_CAPITALIZATION = 1 | | UDAT_PATTERN = -2, | |
| } UDateFormatContextType; | | | |
| | | | |
|
| /** Values for date format context types | | /** @internal alias to UDAT_PATTERN */ | |
| * @draft ICU 49 | | UDAT_IGNORE = UDAT_PATTERN | |
| */ | | } UDateFormatStyle; | |
| typedef enum UDateFormatContextValue { | | | |
| /** Values for any UDateFormatContextType (key) */ | | // Skeletons for dates. | |
| /** | | | |
| * Value for any UDateFormatContextType (such as UDAT_CAPITALIZATION) i | | | |
| f the | | | |
| * relevant context to be used in formatting a date is unknown (this is | | | |
| the | | | |
| * default value for any UDateFormatContextType when no value has been | | | |
| * explicitly specified for that UDateFormatContextType). | | | |
| * @draft ICU 49 | | | |
| */ | | | |
| UDAT_CONTEXT_UNKNOWN = 0, | | | |
| #if !UCONFIG_NO_BREAK_ITERATION | | | |
| /** Values for type (key) UDAT_CAPITALIZATION */ | | | |
| /** | | | |
| * UDAT_CAPITALIZATION value if a date (or date symbol) is to be format | | | |
| ted | | | |
| * with capitalization appropriate for the middle of a sentence. | | | |
| * @draft ICU 49 | | | |
| */ | | | |
| UDAT_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = 1, | | | |
| /** | | | |
| * UDAT_CAPITALIZATION value if a date (or date symbol) is to be format | | | |
| ted | | | |
| * with capitalization appropriate for the beginning of a sentence. | | | |
| * @draft ICU 49 | | | |
| */ | | | |
| UDAT_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = 2, | | | |
| /** | | | |
| * UDAT_CAPITALIZATION value if a date (or date symbol) is to be format | | | |
| ted | | | |
| * with capitalization appropriate for a user-interface list or menu it | | | |
| em. | | | |
| * @draft ICU 49 | | | |
| */ | | | |
| UDAT_CAPITALIZATION_FOR_UI_LIST_OR_MENU = 3, | | | |
| /** | | | |
| * UDAT_CAPITALIZATION value if a date (or date symbol) is to be format | | | |
| ted | | | |
| * with capitalization appropriate for stand-alone usage such as an | | | |
| * isolated name on a calendar page. | | | |
| * @draft ICU 49 | | | |
| */ | | | |
| UDAT_CAPITALIZATION_FOR_STANDALONE = 4 | | | |
| #endif | | | |
| } UDateFormatContextValue; | | | |
| | | | |
| /** | | /** | |
|
| * @{ | | * Constant for date skeleton with year. | |
| * Below are a set of pre-defined skeletons. | | | |
| * | | | |
| * <P> | | | |
| * A skeleton | | | |
| * <ol> | | | |
| * <li> | | | |
| * only keeps the field pattern letter and ignores all other parts | | | |
| * in a pattern, such as space, punctuations, and string literals. | | | |
| * </li> | | | |
| * <li> | | | |
| * hides the order of fields. | | | |
| * </li> | | | |
| * <li> | | | |
| * might hide a field's pattern letter length. | | | |
| * | | | |
| * For those non-digit calendar fields, the pattern letter length is | | | |
| * important, such as MMM, MMMM, and MMMMM; EEE and EEEE, | | | |
| * and the field's pattern letter length is honored. | | | |
| * | | | |
| * For the digit calendar fields, such as M or MM, d or dd, yy or yyyy, | | | |
| * the field pattern length is ignored and the best match, which is defi | | | |
| ned | | | |
| * in date time patterns, will be returned without honor the field patte | | | |
| rn | | | |
| * letter length in skeleton. | | | |
| * </li> | | | |
| * </ol> | | | |
| * | | | |
| * @stable ICU 4.0 | | * @stable ICU 4.0 | |
| */ | | */ | |
|
| | | #define UDAT_YEAR "y" | |
| #define UDAT_MINUTE_SECOND "ms" | | | |
| #define UDAT_HOUR24_MINUTE "Hm" | | | |
| #define UDAT_HOUR24_MINUTE_SECOND "Hms" | | | |
| #define UDAT_HOUR_MINUTE_SECOND "hms" | | | |
| #define UDAT_STANDALONE_MONTH "LLLL" | | | |
| #define UDAT_ABBR_STANDALONE_MONTH "LLL" | | | |
| #define UDAT_YEAR_QUARTER "yQQQ" | | | |
| #define UDAT_YEAR_ABBR_QUARTER "yQ" | | | |
| | | | |
| /** @} */ | | | |
| | | | |
| /** | | /** | |
|
| * @{ | | * Constant for date skeleton with quarter. | |
| * Below are a set of pre-defined skeletons that | | * @internal ICU 50 technology preview | |
| * have pre-defined interval patterns in resource files. | | */ | |
| * Users are encouraged to use them in date interval format factory methods | | #define UDAT_QUARTER "QQQQ" | |
| . | | /** | |
| * | | * Constant for date skeleton with abbreviated quarter. | |
| | | * @internal ICU 50 technology preview | |
| | | */ | |
| | | #define UDAT_ABBR_QUARTER "QQQ" | |
| | | /** | |
| | | * Constant for date skeleton with year and quarter. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_YEAR_QUARTER "yQQQQ" | |
| | | /** | |
| | | * Constant for date skeleton with year and abbreviated quarter. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_YEAR_ABBR_QUARTER "yQQQ" | |
| | | /** | |
| | | * Constant for date skeleton with month. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_MONTH "MMMM" | |
| | | /** | |
| | | * Constant for date skeleton with abbreviated month. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_ABBR_MONTH "MMM" | |
| | | /** | |
| | | * Constant for date skeleton with numeric month. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_NUM_MONTH "M" | |
| | | /** | |
| | | * Constant for date skeleton with year and month. | |
| * @stable ICU 4.0 | | * @stable ICU 4.0 | |
| */ | | */ | |
|
| #define UDAT_HOUR_MINUTE "hm" | | | |
| #define UDAT_YEAR "y" | | | |
| #define UDAT_DAY "d" | | | |
| #define UDAT_NUM_MONTH_WEEKDAY_DAY "MEd" | | | |
| #define UDAT_YEAR_NUM_MONTH "yM" | | | |
| #define UDAT_NUM_MONTH_DAY "Md" | | | |
| #define UDAT_YEAR_NUM_MONTH_WEEKDAY_DAY "yMEd" | | | |
| #define UDAT_ABBR_MONTH_WEEKDAY_DAY "MMMEd" | | | |
| #define UDAT_YEAR_MONTH "yMMMM" | | #define UDAT_YEAR_MONTH "yMMMM" | |
|
| | | /** | |
| | | * Constant for date skeleton with year and abbreviated month. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| #define UDAT_YEAR_ABBR_MONTH "yMMM" | | #define UDAT_YEAR_ABBR_MONTH "yMMM" | |
|
| #define UDAT_MONTH_DAY "MMMMd" | | /** | |
| #define UDAT_ABBR_MONTH_DAY "MMMd" | | * Constant for date skeleton with year and numeric month. | |
| #define UDAT_MONTH_WEEKDAY_DAY "MMMMEEEEd" | | * @stable ICU 4.0 | |
| #define UDAT_YEAR_ABBR_MONTH_WEEKDAY_DAY "yMMMEd" | | */ | |
| #define UDAT_YEAR_MONTH_WEEKDAY_DAY "yMMMMEEEEd" | | #define UDAT_YEAR_NUM_MONTH "yM" | |
| | | /** | |
| | | * Constant for date skeleton with day. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_DAY "d" | |
| | | /** | |
| | | * Constant for date skeleton with year, month, and day. | |
| | | * Used in combinations date + time, date + time + zone, or time + zone. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| #define UDAT_YEAR_MONTH_DAY "yMMMMd" | | #define UDAT_YEAR_MONTH_DAY "yMMMMd" | |
|
| | | /** | |
| | | * Constant for date skeleton with year, abbreviated month, and day. | |
| | | * Used in combinations date + time, date + time + zone, or time + zone. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| #define UDAT_YEAR_ABBR_MONTH_DAY "yMMMd" | | #define UDAT_YEAR_ABBR_MONTH_DAY "yMMMd" | |
|
| | | /** | |
| | | * Constant for date skeleton with year, numeric month, and day. | |
| | | * Used in combinations date + time, date + time + zone, or time + zone. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| #define UDAT_YEAR_NUM_MONTH_DAY "yMd" | | #define UDAT_YEAR_NUM_MONTH_DAY "yMd" | |
|
| #define UDAT_NUM_MONTH "M" | | /** | |
| #define UDAT_ABBR_MONTH "MMM" | | * Constant for date skeleton with weekday. | |
| #define UDAT_MONTH "MMMM" | | * @internal ICU 50 technology preview | |
| #define UDAT_HOUR_MINUTE_GENERIC_TZ "hmv" | | */ | |
| #define UDAT_HOUR_MINUTE_TZ "hmz" | | #define UDAT_WEEKDAY "EEEE" | |
| #define UDAT_HOUR "h" | | /** | |
| #define UDAT_HOUR_GENERIC_TZ "hv" | | * Constant for date skeleton with abbreviated weekday. | |
| #define UDAT_HOUR_TZ "hz" | | * @internal ICU 50 technology preview | |
| | | */ | |
| | | #define UDAT_ABBR_WEEKDAY "E" | |
| | | /** | |
| | | * Constant for date skeleton with year, month, weekday, and day. | |
| | | * Used in combinations date + time, date + time + zone, or time + zone. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_YEAR_MONTH_WEEKDAY_DAY "yMMMMEEEEd" | |
| | | /** | |
| | | * Constant for date skeleton with year, abbreviated month, weekday, and da | |
| | | y. | |
| | | * Used in combinations date + time, date + time + zone, or time + zone. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_YEAR_ABBR_MONTH_WEEKDAY_DAY "yMMMEd" | |
| | | /** | |
| | | * Constant for date skeleton with year, numeric month, weekday, and day. | |
| | | * Used in combinations date + time, date + time + zone, or time + zone. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_YEAR_NUM_MONTH_WEEKDAY_DAY "yMEd" | |
| | | /** | |
| | | * Constant for date skeleton with long month and day. | |
| | | * Used in combinations date + time, date + time + zone, or time + zone. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_MONTH_DAY "MMMMd" | |
| | | /** | |
| | | * Constant for date skeleton with abbreviated month and day. | |
| | | * Used in combinations date + time, date + time + zone, or time + zone. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_ABBR_MONTH_DAY "MMMd" | |
| | | /** | |
| | | * Constant for date skeleton with numeric month and day. | |
| | | * Used in combinations date + time, date + time + zone, or time + zone. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_NUM_MONTH_DAY "Md" | |
| | | /** | |
| | | * Constant for date skeleton with month, weekday, and day. | |
| | | * Used in combinations date + time, date + time + zone, or time + zone. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_MONTH_WEEKDAY_DAY "MMMMEEEEd" | |
| | | /** | |
| | | * Constant for date skeleton with abbreviated month, weekday, and day. | |
| | | * Used in combinations date + time, date + time + zone, or time + zone. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_ABBR_MONTH_WEEKDAY_DAY "MMMEd" | |
| | | /** | |
| | | * Constant for date skeleton with numeric month, weekday, and day. | |
| | | * Used in combinations date + time, date + time + zone, or time + zone. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_NUM_MONTH_WEEKDAY_DAY "MEd" | |
| | | | |
| | | // Skeletons for times. | |
| | | | |
| | | /** | |
| | | * Constant for date skeleton with hour, with the locale's preferred hour f | |
| | | ormat (12 or 24). | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_HOUR "j" | |
| | | /** | |
| | | * Constant for date skeleton with hour in 24-hour presentation. | |
| | | * @internal ICU 50 technology preview | |
| | | */ | |
| | | #define UDAT_HOUR24 "H" | |
| | | /** | |
| | | * Constant for date skeleton with minute. | |
| | | * @internal ICU 50 technology preview | |
| | | */ | |
| | | #define UDAT_MINUTE "m" | |
| | | /** | |
| | | * Constant for date skeleton with hour and minute, with the locale's prefe | |
| | | rred hour format (12 or 24). | |
| | | * Used in combinations date + time, date + time + zone, or time + zone. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_HOUR_MINUTE "jm" | |
| | | /** | |
| | | * Constant for date skeleton with hour and minute in 24-hour presentation. | |
| | | * Used in combinations date + time, date + time + zone, or time + zone. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_HOUR24_MINUTE "Hm" | |
| | | /** | |
| | | * Constant for date skeleton with second. | |
| | | * @internal ICU 50 technology preview | |
| | | */ | |
| | | #define UDAT_SECOND "s" | |
| | | /** | |
| | | * Constant for date skeleton with hour, minute, and second, | |
| | | * with the locale's preferred hour format (12 or 24). | |
| | | * Used in combinations date + time, date + time + zone, or time + zone. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_HOUR_MINUTE_SECOND "jms" | |
| | | /** | |
| | | * Constant for date skeleton with hour, minute, and second in | |
| | | * 24-hour presentation. | |
| | | * Used in combinations date + time, date + time + zone, or time + zone. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_HOUR24_MINUTE_SECOND "Hms" | |
| | | /** | |
| | | * Constant for date skeleton with minute and second. | |
| | | * Used in combinations date + time, date + time + zone, or time + zone. | |
| | | * @stable ICU 4.0 | |
| | | */ | |
| | | #define UDAT_MINUTE_SECOND "ms" | |
| | | | |
|
| /** @} */ | | // Skeletons for time zones. | |
| | | | |
| | | /** | |
| | | * Constant for <i>generic location format</i>, such as Los Angeles Time; | |
| | | * used in combinations date + time + zone, or time + zone. | |
| | | * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM | |
| | | L Date Format Patterns</a> | |
| | | * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML | |
| | | Time Zone Fallback</a> | |
| | | * @internal ICU 50 technology preview | |
| | | */ | |
| | | #define UDAT_LOCATION_TZ "VVVV" | |
| | | /** | |
| | | * Constant for <i>generic non-location format</i>, such as Pacific Time; | |
| | | * used in combinations date + time + zone, or time + zone. | |
| | | * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM | |
| | | L Date Format Patterns</a> | |
| | | * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML | |
| | | Time Zone Fallback</a> | |
| | | * @internal ICU 50 technology preview | |
| | | */ | |
| | | #define UDAT_GENERIC_TZ "vvvv" | |
| | | /** | |
| | | * Constant for <i>generic non-location format</i>, abbreviated if possible | |
| | | , such as PT; | |
| | | * used in combinations date + time + zone, or time + zone. | |
| | | * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM | |
| | | L Date Format Patterns</a> | |
| | | * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML | |
| | | Time Zone Fallback</a> | |
| | | * @internal ICU 50 technology preview | |
| | | */ | |
| | | #define UDAT_ABBR_GENERIC_TZ "v" | |
| | | /** | |
| | | * Constant for <i>specific non-location format</i>, such as Pacific Daylig | |
| | | ht Time; | |
| | | * used in combinations date + time + zone, or time + zone. | |
| | | * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM | |
| | | L Date Format Patterns</a> | |
| | | * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML | |
| | | Time Zone Fallback</a> | |
| | | * @internal ICU 50 technology preview | |
| | | */ | |
| | | #define UDAT_SPECIFIC_TZ "zzzz" | |
| | | /** | |
| | | * Constant for <i>specific non-location format</i>, abbreviated if possibl | |
| | | e, such as PDT; | |
| | | * used in combinations date + time + zone, or time + zone. | |
| | | * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM | |
| | | L Date Format Patterns</a> | |
| | | * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML | |
| | | Time Zone Fallback</a> | |
| | | * @internal ICU 50 technology preview | |
| | | */ | |
| | | #define UDAT_ABBR_SPECIFIC_TZ "z" | |
| | | /** | |
| | | * Constant for <i>localized GMT/UTC format</i>, such as GMT+8:00 or HPG-8: | |
| | | 00; | |
| | | * used in combinations date + time + zone, or time + zone. | |
| | | * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM | |
| | | L Date Format Patterns</a> | |
| | | * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML | |
| | | Time Zone Fallback</a> | |
| | | * @internal ICU 50 technology preview | |
| | | */ | |
| | | #define UDAT_ABBR_UTC_TZ "ZZZZ" | |
| | | | |
| | | // deprecated skeleton constants | |
| | | | |
| | | /** | |
| | | * Constant for date skeleton with standalone month. | |
| | | * @deprecated ICU 50 Use UDAT_MONTH instead. | |
| | | */ | |
| | | #define UDAT_STANDALONE_MONTH "LLLL" | |
| | | /** | |
| | | * Constant for date skeleton with standalone abbreviated month. | |
| | | * @deprecated ICU 50 Use UDAT_ABBR_MONTH instead. | |
| | | */ | |
| | | #define UDAT_ABBR_STANDALONE_MONTH "LLL" | |
| | | | |
| | | /** | |
| | | * Constant for date skeleton with hour, minute, and generic timezone. | |
| | | * @deprecated ICU 50 Use instead UDAT_HOUR_MINUTE UDAT_ABBR_GENERIC_TZ or | |
| | | some other timezone presentation. | |
| | | */ | |
| | | #define UDAT_HOUR_MINUTE_GENERIC_TZ "jmv" | |
| | | /** | |
| | | * Constant for date skeleton with hour, minute, and timezone. | |
| | | * @deprecated ICU 50 Use instead UDAT_HOUR_MINUTE UDAT_ABBR_SPECIFIC_TZ or | |
| | | some other timezone presentation. | |
| | | */ | |
| | | #define UDAT_HOUR_MINUTE_TZ "jmz" | |
| | | /** | |
| | | * Constant for date skeleton with hour and generic timezone. | |
| | | * @deprecated ICU 50 Use instead UDAT_HOUR UDAT_ABBR_GENERIC_TZ or some ot | |
| | | her timezone presentation. | |
| | | */ | |
| | | #define UDAT_HOUR_GENERIC_TZ "jv" | |
| | | /** | |
| | | * Constant for date skeleton with hour and timezone. | |
| | | * @deprecated ICU 50 Use instead UDAT_HOUR UDAT_ABBR_SPECIFIC_TZ or some o | |
| | | ther timezone presentation. | |
| | | */ | |
| | | #define UDAT_HOUR_TZ "jz" | |
| | | | |
| /** | | /** | |
| * FieldPosition and UFieldPosition selectors for format fields | | * FieldPosition and UFieldPosition selectors for format fields | |
| * defined by DateFormat and UDateFormat. | | * defined by DateFormat and UDateFormat. | |
| * @stable ICU 3.0 | | * @stable ICU 3.0 | |
| */ | | */ | |
| typedef enum UDateFormatField { | | typedef enum UDateFormatField { | |
| /** | | /** | |
| * FieldPosition and UFieldPosition selector for 'G' field alignment, | | * FieldPosition and UFieldPosition selector for 'G' field alignment, | |
| * corresponding to the UCAL_ERA field. | | * corresponding to the UCAL_ERA field. | |
| | | | |
| skipping to change at line 379 | | skipping to change at line 536 | |
| /** | | /** | |
| * FieldPosition and UFieldPosition selector for 's' field alignment, | | * FieldPosition and UFieldPosition selector for 's' field alignment, | |
| * corresponding to the UCAL_SECOND field. | | * corresponding to the UCAL_SECOND field. | |
| * @stable ICU 3.0 | | * @stable ICU 3.0 | |
| */ | | */ | |
| UDAT_SECOND_FIELD = 7, | | UDAT_SECOND_FIELD = 7, | |
| | | | |
| /** | | /** | |
| * FieldPosition and UFieldPosition selector for 'S' field alignment, | | * FieldPosition and UFieldPosition selector for 'S' field alignment, | |
| * corresponding to the UCAL_MILLISECOND field. | | * corresponding to the UCAL_MILLISECOND field. | |
|
| | | * | |
| | | * Note: Time formats that use 'S' can display a maximum of three | |
| | | * significant digits for fractional seconds, corresponding to millisec | |
| | | ond | |
| | | * resolution and a fractional seconds sub-pattern of SSS. If the | |
| | | * sub-pattern is S or SS, the fractional seconds value will be truncat | |
| | | ed | |
| | | * (not rounded) to the number of display places specified. If the | |
| | | * fractional seconds sub-pattern is longer than SSS, the additional | |
| | | * display places will be filled with zeros. | |
| * @stable ICU 3.0 | | * @stable ICU 3.0 | |
| */ | | */ | |
| UDAT_FRACTIONAL_SECOND_FIELD = 8, | | UDAT_FRACTIONAL_SECOND_FIELD = 8, | |
| | | | |
| /** | | /** | |
| * FieldPosition and UFieldPosition selector for 'E' field alignment, | | * FieldPosition and UFieldPosition selector for 'E' field alignment, | |
| * corresponding to the UCAL_DAY_OF_WEEK field. | | * corresponding to the UCAL_DAY_OF_WEEK field. | |
| * @stable ICU 3.0 | | * @stable ICU 3.0 | |
| */ | | */ | |
| UDAT_DAY_OF_WEEK_FIELD = 9, | | UDAT_DAY_OF_WEEK_FIELD = 9, | |
| | | | |
| skipping to change at line 580 | | skipping to change at line 745 | |
| U_STABLE UCalendarDateFields U_EXPORT2 | | U_STABLE UCalendarDateFields U_EXPORT2 | |
| udat_toCalendarDateField(UDateFormatField field); | | udat_toCalendarDateField(UDateFormatField field); | |
| | | | |
| /** | | /** | |
| * Open a new UDateFormat for formatting and parsing dates and times. | | * Open a new UDateFormat for formatting and parsing dates and times. | |
| * A UDateFormat may be used to format dates in calls to {@link #udat_forma
t }, | | * A UDateFormat may be used to format dates in calls to {@link #udat_forma
t }, | |
| * and to parse dates in calls to {@link #udat_parse }. | | * and to parse dates in calls to {@link #udat_parse }. | |
| * @param timeStyle The style used to format times; one of UDAT_FULL, UDAT_
LONG, | | * @param timeStyle The style used to format times; one of UDAT_FULL, UDAT_
LONG, | |
| * UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, or UDAT_NONE (relative time style
s | | * UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, or UDAT_NONE (relative time style
s | |
| * are not currently supported). | | * are not currently supported). | |
|
| | | * When the pattern parameter is used, pass in UDAT_PATTERN for both timeSt
yle and dateStyle. | |
| * @param dateStyle The style used to format dates; one of UDAT_FULL, UDAT_
LONG, | | * @param dateStyle The style used to format dates; one of UDAT_FULL, UDAT_
LONG, | |
| * UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, UDAT_FULL_RELATIVE, UDAT_LONG_REL
ATIVE, | | * UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, UDAT_FULL_RELATIVE, UDAT_LONG_REL
ATIVE, | |
|
| * UDAT_MEDIUM_RELATIVE, UDAT_SHORT_RELATIVE, or UDAT_NONE. As currently im | | * UDAT_MEDIUM_RELATIVE, UDAT_SHORT_RELATIVE, or UDAT_NONE. | |
| plemented, | | * When the pattern parameter is used, pass in UDAT_PATTERN for both timeSt | |
| | | yle and dateStyle. | |
| | | * As currently implemented, | |
| * relative date formatting only affects a limited range of calendar days b
efore or | | * relative date formatting only affects a limited range of calendar days b
efore or | |
| * after the current date, based on the CLDR <field type="day">/<r
elative> data: For | | * after the current date, based on the CLDR <field type="day">/<r
elative> data: For | |
| * example, in English, "Yesterday", "Today", and "Tomorrow". Outside of th
is range, | | * example, in English, "Yesterday", "Today", and "Tomorrow". Outside of th
is range, | |
| * dates are formatted using the corresponding non-relative style. | | * dates are formatted using the corresponding non-relative style. | |
| * @param locale The locale specifying the formatting conventions | | * @param locale The locale specifying the formatting conventions | |
| * @param tzID A timezone ID specifying the timezone to use. If 0, use | | * @param tzID A timezone ID specifying the timezone to use. If 0, use | |
| * the default timezone. | | * the default timezone. | |
| * @param tzIDLength The length of tzID, or -1 if null-terminated. | | * @param tzIDLength The length of tzID, or -1 if null-terminated. | |
| * @param pattern A pattern specifying the format to use. | | * @param pattern A pattern specifying the format to use. | |
| * @param patternLength The number of characters in the pattern, or -1 if n
ull-terminated. | | * @param patternLength The number of characters in the pattern, or -1 if n
ull-terminated. | |
| | | | |
| skipping to change at line 1024 | | skipping to change at line 1192 | |
| * @param type type of the locale we're looking for (valid or actual) | | * @param type type of the locale we're looking for (valid or actual) | |
| * @param status error code for the operation | | * @param status error code for the operation | |
| * @return the locale name | | * @return the locale name | |
| * @stable ICU 2.8 | | * @stable ICU 2.8 | |
| */ | | */ | |
| U_STABLE const char* U_EXPORT2 | | U_STABLE const char* U_EXPORT2 | |
| udat_getLocaleByType(const UDateFormat *fmt, | | udat_getLocaleByType(const UDateFormat *fmt, | |
| ULocDataLocaleType type, | | ULocDataLocaleType type, | |
| UErrorCode* status); | | UErrorCode* status); | |
| | | | |
|
| #ifndef U_HIDE_DRAFT_API | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
|
| * Set the formatter's default value for a particular context type, | | * Set a particular UDisplayContext value in the formatter, such as | |
| * such as UDAT_CAPITALIZATION. | | * UDISPCTX_CAPITALIZATION_FOR_STANDALONE. | |
| * @param fmt The formatter for which to set a context type's default value | | * @param fmt The formatter for which to set a UDisplayContext value. | |
| . | | * @param value The UDisplayContext value to set. | |
| * @param type The context type for which the default value should be set. | | | |
| * @param value The default value to set for the specified context type. | | | |
| * @param status A pointer to an UErrorCode to receive any errors | | * @param status A pointer to an UErrorCode to receive any errors | |
|
| * @draft ICU 49 | | * @internal ICU 50 technology preview | |
| */ | | */ | |
|
| U_DRAFT void U_EXPORT2 | | U_INTERNAL void U_EXPORT2 | |
| udat_setDefaultContext(UDateFormat* fmt, | | udat_setContext(UDateFormat* fmt, UDisplayContext value, UErrorCode* status | |
| UDateFormatContextType type, UDateFormatContextValue | | ); | |
| value, | | | |
| UErrorCode* status); | | | |
| | | | |
| /** | | /** | |
|
| * Get the formatter's default value for a particular context type, | | * Get the formatter's UDisplayContext value for the specified UDisplayCont | |
| * such as UDAT_CAPITALIZATION. | | extType, | |
| * @param fmt The formatter from which to get a context type's default valu | | * such as UDISPCTX_TYPE_CAPITALIZATION. | |
| e. | | * @param fmt The formatter to query. | |
| * @param type The context type for which the default value should be obtai | | * @param type The UDisplayContextType whose value to return | |
| ned. | | | |
| * @param status A pointer to an UErrorCode to receive any errors | | * @param status A pointer to an UErrorCode to receive any errors | |
|
| * @return The current default value for the specified context type. | | * @return The UDisplayContextValue for the specified type. | |
| * @draft ICU 49 | | * @internal ICU 50 technology preview | |
| */ | | */ | |
|
| U_DRAFT int32_t U_EXPORT2 | | U_INTERNAL UDisplayContext U_EXPORT2 | |
| udat_getDefaultContext(UDateFormat* fmt, | | udat_getContext(UDateFormat* fmt, UDisplayContextType type, UErrorCode* sta | |
| UDateFormatContextType type, | | tus); | |
| UErrorCode* status); | | | |
| #endif /* U_HIDE_DRAFT_API */ | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| #ifndef U_HIDE_INTERNAL_API | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
| * Extract the date pattern from a UDateFormat set for relative date formatt
ing. | | * Extract the date pattern from a UDateFormat set for relative date formatt
ing. | |
| * The pattern will follow the pattern syntax rules. | | * The pattern will follow the pattern syntax rules. | |
| * @param fmt The formatter to query. | | * @param fmt The formatter to query. | |
| * @param result A pointer to a buffer to receive the pattern. | | * @param result A pointer to a buffer to receive the pattern. | |
| * @param resultLength The maximum size of result. | | * @param resultLength The maximum size of result. | |
| * @param status A pointer to a UErrorCode to receive any errors | | * @param status A pointer to a UErrorCode to receive any errors | |
| * @return The total buffer size needed; if greater than resultLength, the o
utput was truncated. | | * @return The total buffer size needed; if greater than resultLength, the o
utput was truncated. | |
| | | | |
End of changes. 26 change blocks. |
| 163 lines changed or deleted | | 339 lines changed or added | |
|
| uidna.h | | uidna.h | |
| | | | |
| skipping to change at line 137 | | skipping to change at line 137 | |
| * | | * | |
| * @param options Bit set to modify the processing and error checking. | | * @param options Bit set to modify the processing and error checking. | |
| * See option bit set values in uidna.h. | | * See option bit set values in uidna.h. | |
| * @param pErrorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return the UTS #46 UIDNA instance, if successful | | * @return the UTS #46 UIDNA instance, if successful | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT UIDNA * U_EXPORT2 | | U_STABLE UIDNA * U_EXPORT2 | |
| uidna_openUTS46(uint32_t options, UErrorCode *pErrorCode); | | uidna_openUTS46(uint32_t options, UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Closes a UIDNA instance. | | * Closes a UIDNA instance. | |
| * @param idna UIDNA instance to be closed | | * @param idna UIDNA instance to be closed | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT void U_EXPORT2 | | U_STABLE void U_EXPORT2 | |
| uidna_close(UIDNA *idna); | | uidna_close(UIDNA *idna); | |
| | | | |
| #if U_SHOW_CPLUSPLUS_API | | #if U_SHOW_CPLUSPLUS_API | |
| | | | |
| U_NAMESPACE_BEGIN | | U_NAMESPACE_BEGIN | |
| | | | |
| /** | | /** | |
| * \class LocalUIDNAPointer | | * \class LocalUIDNAPointer | |
| * "Smart pointer" class, closes a UIDNA via uidna_close(). | | * "Smart pointer" class, closes a UIDNA via uidna_close(). | |
| * For most methods see the LocalPointerBase base class. | | * For most methods see the LocalPointerBase base class. | |
| | | | |
| skipping to change at line 177 | | skipping to change at line 177 | |
| /** | | /** | |
| * Output container for IDNA processing errors. | | * Output container for IDNA processing errors. | |
| * Initialize with UIDNA_INFO_INITIALIZER: | | * Initialize with UIDNA_INFO_INITIALIZER: | |
| * \code | | * \code | |
| * UIDNAInfo info = UIDNA_INFO_INITIALIZER; | | * UIDNAInfo info = UIDNA_INFO_INITIALIZER; | |
| * int32_t length = uidna_nameToASCII(..., &info, &errorCode); | | * int32_t length = uidna_nameToASCII(..., &info, &errorCode); | |
| * if(U_SUCCESS(errorCode) && info.errors!=0) { ... } | | * if(U_SUCCESS(errorCode) && info.errors!=0) { ... } | |
| * \endcode | | * \endcode | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| struct UIDNAInfo { | | typedef struct UIDNAInfo { | |
| /** sizeof(UIDNAInfo) @stable ICU 4.6 */ | | /** sizeof(UIDNAInfo) @stable ICU 4.6 */ | |
| int16_t size; | | int16_t size; | |
| /** | | /** | |
| * Set to TRUE if transitional and nontransitional processing produce d
ifferent results. | | * Set to TRUE if transitional and nontransitional processing produce d
ifferent results. | |
| * For details see C++ IDNAInfo::isTransitionalDifferent(). | | * For details see C++ IDNAInfo::isTransitionalDifferent(). | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| UBool isTransitionalDifferent; | | UBool isTransitionalDifferent; | |
| UBool reservedB3; /**< Reserved field, do not use. @internal */ | | UBool reservedB3; /**< Reserved field, do not use. @internal */ | |
| /** | | /** | |
| * Bit set indicating IDNA processing errors. 0 if no errors. | | * Bit set indicating IDNA processing errors. 0 if no errors. | |
| * See UIDNA_ERROR_... constants. | | * See UIDNA_ERROR_... constants. | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| uint32_t errors; | | uint32_t errors; | |
| int32_t reservedI2; /**< Reserved field, do not use. @internal */ | | int32_t reservedI2; /**< Reserved field, do not use. @internal */ | |
| int32_t reservedI3; /**< Reserved field, do not use. @internal */ | | int32_t reservedI3; /**< Reserved field, do not use. @internal */ | |
|
| }; | | } UIDNAInfo; | |
| typedef struct UIDNAInfo UIDNAInfo; | | | |
| | | | |
| /** | | /** | |
| * Static initializer for a UIDNAInfo struct. | | * Static initializer for a UIDNAInfo struct. | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| #define UIDNA_INFO_INITIALIZER { \ | | #define UIDNA_INFO_INITIALIZER { \ | |
| (int16_t)sizeof(UIDNAInfo), \ | | (int16_t)sizeof(UIDNAInfo), \ | |
| FALSE, FALSE, \ | | FALSE, FALSE, \ | |
| 0, 0, 0 } | | 0, 0, 0 } | |
| | | | |
| | | | |
| skipping to change at line 230 | | skipping to change at line 229 | |
| * @param dest Destination string buffer | | * @param dest Destination string buffer | |
| * @param capacity Destination buffer capacity | | * @param capacity Destination buffer capacity | |
| * @param pInfo Output container of IDNA processing details. | | * @param pInfo Output container of IDNA processing details. | |
| * @param pErrorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return destination string length | | * @return destination string length | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| uidna_labelToASCII(const UIDNA *idna, | | uidna_labelToASCII(const UIDNA *idna, | |
| const UChar *label, int32_t length, | | const UChar *label, int32_t length, | |
| UChar *dest, int32_t capacity, | | UChar *dest, int32_t capacity, | |
| UIDNAInfo *pInfo, UErrorCode *pErrorCode); | | UIDNAInfo *pInfo, UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Converts a single domain name label into its Unicode form for human-read
able display. | | * Converts a single domain name label into its Unicode form for human-read
able display. | |
| * If any processing step fails, then pInfo->errors will be non-zero. | | * If any processing step fails, then pInfo->errors will be non-zero. | |
| * The label might be modified according to the types of errors. | | * The label might be modified according to the types of errors. | |
| * | | * | |
| | | | |
| skipping to change at line 257 | | skipping to change at line 256 | |
| * @param dest Destination string buffer | | * @param dest Destination string buffer | |
| * @param capacity Destination buffer capacity | | * @param capacity Destination buffer capacity | |
| * @param pInfo Output container of IDNA processing details. | | * @param pInfo Output container of IDNA processing details. | |
| * @param pErrorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return destination string length | | * @return destination string length | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| uidna_labelToUnicode(const UIDNA *idna, | | uidna_labelToUnicode(const UIDNA *idna, | |
| const UChar *label, int32_t length, | | const UChar *label, int32_t length, | |
| UChar *dest, int32_t capacity, | | UChar *dest, int32_t capacity, | |
| UIDNAInfo *pInfo, UErrorCode *pErrorCode); | | UIDNAInfo *pInfo, UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Converts a whole domain name into its ASCII form for DNS lookup. | | * Converts a whole domain name into its ASCII form for DNS lookup. | |
| * If any processing step fails, then pInfo->errors will be non-zero and | | * If any processing step fails, then pInfo->errors will be non-zero and | |
| * the result might not be an ASCII string. | | * the result might not be an ASCII string. | |
| * The domain name might be modified according to the types of errors. | | * The domain name might be modified according to the types of errors. | |
| | | | |
| skipping to change at line 286 | | skipping to change at line 285 | |
| * @param dest Destination string buffer | | * @param dest Destination string buffer | |
| * @param capacity Destination buffer capacity | | * @param capacity Destination buffer capacity | |
| * @param pInfo Output container of IDNA processing details. | | * @param pInfo Output container of IDNA processing details. | |
| * @param pErrorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return destination string length | | * @return destination string length | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| uidna_nameToASCII(const UIDNA *idna, | | uidna_nameToASCII(const UIDNA *idna, | |
| const UChar *name, int32_t length, | | const UChar *name, int32_t length, | |
| UChar *dest, int32_t capacity, | | UChar *dest, int32_t capacity, | |
| UIDNAInfo *pInfo, UErrorCode *pErrorCode); | | UIDNAInfo *pInfo, UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Converts a whole domain name into its Unicode form for human-readable di
splay. | | * Converts a whole domain name into its Unicode form for human-readable di
splay. | |
| * If any processing step fails, then pInfo->errors will be non-zero. | | * If any processing step fails, then pInfo->errors will be non-zero. | |
| * The domain name might be modified according to the types of errors. | | * The domain name might be modified according to the types of errors. | |
| * | | * | |
| | | | |
| skipping to change at line 313 | | skipping to change at line 312 | |
| * @param dest Destination string buffer | | * @param dest Destination string buffer | |
| * @param capacity Destination buffer capacity | | * @param capacity Destination buffer capacity | |
| * @param pInfo Output container of IDNA processing details. | | * @param pInfo Output container of IDNA processing details. | |
| * @param pErrorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return destination string length | | * @return destination string length | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| uidna_nameToUnicode(const UIDNA *idna, | | uidna_nameToUnicode(const UIDNA *idna, | |
| const UChar *name, int32_t length, | | const UChar *name, int32_t length, | |
| UChar *dest, int32_t capacity, | | UChar *dest, int32_t capacity, | |
| UIDNAInfo *pInfo, UErrorCode *pErrorCode); | | UIDNAInfo *pInfo, UErrorCode *pErrorCode); | |
| | | | |
| /* UTF-8 versions of the processing methods -------------------------------
-- */ | | /* UTF-8 versions of the processing methods -------------------------------
-- */ | |
| | | | |
| /** | | /** | |
| * Converts a single domain name label into its ASCII form for DNS lookup. | | * Converts a single domain name label into its ASCII form for DNS lookup. | |
| * UTF-8 version of uidna_labelToASCII(), same behavior. | | * UTF-8 version of uidna_labelToASCII(), same behavior. | |
| | | | |
| skipping to change at line 338 | | skipping to change at line 337 | |
| * @param dest Destination string buffer | | * @param dest Destination string buffer | |
| * @param capacity Destination buffer capacity | | * @param capacity Destination buffer capacity | |
| * @param pInfo Output container of IDNA processing details. | | * @param pInfo Output container of IDNA processing details. | |
| * @param pErrorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return destination string length | | * @return destination string length | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| uidna_labelToASCII_UTF8(const UIDNA *idna, | | uidna_labelToASCII_UTF8(const UIDNA *idna, | |
| const char *label, int32_t length, | | const char *label, int32_t length, | |
| char *dest, int32_t capacity, | | char *dest, int32_t capacity, | |
| UIDNAInfo *pInfo, UErrorCode *pErrorCode); | | UIDNAInfo *pInfo, UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Converts a single domain name label into its Unicode form for human-read
able display. | | * Converts a single domain name label into its Unicode form for human-read
able display. | |
| * UTF-8 version of uidna_labelToUnicode(), same behavior. | | * UTF-8 version of uidna_labelToUnicode(), same behavior. | |
| * | | * | |
| * @param idna UIDNA instance | | * @param idna UIDNA instance | |
| | | | |
| skipping to change at line 361 | | skipping to change at line 360 | |
| * @param dest Destination string buffer | | * @param dest Destination string buffer | |
| * @param capacity Destination buffer capacity | | * @param capacity Destination buffer capacity | |
| * @param pInfo Output container of IDNA processing details. | | * @param pInfo Output container of IDNA processing details. | |
| * @param pErrorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return destination string length | | * @return destination string length | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| uidna_labelToUnicodeUTF8(const UIDNA *idna, | | uidna_labelToUnicodeUTF8(const UIDNA *idna, | |
| const char *label, int32_t length, | | const char *label, int32_t length, | |
| char *dest, int32_t capacity, | | char *dest, int32_t capacity, | |
| UIDNAInfo *pInfo, UErrorCode *pErrorCode); | | UIDNAInfo *pInfo, UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Converts a whole domain name into its ASCII form for DNS lookup. | | * Converts a whole domain name into its ASCII form for DNS lookup. | |
| * UTF-8 version of uidna_nameToASCII(), same behavior. | | * UTF-8 version of uidna_nameToASCII(), same behavior. | |
| * | | * | |
| * @param idna UIDNA instance | | * @param idna UIDNA instance | |
| | | | |
| skipping to change at line 384 | | skipping to change at line 383 | |
| * @param dest Destination string buffer | | * @param dest Destination string buffer | |
| * @param capacity Destination buffer capacity | | * @param capacity Destination buffer capacity | |
| * @param pInfo Output container of IDNA processing details. | | * @param pInfo Output container of IDNA processing details. | |
| * @param pErrorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return destination string length | | * @return destination string length | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| uidna_nameToASCII_UTF8(const UIDNA *idna, | | uidna_nameToASCII_UTF8(const UIDNA *idna, | |
| const char *name, int32_t length, | | const char *name, int32_t length, | |
| char *dest, int32_t capacity, | | char *dest, int32_t capacity, | |
| UIDNAInfo *pInfo, UErrorCode *pErrorCode); | | UIDNAInfo *pInfo, UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Converts a whole domain name into its Unicode form for human-readable di
splay. | | * Converts a whole domain name into its Unicode form for human-readable di
splay. | |
| * UTF-8 version of uidna_nameToUnicode(), same behavior. | | * UTF-8 version of uidna_nameToUnicode(), same behavior. | |
| * | | * | |
| * @param idna UIDNA instance | | * @param idna UIDNA instance | |
| | | | |
| skipping to change at line 407 | | skipping to change at line 406 | |
| * @param dest Destination string buffer | | * @param dest Destination string buffer | |
| * @param capacity Destination buffer capacity | | * @param capacity Destination buffer capacity | |
| * @param pInfo Output container of IDNA processing details. | | * @param pInfo Output container of IDNA processing details. | |
| * @param pErrorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return destination string length | | * @return destination string length | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| uidna_nameToUnicodeUTF8(const UIDNA *idna, | | uidna_nameToUnicodeUTF8(const UIDNA *idna, | |
| const char *name, int32_t length, | | const char *name, int32_t length, | |
| char *dest, int32_t capacity, | | char *dest, int32_t capacity, | |
| UIDNAInfo *pInfo, UErrorCode *pErrorCode); | | UIDNAInfo *pInfo, UErrorCode *pErrorCode); | |
| | | | |
| /* | | /* | |
| * IDNA error bit set values. | | * IDNA error bit set values. | |
| * When a domain name or label fails a processing step or does not meet the | | * When a domain name or label fails a processing step or does not meet the | |
| * validity criteria, then one or more of these error bits are set. | | * validity criteria, then one or more of these error bits are set. | |
| */ | | */ | |
| | | | |
End of changes. 12 change blocks. |
| 13 lines changed or deleted | | 12 lines changed or added | |
|
| unistr.h | | unistr.h | |
| /* | | /* | |
| ********************************************************************** | | ********************************************************************** | |
|
| * Copyright (C) 1998-2011, International Business Machines | | * Copyright (C) 1998-2012, International Business Machines | |
| * Corporation and others. All Rights Reserved. | | * Corporation and others. All Rights Reserved. | |
| ********************************************************************** | | ********************************************************************** | |
| * | | * | |
| * File unistr.h | | * File unistr.h | |
| * | | * | |
| * Modification History: | | * Modification History: | |
| * | | * | |
| * Date Name Description | | * Date Name Description | |
| * 09/25/98 stephen Creation. | | * 09/25/98 stephen Creation. | |
| * 11/11/98 stephen Changed per 11/9 code review. | | * 11/11/98 stephen Changed per 11/9 code review. | |
| | | | |
| skipping to change at line 57 | | skipping to change at line 57 | |
| #endif | | #endif | |
| | | | |
| #ifndef USTRING_H | | #ifndef USTRING_H | |
| /** | | /** | |
| * \ingroup ustring_ustrlen | | * \ingroup ustring_ustrlen | |
| */ | | */ | |
| U_STABLE int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| u_strlen(const UChar *s); | | u_strlen(const UChar *s); | |
| #endif | | #endif | |
| | | | |
|
| | | /** | |
| | | * \def U_STRING_CASE_MAPPER_DEFINED | |
| | | * @internal | |
| | | */ | |
| | | | |
| #ifndef U_STRING_CASE_MAPPER_DEFINED | | #ifndef U_STRING_CASE_MAPPER_DEFINED | |
| #define U_STRING_CASE_MAPPER_DEFINED | | #define U_STRING_CASE_MAPPER_DEFINED | |
| | | | |
| /** | | /** | |
| * Internal string case mapping function type. | | * Internal string case mapping function type. | |
| * @internal | | * @internal | |
| */ | | */ | |
| typedef int32_t U_CALLCONV | | typedef int32_t U_CALLCONV | |
| UStringCaseMapper(const UCaseMap *csm, | | UStringCaseMapper(const UCaseMap *csm, | |
| UChar *dest, int32_t destCapacity, | | UChar *dest, int32_t destCapacity, | |
| | | | |
| skipping to change at line 1816 | | skipping to change at line 1821 | |
| * @return a reference to this | | * @return a reference to this | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| UnicodeString &operator=(const UnicodeString &srcText); | | UnicodeString &operator=(const UnicodeString &srcText); | |
| | | | |
| /** | | /** | |
| * Almost the same as the assignment operator. | | * Almost the same as the assignment operator. | |
| * Replace the characters in this UnicodeString | | * Replace the characters in this UnicodeString | |
| * with the characters from <code>srcText</code>. | | * with the characters from <code>srcText</code>. | |
| * | | * | |
|
| * This function works the same for all strings except for ones that | | * This function works the same as the assignment operator | |
| * are readonly aliases. | | * for all strings except for ones that are readonly aliases. | |
| | | * | |
| * Starting with ICU 2.4, the assignment operator and the copy constructo
r | | * Starting with ICU 2.4, the assignment operator and the copy constructo
r | |
| * allocate a new buffer and copy the buffer contents even for readonly a
liases. | | * allocate a new buffer and copy the buffer contents even for readonly a
liases. | |
| * This function implements the old, more efficient but less safe behavio
r | | * This function implements the old, more efficient but less safe behavio
r | |
| * of making this string also a readonly alias to the same buffer. | | * of making this string also a readonly alias to the same buffer. | |
|
| | | * | |
| * The fastCopyFrom function must be used only if it is known that the li
fetime of | | * The fastCopyFrom function must be used only if it is known that the li
fetime of | |
|
| * this UnicodeString is at least as long as the lifetime of the aliased
buffer | | * this UnicodeString does not exceed the lifetime of the aliased buffer | |
| * including its contents, for example for strings from resource bundles | | * including its contents, for example for strings from resource bundles | |
|
| * or aliases to string contents. | | * or aliases to string constants. | |
| * | | * | |
| * @param src The text containing the characters to replace. | | * @param src The text containing the characters to replace. | |
| * @return a reference to this | | * @return a reference to this | |
| * @stable ICU 2.4 | | * @stable ICU 2.4 | |
| */ | | */ | |
| UnicodeString &fastCopyFrom(const UnicodeString &src); | | UnicodeString &fastCopyFrom(const UnicodeString &src); | |
| | | | |
| /** | | /** | |
| * Assignment operator. Replace the characters in this UnicodeString | | * Assignment operator. Replace the characters in this UnicodeString | |
| * with the code unit <TT>ch</TT>. | | * with the code unit <TT>ch</TT>. | |
| | | | |
| skipping to change at line 1931 | | skipping to change at line 1938 | |
| UnicodeString& setTo(UChar32 srcChar); | | UnicodeString& setTo(UChar32 srcChar); | |
| | | | |
| /** | | /** | |
| * Aliasing setTo() function, analogous to the readonly-aliasing UChar* c
onstructor. | | * Aliasing setTo() function, analogous to the readonly-aliasing UChar* c
onstructor. | |
| * The text will be used for the UnicodeString object, but | | * The text will be used for the UnicodeString object, but | |
| * it will not be released when the UnicodeString is destroyed. | | * it will not be released when the UnicodeString is destroyed. | |
| * This has copy-on-write semantics: | | * This has copy-on-write semantics: | |
| * When the string is modified, then the buffer is first copied into | | * When the string is modified, then the buffer is first copied into | |
| * newly allocated memory. | | * newly allocated memory. | |
| * The aliased buffer is never modified. | | * The aliased buffer is never modified. | |
|
| * In an assignment to another UnicodeString, the text will be aliased ag | | * | |
| ain, | | * In an assignment to another UnicodeString, when using the copy constru | |
| | | ctor | |
| | | * or the assignment operator, the text will be copied. | |
| | | * When using fastCopyFrom(), the text will be aliased again, | |
| * so that both strings then alias the same readonly-text. | | * so that both strings then alias the same readonly-text. | |
| * | | * | |
| * @param isTerminated specifies if <code>text</code> is <code>NUL</code>
-terminated. | | * @param isTerminated specifies if <code>text</code> is <code>NUL</code>
-terminated. | |
| * This must be true if <code>textLength==-1</code>. | | * This must be true if <code>textLength==-1</code>. | |
| * @param text The characters to alias for the UnicodeString. | | * @param text The characters to alias for the UnicodeString. | |
| * @param textLength The number of Unicode characters in <code>text</code
> to alias. | | * @param textLength The number of Unicode characters in <code>text</code
> to alias. | |
| * If -1, then this constructor will determine the leng
th | | * If -1, then this constructor will determine the leng
th | |
| * by calling <code>u_strlen()</code>. | | * by calling <code>u_strlen()</code>. | |
| * @return a reference to this | | * @return a reference to this | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| | | | |
| skipping to change at line 2678 | | skipping to change at line 2688 | |
| * @see U_TITLECASE_NO_LOWERCASE | | * @see U_TITLECASE_NO_LOWERCASE | |
| * @see U_TITLECASE_NO_BREAK_ADJUSTMENT | | * @see U_TITLECASE_NO_BREAK_ADJUSTMENT | |
| * @see ucasemap_open | | * @see ucasemap_open | |
| * @stable ICU 3.8 | | * @stable ICU 3.8 | |
| */ | | */ | |
| UnicodeString &toTitle(BreakIterator *titleIter, const Locale &locale, ui
nt32_t options); | | UnicodeString &toTitle(BreakIterator *titleIter, const Locale &locale, ui
nt32_t options); | |
| | | | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
|
| * Case-fold the characters in this string. | | * Case-folds the characters in this string. | |
| | | * | |
| * Case-folding is locale-independent and not context-sensitive, | | * Case-folding is locale-independent and not context-sensitive, | |
| * but there is an option for whether to include or exclude mappings for
dotted I | | * but there is an option for whether to include or exclude mappings for
dotted I | |
|
| * and dotless i that are marked with 'I' in CaseFolding.txt. | | * and dotless i that are marked with 'T' in CaseFolding.txt. | |
| | | * | |
| * The result may be longer or shorter than the original. | | * The result may be longer or shorter than the original. | |
| * | | * | |
| * @param options Either U_FOLD_CASE_DEFAULT or U_FOLD_CASE_EXCLUDE_SPECI
AL_I | | * @param options Either U_FOLD_CASE_DEFAULT or U_FOLD_CASE_EXCLUDE_SPECI
AL_I | |
| * @return A reference to this. | | * @return A reference to this. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| UnicodeString &foldCase(uint32_t options=0 /*U_FOLD_CASE_DEFAULT*/); | | UnicodeString &foldCase(uint32_t options=0 /*U_FOLD_CASE_DEFAULT*/); | |
| | | | |
| //======================================== | | //======================================== | |
| // Access to the internal buffer | | // Access to the internal buffer | |
| | | | |
| skipping to change at line 2902 | | skipping to change at line 2914 | |
| int32_t textLength); | | int32_t textLength); | |
| | | | |
| /** | | /** | |
| * Readonly-aliasing UChar* constructor. | | * Readonly-aliasing UChar* constructor. | |
| * The text will be used for the UnicodeString object, but | | * The text will be used for the UnicodeString object, but | |
| * it will not be released when the UnicodeString is destroyed. | | * it will not be released when the UnicodeString is destroyed. | |
| * This has copy-on-write semantics: | | * This has copy-on-write semantics: | |
| * When the string is modified, then the buffer is first copied into | | * When the string is modified, then the buffer is first copied into | |
| * newly allocated memory. | | * newly allocated memory. | |
| * The aliased buffer is never modified. | | * The aliased buffer is never modified. | |
|
| * In an assignment to another UnicodeString, the text will be aliased ag | | * | |
| ain, | | * In an assignment to another UnicodeString, when using the copy constru | |
| | | ctor | |
| | | * or the assignment operator, the text will be copied. | |
| | | * When using fastCopyFrom(), the text will be aliased again, | |
| * so that both strings then alias the same readonly-text. | | * so that both strings then alias the same readonly-text. | |
| * | | * | |
| * @param isTerminated specifies if <code>text</code> is <code>NUL</code>
-terminated. | | * @param isTerminated specifies if <code>text</code> is <code>NUL</code>
-terminated. | |
| * This must be true if <code>textLength==-1</code>. | | * This must be true if <code>textLength==-1</code>. | |
| * @param text The characters to alias for the UnicodeString. | | * @param text The characters to alias for the UnicodeString. | |
| * @param textLength The number of Unicode characters in <code>text</code
> to alias. | | * @param textLength The number of Unicode characters in <code>text</code
> to alias. | |
| * If -1, then this constructor will determine the leng
th | | * If -1, then this constructor will determine the leng
th | |
| * by calling <code>u_strlen()</code>. | | * by calling <code>u_strlen()</code>. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| | | | |
| skipping to change at line 3251 | | skipping to change at line 3266 | |
| UnicodeString &setToUTF8(const StringPiece &utf8); | | UnicodeString &setToUTF8(const StringPiece &utf8); | |
| // For extract(char*). | | // For extract(char*). | |
| // We could make a toUTF8(target, capacity, errorCode) public but not | | // We could make a toUTF8(target, capacity, errorCode) public but not | |
| // this version: New API will be cleaner if we make callers create substr
ings | | // this version: New API will be cleaner if we make callers create substr
ings | |
| // rather than having start+length on every method, | | // rather than having start+length on every method, | |
| // and it should take a UErrorCode&. | | // and it should take a UErrorCode&. | |
| int32_t | | int32_t | |
| toUTF8(int32_t start, int32_t len, | | toUTF8(int32_t start, int32_t len, | |
| char *target, int32_t capacity) const; | | char *target, int32_t capacity) const; | |
| | | | |
|
| | | /** | |
| | | * Internal string contents comparison, called by operator==. | |
| | | * Requires: this & text not bogus and have same lengths. | |
| | | */ | |
| | | UBool doEquals(const UnicodeString &text, int32_t len) const; | |
| | | | |
| inline int8_t | | inline int8_t | |
| doCompare(int32_t start, | | doCompare(int32_t start, | |
| int32_t length, | | int32_t length, | |
| const UnicodeString& srcText, | | const UnicodeString& srcText, | |
| int32_t srcStart, | | int32_t srcStart, | |
| int32_t srcLength) const; | | int32_t srcLength) const; | |
| | | | |
| int8_t doCompare(int32_t start, | | int8_t doCompare(int32_t start, | |
| int32_t length, | | int32_t length, | |
| const UChar *srcChars, | | const UChar *srcChars, | |
| | | | |
| skipping to change at line 3643 | | skipping to change at line 3664 | |
| } | | } | |
| } | | } | |
| | | | |
| inline UBool | | inline UBool | |
| UnicodeString::operator== (const UnicodeString& text) const | | UnicodeString::operator== (const UnicodeString& text) const | |
| { | | { | |
| if(isBogus()) { | | if(isBogus()) { | |
| return text.isBogus(); | | return text.isBogus(); | |
| } else { | | } else { | |
| int32_t len = length(), textLength = text.length(); | | int32_t len = length(), textLength = text.length(); | |
|
| return | | return !text.isBogus() && len == textLength && doEquals(text, len); | |
| !text.isBogus() && | | | |
| len == textLength && | | | |
| doCompare(0, len, text, 0, textLength) == 0; | | | |
| } | | } | |
| } | | } | |
| | | | |
| inline UBool | | inline UBool | |
| UnicodeString::operator!= (const UnicodeString& text) const | | UnicodeString::operator!= (const UnicodeString& text) const | |
| { return (! operator==(text)); } | | { return (! operator==(text)); } | |
| | | | |
| inline UBool | | inline UBool | |
| UnicodeString::operator> (const UnicodeString& text) const | | UnicodeString::operator> (const UnicodeString& text) const | |
| { return doCompare(0, length(), text, 0, text.length()) == 1; } | | { return doCompare(0, length(), text, 0, text.length()) == 1; } | |
| | | | |
End of changes. 12 change blocks. |
| 15 lines changed or deleted | | 33 lines changed or added | |
|
| unorm2.h | | unorm2.h | |
| | | | |
| skipping to change at line 126 | | skipping to change at line 126 | |
| struct UNormalizer2; | | struct UNormalizer2; | |
| typedef struct UNormalizer2 UNormalizer2; /**< C typedef for struct UNorma
lizer2. @stable ICU 4.4 */ | | typedef struct UNormalizer2 UNormalizer2; /**< C typedef for struct UNorma
lizer2. @stable ICU 4.4 */ | |
| | | | |
| #if !UCONFIG_NO_NORMALIZATION | | #if !UCONFIG_NO_NORMALIZATION | |
| | | | |
| #ifndef U_HIDE_DRAFT_API | | #ifndef U_HIDE_DRAFT_API | |
| /** | | /** | |
| * Returns a UNormalizer2 instance for Unicode NFC normalization. | | * Returns a UNormalizer2 instance for Unicode NFC normalization. | |
| * Same as unorm2_getInstance(NULL, "nfc", UNORM2_COMPOSE, pErrorCode). | | * Same as unorm2_getInstance(NULL, "nfc", UNORM2_COMPOSE, pErrorCode). | |
| * Returns an unmodifiable singleton instance. Do not delete it. | | * Returns an unmodifiable singleton instance. Do not delete it. | |
|
| * @param errorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return the requested Normalizer2, if successful | | * @return the requested Normalizer2, if successful | |
| * @draft ICU 49 | | * @draft ICU 49 | |
| */ | | */ | |
| U_DRAFT const UNormalizer2 * U_EXPORT2 | | U_DRAFT const UNormalizer2 * U_EXPORT2 | |
| unorm2_getNFCInstance(UErrorCode *pErrorCode); | | unorm2_getNFCInstance(UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Returns a UNormalizer2 instance for Unicode NFD normalization. | | * Returns a UNormalizer2 instance for Unicode NFD normalization. | |
| * Same as unorm2_getInstance(NULL, "nfc", UNORM2_DECOMPOSE, pErrorCode). | | * Same as unorm2_getInstance(NULL, "nfc", UNORM2_DECOMPOSE, pErrorCode). | |
| * Returns an unmodifiable singleton instance. Do not delete it. | | * Returns an unmodifiable singleton instance. Do not delete it. | |
|
| * @param errorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return the requested Normalizer2, if successful | | * @return the requested Normalizer2, if successful | |
| * @draft ICU 49 | | * @draft ICU 49 | |
| */ | | */ | |
| U_DRAFT const UNormalizer2 * U_EXPORT2 | | U_DRAFT const UNormalizer2 * U_EXPORT2 | |
| unorm2_getNFDInstance(UErrorCode *pErrorCode); | | unorm2_getNFDInstance(UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Returns a UNormalizer2 instance for Unicode NFKC normalization. | | * Returns a UNormalizer2 instance for Unicode NFKC normalization. | |
| * Same as unorm2_getInstance(NULL, "nfkc", UNORM2_COMPOSE, pErrorCode). | | * Same as unorm2_getInstance(NULL, "nfkc", UNORM2_COMPOSE, pErrorCode). | |
| * Returns an unmodifiable singleton instance. Do not delete it. | | * Returns an unmodifiable singleton instance. Do not delete it. | |
|
| * @param errorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return the requested Normalizer2, if successful | | * @return the requested Normalizer2, if successful | |
| * @draft ICU 49 | | * @draft ICU 49 | |
| */ | | */ | |
| U_DRAFT const UNormalizer2 * U_EXPORT2 | | U_DRAFT const UNormalizer2 * U_EXPORT2 | |
| unorm2_getNFKCInstance(UErrorCode *pErrorCode); | | unorm2_getNFKCInstance(UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Returns a UNormalizer2 instance for Unicode NFKD normalization. | | * Returns a UNormalizer2 instance for Unicode NFKD normalization. | |
| * Same as unorm2_getInstance(NULL, "nfkc", UNORM2_DECOMPOSE, pErrorCode). | | * Same as unorm2_getInstance(NULL, "nfkc", UNORM2_DECOMPOSE, pErrorCode). | |
| * Returns an unmodifiable singleton instance. Do not delete it. | | * Returns an unmodifiable singleton instance. Do not delete it. | |
|
| * @param errorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return the requested Normalizer2, if successful | | * @return the requested Normalizer2, if successful | |
| * @draft ICU 49 | | * @draft ICU 49 | |
| */ | | */ | |
| U_DRAFT const UNormalizer2 * U_EXPORT2 | | U_DRAFT const UNormalizer2 * U_EXPORT2 | |
| unorm2_getNFKDInstance(UErrorCode *pErrorCode); | | unorm2_getNFKDInstance(UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Returns a UNormalizer2 instance for Unicode NFKC_Casefold normalization. | | * Returns a UNormalizer2 instance for Unicode NFKC_Casefold normalization. | |
| * Same as unorm2_getInstance(NULL, "nfkc_cf", UNORM2_COMPOSE, pErrorCode). | | * Same as unorm2_getInstance(NULL, "nfkc_cf", UNORM2_COMPOSE, pErrorCode). | |
| * Returns an unmodifiable singleton instance. Do not delete it. | | * Returns an unmodifiable singleton instance. Do not delete it. | |
|
| * @param errorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return the requested Normalizer2, if successful | | * @return the requested Normalizer2, if successful | |
| * @draft ICU 49 | | * @draft ICU 49 | |
| */ | | */ | |
| U_DRAFT const UNormalizer2 * U_EXPORT2 | | U_DRAFT const UNormalizer2 * U_EXPORT2 | |
| unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode); | | unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode); | |
| #endif /* U_HIDE_DRAFT_API */ | | #endif /* U_HIDE_DRAFT_API */ | |
| | | | |
| | | | |
| skipping to change at line 353 | | skipping to change at line 353 | |
| * @param decomposition String buffer which will be set to c's | | * @param decomposition String buffer which will be set to c's | |
| * decomposition mapping, if there is one. | | * decomposition mapping, if there is one. | |
| * @param capacity number of UChars that can be written to decomposition | | * @param capacity number of UChars that can be written to decomposition | |
| * @param pErrorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function return
s | | * pass the U_SUCCESS() test, or else the function return
s | |
| * immediately. Check for U_FAILURE() on output or use wi
th | | * immediately. Check for U_FAILURE() on output or use wi
th | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return the non-negative length of c's decomposition, if there is one; o
therwise a negative value | | * @return the non-negative length of c's decomposition, if there is one; o
therwise a negative value | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| unorm2_getDecomposition(const UNormalizer2 *norm2, | | unorm2_getDecomposition(const UNormalizer2 *norm2, | |
| UChar32 c, UChar *decomposition, int32_t capacity, | | UChar32 c, UChar *decomposition, int32_t capacity, | |
| UErrorCode *pErrorCode); | | UErrorCode *pErrorCode); | |
| | | | |
| #ifndef U_HIDE_DRAFT_API | | #ifndef U_HIDE_DRAFT_API | |
| /** | | /** | |
| * Gets the raw decomposition mapping of c. | | * Gets the raw decomposition mapping of c. | |
| * | | * | |
| * This is similar to the unorm2_getDecomposition() function but returns th
e | | * This is similar to the unorm2_getDecomposition() function but returns th
e | |
| * raw decomposition mapping as specified in UnicodeData.txt or | | * raw decomposition mapping as specified in UnicodeData.txt or | |
| | | | |
End of changes. 6 change blocks. |
| 6 lines changed or deleted | | 6 lines changed or added | |
|
| unum.h | | unum.h | |
| | | | |
| skipping to change at line 110 | | skipping to change at line 110 | |
| * There are other static options available. Use UNUM_CURRENCY | | * There are other static options available. Use UNUM_CURRENCY | |
| * to get the currency number format for that country. Use UNUM_PERCENT | | * to get the currency number format for that country. Use UNUM_PERCENT | |
| * to get a format for displaying percentages. With this format, a | | * to get a format for displaying percentages. With this format, a | |
| * fraction from 0.53 is displayed as 53%. | | * fraction from 0.53 is displayed as 53%. | |
| * <P> | | * <P> | |
| * Use a pattern to create either a DecimalFormat or a RuleBasedNumberForma
t | | * Use a pattern to create either a DecimalFormat or a RuleBasedNumberForma
t | |
| * formatter. The pattern must conform to the syntax defined for those | | * formatter. The pattern must conform to the syntax defined for those | |
| * formatters. | | * formatters. | |
| * <P> | | * <P> | |
| * You can also control the display of numbers with such function as | | * You can also control the display of numbers with such function as | |
|
| * unum_getAttribues() and unum_setAtributes(), which let you set the | | * unum_getAttributes() and unum_setAttributes(), which let you set the | |
| * miminum fraction digits, grouping, etc. | | * miminum fraction digits, grouping, etc. | |
| * @see UNumberFormatAttributes for more details | | * @see UNumberFormatAttributes for more details | |
| * <P> | | * <P> | |
| * You can also use forms of the parse and format methods with | | * You can also use forms of the parse and format methods with | |
| * ParsePosition and UFieldPosition to allow you to: | | * ParsePosition and UFieldPosition to allow you to: | |
| * <ul type=round> | | * <ul type=round> | |
| * <li>(a) progressively parse through pieces of a string. | | * <li>(a) progressively parse through pieces of a string. | |
| * <li>(b) align the decimal point and other areas. | | * <li>(b) align the decimal point and other areas. | |
| * </ul> | | * </ul> | |
| * <p> | | * <p> | |
| | | | |
| skipping to change at line 666 | | skipping to change at line 666 | |
| U_STABLE double U_EXPORT2 | | U_STABLE double U_EXPORT2 | |
| unum_parseDoubleCurrency(const UNumberFormat* fmt, | | unum_parseDoubleCurrency(const UNumberFormat* fmt, | |
| const UChar* text, | | const UChar* text, | |
| int32_t textLength, | | int32_t textLength, | |
| int32_t* parsePos, /* 0 = start */ | | int32_t* parsePos, /* 0 = start */ | |
| UChar* currency, | | UChar* currency, | |
| UErrorCode* status); | | UErrorCode* status); | |
| | | | |
| /** | | /** | |
| * Set the pattern used by a UNumberFormat. This can only be used | | * Set the pattern used by a UNumberFormat. This can only be used | |
|
| * on a DecimalFormat, other formats return U_ILLEGAL_ARGUMENT_ERROR | | * on a DecimalFormat, other formats return U_UNSUPPORTED_ERROR | |
| * in the status. | | * in the status. | |
| * @param format The formatter to set. | | * @param format The formatter to set. | |
| * @param localized TRUE if the pattern is localized, FALSE otherwise. | | * @param localized TRUE if the pattern is localized, FALSE otherwise. | |
| * @param pattern The new pattern | | * @param pattern The new pattern | |
| * @param patternLength The length of pattern, or -1 if null-terminated. | | * @param patternLength The length of pattern, or -1 if null-terminated. | |
| * @param parseError A pointer to UParseError to recieve information | | * @param parseError A pointer to UParseError to recieve information | |
| * about errors occurred during parsing, or NULL if no parse error | | * about errors occurred during parsing, or NULL if no parse error | |
| * information is desired. | | * information is desired. | |
| * @param status A pointer to an input-output UErrorCode. | | * @param status A pointer to an input-output UErrorCode. | |
| * @see unum_toPattern | | * @see unum_toPattern | |
| | | | |
| skipping to change at line 774 | | skipping to change at line 774 | |
| UNUM_SIGNIFICANT_DIGITS_USED, | | UNUM_SIGNIFICANT_DIGITS_USED, | |
| /** Minimum significant digits | | /** Minimum significant digits | |
| * @stable ICU 3.0 */ | | * @stable ICU 3.0 */ | |
| UNUM_MIN_SIGNIFICANT_DIGITS, | | UNUM_MIN_SIGNIFICANT_DIGITS, | |
| /** Maximum significant digits | | /** Maximum significant digits | |
| * @stable ICU 3.0 */ | | * @stable ICU 3.0 */ | |
| UNUM_MAX_SIGNIFICANT_DIGITS, | | UNUM_MAX_SIGNIFICANT_DIGITS, | |
| /** Lenient parse mode used by rule-based formats. | | /** Lenient parse mode used by rule-based formats. | |
| * @stable ICU 3.0 | | * @stable ICU 3.0 | |
| */ | | */ | |
|
| UNUM_LENIENT_PARSE | | UNUM_LENIENT_PARSE, | |
| | | | |
| #if UCONFIG_HAVE_PARSEALLINPUT | | #if UCONFIG_HAVE_PARSEALLINPUT | |
| /** Consume all input. (may use fastpath). Set to UNUM_YES (require fastp
ath), UNUM_NO (skip fastpath), or UNUM_MAYBE (heuristic). | | /** Consume all input. (may use fastpath). Set to UNUM_YES (require fastp
ath), UNUM_NO (skip fastpath), or UNUM_MAYBE (heuristic). | |
|
| | | * This is an internal ICU API. Do not use. | |
| * @internal | | * @internal | |
| */ | | */ | |
|
| ,UNUM_PARSE_ALL_INPUT | | UNUM_PARSE_ALL_INPUT, | |
| #endif | | #endif | |
| | | | |
|
| | | /** Count of "regular" numeric attributes. | |
| | | * @internal */ | |
| | | UNUM_NUMERIC_ATTRIBUTE_COUNT, | |
| | | | |
| | | /** One below the first bitfield-boolean item. | |
| | | * All items after this one are stored in boolean form. | |
| | | * @internal */ | |
| | | UNUM_MAX_NONBOOLEAN_ATTRIBUTE = 0x0FFF, | |
| | | | |
| | | /** If 1, specifies that if setting the "max integer digits" attribute wo | |
| | | uld truncate a value, set an error status rather than silently truncating. | |
| | | * For example, formatting the value 1234 with 4 max int digits would su | |
| | | cceed, but formatting 12345 would fail. There is no effect on parsing. | |
| | | * Default: 0 (not set) | |
| | | * @draft ICU 50 | |
| | | */ | |
| | | UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS, | |
| | | /** | |
| | | * if this attribute is set to 1, specifies that, if the pattern doesn't | |
| | | contain an exponent, the exponent will not be parsed. If the pattern does c | |
| | | ontain an exponent, this attribute has no effect. | |
| | | * Has no effect on formatting. | |
| | | * Default: 0 (unset) | |
| | | * @draft ICU 50 | |
| | | */ | |
| | | UNUM_PARSE_NO_EXPONENT, | |
| | | | |
| | | /** Limit of boolean attributes. | |
| | | * @internal */ | |
| | | UNUM_LIMIT_BOOLEAN_ATTRIBUTE | |
| } UNumberFormatAttribute; | | } UNumberFormatAttribute; | |
| | | | |
| /** | | /** | |
| * Get a numeric attribute associated with a UNumberFormat. | | * Get a numeric attribute associated with a UNumberFormat. | |
| * An example of a numeric attribute is the number of integer digits a forma
tter will produce. | | * An example of a numeric attribute is the number of integer digits a forma
tter will produce. | |
| * @param fmt The formatter to query. | | * @param fmt The formatter to query. | |
| * @param attr The attribute to query; one of UNUM_PARSE_INT_ONLY, UNUM_GROU
PING_USED, | | * @param attr The attribute to query; one of UNUM_PARSE_INT_ONLY, UNUM_GROU
PING_USED, | |
| * UNUM_DECIMAL_ALWAYS_SHOWN, UNUM_MAX_INTEGER_DIGITS, UNUM_MIN_INTEGER_DIGI
TS, UNUM_INTEGER_DIGITS, | | * UNUM_DECIMAL_ALWAYS_SHOWN, UNUM_MAX_INTEGER_DIGITS, UNUM_MIN_INTEGER_DIGI
TS, UNUM_INTEGER_DIGITS, | |
| * UNUM_MAX_FRACTION_DIGITS, UNUM_MIN_FRACTION_DIGITS, UNUM_FRACTION_DIGITS,
UNUM_MULTIPLIER, | | * UNUM_MAX_FRACTION_DIGITS, UNUM_MIN_FRACTION_DIGITS, UNUM_FRACTION_DIGITS,
UNUM_MULTIPLIER, | |
| * UNUM_GROUPING_SIZE, UNUM_ROUNDING_MODE, UNUM_FORMAT_WIDTH, UNUM_PADDING_P
OSITION, UNUM_SECONDARY_GROUPING_SIZE. | | * UNUM_GROUPING_SIZE, UNUM_ROUNDING_MODE, UNUM_FORMAT_WIDTH, UNUM_PADDING_P
OSITION, UNUM_SECONDARY_GROUPING_SIZE. | |
| | | | |
| skipping to change at line 897 | | skipping to change at line 923 | |
| * This is a read-only attribute. The public rulesets are returned as a | | * This is a read-only attribute. The public rulesets are returned as a | |
| * single string, with each ruleset name delimited by ';' (semicolon). | | * single string, with each ruleset name delimited by ';' (semicolon). | |
| * @stable ICU 3.0 | | * @stable ICU 3.0 | |
| */ | | */ | |
| UNUM_PUBLIC_RULESETS | | UNUM_PUBLIC_RULESETS | |
| } UNumberFormatTextAttribute; | | } UNumberFormatTextAttribute; | |
| | | | |
| /** | | /** | |
| * Get a text attribute associated with a UNumberFormat. | | * Get a text attribute associated with a UNumberFormat. | |
| * An example of a text attribute is the suffix for positive numbers. If th
e formatter | | * An example of a text attribute is the suffix for positive numbers. If th
e formatter | |
|
| * does not understand the attributre, U_UNSUPPORTED_ERROR is returned as th
e status. | | * does not understand the attribute, U_UNSUPPORTED_ERROR is returned as the
status. | |
| * Rule-based formatters only understand UNUM_DEFAULT_RULESET and UNUM_PUBLI
C_RULESETS. | | * Rule-based formatters only understand UNUM_DEFAULT_RULESET and UNUM_PUBLI
C_RULESETS. | |
| * @param fmt The formatter to query. | | * @param fmt The formatter to query. | |
| * @param tag The attribute to query; one of UNUM_POSITIVE_PREFIX, UNUM_POSI
TIVE_SUFFIX, | | * @param tag The attribute to query; one of UNUM_POSITIVE_PREFIX, UNUM_POSI
TIVE_SUFFIX, | |
| * UNUM_NEGATIVE_PREFIX, UNUM_NEGATIVE_SUFFIX, UNUM_PADDING_CHARACTER, UNUM_
CURRENCY_CODE, | | * UNUM_NEGATIVE_PREFIX, UNUM_NEGATIVE_SUFFIX, UNUM_PADDING_CHARACTER, UNUM_
CURRENCY_CODE, | |
| * UNUM_DEFAULT_RULESET, or UNUM_PUBLIC_RULESETS. | | * UNUM_DEFAULT_RULESET, or UNUM_PUBLIC_RULESETS. | |
| * @param result A pointer to a buffer to receive the attribute. | | * @param result A pointer to a buffer to receive the attribute. | |
| * @param resultLength The maximum size of result. | | * @param resultLength The maximum size of result. | |
| * @param status A pointer to an UErrorCode to receive any errors | | * @param status A pointer to an UErrorCode to receive any errors | |
| * @return The total buffer size needed; if greater than resultLength, the o
utput was truncated. | | * @return The total buffer size needed; if greater than resultLength, the o
utput was truncated. | |
| * @see unum_setTextAttribute | | * @see unum_setTextAttribute | |
| | | | |
End of changes. 7 change blocks. |
| 6 lines changed or deleted | | 36 lines changed or added | |
|
| uregex.h | | uregex.h | |
| | | | |
| skipping to change at line 161 | | skipping to change at line 161 | |
| * example. For default behavior, set this paramete
r to zero. | | * example. For default behavior, set this paramete
r to zero. | |
| * See <code>enum URegexpFlag</code>. All desired f
lags | | * See <code>enum URegexpFlag</code>. All desired f
lags | |
| * are bitwise-ORed together. | | * are bitwise-ORed together. | |
| * @param pe Receives the position (line and column numbers) o
f any syntax | | * @param pe Receives the position (line and column numbers) o
f any syntax | |
| * error within the source regular expression string
. If this | | * error within the source regular expression string
. If this | |
| * information is not wanted, pass NULL for this par
ameter. | | * information is not wanted, pass NULL for this par
ameter. | |
| * @param status Receives error detected by this function. | | * @param status Receives error detected by this function. | |
| * | | * | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT URegularExpression * U_EXPORT2 | | U_STABLE URegularExpression * U_EXPORT2 | |
| uregex_openUText(UText *pattern, | | uregex_openUText(UText *pattern, | |
| uint32_t flags, | | uint32_t flags, | |
| UParseError *pe, | | UParseError *pe, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Open (compile) an ICU regular expression. The resulting regular expre
ssion | | * Open (compile) an ICU regular expression. The resulting regular expre
ssion | |
| * handle can then be used to perform various matching operations. | | * handle can then be used to perform various matching operations. | |
| * <p> | | * <p> | |
| * This function is the same as uregex_open, except that the pattern | | * This function is the same as uregex_open, except that the pattern | |
| | | | |
| skipping to change at line 281 | | skipping to change at line 281 | |
| * Returns the source text of the pattern for this regular expression. | | * Returns the source text of the pattern for this regular expression. | |
| * This function will work even if the pattern was originally specified as
a UChar string. | | * This function will work even if the pattern was originally specified as
a UChar string. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param status Receives errors detected by this function. | | * @param status Receives errors detected by this function. | |
| * @return the pattern text. The storage for the text is owned by the regu
lar expression | | * @return the pattern text. The storage for the text is owned by the regu
lar expression | |
| * object, and must not be altered or deleted. | | * object, and must not be altered or deleted. | |
| * | | * | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT UText * U_EXPORT2 | | U_STABLE UText * U_EXPORT2 | |
| uregex_patternUText(const URegularExpression *regexp, | | uregex_patternUText(const URegularExpression *regexp, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Get the match mode flags that were specified when compiling this regula
r expression. | | * Get the match mode flags that were specified when compiling this regula
r expression. | |
| * @param status Receives errors detected by this function. | | * @param status Receives errors detected by this function. | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @return The match mode flags | | * @return The match mode flags | |
| * @see URegexpFlag | | * @see URegexpFlag | |
| * @stable ICU 3.0 | | * @stable ICU 3.0 | |
| | | | |
| skipping to change at line 339 | | skipping to change at line 339 | |
| * string data; only a shallow clone is made. The subject string data mu
st not be | | * string data; only a shallow clone is made. The subject string data mu
st not be | |
| * altered after calling this function until after all regular expression | | * altered after calling this function until after all regular expression | |
| * operations involving this string data are completed. | | * operations involving this string data are completed. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param text The subject text string. | | * @param text The subject text string. | |
| * @param status Receives errors detected by this function. | | * @param status Receives errors detected by this function. | |
| * | | * | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT void U_EXPORT2 | | U_STABLE void U_EXPORT2 | |
| uregex_setUText(URegularExpression *regexp, | | uregex_setUText(URegularExpression *regexp, | |
| UText *text, | | UText *text, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Get the subject text that is currently associated with this | | * Get the subject text that is currently associated with this | |
| * regular expression object. If the input was supplied using uregex_se
tText(), | | * regular expression object. If the input was supplied using uregex_se
tText(), | |
| * that pointer will be returned. Otherwise, the characters in the inpu
t will | | * that pointer will be returned. Otherwise, the characters in the inpu
t will | |
| * be extracted to a buffer and returned. In either case, ownership rem
ains | | * be extracted to a buffer and returned. In either case, ownership rem
ains | |
| * with the regular expression object. | | * with the regular expression object. | |
| | | | |
| skipping to change at line 385 | | skipping to change at line 385 | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param dest A mutable UText in which to store the current input. | | * @param dest A mutable UText in which to store the current input. | |
| * If NULL, a new UText will be created as an immutable
shallow clone | | * If NULL, a new UText will be created as an immutable
shallow clone | |
| * of the actual input string. | | * of the actual input string. | |
| * @param status Receives errors detected by this function. | | * @param status Receives errors detected by this function. | |
| * @return The subject text currently associated with this regu
lar expression. | | * @return The subject text currently associated with this regu
lar expression. | |
| * If a pre-allocated UText was provided, it will alway
s be used and returned. | | * If a pre-allocated UText was provided, it will alway
s be used and returned. | |
| * | | * | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT UText * U_EXPORT2 | | U_STABLE UText * U_EXPORT2 | |
| uregex_getUText(URegularExpression *regexp, | | uregex_getUText(URegularExpression *regexp, | |
| UText *dest, | | UText *dest, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Set the subject text string upon which the regular expression is looki
ng for matches | | * Set the subject text string upon which the regular expression is looki
ng for matches | |
| * without changing any other aspect of the matching state. | | * without changing any other aspect of the matching state. | |
| * The new and previous text strings must have the same content. | | * The new and previous text strings must have the same content. | |
| * | | * | |
| * This function is intended for use in environments where ICU is operati
ng on | | * This function is intended for use in environments where ICU is operati
ng on | |
| | | | |
| skipping to change at line 415 | | skipping to change at line 415 | |
| * Caution: this function is normally used only by very specialized | | * Caution: this function is normally used only by very specialized | |
| * system-level code. One example use case is with garbage co
llection | | * system-level code. One example use case is with garbage co
llection | |
| * that moves the text in memory. | | * that moves the text in memory. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param text The new (moved) text string. | | * @param text The new (moved) text string. | |
| * @param status Receives errors detected by this function. | | * @param status Receives errors detected by this function. | |
| * | | * | |
| * @stable ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
|
| U_DRAFT void U_EXPORT2 | | U_STABLE void U_EXPORT2 | |
| uregex_refreshUText(URegularExpression *regexp, | | uregex_refreshUText(URegularExpression *regexp, | |
| UText *text, | | UText *text, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Attempts to match the input string against the pattern. | | * Attempts to match the input string against the pattern. | |
| * To succeed, the match must extend to the end of the string, | | * To succeed, the match must extend to the end of the string, | |
| * or cover the complete match region. | | * or cover the complete match region. | |
| * | | * | |
| * If startIndex >= zero the match operation starts at the specified | | * If startIndex >= zero the match operation starts at the specified | |
| | | | |
| skipping to change at line 466 | | skipping to change at line 466 | |
| * input string if no region has been set. This directly corresponds to | | * input string if no region has been set. This directly corresponds to | |
| * Matcher.matches() in Java | | * Matcher.matches() in Java | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param startIndex The input string (native) index at which to begi
n matching, or -1 | | * @param startIndex The input string (native) index at which to begi
n matching, or -1 | |
| * to match the input Region. | | * to match the input Region. | |
| * @param status Receives errors detected by this function. | | * @param status Receives errors detected by this function. | |
| * @return TRUE if there is a match | | * @return TRUE if there is a match | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT UBool U_EXPORT2 | | U_STABLE UBool U_EXPORT2 | |
| uregex_matches64(URegularExpression *regexp, | | uregex_matches64(URegularExpression *regexp, | |
| int64_t startIndex, | | int64_t startIndex, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Attempts to match the input string, starting from the specified index
, against the pattern. | | * Attempts to match the input string, starting from the specified index
, against the pattern. | |
| * The match may be of any length, and is not required to extend to the
end | | * The match may be of any length, and is not required to extend to the
end | |
| * of the input string. Contrast with uregex_matches(). | | * of the input string. Contrast with uregex_matches(). | |
| * | | * | |
| * <p>If startIndex is >= 0 any input region that was set for this | | * <p>If startIndex is >= 0 any input region that was set for this | |
| | | | |
| skipping to change at line 523 | | skipping to change at line 523 | |
| * <code>uregexp_start()</code>, <code>uregexp_end()</code>, | | * <code>uregexp_start()</code>, <code>uregexp_end()</code>, | |
| * and <code>uregexp_group()</code> functions.</p> | | * and <code>uregexp_group()</code> functions.</p> | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param startIndex The input string (native) index at which to beg
in matching, or | | * @param startIndex The input string (native) index at which to beg
in matching, or | |
| * -1 to match the Input Region | | * -1 to match the Input Region | |
| * @param status A reference to a UErrorCode to receive any erro
rs. | | * @param status A reference to a UErrorCode to receive any erro
rs. | |
| * @return TRUE if there is a match. | | * @return TRUE if there is a match. | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT UBool U_EXPORT2 | | U_STABLE UBool U_EXPORT2 | |
| uregex_lookingAt64(URegularExpression *regexp, | | uregex_lookingAt64(URegularExpression *regexp, | |
| int64_t startIndex, | | int64_t startIndex, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Find the first matching substring of the input string that matches th
e pattern. | | * Find the first matching substring of the input string that matches th
e pattern. | |
| * If startIndex is >= zero the search for a match begins at the specifi
ed index, | | * If startIndex is >= zero the search for a match begins at the specifi
ed index, | |
| * and any match region is reset. This corresponds directly with | | * and any match region is reset. This corresponds directly with | |
| * Matcher.find(startIndex) in Java. | | * Matcher.find(startIndex) in Java. | |
| * | | * | |
| | | | |
| skipping to change at line 572 | | skipping to change at line 572 | |
| * If a match is found, <code>uregex_start(), uregex_end()</code>, and | | * If a match is found, <code>uregex_start(), uregex_end()</code>, and | |
| * <code>uregex_group()</code> will provide more information regarding t
he match. | | * <code>uregex_group()</code> will provide more information regarding t
he match. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param startIndex The position (native) in the input string to beg
in the search, or | | * @param startIndex The position (native) in the input string to beg
in the search, or | |
| * -1 to search within the Input Region. | | * -1 to search within the Input Region. | |
| * @param status A reference to a UErrorCode to receive any error
s. | | * @param status A reference to a UErrorCode to receive any error
s. | |
| * @return TRUE if a match is found. | | * @return TRUE if a match is found. | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT UBool U_EXPORT2 | | U_STABLE UBool U_EXPORT2 | |
| uregex_find64(URegularExpression *regexp, | | uregex_find64(URegularExpression *regexp, | |
| int64_t startIndex, | | int64_t startIndex, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Find the next pattern match in the input string. Begin searching | | * Find the next pattern match in the input string. Begin searching | |
| * the input at the location following the end of he previous match, | | * the input at the location following the end of he previous match, | |
| * or at the start of the string (or region) if there is no | | * or at the start of the string (or region) if there is no | |
| * previous match. If a match is found, <code>uregex_start(), uregex_end
()</code>, and | | * previous match. If a match is found, <code>uregex_start(), uregex_end
()</code>, and | |
| * <code>uregex_group()</code> will provide more information regarding th
e match. | | * <code>uregex_group()</code> will provide more information regarding th
e match. | |
| | | | |
| skipping to change at line 650 | | skipping to change at line 650 | |
| * If NULL, a new UText will be created as an immu
table shallow clone | | * If NULL, a new UText will be created as an immu
table shallow clone | |
| * of the entire input string. | | * of the entire input string. | |
| * @param groupLength The group length of the desired capture group. | | * @param groupLength The group length of the desired capture group. | |
| * @param status A reference to a UErrorCode to receive any erro
rs. | | * @param status A reference to a UErrorCode to receive any erro
rs. | |
| * @return The subject text currently associated with this
regular expression. | | * @return The subject text currently associated with this
regular expression. | |
| * If a pre-allocated UText was provided, it will
always be used and returned. | | * If a pre-allocated UText was provided, it will
always be used and returned. | |
| | | | |
| * | | * | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT UText * U_EXPORT2 | | U_STABLE UText * U_EXPORT2 | |
| uregex_groupUText(URegularExpression *regexp, | | uregex_groupUText(URegularExpression *regexp, | |
| int32_t groupNum, | | int32_t groupNum, | |
| UText *dest, | | UText *dest, | |
| int64_t *groupLength, | | int64_t *groupLength, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| #ifndef U_HIDE_INTERNAL_API | | #ifndef U_HIDE_INTERNAL_API | |
| /** Extract the string for the specified matching expression or subexpressi
on. | | /** Extract the string for the specified matching expression or subexpressi
on. | |
| * Group #0 is the complete string of matched text. | | * Group #0 is the complete string of matched text. | |
| * Group #1 is the text matched by the first set of capturing parentheses. | | * Group #1 is the text matched by the first set of capturing parentheses. | |
| | | | |
| skipping to change at line 716 | | skipping to change at line 716 | |
| * Group #0 refers to the complete range of matched text. | | * Group #0 refers to the complete range of matched text. | |
| * Group #1 refers to the text matched by the first set of capturing par
entheses. | | * Group #1 refers to the text matched by the first set of capturing par
entheses. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param groupNum The capture group number | | * @param groupNum The capture group number | |
| * @param status A reference to a UErrorCode to receive any erro
rs. | | * @param status A reference to a UErrorCode to receive any erro
rs. | |
| * @return the starting (native) position in the input of
the text matched | | * @return the starting (native) position in the input of
the text matched | |
| * by the specified group. | | * by the specified group. | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT int64_t U_EXPORT2 | | U_STABLE int64_t U_EXPORT2 | |
| uregex_start64(URegularExpression *regexp, | | uregex_start64(URegularExpression *regexp, | |
| int32_t groupNum, | | int32_t groupNum, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Returns the index in the input string of the position following the e
nd | | * Returns the index in the input string of the position following the e
nd | |
| * of the text matched by the specified capture group. | | * of the text matched by the specified capture group. | |
| * Return -1 if the capture group was not part of the last match. | | * Return -1 if the capture group was not part of the last match. | |
| * Group #0 refers to the complete range of matched text. | | * Group #0 refers to the complete range of matched text. | |
| * Group #1 refers to the text matched by the first set of capturing par
entheses. | | * Group #1 refers to the text matched by the first set of capturing par
entheses. | |
| | | | |
| skipping to change at line 753 | | skipping to change at line 753 | |
| * Return -1 if the capture group was not part of the last match. | | * Return -1 if the capture group was not part of the last match. | |
| * Group #0 refers to the complete range of matched text. | | * Group #0 refers to the complete range of matched text. | |
| * Group #1 refers to the text matched by the first set of capturing par
entheses. | | * Group #1 refers to the text matched by the first set of capturing par
entheses. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param groupNum The capture group number | | * @param groupNum The capture group number | |
| * @param status A reference to a UErrorCode to receive any erro
rs. | | * @param status A reference to a UErrorCode to receive any erro
rs. | |
| * @return the (native) index of the position following th
e last matched character. | | * @return the (native) index of the position following th
e last matched character. | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT int64_t U_EXPORT2 | | U_STABLE int64_t U_EXPORT2 | |
| uregex_end64(URegularExpression *regexp, | | uregex_end64(URegularExpression *regexp, | |
| int32_t groupNum, | | int32_t groupNum, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Reset any saved state from the previous match. Has the effect of | | * Reset any saved state from the previous match. Has the effect of | |
| * causing uregex_findNext to begin at the specified index, and causing | | * causing uregex_findNext to begin at the specified index, and causing | |
| * uregex_start(), uregex_end() and uregex_group() to return an error | | * uregex_start(), uregex_end() and uregex_group() to return an error | |
| * indicating that there is no match information available. Clears any | | * indicating that there is no match information available. Clears any | |
| * match region that may have been set. | | * match region that may have been set. | |
| | | | |
| skipping to change at line 790 | | skipping to change at line 790 | |
| * uregex_start(), uregex_end() and uregex_group() to return an error | | * uregex_start(), uregex_end() and uregex_group() to return an error | |
| * indicating that there is no match information available. Clears any | | * indicating that there is no match information available. Clears any | |
| * match region that may have been set. | | * match region that may have been set. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param index The position (native) in the text at which a | | * @param index The position (native) in the text at which a | |
| * uregex_findNext() should begin searching. | | * uregex_findNext() should begin searching. | |
| * @param status A reference to a UErrorCode to receive any erro
rs. | | * @param status A reference to a UErrorCode to receive any erro
rs. | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT void U_EXPORT2 | | U_STABLE void U_EXPORT2 | |
| uregex_reset64(URegularExpression *regexp, | | uregex_reset64(URegularExpression *regexp, | |
| int64_t index, | | int64_t index, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Sets the limits of the matching region for this URegularExpression. | | * Sets the limits of the matching region for this URegularExpression. | |
| * The region is the part of the input string that will be considered when
matching. | | * The region is the part of the input string that will be considered when
matching. | |
| * Invoking this method resets any saved state from the previous match, | | * Invoking this method resets any saved state from the previous match, | |
| * then sets the region to start at the index specified by the start param
eter | | * then sets the region to start at the index specified by the start param
eter | |
| * and end at the index specified by the end parameter. | | * and end at the index specified by the end parameter. | |
| | | | |
| skipping to change at line 842 | | skipping to change at line 842 | |
| * | | * | |
| * The function will fail if start is greater than limit, or if either ind
ex | | * The function will fail if start is greater than limit, or if either ind
ex | |
| * is less than zero or greater than the length of the string being match
ed. | | * is less than zero or greater than the length of the string being match
ed. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param regionStart The (native) index to begin searches at. | | * @param regionStart The (native) index to begin searches at. | |
| * @param regionLimit The (native) index to end searches at (exclusive). | | * @param regionLimit The (native) index to end searches at (exclusive). | |
| * @param status A pointer to a UErrorCode to receive any errors. | | * @param status A pointer to a UErrorCode to receive any errors. | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT void U_EXPORT2 | | U_STABLE void U_EXPORT2 | |
| uregex_setRegion64(URegularExpression *regexp, | | uregex_setRegion64(URegularExpression *regexp, | |
| int64_t regionStart, | | int64_t regionStart, | |
| int64_t regionLimit, | | int64_t regionLimit, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Set the matching region and the starting index for subsequent matches | | * Set the matching region and the starting index for subsequent matches | |
| * in a single operation. | | * in a single operation. | |
| * This is useful because the usual function for setting the starting | | * This is useful because the usual function for setting the starting | |
| * index, urgex_reset(), also resets any region limits. | | * index, urgex_reset(), also resets any region limits. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param regionStart The (native) index to begin searches at. | | * @param regionStart The (native) index to begin searches at. | |
| * @param regionLimit The (native) index to end searches at (exclusive). | | * @param regionLimit The (native) index to end searches at (exclusive). | |
| * @param startIndex The index in the input text at which the next | | * @param startIndex The index in the input text at which the next | |
| * match operation should begin. | | * match operation should begin. | |
| * @param status A pointer to a UErrorCode to receive any errors. | | * @param status A pointer to a UErrorCode to receive any errors. | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT void U_EXPORT2 | | U_STABLE void U_EXPORT2 | |
| uregex_setRegionAndStart(URegularExpression *regexp, | | uregex_setRegionAndStart(URegularExpression *regexp, | |
| int64_t regionStart, | | int64_t regionStart, | |
| int64_t regionLimit, | | int64_t regionLimit, | |
| int64_t startIndex, | | int64_t startIndex, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Reports the start index of the matching region. Any matches found are l
imited to | | * Reports the start index of the matching region. Any matches found are l
imited to | |
| * to the region bounded by regionStart (inclusive) and regionEnd (exclusi
ve). | | * to the region bounded by regionStart (inclusive) and regionEnd (exclusi
ve). | |
| * | | * | |
| | | | |
| skipping to change at line 892 | | skipping to change at line 892 | |
| /** | | /** | |
| * 64bit version of uregex_regionStart. | | * 64bit version of uregex_regionStart. | |
| * Reports the start index of the matching region. Any matches found are l
imited to | | * Reports the start index of the matching region. Any matches found are l
imited to | |
| * to the region bounded by regionStart (inclusive) and regionEnd (exclusi
ve). | | * to the region bounded by regionStart (inclusive) and regionEnd (exclusi
ve). | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param status A pointer to a UErrorCode to receive any errors. | | * @param status A pointer to a UErrorCode to receive any errors. | |
| * @return The starting (native) index of this matcher's region. | | * @return The starting (native) index of this matcher's region. | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT int64_t U_EXPORT2 | | U_STABLE int64_t U_EXPORT2 | |
| uregex_regionStart64(const URegularExpression *regexp, | | uregex_regionStart64(const URegularExpression *regexp, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Reports the end index (exclusive) of the matching region for this URegu
larExpression. | | * Reports the end index (exclusive) of the matching region for this URegu
larExpression. | |
| * Any matches found are limited to to the region bounded by regionStart (
inclusive) | | * Any matches found are limited to to the region bounded by regionStart (
inclusive) | |
| * and regionEnd (exclusive). | | * and regionEnd (exclusive). | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param status A pointer to a UErrorCode to receive any errors. | | * @param status A pointer to a UErrorCode to receive any errors. | |
| | | | |
| skipping to change at line 921 | | skipping to change at line 921 | |
| * 64bit version of uregex_regionEnd. | | * 64bit version of uregex_regionEnd. | |
| * Reports the end index (exclusive) of the matching region for this URegu
larExpression. | | * Reports the end index (exclusive) of the matching region for this URegu
larExpression. | |
| * Any matches found are limited to to the region bounded by regionStart (
inclusive) | | * Any matches found are limited to to the region bounded by regionStart (
inclusive) | |
| * and regionEnd (exclusive). | | * and regionEnd (exclusive). | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param status A pointer to a UErrorCode to receive any errors. | | * @param status A pointer to a UErrorCode to receive any errors. | |
| * @return The ending point (native) of this matcher's region. | | * @return The ending point (native) of this matcher's region. | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT int64_t U_EXPORT2 | | U_STABLE int64_t U_EXPORT2 | |
| uregex_regionEnd64(const URegularExpression *regexp, | | uregex_regionEnd64(const URegularExpression *regexp, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Queries the transparency of region bounds for this URegularExpression. | | * Queries the transparency of region bounds for this URegularExpression. | |
| * See useTransparentBounds for a description of transparent and opaque bo
unds. | | * See useTransparentBounds for a description of transparent and opaque bo
unds. | |
| * By default, matching boundaries are opaque. | | * By default, matching boundaries are opaque. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param status A pointer to a UErrorCode to receive any errors. | | * @param status A pointer to a UErrorCode to receive any errors. | |
| | | | |
| skipping to change at line 1076 | | skipping to change at line 1076 | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param replacement A string containing the replacement text. | | * @param replacement A string containing the replacement text. | |
| * @param dest A mutable UText that will receive the result
. | | * @param dest A mutable UText that will receive the result
. | |
| * If NULL, a new UText will be created (which
may not be mutable). | | * If NULL, a new UText will be created (which
may not be mutable). | |
| * @param status A reference to a UErrorCode to receive any e
rrors. | | * @param status A reference to a UErrorCode to receive any e
rrors. | |
| * @return A UText containing the results of the find a
nd replace. | | * @return A UText containing the results of the find a
nd replace. | |
| * If a pre-allocated UText was provided, it w
ill always be used and returned. | | * If a pre-allocated UText was provided, it w
ill always be used and returned. | |
| * | | * | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT UText * U_EXPORT2 | | U_STABLE UText * U_EXPORT2 | |
| uregex_replaceAllUText(URegularExpression *regexp, | | uregex_replaceAllUText(URegularExpression *regexp, | |
| UText *replacement, | | UText *replacement, | |
| UText *dest, | | UText *dest, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Replaces the first substring of the input that matches the pattern | | * Replaces the first substring of the input that matches the pattern | |
| * with the given replacement string. This is a convenience function t
hat | | * with the given replacement string. This is a convenience function t
hat | |
| * provides a complete find-and-replace operation. | | * provides a complete find-and-replace operation. | |
| * | | * | |
| | | | |
| skipping to change at line 1135 | | skipping to change at line 1135 | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param replacement A string containing the replacement text. | | * @param replacement A string containing the replacement text. | |
| * @param dest A mutable UText that will receive the result
. | | * @param dest A mutable UText that will receive the result
. | |
| * If NULL, a new UText will be created (which
may not be mutable). | | * If NULL, a new UText will be created (which
may not be mutable). | |
| * @param status A reference to a UErrorCode to receive any e
rrors. | | * @param status A reference to a UErrorCode to receive any e
rrors. | |
| * @return A UText containing the results of the find a
nd replace. | | * @return A UText containing the results of the find a
nd replace. | |
| * If a pre-allocated UText was provided, it w
ill always be used and returned. | | * If a pre-allocated UText was provided, it w
ill always be used and returned. | |
| * | | * | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT UText * U_EXPORT2 | | U_STABLE UText * U_EXPORT2 | |
| uregex_replaceFirstUText(URegularExpression *regexp, | | uregex_replaceFirstUText(URegularExpression *regexp, | |
| UText *replacement, | | UText *replacement, | |
| UText *dest, | | UText *dest, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Implements a replace operation intended to be used as part of an | | * Implements a replace operation intended to be used as part of an | |
| * incremental find-and-replace. | | * incremental find-and-replace. | |
| * | | * | |
| * <p>The input string, starting from the end of the previous match and
ending at | | * <p>The input string, starting from the end of the previous match and
ending at | |
| | | | |
| skipping to change at line 1217 | | skipping to change at line 1217 | |
| * @param regexp The regular expression object. | | * @param regexp The regular expression object. | |
| * @param replacementText The string that will replace the matched por
tion of the | | * @param replacementText The string that will replace the matched por
tion of the | |
| * input string as it is copied to the destination
buffer. | | * input string as it is copied to the destination
buffer. | |
| * The replacement text may contain references ($1,
for | | * The replacement text may contain references ($1,
for | |
| * example) to capture groups from the match. | | * example) to capture groups from the match. | |
| * @param dest A mutable UText that will receive the result. Mu
st not be NULL. | | * @param dest A mutable UText that will receive the result. Mu
st not be NULL. | |
| * @param status A reference to a UErrorCode to receive any error
s. | | * @param status A reference to a UErrorCode to receive any error
s. | |
| * | | * | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT void U_EXPORT2 | | U_STABLE void U_EXPORT2 | |
| uregex_appendReplacementUText(URegularExpression *regexp, | | uregex_appendReplacementUText(URegularExpression *regexp, | |
| UText *replacementText, | | UText *replacementText, | |
| UText *dest, | | UText *dest, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * As the final step in a find-and-replace operation, append the remainder | | * As the final step in a find-and-replace operation, append the remainder | |
| * of the input string, starting at the position following the last match, | | * of the input string, starting at the position following the last match, | |
| * to the destination string. <code>uregex_appendTail()</code> is intended | | * to the destination string. <code>uregex_appendTail()</code> is intended | |
| * to be invoked after one or more invocations of the | | * to be invoked after one or more invocations of the | |
| | | | |
| skipping to change at line 1271 | | skipping to change at line 1271 | |
| * obtain the input string and with the position | | * obtain the input string and with the position | |
| * of the last match within it. | | * of the last match within it. | |
| * @param dest A mutable UText that will receive the result. Mu
st not be NULL. | | * @param dest A mutable UText that will receive the result. Mu
st not be NULL. | |
| * | | * | |
| * @param status Error code | | * @param status Error code | |
| * | | * | |
| * @return The destination UText. | | * @return The destination UText. | |
| * | | * | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT UText * U_EXPORT2 | | U_STABLE UText * U_EXPORT2 | |
| uregex_appendTailUText(URegularExpression *regexp, | | uregex_appendTailUText(URegularExpression *regexp, | |
| UText *dest, | | UText *dest, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Split a string into fields. Somewhat like split() from Perl. | | * Split a string into fields. Somewhat like split() from Perl. | |
| * The pattern matches identify delimiters that separate the input | | * The pattern matches identify delimiters that separate the input | |
| * into fields. The input data between the matches becomes the | | * into fields. The input data between the matches becomes the | |
| * fields themselves. | | * fields themselves. | |
| * | | * | |
| | | | |
| skipping to change at line 1362 | | skipping to change at line 1362 | |
| * If the number of destination strings is less than the n
umber | | * If the number of destination strings is less than the n
umber | |
| * of fields, the trailing part of the input string, inclu
ding any | | * of fields, the trailing part of the input string, inclu
ding any | |
| * field delimiters, is placed in the last destination str
ing. | | * field delimiters, is placed in the last destination str
ing. | |
| * This behavior mimics that of Perl. It is not an error
condition, and no | | * This behavior mimics that of Perl. It is not an error
condition, and no | |
| * error status is returned when all destField positions a
re used. | | * error status is returned when all destField positions a
re used. | |
| * @param status A reference to a UErrorCode to receive any errors. | | * @param status A reference to a UErrorCode to receive any errors. | |
| * @return The number of fields into which the input string was sp
lit. | | * @return The number of fields into which the input string was sp
lit. | |
| * | | * | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| uregex_splitUText(URegularExpression *regexp, | | uregex_splitUText(URegularExpression *regexp, | |
| UText *destFields[], | | UText *destFields[], | |
| int32_t destFieldsCapacity, | | int32_t destFieldsCapacity, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Set a processing time limit for match operations with this URegularExpre
ssion. | | * Set a processing time limit for match operations with this URegularExpre
ssion. | |
| * | | * | |
| * Some patterns, when matching certain strings, can run in exponential tim
e. | | * Some patterns, when matching certain strings, can run in exponential tim
e. | |
| * For practical purposes, the match operation may appear to be in an | | * For practical purposes, the match operation may appear to be in an | |
| | | | |
| skipping to change at line 1552 | | skipping to change at line 1552 | |
| * Set the find progress callback function for this URegularExpression. | | * Set the find progress callback function for this URegularExpression. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param callback A pointer to the user-supplied callback function. | | * @param callback A pointer to the user-supplied callback function. | |
| * @param context User context pointer. The value supplied at the | | * @param context User context pointer. The value supplied at the | |
| * time the callback function is set will be saved | | * time the callback function is set will be saved | |
| * and passed to the callback each time that it is cal
led. | | * and passed to the callback each time that it is cal
led. | |
| * @param status A reference to a UErrorCode to receive any errors. | | * @param status A reference to a UErrorCode to receive any errors. | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT void U_EXPORT2 | | U_STABLE void U_EXPORT2 | |
| uregex_setFindProgressCallback(URegularExpression *regexp, | | uregex_setFindProgressCallback(URegularExpression *regexp, | |
| URegexFindProgressCallback *callback, | | URegexFindProgressCallback *callback, | |
| const void *context, | | const void *context, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Get the find progress callback function for this URegularExpression. | | * Get the find progress callback function for this URegularExpression. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param callback Out parameter, receives a pointer to the user-suppl
ied | | * @param callback Out parameter, receives a pointer to the user-suppl
ied | |
| * callback function. | | * callback function. | |
| * @param context Out parameter, receives the user context pointer th
at | | * @param context Out parameter, receives the user context pointer th
at | |
| * was set when uregex_setFindProgressCallback() was c
alled. | | * was set when uregex_setFindProgressCallback() was c
alled. | |
| * @param status A reference to a UErrorCode to receive any errors. | | * @param status A reference to a UErrorCode to receive any errors. | |
| * @stable ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| U_DRAFT void U_EXPORT2 | | U_STABLE void U_EXPORT2 | |
| uregex_getFindProgressCallback(const URegularExpression *regexp, | | uregex_getFindProgressCallback(const URegularExpression *regexp, | |
| URegexFindProgressCallback **callbac
k, | | URegexFindProgressCallback **callbac
k, | |
| const void **context
, | | const void **context
, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| #endif /* !UCONFIG_NO_REGULAR_EXPRESSIONS */ | | #endif /* !UCONFIG_NO_REGULAR_EXPRESSIONS */ | |
| #endif /* UREGEX_H */ | | #endif /* UREGEX_H */ | |
| | | | |
End of changes. 23 change blocks. |
| 23 lines changed or deleted | | 23 lines changed or added | |
|
| urename.h | | urename.h | |
| | | | |
| skipping to change at line 12 | | skipping to change at line 12 | |
| ***************************************************************************
**** | | ***************************************************************************
**** | |
| * Copyright (C) 2002-2012, International Business Machines | | * Copyright (C) 2002-2012, International Business Machines | |
| * Corporation and others. All Rights Reserved. | | * Corporation and others. All Rights Reserved. | |
| ***************************************************************************
**** | | ***************************************************************************
**** | |
| * | | * | |
| * file name: urename.h | | * file name: urename.h | |
| * encoding: US-ASCII | | * encoding: US-ASCII | |
| * tab size: 8 (not used) | | * tab size: 8 (not used) | |
| * indentation:4 | | * indentation:4 | |
| * | | * | |
|
| * Created by: Perl script written by Vladimir Weinstein | | * Created by: Perl script tools/genren.pl written by Vladimir Weinstein | |
| * | | * | |
| * Contains data for renaming ICU exports. | | * Contains data for renaming ICU exports. | |
| * Gets included by umachine.h | | * Gets included by umachine.h | |
| * | | * | |
| * THIS FILE IS MACHINE-GENERATED, DON'T PLAY WITH IT IF YOU DON'T KNOW WHA
T | | * THIS FILE IS MACHINE-GENERATED, DON'T PLAY WITH IT IF YOU DON'T KNOW WHA
T | |
| * YOU ARE DOING, OTHERWISE VERY BAD THINGS WILL HAPPEN! | | * YOU ARE DOING, OTHERWISE VERY BAD THINGS WILL HAPPEN! | |
| */ | | */ | |
| | | | |
| #ifndef URENAME_H | | #ifndef URENAME_H | |
| #define URENAME_H | | #define URENAME_H | |
| | | | |
|
| /* Uncomment the following line to disable renaming on platforms | | /* U_DISABLE_RENAMING can be defined in the following ways: | |
| that do not use Autoconf. */ | | * - when running configure, e.g. | |
| /* #define U_DISABLE_RENAMING 1 */ | | * runConfigureICU Linux --disable-renaming | |
| | | * - by changing the default setting of U_DISABLE_RENAMING in uconfig.h | |
| | | */ | |
| | | | |
| | | #include "unicode/uconfig.h" | |
| | | | |
| #if !U_DISABLE_RENAMING | | #if !U_DISABLE_RENAMING | |
| | | | |
| /* We need the U_ICU_ENTRY_POINT_RENAME definition. There's a default one i
n unicode/uvernum.h we can use, but we will give | | /* We need the U_ICU_ENTRY_POINT_RENAME definition. There's a default one i
n unicode/uvernum.h we can use, but we will give | |
| the platform a chance to define it first. | | the platform a chance to define it first. | |
| Normally (if utypes.h or umachine.h was included first) this will not be
necessary as it will already be defined. | | Normally (if utypes.h or umachine.h was included first) this will not be
necessary as it will already be defined. | |
| */ | | */ | |
|
| #ifndef U_ICU_ENTRY_POINT_RENAME | | | |
| #include "unicode/uconfig.h" | | | |
| #endif | | | |
| | | | |
| #ifndef U_ICU_ENTRY_POINT_RENAME | | #ifndef U_ICU_ENTRY_POINT_RENAME | |
| #include "unicode/umachine.h" | | #include "unicode/umachine.h" | |
| #endif | | #endif | |
| | | | |
| /* If we still don't have U_ICU_ENTRY_POINT_RENAME use the default. */ | | /* If we still don't have U_ICU_ENTRY_POINT_RENAME use the default. */ | |
| #ifndef U_ICU_ENTRY_POINT_RENAME | | #ifndef U_ICU_ENTRY_POINT_RENAME | |
| #include "unicode/uvernum.h" | | #include "unicode/uvernum.h" | |
| #endif | | #endif | |
| | | | |
| /* Error out before the following defines cause very strange and unexpected
code breakage */ | | /* Error out before the following defines cause very strange and unexpected
code breakage */ | |
| #ifndef U_ICU_ENTRY_POINT_RENAME | | #ifndef U_ICU_ENTRY_POINT_RENAME | |
| #error U_ICU_ENTRY_POINT_RENAME is not defined - cannot continue. Consider
defining U_DISABLE_RENAMING if renaming should not be used. | | #error U_ICU_ENTRY_POINT_RENAME is not defined - cannot continue. Consider
defining U_DISABLE_RENAMING if renaming should not be used. | |
| #endif | | #endif | |
| | | | |
| /* C exports renaming data */ | | /* C exports renaming data */ | |
| | | | |
|
| #define DECPOWERS U_ICU_ENTRY_POINT_RENAME(DECPOWERS) | | | |
| #define DECSTICKYTAB U_ICU_ENTRY_POINT_RENAME(DECSTICKYTAB) | | | |
| #define T_CString_int64ToString U_ICU_ENTRY_POINT_RENAME(T_CString_int64ToS
tring) | | #define T_CString_int64ToString U_ICU_ENTRY_POINT_RENAME(T_CString_int64ToS
tring) | |
| #define T_CString_integerToString U_ICU_ENTRY_POINT_RENAME(T_CString_intege
rToString) | | #define T_CString_integerToString U_ICU_ENTRY_POINT_RENAME(T_CString_intege
rToString) | |
| #define T_CString_stringToInteger U_ICU_ENTRY_POINT_RENAME(T_CString_string
ToInteger) | | #define T_CString_stringToInteger U_ICU_ENTRY_POINT_RENAME(T_CString_string
ToInteger) | |
| #define T_CString_toLowerCase U_ICU_ENTRY_POINT_RENAME(T_CString_toLowerCas
e) | | #define T_CString_toLowerCase U_ICU_ENTRY_POINT_RENAME(T_CString_toLowerCas
e) | |
| #define T_CString_toUpperCase U_ICU_ENTRY_POINT_RENAME(T_CString_toUpperCas
e) | | #define T_CString_toUpperCase U_ICU_ENTRY_POINT_RENAME(T_CString_toUpperCas
e) | |
| #define UCNV_FROM_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CA
LLBACK_ESCAPE) | | #define UCNV_FROM_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CA
LLBACK_ESCAPE) | |
| #define UCNV_FROM_U_CALLBACK_SKIP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALL
BACK_SKIP) | | #define UCNV_FROM_U_CALLBACK_SKIP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALL
BACK_SKIP) | |
| #define UCNV_FROM_U_CALLBACK_STOP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALL
BACK_STOP) | | #define UCNV_FROM_U_CALLBACK_STOP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALL
BACK_STOP) | |
| #define UCNV_FROM_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_
U_CALLBACK_SUBSTITUTE) | | #define UCNV_FROM_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_
U_CALLBACK_SUBSTITUTE) | |
| #define UCNV_TO_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBA
CK_ESCAPE) | | #define UCNV_TO_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBA
CK_ESCAPE) | |
| | | | |
| skipping to change at line 114 | | skipping to change at line 113 | |
| #define _UTF7Data U_ICU_ENTRY_POINT_RENAME(_UTF7Data) | | #define _UTF7Data U_ICU_ENTRY_POINT_RENAME(_UTF7Data) | |
| #define _UTF8Data U_ICU_ENTRY_POINT_RENAME(_UTF8Data) | | #define _UTF8Data U_ICU_ENTRY_POINT_RENAME(_UTF8Data) | |
| #define bms_close U_ICU_ENTRY_POINT_RENAME(bms_close) | | #define bms_close U_ICU_ENTRY_POINT_RENAME(bms_close) | |
| #define bms_empty U_ICU_ENTRY_POINT_RENAME(bms_empty) | | #define bms_empty U_ICU_ENTRY_POINT_RENAME(bms_empty) | |
| #define bms_getData U_ICU_ENTRY_POINT_RENAME(bms_getData) | | #define bms_getData U_ICU_ENTRY_POINT_RENAME(bms_getData) | |
| #define bms_open U_ICU_ENTRY_POINT_RENAME(bms_open) | | #define bms_open U_ICU_ENTRY_POINT_RENAME(bms_open) | |
| #define bms_search U_ICU_ENTRY_POINT_RENAME(bms_search) | | #define bms_search U_ICU_ENTRY_POINT_RENAME(bms_search) | |
| #define bms_setTargetString U_ICU_ENTRY_POINT_RENAME(bms_setTargetString) | | #define bms_setTargetString U_ICU_ENTRY_POINT_RENAME(bms_setTargetString) | |
| #define cmemory_cleanup U_ICU_ENTRY_POINT_RENAME(cmemory_cleanup) | | #define cmemory_cleanup U_ICU_ENTRY_POINT_RENAME(cmemory_cleanup) | |
| #define cmemory_inUse U_ICU_ENTRY_POINT_RENAME(cmemory_inUse) | | #define cmemory_inUse U_ICU_ENTRY_POINT_RENAME(cmemory_inUse) | |
|
| #define d2utable U_ICU_ENTRY_POINT_RENAME(d2utable) | | | |
| #define deleteCEList U_ICU_ENTRY_POINT_RENAME(deleteCEList) | | | |
| #define deleteChars U_ICU_ENTRY_POINT_RENAME(deleteChars) | | | |
| #define deleteCollDataCacheEntry U_ICU_ENTRY_POINT_RENAME(deleteCollDataCac | | | |
| heEntry) | | | |
| #define deleteStringList U_ICU_ENTRY_POINT_RENAME(deleteStringList) | | | |
| #define deleteUnicodeStringKey U_ICU_ENTRY_POINT_RENAME(deleteUnicodeString | | | |
| Key) | | | |
| #define gICUInitMutex U_ICU_ENTRY_POINT_RENAME(gICUInitMutex) | | | |
| #define gICUInitialized U_ICU_ENTRY_POINT_RENAME(gICUInitialized) | | | |
| #define izrule_clone U_ICU_ENTRY_POINT_RENAME(izrule_clone) | | #define izrule_clone U_ICU_ENTRY_POINT_RENAME(izrule_clone) | |
| #define izrule_close U_ICU_ENTRY_POINT_RENAME(izrule_close) | | #define izrule_close U_ICU_ENTRY_POINT_RENAME(izrule_close) | |
| #define izrule_equals U_ICU_ENTRY_POINT_RENAME(izrule_equals) | | #define izrule_equals U_ICU_ENTRY_POINT_RENAME(izrule_equals) | |
| #define izrule_getDSTSavings U_ICU_ENTRY_POINT_RENAME(izrule_getDSTSavings) | | #define izrule_getDSTSavings U_ICU_ENTRY_POINT_RENAME(izrule_getDSTSavings) | |
| #define izrule_getDynamicClassID U_ICU_ENTRY_POINT_RENAME(izrule_getDynamic
ClassID) | | #define izrule_getDynamicClassID U_ICU_ENTRY_POINT_RENAME(izrule_getDynamic
ClassID) | |
| #define izrule_getFinalStart U_ICU_ENTRY_POINT_RENAME(izrule_getFinalStart) | | #define izrule_getFinalStart U_ICU_ENTRY_POINT_RENAME(izrule_getFinalStart) | |
| #define izrule_getFirstStart U_ICU_ENTRY_POINT_RENAME(izrule_getFirstStart) | | #define izrule_getFirstStart U_ICU_ENTRY_POINT_RENAME(izrule_getFirstStart) | |
| #define izrule_getName U_ICU_ENTRY_POINT_RENAME(izrule_getName) | | #define izrule_getName U_ICU_ENTRY_POINT_RENAME(izrule_getName) | |
| #define izrule_getNextStart U_ICU_ENTRY_POINT_RENAME(izrule_getNextStart) | | #define izrule_getNextStart U_ICU_ENTRY_POINT_RENAME(izrule_getNextStart) | |
| #define izrule_getPreviousStart U_ICU_ENTRY_POINT_RENAME(izrule_getPrevious
Start) | | #define izrule_getPreviousStart U_ICU_ENTRY_POINT_RENAME(izrule_getPrevious
Start) | |
| | | | |
| skipping to change at line 217 | | skipping to change at line 208 | |
| #define res_getBinary U_ICU_ENTRY_POINT_RENAME(res_getBinary) | | #define res_getBinary U_ICU_ENTRY_POINT_RENAME(res_getBinary) | |
| #define res_getIntVector U_ICU_ENTRY_POINT_RENAME(res_getIntVector) | | #define res_getIntVector U_ICU_ENTRY_POINT_RENAME(res_getIntVector) | |
| #define res_getPublicType U_ICU_ENTRY_POINT_RENAME(res_getPublicType) | | #define res_getPublicType U_ICU_ENTRY_POINT_RENAME(res_getPublicType) | |
| #define res_getResource U_ICU_ENTRY_POINT_RENAME(res_getResource) | | #define res_getResource U_ICU_ENTRY_POINT_RENAME(res_getResource) | |
| #define res_getString U_ICU_ENTRY_POINT_RENAME(res_getString) | | #define res_getString U_ICU_ENTRY_POINT_RENAME(res_getString) | |
| #define res_getTableItemByIndex U_ICU_ENTRY_POINT_RENAME(res_getTableItemBy
Index) | | #define res_getTableItemByIndex U_ICU_ENTRY_POINT_RENAME(res_getTableItemBy
Index) | |
| #define res_getTableItemByKey U_ICU_ENTRY_POINT_RENAME(res_getTableItemByKe
y) | | #define res_getTableItemByKey U_ICU_ENTRY_POINT_RENAME(res_getTableItemByKe
y) | |
| #define res_load U_ICU_ENTRY_POINT_RENAME(res_load) | | #define res_load U_ICU_ENTRY_POINT_RENAME(res_load) | |
| #define res_read U_ICU_ENTRY_POINT_RENAME(res_read) | | #define res_read U_ICU_ENTRY_POINT_RENAME(res_read) | |
| #define res_unload U_ICU_ENTRY_POINT_RENAME(res_unload) | | #define res_unload U_ICU_ENTRY_POINT_RENAME(res_unload) | |
|
| #define triedict_swap U_ICU_ENTRY_POINT_RENAME(triedict_swap) | | | |
| #define u_UCharsToChars U_ICU_ENTRY_POINT_RENAME(u_UCharsToChars) | | #define u_UCharsToChars U_ICU_ENTRY_POINT_RENAME(u_UCharsToChars) | |
| #define u_austrcpy U_ICU_ENTRY_POINT_RENAME(u_austrcpy) | | #define u_austrcpy U_ICU_ENTRY_POINT_RENAME(u_austrcpy) | |
| #define u_austrncpy U_ICU_ENTRY_POINT_RENAME(u_austrncpy) | | #define u_austrncpy U_ICU_ENTRY_POINT_RENAME(u_austrncpy) | |
| #define u_catclose U_ICU_ENTRY_POINT_RENAME(u_catclose) | | #define u_catclose U_ICU_ENTRY_POINT_RENAME(u_catclose) | |
| #define u_catgets U_ICU_ENTRY_POINT_RENAME(u_catgets) | | #define u_catgets U_ICU_ENTRY_POINT_RENAME(u_catgets) | |
| #define u_catopen U_ICU_ENTRY_POINT_RENAME(u_catopen) | | #define u_catopen U_ICU_ENTRY_POINT_RENAME(u_catopen) | |
| #define u_charAge U_ICU_ENTRY_POINT_RENAME(u_charAge) | | #define u_charAge U_ICU_ENTRY_POINT_RENAME(u_charAge) | |
| #define u_charDigitValue U_ICU_ENTRY_POINT_RENAME(u_charDigitValue) | | #define u_charDigitValue U_ICU_ENTRY_POINT_RENAME(u_charDigitValue) | |
| #define u_charDirection U_ICU_ENTRY_POINT_RENAME(u_charDirection) | | #define u_charDirection U_ICU_ENTRY_POINT_RENAME(u_charDirection) | |
| #define u_charFromName U_ICU_ENTRY_POINT_RENAME(u_charFromName) | | #define u_charFromName U_ICU_ENTRY_POINT_RENAME(u_charFromName) | |
| | | | |
| skipping to change at line 530 | | skipping to change at line 520 | |
| #define ucal_getDefaultTimeZone U_ICU_ENTRY_POINT_RENAME(ucal_getDefaultTim
eZone) | | #define ucal_getDefaultTimeZone U_ICU_ENTRY_POINT_RENAME(ucal_getDefaultTim
eZone) | |
| #define ucal_getFieldDifference U_ICU_ENTRY_POINT_RENAME(ucal_getFieldDiffe
rence) | | #define ucal_getFieldDifference U_ICU_ENTRY_POINT_RENAME(ucal_getFieldDiffe
rence) | |
| #define ucal_getGregorianChange U_ICU_ENTRY_POINT_RENAME(ucal_getGregorianC
hange) | | #define ucal_getGregorianChange U_ICU_ENTRY_POINT_RENAME(ucal_getGregorianC
hange) | |
| #define ucal_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucal_getKey
wordValuesForLocale) | | #define ucal_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucal_getKey
wordValuesForLocale) | |
| #define ucal_getLimit U_ICU_ENTRY_POINT_RENAME(ucal_getLimit) | | #define ucal_getLimit U_ICU_ENTRY_POINT_RENAME(ucal_getLimit) | |
| #define ucal_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ucal_getLocaleByType) | | #define ucal_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ucal_getLocaleByType) | |
| #define ucal_getMillis U_ICU_ENTRY_POINT_RENAME(ucal_getMillis) | | #define ucal_getMillis U_ICU_ENTRY_POINT_RENAME(ucal_getMillis) | |
| #define ucal_getNow U_ICU_ENTRY_POINT_RENAME(ucal_getNow) | | #define ucal_getNow U_ICU_ENTRY_POINT_RENAME(ucal_getNow) | |
| #define ucal_getTZDataVersion U_ICU_ENTRY_POINT_RENAME(ucal_getTZDataVersio
n) | | #define ucal_getTZDataVersion U_ICU_ENTRY_POINT_RENAME(ucal_getTZDataVersio
n) | |
| #define ucal_getTimeZoneDisplayName U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZo
neDisplayName) | | #define ucal_getTimeZoneDisplayName U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZo
neDisplayName) | |
|
| | | #define ucal_getTimeZoneTransitionDate U_ICU_ENTRY_POINT_RENAME(ucal_getTim
eZoneTransitionDate) | |
| #define ucal_getType U_ICU_ENTRY_POINT_RENAME(ucal_getType) | | #define ucal_getType U_ICU_ENTRY_POINT_RENAME(ucal_getType) | |
| #define ucal_getWeekendTransition U_ICU_ENTRY_POINT_RENAME(ucal_getWeekendT
ransition) | | #define ucal_getWeekendTransition U_ICU_ENTRY_POINT_RENAME(ucal_getWeekendT
ransition) | |
| #define ucal_inDaylightTime U_ICU_ENTRY_POINT_RENAME(ucal_inDaylightTime) | | #define ucal_inDaylightTime U_ICU_ENTRY_POINT_RENAME(ucal_inDaylightTime) | |
| #define ucal_isSet U_ICU_ENTRY_POINT_RENAME(ucal_isSet) | | #define ucal_isSet U_ICU_ENTRY_POINT_RENAME(ucal_isSet) | |
| #define ucal_isWeekend U_ICU_ENTRY_POINT_RENAME(ucal_isWeekend) | | #define ucal_isWeekend U_ICU_ENTRY_POINT_RENAME(ucal_isWeekend) | |
| #define ucal_open U_ICU_ENTRY_POINT_RENAME(ucal_open) | | #define ucal_open U_ICU_ENTRY_POINT_RENAME(ucal_open) | |
| #define ucal_openCountryTimeZones U_ICU_ENTRY_POINT_RENAME(ucal_openCountry
TimeZones) | | #define ucal_openCountryTimeZones U_ICU_ENTRY_POINT_RENAME(ucal_openCountry
TimeZones) | |
| #define ucal_openTimeZoneIDEnumeration U_ICU_ENTRY_POINT_RENAME(ucal_openTi
meZoneIDEnumeration) | | #define ucal_openTimeZoneIDEnumeration U_ICU_ENTRY_POINT_RENAME(ucal_openTi
meZoneIDEnumeration) | |
| #define ucal_openTimeZones U_ICU_ENTRY_POINT_RENAME(ucal_openTimeZones) | | #define ucal_openTimeZones U_ICU_ENTRY_POINT_RENAME(ucal_openTimeZones) | |
| #define ucal_roll U_ICU_ENTRY_POINT_RENAME(ucal_roll) | | #define ucal_roll U_ICU_ENTRY_POINT_RENAME(ucal_roll) | |
| | | | |
| skipping to change at line 593 | | skipping to change at line 584 | |
| #define ucd_freeCache U_ICU_ENTRY_POINT_RENAME(ucd_freeCache) | | #define ucd_freeCache U_ICU_ENTRY_POINT_RENAME(ucd_freeCache) | |
| #define ucd_getCollator U_ICU_ENTRY_POINT_RENAME(ucd_getCollator) | | #define ucd_getCollator U_ICU_ENTRY_POINT_RENAME(ucd_getCollator) | |
| #define ucd_open U_ICU_ENTRY_POINT_RENAME(ucd_open) | | #define ucd_open U_ICU_ENTRY_POINT_RENAME(ucd_open) | |
| #define uchar_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(uchar_addPropertyS
tarts) | | #define uchar_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(uchar_addPropertyS
tarts) | |
| #define uchar_swapNames U_ICU_ENTRY_POINT_RENAME(uchar_swapNames) | | #define uchar_swapNames U_ICU_ENTRY_POINT_RENAME(uchar_swapNames) | |
| #define ucln_cleanupOne U_ICU_ENTRY_POINT_RENAME(ucln_cleanupOne) | | #define ucln_cleanupOne U_ICU_ENTRY_POINT_RENAME(ucln_cleanupOne) | |
| #define ucln_common_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_common_re
gisterCleanup) | | #define ucln_common_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_common_re
gisterCleanup) | |
| #define ucln_i18n_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_i18n_regist
erCleanup) | | #define ucln_i18n_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_i18n_regist
erCleanup) | |
| #define ucln_io_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_io_registerCl
eanup) | | #define ucln_io_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_io_registerCl
eanup) | |
| #define ucln_lib_cleanup U_ICU_ENTRY_POINT_RENAME(ucln_lib_cleanup) | | #define ucln_lib_cleanup U_ICU_ENTRY_POINT_RENAME(ucln_lib_cleanup) | |
|
| | | #define ucln_mutexedInit U_ICU_ENTRY_POINT_RENAME(ucln_mutexedInit) | |
| #define ucln_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_registerCleanup) | | #define ucln_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_registerCleanup) | |
| #define ucnv_MBCSFromUChar32 U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSFromUChar32) | | #define ucnv_MBCSFromUChar32 U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSFromUChar32) | |
| #define ucnv_MBCSFromUnicodeWithOffsets U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSF
romUnicodeWithOffsets) | | #define ucnv_MBCSFromUnicodeWithOffsets U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSF
romUnicodeWithOffsets) | |
| #define ucnv_MBCSGetFilteredUnicodeSetForUnicode U_ICU_ENTRY_POINT_RENAME(u
cnv_MBCSGetFilteredUnicodeSetForUnicode) | | #define ucnv_MBCSGetFilteredUnicodeSetForUnicode U_ICU_ENTRY_POINT_RENAME(u
cnv_MBCSGetFilteredUnicodeSetForUnicode) | |
| #define ucnv_MBCSGetType U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSGetType) | | #define ucnv_MBCSGetType U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSGetType) | |
| #define ucnv_MBCSGetUnicodeSetForUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_MBCS
GetUnicodeSetForUnicode) | | #define ucnv_MBCSGetUnicodeSetForUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_MBCS
GetUnicodeSetForUnicode) | |
| #define ucnv_MBCSIsLeadByte U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSIsLeadByte) | | #define ucnv_MBCSIsLeadByte U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSIsLeadByte) | |
| #define ucnv_MBCSSimpleGetNextUChar U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSSimpl
eGetNextUChar) | | #define ucnv_MBCSSimpleGetNextUChar U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSSimpl
eGetNextUChar) | |
| #define ucnv_MBCSToUnicodeWithOffsets U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSToU
nicodeWithOffsets) | | #define ucnv_MBCSToUnicodeWithOffsets U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSToU
nicodeWithOffsets) | |
| #define ucnv_bld_countAvailableConverters U_ICU_ENTRY_POINT_RENAME(ucnv_bld
_countAvailableConverters) | | #define ucnv_bld_countAvailableConverters U_ICU_ENTRY_POINT_RENAME(ucnv_bld
_countAvailableConverters) | |
| | | | |
| skipping to change at line 727 | | skipping to change at line 719 | |
| #define ucol_equals U_ICU_ENTRY_POINT_RENAME(ucol_equals) | | #define ucol_equals U_ICU_ENTRY_POINT_RENAME(ucol_equals) | |
| #define ucol_findReorderingEntry U_ICU_ENTRY_POINT_RENAME(ucol_findReorderi
ngEntry) | | #define ucol_findReorderingEntry U_ICU_ENTRY_POINT_RENAME(ucol_findReorderi
ngEntry) | |
| #define ucol_forceHanImplicit U_ICU_ENTRY_POINT_RENAME(ucol_forceHanImplici
t) | | #define ucol_forceHanImplicit U_ICU_ENTRY_POINT_RENAME(ucol_forceHanImplici
t) | |
| #define ucol_forgetUCA U_ICU_ENTRY_POINT_RENAME(ucol_forgetUCA) | | #define ucol_forgetUCA U_ICU_ENTRY_POINT_RENAME(ucol_forgetUCA) | |
| #define ucol_freeOffsetBuffer U_ICU_ENTRY_POINT_RENAME(ucol_freeOffsetBuffe
r) | | #define ucol_freeOffsetBuffer U_ICU_ENTRY_POINT_RENAME(ucol_freeOffsetBuffe
r) | |
| #define ucol_getAttribute U_ICU_ENTRY_POINT_RENAME(ucol_getAttribute) | | #define ucol_getAttribute U_ICU_ENTRY_POINT_RENAME(ucol_getAttribute) | |
| #define ucol_getAttributeOrDefault U_ICU_ENTRY_POINT_RENAME(ucol_getAttribu
teOrDefault) | | #define ucol_getAttributeOrDefault U_ICU_ENTRY_POINT_RENAME(ucol_getAttribu
teOrDefault) | |
| #define ucol_getAvailable U_ICU_ENTRY_POINT_RENAME(ucol_getAvailable) | | #define ucol_getAvailable U_ICU_ENTRY_POINT_RENAME(ucol_getAvailable) | |
| #define ucol_getBound U_ICU_ENTRY_POINT_RENAME(ucol_getBound) | | #define ucol_getBound U_ICU_ENTRY_POINT_RENAME(ucol_getBound) | |
| #define ucol_getCEStrengthDifference U_ICU_ENTRY_POINT_RENAME(ucol_getCEStr
engthDifference) | | #define ucol_getCEStrengthDifference U_ICU_ENTRY_POINT_RENAME(ucol_getCEStr
engthDifference) | |
|
| | | #define ucol_getCollationKey U_ICU_ENTRY_POINT_RENAME(ucol_getCollationKey) | |
| #define ucol_getContractions U_ICU_ENTRY_POINT_RENAME(ucol_getContractions) | | #define ucol_getContractions U_ICU_ENTRY_POINT_RENAME(ucol_getContractions) | |
| #define ucol_getContractionsAndExpansions U_ICU_ENTRY_POINT_RENAME(ucol_get
ContractionsAndExpansions) | | #define ucol_getContractionsAndExpansions U_ICU_ENTRY_POINT_RENAME(ucol_get
ContractionsAndExpansions) | |
| #define ucol_getDisplayName U_ICU_ENTRY_POINT_RENAME(ucol_getDisplayName) | | #define ucol_getDisplayName U_ICU_ENTRY_POINT_RENAME(ucol_getDisplayName) | |
| #define ucol_getEquivalentReorderCodes U_ICU_ENTRY_POINT_RENAME(ucol_getEqu
ivalentReorderCodes) | | #define ucol_getEquivalentReorderCodes U_ICU_ENTRY_POINT_RENAME(ucol_getEqu
ivalentReorderCodes) | |
| #define ucol_getFirstCE U_ICU_ENTRY_POINT_RENAME(ucol_getFirstCE) | | #define ucol_getFirstCE U_ICU_ENTRY_POINT_RENAME(ucol_getFirstCE) | |
| #define ucol_getFunctionalEquivalent U_ICU_ENTRY_POINT_RENAME(ucol_getFunct
ionalEquivalent) | | #define ucol_getFunctionalEquivalent U_ICU_ENTRY_POINT_RENAME(ucol_getFunct
ionalEquivalent) | |
| #define ucol_getKeywordValues U_ICU_ENTRY_POINT_RENAME(ucol_getKeywordValue
s) | | #define ucol_getKeywordValues U_ICU_ENTRY_POINT_RENAME(ucol_getKeywordValue
s) | |
| #define ucol_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucol_getKey
wordValuesForLocale) | | #define ucol_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucol_getKey
wordValuesForLocale) | |
| #define ucol_getKeywords U_ICU_ENTRY_POINT_RENAME(ucol_getKeywords) | | #define ucol_getKeywords U_ICU_ENTRY_POINT_RENAME(ucol_getKeywords) | |
| #define ucol_getLeadBytesForReorderCode U_ICU_ENTRY_POINT_RENAME(ucol_getLe
adBytesForReorderCode) | | #define ucol_getLeadBytesForReorderCode U_ICU_ENTRY_POINT_RENAME(ucol_getLe
adBytesForReorderCode) | |
| | | | |
| skipping to change at line 749 | | skipping to change at line 742 | |
| #define ucol_getMaxExpansion U_ICU_ENTRY_POINT_RENAME(ucol_getMaxExpansion) | | #define ucol_getMaxExpansion U_ICU_ENTRY_POINT_RENAME(ucol_getMaxExpansion) | |
| #define ucol_getNextCE U_ICU_ENTRY_POINT_RENAME(ucol_getNextCE) | | #define ucol_getNextCE U_ICU_ENTRY_POINT_RENAME(ucol_getNextCE) | |
| #define ucol_getOffset U_ICU_ENTRY_POINT_RENAME(ucol_getOffset) | | #define ucol_getOffset U_ICU_ENTRY_POINT_RENAME(ucol_getOffset) | |
| #define ucol_getPrevCE U_ICU_ENTRY_POINT_RENAME(ucol_getPrevCE) | | #define ucol_getPrevCE U_ICU_ENTRY_POINT_RENAME(ucol_getPrevCE) | |
| #define ucol_getReorderCodes U_ICU_ENTRY_POINT_RENAME(ucol_getReorderCodes) | | #define ucol_getReorderCodes U_ICU_ENTRY_POINT_RENAME(ucol_getReorderCodes) | |
| #define ucol_getReorderCodesForLeadByte U_ICU_ENTRY_POINT_RENAME(ucol_getRe
orderCodesForLeadByte) | | #define ucol_getReorderCodesForLeadByte U_ICU_ENTRY_POINT_RENAME(ucol_getRe
orderCodesForLeadByte) | |
| #define ucol_getRules U_ICU_ENTRY_POINT_RENAME(ucol_getRules) | | #define ucol_getRules U_ICU_ENTRY_POINT_RENAME(ucol_getRules) | |
| #define ucol_getRulesEx U_ICU_ENTRY_POINT_RENAME(ucol_getRulesEx) | | #define ucol_getRulesEx U_ICU_ENTRY_POINT_RENAME(ucol_getRulesEx) | |
| #define ucol_getShortDefinitionString U_ICU_ENTRY_POINT_RENAME(ucol_getShor
tDefinitionString) | | #define ucol_getShortDefinitionString U_ICU_ENTRY_POINT_RENAME(ucol_getShor
tDefinitionString) | |
| #define ucol_getSortKey U_ICU_ENTRY_POINT_RENAME(ucol_getSortKey) | | #define ucol_getSortKey U_ICU_ENTRY_POINT_RENAME(ucol_getSortKey) | |
|
| #define ucol_getSortKeyWithAllocation U_ICU_ENTRY_POINT_RENAME(ucol_getSort
KeyWithAllocation) | | | |
| #define ucol_getStrength U_ICU_ENTRY_POINT_RENAME(ucol_getStrength) | | #define ucol_getStrength U_ICU_ENTRY_POINT_RENAME(ucol_getStrength) | |
| #define ucol_getTailoredSet U_ICU_ENTRY_POINT_RENAME(ucol_getTailoredSet) | | #define ucol_getTailoredSet U_ICU_ENTRY_POINT_RENAME(ucol_getTailoredSet) | |
| #define ucol_getUCAVersion U_ICU_ENTRY_POINT_RENAME(ucol_getUCAVersion) | | #define ucol_getUCAVersion U_ICU_ENTRY_POINT_RENAME(ucol_getUCAVersion) | |
| #define ucol_getUnsafeSet U_ICU_ENTRY_POINT_RENAME(ucol_getUnsafeSet) | | #define ucol_getUnsafeSet U_ICU_ENTRY_POINT_RENAME(ucol_getUnsafeSet) | |
| #define ucol_getVariableTop U_ICU_ENTRY_POINT_RENAME(ucol_getVariableTop) | | #define ucol_getVariableTop U_ICU_ENTRY_POINT_RENAME(ucol_getVariableTop) | |
| #define ucol_getVersion U_ICU_ENTRY_POINT_RENAME(ucol_getVersion) | | #define ucol_getVersion U_ICU_ENTRY_POINT_RENAME(ucol_getVersion) | |
| #define ucol_greater U_ICU_ENTRY_POINT_RENAME(ucol_greater) | | #define ucol_greater U_ICU_ENTRY_POINT_RENAME(ucol_greater) | |
| #define ucol_greaterOrEqual U_ICU_ENTRY_POINT_RENAME(ucol_greaterOrEqual) | | #define ucol_greaterOrEqual U_ICU_ENTRY_POINT_RENAME(ucol_greaterOrEqual) | |
| #define ucol_initBuffers U_ICU_ENTRY_POINT_RENAME(ucol_initBuffers) | | #define ucol_initBuffers U_ICU_ENTRY_POINT_RENAME(ucol_initBuffers) | |
| #define ucol_initCollator U_ICU_ENTRY_POINT_RENAME(ucol_initCollator) | | #define ucol_initCollator U_ICU_ENTRY_POINT_RENAME(ucol_initCollator) | |
| | | | |
| skipping to change at line 801 | | skipping to change at line 793 | |
| #define ucol_setAttribute U_ICU_ENTRY_POINT_RENAME(ucol_setAttribute) | | #define ucol_setAttribute U_ICU_ENTRY_POINT_RENAME(ucol_setAttribute) | |
| #define ucol_setOffset U_ICU_ENTRY_POINT_RENAME(ucol_setOffset) | | #define ucol_setOffset U_ICU_ENTRY_POINT_RENAME(ucol_setOffset) | |
| #define ucol_setOptionsFromHeader U_ICU_ENTRY_POINT_RENAME(ucol_setOptionsF
romHeader) | | #define ucol_setOptionsFromHeader U_ICU_ENTRY_POINT_RENAME(ucol_setOptionsF
romHeader) | |
| #define ucol_setReorderCodes U_ICU_ENTRY_POINT_RENAME(ucol_setReorderCodes) | | #define ucol_setReorderCodes U_ICU_ENTRY_POINT_RENAME(ucol_setReorderCodes) | |
| #define ucol_setReqValidLocales U_ICU_ENTRY_POINT_RENAME(ucol_setReqValidLo
cales) | | #define ucol_setReqValidLocales U_ICU_ENTRY_POINT_RENAME(ucol_setReqValidLo
cales) | |
| #define ucol_setStrength U_ICU_ENTRY_POINT_RENAME(ucol_setStrength) | | #define ucol_setStrength U_ICU_ENTRY_POINT_RENAME(ucol_setStrength) | |
| #define ucol_setText U_ICU_ENTRY_POINT_RENAME(ucol_setText) | | #define ucol_setText U_ICU_ENTRY_POINT_RENAME(ucol_setText) | |
| #define ucol_setVariableTop U_ICU_ENTRY_POINT_RENAME(ucol_setVariableTop) | | #define ucol_setVariableTop U_ICU_ENTRY_POINT_RENAME(ucol_setVariableTop) | |
| #define ucol_strcoll U_ICU_ENTRY_POINT_RENAME(ucol_strcoll) | | #define ucol_strcoll U_ICU_ENTRY_POINT_RENAME(ucol_strcoll) | |
| #define ucol_strcollIter U_ICU_ENTRY_POINT_RENAME(ucol_strcollIter) | | #define ucol_strcollIter U_ICU_ENTRY_POINT_RENAME(ucol_strcollIter) | |
|
| | | #define ucol_strcollUTF8 U_ICU_ENTRY_POINT_RENAME(ucol_strcollUTF8) | |
| #define ucol_swap U_ICU_ENTRY_POINT_RENAME(ucol_swap) | | #define ucol_swap U_ICU_ENTRY_POINT_RENAME(ucol_swap) | |
| #define ucol_swapBinary U_ICU_ENTRY_POINT_RENAME(ucol_swapBinary) | | #define ucol_swapBinary U_ICU_ENTRY_POINT_RENAME(ucol_swapBinary) | |
| #define ucol_swapInverseUCA U_ICU_ENTRY_POINT_RENAME(ucol_swapInverseUCA) | | #define ucol_swapInverseUCA U_ICU_ENTRY_POINT_RENAME(ucol_swapInverseUCA) | |
| #define ucol_tertiaryOrder U_ICU_ENTRY_POINT_RENAME(ucol_tertiaryOrder) | | #define ucol_tertiaryOrder U_ICU_ENTRY_POINT_RENAME(ucol_tertiaryOrder) | |
| #define ucol_tok_assembleTokenList U_ICU_ENTRY_POINT_RENAME(ucol_tok_assemb
leTokenList) | | #define ucol_tok_assembleTokenList U_ICU_ENTRY_POINT_RENAME(ucol_tok_assemb
leTokenList) | |
| #define ucol_tok_closeTokenList U_ICU_ENTRY_POINT_RENAME(ucol_tok_closeToke
nList) | | #define ucol_tok_closeTokenList U_ICU_ENTRY_POINT_RENAME(ucol_tok_closeToke
nList) | |
| #define ucol_tok_getNextArgument U_ICU_ENTRY_POINT_RENAME(ucol_tok_getNextA
rgument) | | #define ucol_tok_getNextArgument U_ICU_ENTRY_POINT_RENAME(ucol_tok_getNextA
rgument) | |
| #define ucol_tok_getRulesFromBundle U_ICU_ENTRY_POINT_RENAME(ucol_tok_getRu
lesFromBundle) | | #define ucol_tok_getRulesFromBundle U_ICU_ENTRY_POINT_RENAME(ucol_tok_getRu
lesFromBundle) | |
| #define ucol_tok_initTokenList U_ICU_ENTRY_POINT_RENAME(ucol_tok_initTokenL
ist) | | #define ucol_tok_initTokenList U_ICU_ENTRY_POINT_RENAME(ucol_tok_initTokenL
ist) | |
| #define ucol_tok_parseNextToken U_ICU_ENTRY_POINT_RENAME(ucol_tok_parseNext
Token) | | #define ucol_tok_parseNextToken U_ICU_ENTRY_POINT_RENAME(ucol_tok_parseNext
Token) | |
| | | | |
| skipping to change at line 848 | | skipping to change at line 841 | |
| #define udat_applyPattern U_ICU_ENTRY_POINT_RENAME(udat_applyPattern) | | #define udat_applyPattern U_ICU_ENTRY_POINT_RENAME(udat_applyPattern) | |
| #define udat_applyPatternRelative U_ICU_ENTRY_POINT_RENAME(udat_applyPatter
nRelative) | | #define udat_applyPatternRelative U_ICU_ENTRY_POINT_RENAME(udat_applyPatter
nRelative) | |
| #define udat_clone U_ICU_ENTRY_POINT_RENAME(udat_clone) | | #define udat_clone U_ICU_ENTRY_POINT_RENAME(udat_clone) | |
| #define udat_close U_ICU_ENTRY_POINT_RENAME(udat_close) | | #define udat_close U_ICU_ENTRY_POINT_RENAME(udat_close) | |
| #define udat_countAvailable U_ICU_ENTRY_POINT_RENAME(udat_countAvailable) | | #define udat_countAvailable U_ICU_ENTRY_POINT_RENAME(udat_countAvailable) | |
| #define udat_countSymbols U_ICU_ENTRY_POINT_RENAME(udat_countSymbols) | | #define udat_countSymbols U_ICU_ENTRY_POINT_RENAME(udat_countSymbols) | |
| #define udat_format U_ICU_ENTRY_POINT_RENAME(udat_format) | | #define udat_format U_ICU_ENTRY_POINT_RENAME(udat_format) | |
| #define udat_get2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_get2DigitYear
Start) | | #define udat_get2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_get2DigitYear
Start) | |
| #define udat_getAvailable U_ICU_ENTRY_POINT_RENAME(udat_getAvailable) | | #define udat_getAvailable U_ICU_ENTRY_POINT_RENAME(udat_getAvailable) | |
| #define udat_getCalendar U_ICU_ENTRY_POINT_RENAME(udat_getCalendar) | | #define udat_getCalendar U_ICU_ENTRY_POINT_RENAME(udat_getCalendar) | |
|
| #define udat_getDefaultContext U_ICU_ENTRY_POINT_RENAME(udat_getDefaultCont
ext) | | #define udat_getContext U_ICU_ENTRY_POINT_RENAME(udat_getContext) | |
| #define udat_getLocaleByType U_ICU_ENTRY_POINT_RENAME(udat_getLocaleByType) | | #define udat_getLocaleByType U_ICU_ENTRY_POINT_RENAME(udat_getLocaleByType) | |
| #define udat_getNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_getNumberFormat) | | #define udat_getNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_getNumberFormat) | |
| #define udat_getSymbols U_ICU_ENTRY_POINT_RENAME(udat_getSymbols) | | #define udat_getSymbols U_ICU_ENTRY_POINT_RENAME(udat_getSymbols) | |
| #define udat_isLenient U_ICU_ENTRY_POINT_RENAME(udat_isLenient) | | #define udat_isLenient U_ICU_ENTRY_POINT_RENAME(udat_isLenient) | |
| #define udat_open U_ICU_ENTRY_POINT_RENAME(udat_open) | | #define udat_open U_ICU_ENTRY_POINT_RENAME(udat_open) | |
| #define udat_parse U_ICU_ENTRY_POINT_RENAME(udat_parse) | | #define udat_parse U_ICU_ENTRY_POINT_RENAME(udat_parse) | |
| #define udat_parseCalendar U_ICU_ENTRY_POINT_RENAME(udat_parseCalendar) | | #define udat_parseCalendar U_ICU_ENTRY_POINT_RENAME(udat_parseCalendar) | |
| #define udat_registerOpener U_ICU_ENTRY_POINT_RENAME(udat_registerOpener) | | #define udat_registerOpener U_ICU_ENTRY_POINT_RENAME(udat_registerOpener) | |
| #define udat_set2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_set2DigitYear
Start) | | #define udat_set2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_set2DigitYear
Start) | |
| #define udat_setCalendar U_ICU_ENTRY_POINT_RENAME(udat_setCalendar) | | #define udat_setCalendar U_ICU_ENTRY_POINT_RENAME(udat_setCalendar) | |
|
| #define udat_setDefaultContext U_ICU_ENTRY_POINT_RENAME(udat_setDefaultCont
ext) | | #define udat_setContext U_ICU_ENTRY_POINT_RENAME(udat_setContext) | |
| #define udat_setLenient U_ICU_ENTRY_POINT_RENAME(udat_setLenient) | | #define udat_setLenient U_ICU_ENTRY_POINT_RENAME(udat_setLenient) | |
| #define udat_setNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_setNumberFormat) | | #define udat_setNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_setNumberFormat) | |
| #define udat_setSymbols U_ICU_ENTRY_POINT_RENAME(udat_setSymbols) | | #define udat_setSymbols U_ICU_ENTRY_POINT_RENAME(udat_setSymbols) | |
| #define udat_toCalendarDateField U_ICU_ENTRY_POINT_RENAME(udat_toCalendarDa
teField) | | #define udat_toCalendarDateField U_ICU_ENTRY_POINT_RENAME(udat_toCalendarDa
teField) | |
| #define udat_toPattern U_ICU_ENTRY_POINT_RENAME(udat_toPattern) | | #define udat_toPattern U_ICU_ENTRY_POINT_RENAME(udat_toPattern) | |
| #define udat_toPatternRelativeDate U_ICU_ENTRY_POINT_RENAME(udat_toPatternR
elativeDate) | | #define udat_toPatternRelativeDate U_ICU_ENTRY_POINT_RENAME(udat_toPatternR
elativeDate) | |
| #define udat_toPatternRelativeTime U_ICU_ENTRY_POINT_RENAME(udat_toPatternR
elativeTime) | | #define udat_toPatternRelativeTime U_ICU_ENTRY_POINT_RENAME(udat_toPatternR
elativeTime) | |
| #define udat_unregisterOpener U_ICU_ENTRY_POINT_RENAME(udat_unregisterOpene
r) | | #define udat_unregisterOpener U_ICU_ENTRY_POINT_RENAME(udat_unregisterOpene
r) | |
| #define udata_checkCommonData U_ICU_ENTRY_POINT_RENAME(udata_checkCommonDat
a) | | #define udata_checkCommonData U_ICU_ENTRY_POINT_RENAME(udata_checkCommonDat
a) | |
| #define udata_close U_ICU_ENTRY_POINT_RENAME(udata_close) | | #define udata_close U_ICU_ENTRY_POINT_RENAME(udata_close) | |
| | | | |
| skipping to change at line 911 | | skipping to change at line 904 | |
| #define udatpg_open U_ICU_ENTRY_POINT_RENAME(udatpg_open) | | #define udatpg_open U_ICU_ENTRY_POINT_RENAME(udatpg_open) | |
| #define udatpg_openBaseSkeletons U_ICU_ENTRY_POINT_RENAME(udatpg_openBaseSk
eletons) | | #define udatpg_openBaseSkeletons U_ICU_ENTRY_POINT_RENAME(udatpg_openBaseSk
eletons) | |
| #define udatpg_openEmpty U_ICU_ENTRY_POINT_RENAME(udatpg_openEmpty) | | #define udatpg_openEmpty U_ICU_ENTRY_POINT_RENAME(udatpg_openEmpty) | |
| #define udatpg_openSkeletons U_ICU_ENTRY_POINT_RENAME(udatpg_openSkeletons) | | #define udatpg_openSkeletons U_ICU_ENTRY_POINT_RENAME(udatpg_openSkeletons) | |
| #define udatpg_replaceFieldTypes U_ICU_ENTRY_POINT_RENAME(udatpg_replaceFie
ldTypes) | | #define udatpg_replaceFieldTypes U_ICU_ENTRY_POINT_RENAME(udatpg_replaceFie
ldTypes) | |
| #define udatpg_replaceFieldTypesWithOptions U_ICU_ENTRY_POINT_RENAME(udatpg
_replaceFieldTypesWithOptions) | | #define udatpg_replaceFieldTypesWithOptions U_ICU_ENTRY_POINT_RENAME(udatpg
_replaceFieldTypesWithOptions) | |
| #define udatpg_setAppendItemFormat U_ICU_ENTRY_POINT_RENAME(udatpg_setAppen
dItemFormat) | | #define udatpg_setAppendItemFormat U_ICU_ENTRY_POINT_RENAME(udatpg_setAppen
dItemFormat) | |
| #define udatpg_setAppendItemName U_ICU_ENTRY_POINT_RENAME(udatpg_setAppendI
temName) | | #define udatpg_setAppendItemName U_ICU_ENTRY_POINT_RENAME(udatpg_setAppendI
temName) | |
| #define udatpg_setDateTimeFormat U_ICU_ENTRY_POINT_RENAME(udatpg_setDateTim
eFormat) | | #define udatpg_setDateTimeFormat U_ICU_ENTRY_POINT_RENAME(udatpg_setDateTim
eFormat) | |
| #define udatpg_setDecimal U_ICU_ENTRY_POINT_RENAME(udatpg_setDecimal) | | #define udatpg_setDecimal U_ICU_ENTRY_POINT_RENAME(udatpg_setDecimal) | |
|
| | | #define udict_swap U_ICU_ENTRY_POINT_RENAME(udict_swap) | |
| #define udtitvfmt_close U_ICU_ENTRY_POINT_RENAME(udtitvfmt_close) | | #define udtitvfmt_close U_ICU_ENTRY_POINT_RENAME(udtitvfmt_close) | |
| #define udtitvfmt_format U_ICU_ENTRY_POINT_RENAME(udtitvfmt_format) | | #define udtitvfmt_format U_ICU_ENTRY_POINT_RENAME(udtitvfmt_format) | |
| #define udtitvfmt_open U_ICU_ENTRY_POINT_RENAME(udtitvfmt_open) | | #define udtitvfmt_open U_ICU_ENTRY_POINT_RENAME(udtitvfmt_open) | |
| #define uenum_close U_ICU_ENTRY_POINT_RENAME(uenum_close) | | #define uenum_close U_ICU_ENTRY_POINT_RENAME(uenum_close) | |
| #define uenum_count U_ICU_ENTRY_POINT_RENAME(uenum_count) | | #define uenum_count U_ICU_ENTRY_POINT_RENAME(uenum_count) | |
| #define uenum_next U_ICU_ENTRY_POINT_RENAME(uenum_next) | | #define uenum_next U_ICU_ENTRY_POINT_RENAME(uenum_next) | |
| #define uenum_nextDefault U_ICU_ENTRY_POINT_RENAME(uenum_nextDefault) | | #define uenum_nextDefault U_ICU_ENTRY_POINT_RENAME(uenum_nextDefault) | |
| #define uenum_openCharStringsEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_ope
nCharStringsEnumeration) | | #define uenum_openCharStringsEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_ope
nCharStringsEnumeration) | |
| #define uenum_openFromStringEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_open
FromStringEnumeration) | | #define uenum_openFromStringEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_open
FromStringEnumeration) | |
|
| | | #define uenum_openUCharStringsEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_op
enUCharStringsEnumeration) | |
| #define uenum_reset U_ICU_ENTRY_POINT_RENAME(uenum_reset) | | #define uenum_reset U_ICU_ENTRY_POINT_RENAME(uenum_reset) | |
| #define uenum_unext U_ICU_ENTRY_POINT_RENAME(uenum_unext) | | #define uenum_unext U_ICU_ENTRY_POINT_RENAME(uenum_unext) | |
| #define uenum_unextDefault U_ICU_ENTRY_POINT_RENAME(uenum_unextDefault) | | #define uenum_unextDefault U_ICU_ENTRY_POINT_RENAME(uenum_unextDefault) | |
| #define ufile_close_translit U_ICU_ENTRY_POINT_RENAME(ufile_close_translit) | | #define ufile_close_translit U_ICU_ENTRY_POINT_RENAME(ufile_close_translit) | |
| #define ufile_fill_uchar_buffer U_ICU_ENTRY_POINT_RENAME(ufile_fill_uchar_b
uffer) | | #define ufile_fill_uchar_buffer U_ICU_ENTRY_POINT_RENAME(ufile_fill_uchar_b
uffer) | |
| #define ufile_flush_io U_ICU_ENTRY_POINT_RENAME(ufile_flush_io) | | #define ufile_flush_io U_ICU_ENTRY_POINT_RENAME(ufile_flush_io) | |
| #define ufile_flush_translit U_ICU_ENTRY_POINT_RENAME(ufile_flush_translit) | | #define ufile_flush_translit U_ICU_ENTRY_POINT_RENAME(ufile_flush_translit) | |
| #define ufile_getch U_ICU_ENTRY_POINT_RENAME(ufile_getch) | | #define ufile_getch U_ICU_ENTRY_POINT_RENAME(ufile_getch) | |
| #define ufile_getch32 U_ICU_ENTRY_POINT_RENAME(ufile_getch32) | | #define ufile_getch32 U_ICU_ENTRY_POINT_RENAME(ufile_getch32) | |
| #define ufmt_64tou U_ICU_ENTRY_POINT_RENAME(ufmt_64tou) | | #define ufmt_64tou U_ICU_ENTRY_POINT_RENAME(ufmt_64tou) | |
| #define ufmt_defaultCPToUnicode U_ICU_ENTRY_POINT_RENAME(ufmt_defaultCPToUn
icode) | | #define ufmt_defaultCPToUnicode U_ICU_ENTRY_POINT_RENAME(ufmt_defaultCPToUn
icode) | |
| #define ufmt_digitvalue U_ICU_ENTRY_POINT_RENAME(ufmt_digitvalue) | | #define ufmt_digitvalue U_ICU_ENTRY_POINT_RENAME(ufmt_digitvalue) | |
| #define ufmt_isdigit U_ICU_ENTRY_POINT_RENAME(ufmt_isdigit) | | #define ufmt_isdigit U_ICU_ENTRY_POINT_RENAME(ufmt_isdigit) | |
| #define ufmt_ptou U_ICU_ENTRY_POINT_RENAME(ufmt_ptou) | | #define ufmt_ptou U_ICU_ENTRY_POINT_RENAME(ufmt_ptou) | |
| #define ufmt_uto64 U_ICU_ENTRY_POINT_RENAME(ufmt_uto64) | | #define ufmt_uto64 U_ICU_ENTRY_POINT_RENAME(ufmt_uto64) | |
| #define ufmt_utop U_ICU_ENTRY_POINT_RENAME(ufmt_utop) | | #define ufmt_utop U_ICU_ENTRY_POINT_RENAME(ufmt_utop) | |
|
| | | #define ugender_getInstance U_ICU_ENTRY_POINT_RENAME(ugender_getInstance) | |
| | | #define ugender_getListGender U_ICU_ENTRY_POINT_RENAME(ugender_getListGende | |
| | | r) | |
| #define uhash_close U_ICU_ENTRY_POINT_RENAME(uhash_close) | | #define uhash_close U_ICU_ENTRY_POINT_RENAME(uhash_close) | |
| #define uhash_compareCaselessUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_c
ompareCaselessUnicodeString) | | #define uhash_compareCaselessUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_c
ompareCaselessUnicodeString) | |
| #define uhash_compareChars U_ICU_ENTRY_POINT_RENAME(uhash_compareChars) | | #define uhash_compareChars U_ICU_ENTRY_POINT_RENAME(uhash_compareChars) | |
| #define uhash_compareIChars U_ICU_ENTRY_POINT_RENAME(uhash_compareIChars) | | #define uhash_compareIChars U_ICU_ENTRY_POINT_RENAME(uhash_compareIChars) | |
| #define uhash_compareLong U_ICU_ENTRY_POINT_RENAME(uhash_compareLong) | | #define uhash_compareLong U_ICU_ENTRY_POINT_RENAME(uhash_compareLong) | |
| #define uhash_compareUChars U_ICU_ENTRY_POINT_RENAME(uhash_compareUChars) | | #define uhash_compareUChars U_ICU_ENTRY_POINT_RENAME(uhash_compareUChars) | |
| #define uhash_compareUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_compareUn
icodeString) | | #define uhash_compareUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_compareUn
icodeString) | |
| #define uhash_count U_ICU_ENTRY_POINT_RENAME(uhash_count) | | #define uhash_count U_ICU_ENTRY_POINT_RENAME(uhash_count) | |
| #define uhash_deleteHashtable U_ICU_ENTRY_POINT_RENAME(uhash_deleteHashtabl
e) | | #define uhash_deleteHashtable U_ICU_ENTRY_POINT_RENAME(uhash_deleteHashtabl
e) | |
| #define uhash_equals U_ICU_ENTRY_POINT_RENAME(uhash_equals) | | #define uhash_equals U_ICU_ENTRY_POINT_RENAME(uhash_equals) | |
| | | | |
| skipping to change at line 1003 | | skipping to change at line 1000 | |
| #define uiter_getState U_ICU_ENTRY_POINT_RENAME(uiter_getState) | | #define uiter_getState U_ICU_ENTRY_POINT_RENAME(uiter_getState) | |
| #define uiter_next32 U_ICU_ENTRY_POINT_RENAME(uiter_next32) | | #define uiter_next32 U_ICU_ENTRY_POINT_RENAME(uiter_next32) | |
| #define uiter_previous32 U_ICU_ENTRY_POINT_RENAME(uiter_previous32) | | #define uiter_previous32 U_ICU_ENTRY_POINT_RENAME(uiter_previous32) | |
| #define uiter_setCharacterIterator U_ICU_ENTRY_POINT_RENAME(uiter_setCharac
terIterator) | | #define uiter_setCharacterIterator U_ICU_ENTRY_POINT_RENAME(uiter_setCharac
terIterator) | |
| #define uiter_setReplaceable U_ICU_ENTRY_POINT_RENAME(uiter_setReplaceable) | | #define uiter_setReplaceable U_ICU_ENTRY_POINT_RENAME(uiter_setReplaceable) | |
| #define uiter_setState U_ICU_ENTRY_POINT_RENAME(uiter_setState) | | #define uiter_setState U_ICU_ENTRY_POINT_RENAME(uiter_setState) | |
| #define uiter_setString U_ICU_ENTRY_POINT_RENAME(uiter_setString) | | #define uiter_setString U_ICU_ENTRY_POINT_RENAME(uiter_setString) | |
| #define uiter_setUTF16BE U_ICU_ENTRY_POINT_RENAME(uiter_setUTF16BE) | | #define uiter_setUTF16BE U_ICU_ENTRY_POINT_RENAME(uiter_setUTF16BE) | |
| #define uiter_setUTF8 U_ICU_ENTRY_POINT_RENAME(uiter_setUTF8) | | #define uiter_setUTF8 U_ICU_ENTRY_POINT_RENAME(uiter_setUTF8) | |
| #define uldn_close U_ICU_ENTRY_POINT_RENAME(uldn_close) | | #define uldn_close U_ICU_ENTRY_POINT_RENAME(uldn_close) | |
|
| | | #define uldn_getContext U_ICU_ENTRY_POINT_RENAME(uldn_getContext) | |
| #define uldn_getDialectHandling U_ICU_ENTRY_POINT_RENAME(uldn_getDialectHan
dling) | | #define uldn_getDialectHandling U_ICU_ENTRY_POINT_RENAME(uldn_getDialectHan
dling) | |
| #define uldn_getLocale U_ICU_ENTRY_POINT_RENAME(uldn_getLocale) | | #define uldn_getLocale U_ICU_ENTRY_POINT_RENAME(uldn_getLocale) | |
| #define uldn_keyDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_keyDisplayName) | | #define uldn_keyDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_keyDisplayName) | |
| #define uldn_keyValueDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_keyValueDisp
layName) | | #define uldn_keyValueDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_keyValueDisp
layName) | |
| #define uldn_languageDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_languageDisp
layName) | | #define uldn_languageDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_languageDisp
layName) | |
| #define uldn_localeDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_localeDisplayN
ame) | | #define uldn_localeDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_localeDisplayN
ame) | |
| #define uldn_open U_ICU_ENTRY_POINT_RENAME(uldn_open) | | #define uldn_open U_ICU_ENTRY_POINT_RENAME(uldn_open) | |
|
| | | #define uldn_openForContext U_ICU_ENTRY_POINT_RENAME(uldn_openForContext) | |
| #define uldn_regionDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_regionDisplayN
ame) | | #define uldn_regionDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_regionDisplayN
ame) | |
| #define uldn_scriptCodeDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_scriptCode
DisplayName) | | #define uldn_scriptCodeDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_scriptCode
DisplayName) | |
| #define uldn_scriptDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_scriptDisplayN
ame) | | #define uldn_scriptDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_scriptDisplayN
ame) | |
| #define uldn_variantDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_variantDispla
yName) | | #define uldn_variantDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_variantDispla
yName) | |
| #define ulist_addItemBeginList U_ICU_ENTRY_POINT_RENAME(ulist_addItemBeginL
ist) | | #define ulist_addItemBeginList U_ICU_ENTRY_POINT_RENAME(ulist_addItemBeginL
ist) | |
| #define ulist_addItemEndList U_ICU_ENTRY_POINT_RENAME(ulist_addItemEndList) | | #define ulist_addItemEndList U_ICU_ENTRY_POINT_RENAME(ulist_addItemEndList) | |
| #define ulist_close_keyword_values_iterator U_ICU_ENTRY_POINT_RENAME(ulist_
close_keyword_values_iterator) | | #define ulist_close_keyword_values_iterator U_ICU_ENTRY_POINT_RENAME(ulist_
close_keyword_values_iterator) | |
| #define ulist_containsString U_ICU_ENTRY_POINT_RENAME(ulist_containsString) | | #define ulist_containsString U_ICU_ENTRY_POINT_RENAME(ulist_containsString) | |
| #define ulist_count_keyword_values U_ICU_ENTRY_POINT_RENAME(ulist_count_key
word_values) | | #define ulist_count_keyword_values U_ICU_ENTRY_POINT_RENAME(ulist_count_key
word_values) | |
| #define ulist_createEmptyList U_ICU_ENTRY_POINT_RENAME(ulist_createEmptyLis
t) | | #define ulist_createEmptyList U_ICU_ENTRY_POINT_RENAME(ulist_createEmptyLis
t) | |
| | | | |
| skipping to change at line 1097 | | skipping to change at line 1096 | |
| #define umsg_getLocale U_ICU_ENTRY_POINT_RENAME(umsg_getLocale) | | #define umsg_getLocale U_ICU_ENTRY_POINT_RENAME(umsg_getLocale) | |
| #define umsg_open U_ICU_ENTRY_POINT_RENAME(umsg_open) | | #define umsg_open U_ICU_ENTRY_POINT_RENAME(umsg_open) | |
| #define umsg_parse U_ICU_ENTRY_POINT_RENAME(umsg_parse) | | #define umsg_parse U_ICU_ENTRY_POINT_RENAME(umsg_parse) | |
| #define umsg_setLocale U_ICU_ENTRY_POINT_RENAME(umsg_setLocale) | | #define umsg_setLocale U_ICU_ENTRY_POINT_RENAME(umsg_setLocale) | |
| #define umsg_toPattern U_ICU_ENTRY_POINT_RENAME(umsg_toPattern) | | #define umsg_toPattern U_ICU_ENTRY_POINT_RENAME(umsg_toPattern) | |
| #define umsg_vformat U_ICU_ENTRY_POINT_RENAME(umsg_vformat) | | #define umsg_vformat U_ICU_ENTRY_POINT_RENAME(umsg_vformat) | |
| #define umsg_vparse U_ICU_ENTRY_POINT_RENAME(umsg_vparse) | | #define umsg_vparse U_ICU_ENTRY_POINT_RENAME(umsg_vparse) | |
| #define umtx_atomic_dec U_ICU_ENTRY_POINT_RENAME(umtx_atomic_dec) | | #define umtx_atomic_dec U_ICU_ENTRY_POINT_RENAME(umtx_atomic_dec) | |
| #define umtx_atomic_inc U_ICU_ENTRY_POINT_RENAME(umtx_atomic_inc) | | #define umtx_atomic_inc U_ICU_ENTRY_POINT_RENAME(umtx_atomic_inc) | |
| #define umtx_cleanup U_ICU_ENTRY_POINT_RENAME(umtx_cleanup) | | #define umtx_cleanup U_ICU_ENTRY_POINT_RENAME(umtx_cleanup) | |
|
| #define umtx_destroy U_ICU_ENTRY_POINT_RENAME(umtx_destroy) | | | |
| #define umtx_init U_ICU_ENTRY_POINT_RENAME(umtx_init) | | | |
| #define umtx_lock U_ICU_ENTRY_POINT_RENAME(umtx_lock) | | #define umtx_lock U_ICU_ENTRY_POINT_RENAME(umtx_lock) | |
| #define umtx_unlock U_ICU_ENTRY_POINT_RENAME(umtx_unlock) | | #define umtx_unlock U_ICU_ENTRY_POINT_RENAME(umtx_unlock) | |
| #define uniset_getUnicode32Instance U_ICU_ENTRY_POINT_RENAME(uniset_getUnic
ode32Instance) | | #define uniset_getUnicode32Instance U_ICU_ENTRY_POINT_RENAME(uniset_getUnic
ode32Instance) | |
| #define unorm2_append U_ICU_ENTRY_POINT_RENAME(unorm2_append) | | #define unorm2_append U_ICU_ENTRY_POINT_RENAME(unorm2_append) | |
| #define unorm2_close U_ICU_ENTRY_POINT_RENAME(unorm2_close) | | #define unorm2_close U_ICU_ENTRY_POINT_RENAME(unorm2_close) | |
| #define unorm2_composePair U_ICU_ENTRY_POINT_RENAME(unorm2_composePair) | | #define unorm2_composePair U_ICU_ENTRY_POINT_RENAME(unorm2_composePair) | |
| #define unorm2_getCombiningClass U_ICU_ENTRY_POINT_RENAME(unorm2_getCombini
ngClass) | | #define unorm2_getCombiningClass U_ICU_ENTRY_POINT_RENAME(unorm2_getCombini
ngClass) | |
| #define unorm2_getDecomposition U_ICU_ENTRY_POINT_RENAME(unorm2_getDecompos
ition) | | #define unorm2_getDecomposition U_ICU_ENTRY_POINT_RENAME(unorm2_getDecompos
ition) | |
| #define unorm2_getInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getInstance) | | #define unorm2_getInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getInstance) | |
| #define unorm2_getNFCInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFCInstanc
e) | | #define unorm2_getNFCInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFCInstanc
e) | |
| | | | |
| skipping to change at line 1166 | | skipping to change at line 1163 | |
| #define unum_parseDouble U_ICU_ENTRY_POINT_RENAME(unum_parseDouble) | | #define unum_parseDouble U_ICU_ENTRY_POINT_RENAME(unum_parseDouble) | |
| #define unum_parseDoubleCurrency U_ICU_ENTRY_POINT_RENAME(unum_parseDoubleC
urrency) | | #define unum_parseDoubleCurrency U_ICU_ENTRY_POINT_RENAME(unum_parseDoubleC
urrency) | |
| #define unum_parseInt64 U_ICU_ENTRY_POINT_RENAME(unum_parseInt64) | | #define unum_parseInt64 U_ICU_ENTRY_POINT_RENAME(unum_parseInt64) | |
| #define unum_setAttribute U_ICU_ENTRY_POINT_RENAME(unum_setAttribute) | | #define unum_setAttribute U_ICU_ENTRY_POINT_RENAME(unum_setAttribute) | |
| #define unum_setDoubleAttribute U_ICU_ENTRY_POINT_RENAME(unum_setDoubleAttr
ibute) | | #define unum_setDoubleAttribute U_ICU_ENTRY_POINT_RENAME(unum_setDoubleAttr
ibute) | |
| #define unum_setSymbol U_ICU_ENTRY_POINT_RENAME(unum_setSymbol) | | #define unum_setSymbol U_ICU_ENTRY_POINT_RENAME(unum_setSymbol) | |
| #define unum_setTextAttribute U_ICU_ENTRY_POINT_RENAME(unum_setTextAttribut
e) | | #define unum_setTextAttribute U_ICU_ENTRY_POINT_RENAME(unum_setTextAttribut
e) | |
| #define unum_toPattern U_ICU_ENTRY_POINT_RENAME(unum_toPattern) | | #define unum_toPattern U_ICU_ENTRY_POINT_RENAME(unum_toPattern) | |
| #define uplrules_close U_ICU_ENTRY_POINT_RENAME(uplrules_close) | | #define uplrules_close U_ICU_ENTRY_POINT_RENAME(uplrules_close) | |
| #define uplrules_open U_ICU_ENTRY_POINT_RENAME(uplrules_open) | | #define uplrules_open U_ICU_ENTRY_POINT_RENAME(uplrules_open) | |
|
| | | #define uplrules_openForType U_ICU_ENTRY_POINT_RENAME(uplrules_openForType) | |
| #define uplrules_select U_ICU_ENTRY_POINT_RENAME(uplrules_select) | | #define uplrules_select U_ICU_ENTRY_POINT_RENAME(uplrules_select) | |
| #define uplug_closeLibrary U_ICU_ENTRY_POINT_RENAME(uplug_closeLibrary) | | #define uplug_closeLibrary U_ICU_ENTRY_POINT_RENAME(uplug_closeLibrary) | |
| #define uplug_findLibrary U_ICU_ENTRY_POINT_RENAME(uplug_findLibrary) | | #define uplug_findLibrary U_ICU_ENTRY_POINT_RENAME(uplug_findLibrary) | |
| #define uplug_getConfiguration U_ICU_ENTRY_POINT_RENAME(uplug_getConfigurat
ion) | | #define uplug_getConfiguration U_ICU_ENTRY_POINT_RENAME(uplug_getConfigurat
ion) | |
| #define uplug_getContext U_ICU_ENTRY_POINT_RENAME(uplug_getContext) | | #define uplug_getContext U_ICU_ENTRY_POINT_RENAME(uplug_getContext) | |
| #define uplug_getCurrentLevel U_ICU_ENTRY_POINT_RENAME(uplug_getCurrentLeve
l) | | #define uplug_getCurrentLevel U_ICU_ENTRY_POINT_RENAME(uplug_getCurrentLeve
l) | |
| #define uplug_getLibrary U_ICU_ENTRY_POINT_RENAME(uplug_getLibrary) | | #define uplug_getLibrary U_ICU_ENTRY_POINT_RENAME(uplug_getLibrary) | |
| #define uplug_getLibraryName U_ICU_ENTRY_POINT_RENAME(uplug_getLibraryName) | | #define uplug_getLibraryName U_ICU_ENTRY_POINT_RENAME(uplug_getLibraryName) | |
| #define uplug_getPlugInternal U_ICU_ENTRY_POINT_RENAME(uplug_getPlugInterna
l) | | #define uplug_getPlugInternal U_ICU_ENTRY_POINT_RENAME(uplug_getPlugInterna
l) | |
| #define uplug_getPlugLevel U_ICU_ENTRY_POINT_RENAME(uplug_getPlugLevel) | | #define uplug_getPlugLevel U_ICU_ENTRY_POINT_RENAME(uplug_getPlugLevel) | |
| | | | |
End of changes. 20 change blocks. |
| 25 lines changed or deleted | | 22 lines changed or added | |
|
| ustring.h | | ustring.h | |
| /* | | /* | |
| ********************************************************************** | | ********************************************************************** | |
|
| * Copyright (C) 1998-2010, International Business Machines | | * Copyright (C) 1998-2012, International Business Machines | |
| * Corporation and others. All Rights Reserved. | | * Corporation and others. All Rights Reserved. | |
| ********************************************************************** | | ********************************************************************** | |
| * | | * | |
| * File ustring.h | | * File ustring.h | |
| * | | * | |
| * Modification History: | | * Modification History: | |
| * | | * | |
| * Date Name Description | | * Date Name Description | |
| * 12/07/98 bertrand Creation. | | * 12/07/98 bertrand Creation. | |
| ***************************************************************************
*** | | ***************************************************************************
*** | |
| */ | | */ | |
| | | | |
| #ifndef USTRING_H | | #ifndef USTRING_H | |
| #define USTRING_H | | #define USTRING_H | |
| | | | |
| #include "unicode/utypes.h" | | #include "unicode/utypes.h" | |
| #include "unicode/putil.h" | | #include "unicode/putil.h" | |
| #include "unicode/uiter.h" | | #include "unicode/uiter.h" | |
| | | | |
|
| /** Simple declaration for u_strToTitle() to avoid including unicode/ubrk.h | | /** | |
| . @stable ICU 2.1*/ | | * \def UBRK_TYPEDEF_UBREAK_ITERATOR | |
| | | * @internal | |
| | | */ | |
| | | | |
| #ifndef UBRK_TYPEDEF_UBREAK_ITERATOR | | #ifndef UBRK_TYPEDEF_UBREAK_ITERATOR | |
| # define UBRK_TYPEDEF_UBREAK_ITERATOR | | # define UBRK_TYPEDEF_UBREAK_ITERATOR | |
|
| | | /** Simple declaration for u_strToTitle() to avoid including unicode/ubrk.h
. @stable ICU 2.1*/ | |
| typedef struct UBreakIterator UBreakIterator; | | typedef struct UBreakIterator UBreakIterator; | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| * \file | | * \file | |
| * \brief C API: Unicode string handling functions | | * \brief C API: Unicode string handling functions | |
| * | | * | |
| * These C API functions provide general Unicode string handling. | | * These C API functions provide general Unicode string handling. | |
| * | | * | |
| * Some functions are equivalent in name, signature, and behavior to the AN
SI C <string.h> | | * Some functions are equivalent in name, signature, and behavior to the AN
SI C <string.h> | |
| | | | |
| skipping to change at line 149 | | skipping to change at line 154 | |
| | | | |
| /** | | /** | |
| * Concatenate two ustrings. | | * Concatenate two ustrings. | |
| * Appends at most <code>n</code> characters from <code>src</code> to <code
>dst</code>. | | * Appends at most <code>n</code> characters from <code>src</code> to <code
>dst</code>. | |
| * Adds a terminating NUL. | | * Adds a terminating NUL. | |
| * If src is too long, then only <code>n-1</code> characters will be copied | | * If src is too long, then only <code>n-1</code> characters will be copied | |
| * before the terminating NUL. | | * before the terminating NUL. | |
| * If <code>n<=0</code> then dst is not modified. | | * If <code>n<=0</code> then dst is not modified. | |
| * | | * | |
| * @param dst The destination string. | | * @param dst The destination string. | |
|
| * @param src The source string. | | * @param src The source string (can be NULL/invalid if n<=0). | |
| * @param n The maximum number of characters to append. | | * @param n The maximum number of characters to append; no-op if <=0. | |
| * @return A pointer to <code>dst</code>. | | * @return A pointer to <code>dst</code>. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| U_STABLE UChar* U_EXPORT2 | | U_STABLE UChar* U_EXPORT2 | |
| u_strncat(UChar *dst, | | u_strncat(UChar *dst, | |
| const UChar *src, | | const UChar *src, | |
| int32_t n); | | int32_t n); | |
| | | | |
| /** | | /** | |
| * Find the first occurrence of a substring in a string. | | * Find the first occurrence of a substring in a string. | |
| | | | |
| skipping to change at line 553 | | skipping to change at line 558 | |
| U_STABLE int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| u_strCaseCompare(const UChar *s1, int32_t length1, | | u_strCaseCompare(const UChar *s1, int32_t length1, | |
| const UChar *s2, int32_t length2, | | const UChar *s2, int32_t length2, | |
| uint32_t options, | | uint32_t options, | |
| UErrorCode *pErrorCode); | | UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Compare two ustrings for bitwise equality. | | * Compare two ustrings for bitwise equality. | |
| * Compares at most <code>n</code> characters. | | * Compares at most <code>n</code> characters. | |
| * | | * | |
|
| * @param ucs1 A string to compare. | | * @param ucs1 A string to compare (can be NULL/invalid if n<=0). | |
| * @param ucs2 A string to compare. | | * @param ucs2 A string to compare (can be NULL/invalid if n<=0). | |
| * @param n The maximum number of characters to compare. | | * @param n The maximum number of characters to compare; always returns 0 i | |
| | | f n<=0. | |
| * @return 0 if <code>s1</code> and <code>s2</code> are bitwise equal; a ne
gative | | * @return 0 if <code>s1</code> and <code>s2</code> are bitwise equal; a ne
gative | |
| * value if <code>s1</code> is bitwise less than <code>s2</code>; a positiv
e | | * value if <code>s1</code> is bitwise less than <code>s2</code>; a positiv
e | |
| * value if <code>s1</code> is bitwise greater than <code>s2</code>. | | * value if <code>s1</code> is bitwise greater than <code>s2</code>. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| U_STABLE int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| u_strncmp(const UChar *ucs1, | | u_strncmp(const UChar *ucs1, | |
| const UChar *ucs2, | | const UChar *ucs2, | |
| int32_t n); | | int32_t n); | |
| | | | |
| | | | |
| skipping to change at line 670 | | skipping to change at line 675 | |
| U_STABLE UChar* U_EXPORT2 | | U_STABLE UChar* U_EXPORT2 | |
| u_strcpy(UChar *dst, | | u_strcpy(UChar *dst, | |
| const UChar *src); | | const UChar *src); | |
| | | | |
| /** | | /** | |
| * Copy a ustring. | | * Copy a ustring. | |
| * Copies at most <code>n</code> characters. The result will be null termi
nated | | * Copies at most <code>n</code> characters. The result will be null termi
nated | |
| * if the length of <code>src</code> is less than <code>n</code>. | | * if the length of <code>src</code> is less than <code>n</code>. | |
| * | | * | |
| * @param dst The destination string. | | * @param dst The destination string. | |
|
| * @param src The source string. | | * @param src The source string (can be NULL/invalid if n<=0). | |
| * @param n The maximum number of characters to copy. | | * @param n The maximum number of characters to copy; no-op if <=0. | |
| * @return A pointer to <code>dst</code>. | | * @return A pointer to <code>dst</code>. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| U_STABLE UChar* U_EXPORT2 | | U_STABLE UChar* U_EXPORT2 | |
| u_strncpy(UChar *dst, | | u_strncpy(UChar *dst, | |
| const UChar *src, | | const UChar *src, | |
| int32_t n); | | int32_t n); | |
| | | | |
| #if !UCONFIG_NO_CONVERSION | | #if !UCONFIG_NO_CONVERSION | |
| | | | |
| | | | |
| skipping to change at line 745 | | skipping to change at line 750 | |
| */ | | */ | |
| U_STABLE char* U_EXPORT2 u_austrncpy(char *dst, | | U_STABLE char* U_EXPORT2 u_austrncpy(char *dst, | |
| const UChar *src, | | const UChar *src, | |
| int32_t n ); | | int32_t n ); | |
| | | | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| * Synonym for memcpy(), but with UChars only. | | * Synonym for memcpy(), but with UChars only. | |
| * @param dest The destination string | | * @param dest The destination string | |
|
| * @param src The source string | | * @param src The source string (can be NULL/invalid if count<=0) | |
| * @param count The number of characters to copy | | * @param count The number of characters to copy; no-op if <=0 | |
| * @return A pointer to <code>dest</code> | | * @return A pointer to <code>dest</code> | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| U_STABLE UChar* U_EXPORT2 | | U_STABLE UChar* U_EXPORT2 | |
| u_memcpy(UChar *dest, const UChar *src, int32_t count); | | u_memcpy(UChar *dest, const UChar *src, int32_t count); | |
| | | | |
| /** | | /** | |
| * Synonym for memmove(), but with UChars only. | | * Synonym for memmove(), but with UChars only. | |
| * @param dest The destination string | | * @param dest The destination string | |
|
| * @param src The source string | | * @param src The source string (can be NULL/invalid if count<=0) | |
| * @param count The number of characters to move | | * @param count The number of characters to move; no-op if <=0 | |
| * @return A pointer to <code>dest</code> | | * @return A pointer to <code>dest</code> | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| U_STABLE UChar* U_EXPORT2 | | U_STABLE UChar* U_EXPORT2 | |
| u_memmove(UChar *dest, const UChar *src, int32_t count); | | u_memmove(UChar *dest, const UChar *src, int32_t count); | |
| | | | |
| /** | | /** | |
| * Initialize <code>count</code> characters of <code>dest</code> to <code>c
</code>. | | * Initialize <code>count</code> characters of <code>dest</code> to <code>c
</code>. | |
| * | | * | |
| * @param dest The destination string. | | * @param dest The destination string. | |
| | | | |
| skipping to change at line 921 | | skipping to change at line 926 | |
| * int32_t function() { | | * int32_t function() { | |
| * if(!didInit) { | | * if(!didInit) { | |
| * U_STRING_INIT(ustringVar1, "Quick-Fox 2", 11); | | * U_STRING_INIT(ustringVar1, "Quick-Fox 2", 11); | |
| * U_STRING_INIT(ustringVar2, "jumps 5%", 8); | | * U_STRING_INIT(ustringVar2, "jumps 5%", 8); | |
| * didInit=TRUE; | | * didInit=TRUE; | |
| * } | | * } | |
| * return u_strcmp(ustringVar1, ustringVar2); | | * return u_strcmp(ustringVar1, ustringVar2); | |
| * } | | * } | |
| * </pre> | | * </pre> | |
| * | | * | |
|
| * Note that the macros will NOT consistently work if their argument is ano
ther #define. | | * Note that the macros will NOT consistently work if their argument is ano
ther <code>#define</code>. | |
| * The following will not work on all platforms, don't use it. | | * The following will not work on all platforms, don't use it. | |
| * | | * | |
| * <pre> | | * <pre> | |
| * #define GLUCK "Mr. Gluck" | | * #define GLUCK "Mr. Gluck" | |
| * U_STRING_DECL(var, GLUCK, 9) | | * U_STRING_DECL(var, GLUCK, 9) | |
| * U_STRING_INIT(var, GLUCK, 9) | | * U_STRING_INIT(var, GLUCK, 9) | |
| * </pre> | | * </pre> | |
| * | | * | |
| * Instead, use the string literal "Mr. Gluck" as the argument to both mac
ro | | * Instead, use the string literal "Mr. Gluck" as the argument to both mac
ro | |
| * calls. | | * calls. | |
| | | | |
| skipping to change at line 1157 | | skipping to change at line 1162 | |
| U_STABLE int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| u_strToTitle(UChar *dest, int32_t destCapacity, | | u_strToTitle(UChar *dest, int32_t destCapacity, | |
| const UChar *src, int32_t srcLength, | | const UChar *src, int32_t srcLength, | |
| UBreakIterator *titleIter, | | UBreakIterator *titleIter, | |
| const char *locale, | | const char *locale, | |
| UErrorCode *pErrorCode); | | UErrorCode *pErrorCode); | |
| | | | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
|
| * Case-fold the characters in a string. | | * Case-folds the characters in a string. | |
| | | * | |
| * Case-folding is locale-independent and not context-sensitive, | | * Case-folding is locale-independent and not context-sensitive, | |
| * but there is an option for whether to include or exclude mappings for do
tted I | | * but there is an option for whether to include or exclude mappings for do
tted I | |
|
| * and dotless i that are marked with 'I' in CaseFolding.txt. | | * and dotless i that are marked with 'T' in CaseFolding.txt. | |
| | | * | |
| * The result may be longer or shorter than the original. | | * The result may be longer or shorter than the original. | |
| * The source string and the destination buffer are allowed to overlap. | | * The source string and the destination buffer are allowed to overlap. | |
| * | | * | |
| * @param dest A buffer for the result string. The result will be zero
-terminated if | | * @param dest A buffer for the result string. The result will be zero
-terminated if | |
| * the buffer is large enough. | | * the buffer is large enough. | |
| * @param destCapacity The size of the buffer (number of UChars). If it is
0, then | | * @param destCapacity The size of the buffer (number of UChars). If it is
0, then | |
| * dest may be NULL and the function will only return the
length of the result | | * dest may be NULL and the function will only return the
length of the result | |
| * without writing any of the result string. | | * without writing any of the result string. | |
| * @param src The original string | | * @param src The original string | |
| * @param srcLength The length of the original string. If -1, then src must
be zero-terminated. | | * @param srcLength The length of the original string. If -1, then src must
be zero-terminated. | |
| | | | |
End of changes. 11 change blocks. |
| 17 lines changed or deleted | | 24 lines changed or added | |
|