From 148ec9f9e503a7a035f11a60a2c5cbcce458fb10 Mon Sep 17 00:00:00 2001 From: Michael Ow Date: Thu, 17 Sep 2015 18:25:20 +0000 Subject: [PATCH] ICU-11917 Promote 54 draft API to stable X-SVN-Rev: 37969 --- icu4c/source/common/unicode/locid.h | 4 +- icu4c/source/common/unicode/uloc.h | 27 +- icu4c/source/i18n/unicode/dcfmtsym.h | 4 +- icu4c/source/i18n/unicode/decimfmt.h | 12 +- icu4c/source/i18n/unicode/dtfmtsym.h | 11 +- icu4c/source/i18n/unicode/measunit.h | 316 +++++--------------- icu4c/source/i18n/unicode/reldatefmt.h | 25 +- icu4c/source/i18n/unicode/smpdtfmt.h | 8 +- icu4c/source/i18n/unicode/tzfmt.h | 9 +- icu4c/source/i18n/unicode/tznames.h | 6 +- icu4c/source/i18n/unicode/ucurr.h | 24 +- icu4c/source/i18n/unicode/udat.h | 36 +-- icu4c/source/i18n/unicode/udisplaycontext.h | 18 +- icu4c/source/i18n/unicode/unum.h | 16 +- icu4c/source/io/unicode/ustdio.h | 8 +- 15 files changed, 155 insertions(+), 369 deletions(-) diff --git a/icu4c/source/common/unicode/locid.h b/icu4c/source/common/unicode/locid.h index 1ad5cb546eb..232ddf263cf 100644 --- a/icu4c/source/common/unicode/locid.h +++ b/icu4c/source/common/unicode/locid.h @@ -493,7 +493,6 @@ public: */ uint32_t getLCID(void) const; -#ifndef U_HIDE_DRAFT_API /** * Returns whether this locale's script is written right-to-left. * If there is no script subtag, then the likely script is used, see uloc_addLikelySubtags(). @@ -505,10 +504,9 @@ public: * Returns TRUE for "ar" and "en-Hebr", FALSE for "zh" and "fa-Cyrl". * * @return TRUE if the locale's script is written right-to-left - * @draft ICU 54 + * @stable ICU 54 */ UBool isRightToLeft() const; -#endif /* U_HIDE_DRAFT_API */ /** * Fills in "dispLang" with the name of this locale's language in a format suitable for diff --git a/icu4c/source/common/unicode/uloc.h b/icu4c/source/common/unicode/uloc.h index c305c8b78c8..2da74e730c3 100644 --- a/icu4c/source/common/unicode/uloc.h +++ b/icu4c/source/common/unicode/uloc.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 1997-2014, International Business Machines +* Copyright (C) 1997-2015, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * @@ -886,7 +886,6 @@ uloc_setKeywordValue(const char* keywordName, char* buffer, int32_t bufferCapacity, UErrorCode* status); -#ifndef U_HIDE_DRAFT_API /** * Returns whether the locale's script is written right-to-left. * If there is no script subtag, then the likely script is used, see uloc_addLikelySubtags(). @@ -899,11 +898,10 @@ uloc_setKeywordValue(const char* keywordName, * * @param locale input locale ID * @return TRUE if the locale's script is written right-to-left - * @draft ICU 54 + * @stable ICU 54 */ -U_DRAFT UBool U_EXPORT2 +U_STABLE UBool U_EXPORT2 uloc_isRightToLeft(const char *locale); -#endif /* U_HIDE_DRAFT_API */ /** * enums for the return value for the character and line orientation @@ -1151,7 +1149,6 @@ uloc_toLanguageTag(const char* localeID, UBool strict, UErrorCode* err); -#ifndef U_HIDE_DRAFT_API /** * Converts the specified keyword (legacy key, or BCP 47 Unicode locale * extension key) to the equivalent BCP 47 Unicode locale extension key. @@ -1171,9 +1168,9 @@ uloc_toLanguageTag(const char* localeID, * mapped to a well-formed BCP 47 Unicode locale extension * key. * @see uloc_toLegacyKey - * @draft ICU 54 + * @stable ICU 54 */ -U_DRAFT const char* U_EXPORT2 +U_STABLE const char* U_EXPORT2 uloc_toUnicodeLocaleKey(const char* keyword); /** @@ -1202,9 +1199,9 @@ uloc_toUnicodeLocaleKey(const char* keyword); * or NULL if the locale keyword value cannot be mapped to * a well-formed BCP 47 Unicode locale extension type. * @see uloc_toLegacyType - * @draft ICU 54 + * @stable ICU 54 */ -U_DRAFT const char* U_EXPORT2 +U_STABLE const char* U_EXPORT2 uloc_toUnicodeLocaleType(const char* keyword, const char* value); /** @@ -1217,9 +1214,9 @@ uloc_toUnicodeLocaleType(const char* keyword, const char* value); * @return the well-formed legacy key, or NULL if the specified * keyword cannot be mapped to a well-formed legacy key. * @see toUnicodeLocaleKey - * @draft ICU 54 + * @stable ICU 54 */ -U_DRAFT const char* U_EXPORT2 +U_STABLE const char* U_EXPORT2 uloc_toLegacyKey(const char* keyword); /** @@ -1246,11 +1243,9 @@ uloc_toLegacyKey(const char* keyword); * keyword value cannot be mapped to a well-formed legacy * type. * @see toUnicodeLocaleType - * @draft ICU 54 + * @stable ICU 54 */ -U_DRAFT const char* U_EXPORT2 +U_STABLE const char* U_EXPORT2 uloc_toLegacyType(const char* keyword, const char* value); -#endif /* U_HIDE_DRAFT_API */ - #endif /*_ULOC*/ diff --git a/icu4c/source/i18n/unicode/dcfmtsym.h b/icu4c/source/i18n/unicode/dcfmtsym.h index 9881171fea7..88f5fbce756 100644 --- a/icu4c/source/i18n/unicode/dcfmtsym.h +++ b/icu4c/source/i18n/unicode/dcfmtsym.h @@ -163,12 +163,10 @@ public: * @stable ICU 4.6 */ kNineDigitSymbol, -#ifndef U_HIDE_DRAFT_API /** Multiplication sign. - * @draft ICU 54 + * @stable ICU 54 */ kExponentMultiplicationSymbol, -#endif /* U_HIDE_DRAFT_API */ /** count symbol constants */ kFormatSymbolCount = kNineDigitSymbol + 2 }; diff --git a/icu4c/source/i18n/unicode/decimfmt.h b/icu4c/source/i18n/unicode/decimfmt.h index 52c1a4c1e68..e09b8c54740 100644 --- a/icu4c/source/i18n/unicode/decimfmt.h +++ b/icu4c/source/i18n/unicode/decimfmt.h @@ -1704,15 +1704,13 @@ public: */ virtual void setDecimalSeparatorAlwaysShown(UBool newValue); -#ifndef U_HIDE_DRAFT_API /** * Allows you to get the parse behavior of the pattern decimal mark. * * @return TRUE if input must contain a match to decimal mark in pattern - * @draft ICU 54 + * @stable ICU 54 */ UBool isDecimalPatternMatchRequired(void) const; -#endif /* U_HIDE_DRAFT_API */ /** * Allows you to set the behavior of the pattern decimal mark. @@ -1721,7 +1719,7 @@ public: * FALSE the decimal mark may be omitted from the input. * * @param newValue set TRUE if input must contain a match to decimal mark in pattern - * @draft ICU 54 + * @stable ICU 54 */ virtual void setDecimalPatternMatchRequired(UBool newValue); @@ -1967,22 +1965,20 @@ public: */ virtual void setCurrency(const UChar* theCurrency); -#ifndef U_HIDE_DRAFT_API /** * Sets the Currency Context object used to display currency. * This takes effect immediately, if this format is a * currency format. * @param currencyContext new currency context object to use. - * @draft ICU 54 + * @stable ICU 54 */ void setCurrencyUsage(UCurrencyUsage newUsage, UErrorCode* ec); /** * Returns the Currency Context object used to display currency - * @draft ICU 54 + * @stable ICU 54 */ UCurrencyUsage getCurrencyUsage() const; -#endif /* U_HIDE_DRAFT_API */ #ifndef U_HIDE_DEPRECATED_API diff --git a/icu4c/source/i18n/unicode/dtfmtsym.h b/icu4c/source/i18n/unicode/dtfmtsym.h index 78d0ceb5a90..bfdf1148acc 100644 --- a/icu4c/source/i18n/unicode/dtfmtsym.h +++ b/icu4c/source/i18n/unicode/dtfmtsym.h @@ -440,7 +440,6 @@ public: void setTimeSeparatorString(const UnicodeString& newTimeSeparator); #endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Gets cyclic year name strings if the calendar has them, by width and context. * For example: "jia-zi", "yi-chou", etc. @@ -449,7 +448,7 @@ public: * @param width The requested name width: WIDE, ABBREVIATED, NARROW. * @return The year name strings (DateFormatSymbols retains ownership), * or null if they are not available for this calendar. - * @draft ICU 54 + * @stable ICU 54 */ const UnicodeString* getYearNames(int32_t& count, DtContextType context, DtWidthType width) const; @@ -461,7 +460,7 @@ public: * @param count The length of the array. * @param context The usage context: FORMAT, STANDALONE (currently only FORMAT is supported). * @param width The name width: WIDE, ABBREVIATED, NARROW (currently only ABBREVIATED is supported). - * @draft ICU 54 + * @stable ICU 54 */ void setYearNames(const UnicodeString* yearNames, int32_t count, DtContextType context, DtWidthType width); @@ -474,7 +473,7 @@ public: * @param width The requested name width: WIDE, ABBREVIATED, NARROW. * @return The zodiac name strings (DateFormatSymbols retains ownership), * or null if they are not available for this calendar. - * @draft ICU 54 + * @stable ICU 54 */ const UnicodeString* getZodiacNames(int32_t& count, DtContextType context, DtWidthType width) const; @@ -486,13 +485,11 @@ public: * @param count The length of the array. * @param context The usage context: FORMAT, STANDALONE (currently only FORMAT is supported). * @param width The name width: WIDE, ABBREVIATED, NARROW (currently only ABBREVIATED is supported). - * @draft ICU 54 + * @stable ICU 54 */ void setZodiacNames(const UnicodeString* zodiacNames, int32_t count, DtContextType context, DtWidthType width); -#endif /* U_HIDE_DRAFT_API */ - #ifndef U_HIDE_INTERNAL_API /** * Somewhat temporary constants for leap month pattern types, adequate for supporting diff --git a/icu4c/source/i18n/unicode/measunit.h b/icu4c/source/i18n/unicode/measunit.h index a81adb576d0..b32f216f6b6 100644 --- a/icu4c/source/i18n/unicode/measunit.h +++ b/icu4c/source/i18n/unicode/measunit.h @@ -207,16 +207,14 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createGForce(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of acceleration: meter-per-second-squared. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createMeterPerSecondSquared(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of angle: arc-minute. * Caller owns returned value and must free it. @@ -241,16 +239,14 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createDegree(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of angle: radian. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createRadian(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ #ifndef U_HIDE_DRAFT_API /** * Returns unit of angle: revolution. @@ -259,8 +255,8 @@ class U_I18N_API MeasureUnit: public UObject { * @draft ICU 56 */ static MeasureUnit *createRevolution(UErrorCode &status); +#endif /* U_HIDE_DRAFT_API */ -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of area: acre. * Caller owns returned value and must free it. @@ -277,16 +273,14 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createHectare(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of area: square-centimeter. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createSquareCentimeter(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of area: square-foot. * Caller owns returned value and must free it. @@ -295,16 +289,14 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createSquareFoot(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of area: square-inch. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createSquareInch(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of area: square-kilometer. * Caller owns returned value and must free it. @@ -329,16 +321,14 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createSquareMile(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of area: square-yard. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createSquareYard(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ #ifndef U_HIDE_DRAFT_API /** * Returns unit of consumption: liter-per-100kilometers. @@ -347,128 +337,104 @@ class U_I18N_API MeasureUnit: public UObject { * @draft ICU 56 */ static MeasureUnit *createLiterPer100Kilometers(UErrorCode &status); +#endif /* U_HIDE_DRAFT_API */ -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of consumption: liter-per-kilometer. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createLiterPerKilometer(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of consumption: mile-per-gallon. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createMilePerGallon(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of digital: bit. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createBit(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of digital: byte. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createByte(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of digital: gigabit. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createGigabit(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of digital: gigabyte. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createGigabyte(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of digital: kilobit. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createKilobit(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of digital: kilobyte. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createKilobyte(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of digital: megabit. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createMegabit(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of digital: megabyte. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createMegabyte(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of digital: terabit. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createTerabit(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of digital: terabyte. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createTerabyte(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ #ifndef U_HIDE_DRAFT_API /** * Returns unit of duration: century. @@ -477,8 +443,8 @@ class U_I18N_API MeasureUnit: public UObject { * @draft ICU 56 */ static MeasureUnit *createCentury(UErrorCode &status); +#endif /* U_HIDE_DRAFT_API */ -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of duration: day. * Caller owns returned value and must free it. @@ -495,16 +461,14 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createHour(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of duration: microsecond. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createMicrosecond(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of duration: millisecond. * Caller owns returned value and must free it. @@ -529,16 +493,14 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createMonth(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of duration: nanosecond. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createNanosecond(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of duration: second. * Caller owns returned value and must free it. @@ -563,156 +525,126 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createYear(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of electric: ampere. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createAmpere(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of electric: milliampere. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createMilliampere(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of electric: ohm. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createOhm(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of electric: volt. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createVolt(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of energy: calorie. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createCalorie(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of energy: foodcalorie. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createFoodcalorie(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of energy: joule. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createJoule(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of energy: kilocalorie. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createKilocalorie(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of energy: kilojoule. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createKilojoule(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of energy: kilowatt-hour. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createKilowattHour(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of frequency: gigahertz. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createGigahertz(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of frequency: hertz. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createHertz(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of frequency: kilohertz. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createKilohertz(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of frequency: megahertz. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createMegahertz(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of length: astronomical-unit. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createAstronomicalUnit(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of length: centimeter. * Caller owns returned value and must free it. @@ -721,26 +653,22 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createCentimeter(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of length: decimeter. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createDecimeter(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of length: fathom. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createFathom(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of length: foot. * Caller owns returned value and must free it. @@ -749,16 +677,14 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createFoot(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of length: furlong. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createFurlong(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of length: inch. * Caller owns returned value and must free it. @@ -791,16 +717,14 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createMeter(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of length: micrometer. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createMicrometer(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of length: mile. * Caller owns returned value and must free it. @@ -817,8 +741,8 @@ class U_I18N_API MeasureUnit: public UObject { * @draft ICU 56 */ static MeasureUnit *createMileScandinavian(UErrorCode &status); +#endif /* U_HIDE_DRAFT_API */ -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of length: millimeter. * Caller owns returned value and must free it. @@ -827,36 +751,30 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createMillimeter(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of length: nanometer. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createNanometer(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of length: nautical-mile. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createNauticalMile(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of length: parsec. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createParsec(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of length: picometer. * Caller owns returned value and must free it. @@ -873,26 +791,22 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createYard(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of light: lux. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createLux(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of mass: carat. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createCarat(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of mass: gram. * Caller owns returned value and must free it. @@ -909,36 +823,30 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createKilogram(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of mass: metric-ton. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createMetricTon(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of mass: microgram. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createMicrogram(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of mass: milligram. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createMilligram(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of mass: ounce. * Caller owns returned value and must free it. @@ -947,16 +855,14 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createOunce(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of mass: ounce-troy. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createOunceTroy(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of mass: pound. * Caller owns returned value and must free it. @@ -965,36 +871,30 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createPound(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of mass: stone. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createStone(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of mass: ton. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createTon(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of power: gigawatt. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createGigawatt(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of power: horsepower. * Caller owns returned value and must free it. @@ -1011,26 +911,22 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createKilowatt(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of power: megawatt. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createMegawatt(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of power: milliwatt. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createMilliwatt(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of power: watt. * Caller owns returned value and must free it. @@ -1063,36 +959,30 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createMillibar(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of pressure: millimeter-of-mercury. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createMillimeterOfMercury(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of pressure: pound-per-square-inch. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createPoundPerSquareInch(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of proportion: karat. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createKarat(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of speed: kilometer-per-hour. * Caller owns returned value and must free it. @@ -1109,8 +999,8 @@ class U_I18N_API MeasureUnit: public UObject { * @draft ICU 56 */ static MeasureUnit *createKnot(UErrorCode &status); +#endif /* U_HIDE_DRAFT_API */ -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of speed: meter-per-second. * Caller owns returned value and must free it. @@ -1151,78 +1041,64 @@ class U_I18N_API MeasureUnit: public UObject { * @draft ICU 55 */ static MeasureUnit *createGeneric(UErrorCode &status); +#endif /* U_HIDE_DRAFT_API */ -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of temperature: kelvin. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createKelvin(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: acre-foot. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createAcreFoot(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: bushel. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createBushel(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: centiliter. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createCentiliter(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: cubic-centimeter. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createCubicCentimeter(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: cubic-foot. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createCubicFoot(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: cubic-inch. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createCubicInch(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of volume: cubic-kilometer. * Caller owns returned value and must free it. @@ -1231,16 +1107,14 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createCubicKilometer(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: cubic-meter. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createCubicMeter(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of volume: cubic-mile. * Caller owns returned value and must free it. @@ -1249,26 +1123,22 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createCubicMile(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: cubic-yard. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createCubicYard(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: cup. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createCup(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ #ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: cup-metric. @@ -1277,48 +1147,40 @@ class U_I18N_API MeasureUnit: public UObject { * @draft ICU 56 */ static MeasureUnit *createCupMetric(UErrorCode &status); +#endif /* U_HIDE_DRAFT_API */ -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: deciliter. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createDeciliter(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: fluid-ounce. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createFluidOunce(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: gallon. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createGallon(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: hectoliter. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createHectoliter(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of volume: liter. * Caller owns returned value and must free it. @@ -1327,36 +1189,30 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createLiter(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: megaliter. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createMegaliter(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: milliliter. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createMilliliter(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: pint. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createPint(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ #ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: pint-metric. @@ -1365,38 +1221,32 @@ class U_I18N_API MeasureUnit: public UObject { * @draft ICU 56 */ static MeasureUnit *createPintMetric(UErrorCode &status); +#endif /* U_HIDE_DRAFT_API */ -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: quart. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createQuart(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: tablespoon. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createTablespoon(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_DRAFT_API /** * Returns unit of volume: teaspoon. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 54 + * @stable ICU 54 */ static MeasureUnit *createTeaspoon(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ // End generated createXXX methods diff --git a/icu4c/source/i18n/unicode/reldatefmt.h b/icu4c/source/i18n/unicode/reldatefmt.h index 8fb551d93b2..c3350c516c4 100644 --- a/icu4c/source/i18n/unicode/reldatefmt.h +++ b/icu4c/source/i18n/unicode/reldatefmt.h @@ -26,37 +26,32 @@ /** * The formatting style - * @draft ICU 54 + * @stable ICU 54 */ typedef enum UDateRelativeDateTimeFormatterStyle { -#ifndef U_HIDE_DRAFT_API /** * Everything spelled out. - * @draft ICU 54 + * @stable ICU 54 */ UDAT_STYLE_LONG, /** * Abbreviations used when possible. - * @draft ICU 54 + * @stable ICU 54 */ UDAT_STYLE_SHORT, /** * Use the shortest possible form. - * @draft ICU 54 + * @stable ICU 54 */ UDAT_STYLE_NARROW, /** * The number of styles. - * @draft ICU 54 + * @stable ICU 54 */ UDAT_STYLE_COUNT -#else - /** @internal */ - UDAT_RELATIVE_DATE_TIME_FORMATTER_STYLE_HIDDEN -#endif /* U_HIDE_DRAFT_API */ } UDateRelativeDateTimeFormatterStyle; /** @@ -358,7 +353,6 @@ public: RelativeDateTimeFormatter( const Locale& locale, NumberFormat *nfToAdopt, UErrorCode& status); -#ifndef U_HIDE_DRAFT_API /** * Create RelativeDateTimeFormatter with given locale, NumberFormat, * and capitalization context. @@ -372,7 +366,7 @@ public: * @param capitalizationContext A value from UDisplayContext that pertains to * capitalization. * @status Any error is returned here. - * @draft ICU 54 + * @stable ICU 54 */ RelativeDateTimeFormatter( const Locale& locale, @@ -380,7 +374,6 @@ public: UDateRelativeDateTimeFormatterStyle style, UDisplayContext capitalizationContext, UErrorCode& status); -#endif /* U_HIDE_DRAFT_API */ /** * Copy constructor. @@ -466,21 +459,19 @@ public: */ const NumberFormat& getNumberFormat() const; -#ifndef U_HIDE_DRAFT_API /** * Returns the capitalization context. * - * @draft ICU 54 + * @stable ICU 54 */ UDisplayContext getCapitalizationContext() const; /** * Returns the format style. * - * @draft ICU 54 + * @stable ICU 54 */ UDateRelativeDateTimeFormatterStyle getFormatStyle() const; -#endif /* U_HIDE_DRAFT_API */ private: const RelativeDateTimeCacheData* fCache; diff --git a/icu4c/source/i18n/unicode/smpdtfmt.h b/icu4c/source/i18n/unicode/smpdtfmt.h index ccdaff42abb..e6e96ae30d2 100644 --- a/icu4c/source/i18n/unicode/smpdtfmt.h +++ b/icu4c/source/i18n/unicode/smpdtfmt.h @@ -1131,13 +1131,12 @@ public: */ virtual void setContext(UDisplayContext value, UErrorCode& status); -#ifndef U_HIDE_DRAFT_API /** * Overrides base class method and * This method clears per field NumberFormat instances * previously set by {@see adoptNumberFormat(const UnicodeString&, NumberFormat*, UErrorCode)} * @param adoptNF the NumbeferFormat used - * @draft ICU 54 + * @stable ICU 54 */ void adoptNumberFormat(NumberFormat *formatToAdopt); @@ -1154,17 +1153,16 @@ public: * @param adoptNF the NumbeferFormat used * @param status Receives a status code, which will be U_ZERO_ERROR * if the operation succeeds. - * @draft ICU 54 + * @stable ICU 54 */ void adoptNumberFormat(const UnicodeString& fields, NumberFormat *formatToAdopt, UErrorCode &status); /** * Get the numbering system to be used for a particular field. * @param field The UDateFormatField to get - * @draft ICU 54 + * @stable ICU 54 */ const NumberFormat * getNumberFormatForField(UChar field) const; -#endif /* U_HIDE_DRAFT_API */ #ifndef U_HIDE_INTERNAL_API /** diff --git a/icu4c/source/i18n/unicode/tzfmt.h b/icu4c/source/i18n/unicode/tzfmt.h index 24f0e49eb79..5ec6c441ad7 100644 --- a/icu4c/source/i18n/unicode/tzfmt.h +++ b/icu4c/source/i18n/unicode/tzfmt.h @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 2011-2014, International Business Machines Corporation and +* Copyright (C) 2011-2015, International Business Machines Corporation and * others. All Rights Reserved. ******************************************************************************* */ @@ -233,18 +233,15 @@ typedef enum UTimeZoneFormatParseOption { * by other styles. * @stable ICU 50 */ - UTZFMT_PARSE_OPTION_ALL_STYLES = 0x01 -#ifndef U_HIDE_DRAFT_API - , + UTZFMT_PARSE_OPTION_ALL_STYLES = 0x01, /** * When parsing a time zone display name in UTZFMT_STYLE_SPECIFIC_SHORT, * look for the IANA tz database compatible zone abbreviations in addition * to the localized names coming from the {@link TimeZoneNames} currently * used by the {@link TimeZoneFormat}. - * @draft ICU 54 + * @stable ICU 54 */ UTZFMT_PARSE_OPTION_TZ_DATABASE_ABBREVIATIONS = 0x02 -#endif /* U_HIDE_DRAFT_API */ } UTimeZoneFormatParseOption; U_CDECL_END diff --git a/icu4c/source/i18n/unicode/tznames.h b/icu4c/source/i18n/unicode/tznames.h index 9583ded022f..cbc9c1f3a84 100644 --- a/icu4c/source/i18n/unicode/tznames.h +++ b/icu4c/source/i18n/unicode/tznames.h @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 2011-2014, International Business Machines Corporation and +* Copyright (C) 2011-2015, International Business Machines Corporation and * others. All Rights Reserved. ******************************************************************************* */ @@ -167,7 +167,6 @@ public: */ static TimeZoneNames* U_EXPORT2 createInstance(const Locale& locale, UErrorCode& status); -#ifndef U_HIDE_DRAFT_API /** * Returns an instance of TimeZoneNames containing only short specific * zone names (SHORT_STANDARD and SHORT_DAYLIGHT), @@ -176,10 +175,9 @@ public: * Note: The input locale is used for resolving ambiguous names (e.g. "IST" is parsed * as Israel Standard Time for Israel, while it is parsed as India Standard Time for * all other regions). The zone names returned by this instance are not localized. - * @draft ICU 54 + * @stable ICU 54 */ static TimeZoneNames* U_EXPORT2 createTZDBInstance(const Locale& locale, UErrorCode& status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns an enumeration of all available meta zone IDs. diff --git a/icu4c/source/i18n/unicode/ucurr.h b/icu4c/source/i18n/unicode/ucurr.h index 5b196901693..d4714a45362 100644 --- a/icu4c/source/i18n/unicode/ucurr.h +++ b/icu4c/source/i18n/unicode/ucurr.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (c) 2002-2014, International Business Machines +* Copyright (c) 2002-2015, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** */ @@ -19,27 +19,25 @@ /** * Currency Usage used for Decimal Format - * @draft ICU 54 + * @stable ICU 54 */ enum UCurrencyUsage { -#ifndef U_HIDE_DRAFT_API /** * a setting to specify currency usage which determines currency digit * and rounding for standard usage, for example: "50.00 NT$" * used as DEFAULT value - * @draft ICU 54 + * @stable ICU 54 */ UCURR_USAGE_STANDARD=0, /** * a setting to specify currency usage which determines currency digit * and rounding for cash usage, for example: "50 NT$" - * @draft ICU 54 + * @stable ICU 54 */ UCURR_USAGE_CASH=1, -#endif /* U_HIDE_DRAFT_API */ /** * One higher than the last enum UCurrencyUsage constant. - * @draft ICU 54 + * @stable ICU 54 */ UCURR_USAGE_COUNT=2 }; @@ -204,7 +202,6 @@ U_STABLE int32_t U_EXPORT2 ucurr_getDefaultFractionDigits(const UChar* currency, UErrorCode* ec); -#ifndef U_HIDE_DRAFT_API /** * Returns the number of the number of fraction digits that should * be displayed for the given currency with usage. @@ -213,13 +210,12 @@ ucurr_getDefaultFractionDigits(const UChar* currency, * @param ec input-output error code * @return a non-negative number of fraction digits to be * displayed, or 0 if there is an error - * @draft ICU 54 + * @stable ICU 54 */ -U_DRAFT int32_t U_EXPORT2 +U_STABLE int32_t U_EXPORT2 ucurr_getDefaultFractionDigitsForUsage(const UChar* currency, const UCurrencyUsage usage, UErrorCode* ec); -#endif /* U_HIDE_DRAFT_API */ /** * Returns the rounding increment for the given currency, or 0.0 if no @@ -235,7 +231,6 @@ U_STABLE double U_EXPORT2 ucurr_getRoundingIncrement(const UChar* currency, UErrorCode* ec); -#ifndef U_HIDE_DRAFT_API /** * Returns the rounding increment for the given currency, or 0.0 if no * rounding is done by the currency given usage. @@ -244,13 +239,12 @@ ucurr_getRoundingIncrement(const UChar* currency, * @param ec input-output error code * @return the non-negative rounding increment, or 0.0 if none, * or 0.0 if there is an error - * @draft ICU 54 + * @stable ICU 54 */ -U_DRAFT double U_EXPORT2 +U_STABLE double U_EXPORT2 ucurr_getRoundingIncrementForUsage(const UChar* currency, const UCurrencyUsage usage, UErrorCode* ec); -#endif /* U_HIDE_DRAFT_API */ /** * Selector constants for ucurr_openCurrencies(). diff --git a/icu4c/source/i18n/unicode/udat.h b/icu4c/source/i18n/unicode/udat.h index e5768535788..bb673ca2d90 100644 --- a/icu4c/source/i18n/unicode/udat.h +++ b/icu4c/source/i18n/unicode/udat.h @@ -1207,7 +1207,6 @@ udat_setCalendar( UDateFormat* fmt, U_STABLE const UNumberFormat* U_EXPORT2 udat_getNumberFormat(const UDateFormat* fmt); -#ifndef U_HIDE_DRAFT_API /** * Get the UNumberFormat for specific field associated with an UDateFormat. * For example: 'y' for year and 'M' for month @@ -1215,9 +1214,9 @@ udat_getNumberFormat(const UDateFormat* fmt); * @param field the field to query * @return A pointer to the UNumberFormat used by fmt to format field numbers. * @see udat_setNumberFormatForField -* @draft ICU 54 +* @stable ICU 54 */ -U_DRAFT const UNumberFormat* U_EXPORT2 +U_STABLE const UNumberFormat* U_EXPORT2 udat_getNumberFormatForField(const UDateFormat* fmt, UChar field); /** @@ -1233,15 +1232,13 @@ udat_getNumberFormatForField(const UDateFormat* fmt, UChar field); * @param numberFormatToSet A pointer to the UNumberFormat to be used by fmt to format numbers. * @param status error code passed around (memory allocation or invalid fields) * @see udat_getNumberFormatForField -* @draft ICU 54 +* @stable ICU 54 */ -U_DRAFT void U_EXPORT2 +U_STABLE void U_EXPORT2 udat_adoptNumberFormatForFields( UDateFormat* fmt, const UChar* fields, UNumberFormat* numberFormatToSet, UErrorCode* status); -#endif /* U_HIDE_DRAFT_API */ - /** * Set the UNumberFormat associated with an UDateFormat. * A UDateFormat uses a UNumberFormat to format numbers within a date, @@ -1257,8 +1254,6 @@ udat_adoptNumberFormatForFields( UDateFormat* fmt, U_STABLE void U_EXPORT2 udat_setNumberFormat( UDateFormat* fmt, const UNumberFormat* numberFormatToSet); - -#ifndef U_HIDE_DRAFT_API /** * Adopt the UNumberFormat associated with an UDateFormat. * A UDateFormat uses a UNumberFormat to format numbers within a date, @@ -1266,13 +1261,11 @@ udat_setNumberFormat( UDateFormat* fmt, * @param fmt The formatter to set. * @param numberFormatToAdopt A pointer to the UNumberFormat to be used by fmt to format numbers. * @see udat_getNumberFormat -* @draft ICU 54 +* @stable ICU 54 */ -U_DRAFT void U_EXPORT2 +U_STABLE void U_EXPORT2 udat_adoptNumberFormat( UDateFormat* fmt, UNumberFormat* numberFormatToAdopt); -#endif /* U_HIDE_DRAFT_API */ - /** * Get a locale for which date/time formatting patterns are available. * A UDateFormat in a locale returned by this function will perform the correct @@ -1420,44 +1413,41 @@ typedef enum UDateFormatSymbolType { * Standalone version of UDAT_SHORTER_WEEKDAYS. * @stable ICU 51 */ - UDAT_STANDALONE_SHORTER_WEEKDAYS -#ifndef U_HIDE_DRAFT_API - , + UDAT_STANDALONE_SHORTER_WEEKDAYS, /** * Cyclic year names (only supported for some calendars, and only for FORMAT usage; * udat_setSymbols not supported for UDAT_CYCLIC_YEARS_WIDE) - * @draft ICU 54 + * @stable ICU 54 */ UDAT_CYCLIC_YEARS_WIDE, /** * Cyclic year names (only supported for some calendars, and only for FORMAT usage) - * @draft ICU 54 + * @stable ICU 54 */ UDAT_CYCLIC_YEARS_ABBREVIATED, /** * Cyclic year names (only supported for some calendars, and only for FORMAT usage; * udat_setSymbols not supported for UDAT_CYCLIC_YEARS_NARROW) - * @draft ICU 54 + * @stable ICU 54 */ UDAT_CYCLIC_YEARS_NARROW, /** * Calendar zodiac names (only supported for some calendars, and only for FORMAT usage; * udat_setSymbols not supported for UDAT_ZODIAC_NAMES_WIDE) - * @draft ICU 54 + * @stable ICU 54 */ UDAT_ZODIAC_NAMES_WIDE, /** * Calendar zodiac names (only supported for some calendars, and only for FORMAT usage) - * @draft ICU 54 + * @stable ICU 54 */ UDAT_ZODIAC_NAMES_ABBREVIATED, /** * Calendar zodiac names (only supported for some calendars, and only for FORMAT usage; * udat_setSymbols not supported for UDAT_ZODIAC_NAMES_NARROW) - * @draft ICU 54 + * @stable ICU 54 */ UDAT_ZODIAC_NAMES_NARROW -#endif /* U_HIDE_DRAFT_API */ } UDateFormatSymbolType; struct UDateFormatSymbols; diff --git a/icu4c/source/i18n/unicode/udisplaycontext.h b/icu4c/source/i18n/unicode/udisplaycontext.h index 92b2f94a491..c04f374978d 100644 --- a/icu4c/source/i18n/unicode/udisplaycontext.h +++ b/icu4c/source/i18n/unicode/udisplaycontext.h @@ -1,6 +1,6 @@ /* ***************************************************************************************** -* Copyright (C) 2014, International Business Machines +* Copyright (C) 2014-2015, International Business Machines * Corporation and others. All Rights Reserved. ***************************************************************************************** */ @@ -35,16 +35,13 @@ enum UDisplayContextType { * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, etc. * @stable ICU 51 */ - UDISPCTX_TYPE_CAPITALIZATION = 1 -#ifndef U_HIDE_DRAFT_API - , + UDISPCTX_TYPE_CAPITALIZATION = 1, /** * Type to retrieve the display length setting, e.g. * UDISPCTX_LENGTH_FULL, UDISPCTX_LENGTH_SHORT. - * @draft ICU 54 + * @stable ICU 54 */ UDISPCTX_TYPE_DISPLAY_LENGTH = 2 -#endif /* U_HIDE_DRAFT_API */ }; /** * @stable ICU 51 @@ -115,9 +112,7 @@ enum UDisplayContext { * isolated name on a calendar page. * @stable ICU 51 */ - UDISPCTX_CAPITALIZATION_FOR_STANDALONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 4 -#ifndef U_HIDE_DRAFT_API - , + UDISPCTX_CAPITALIZATION_FOR_STANDALONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 4, /** * ================================ * DISPLAY_LENGTH can be set to one of UDISPCTX_LENGTH_FULL or @@ -128,17 +123,16 @@ enum UDisplayContext { * A possible setting for DISPLAY_LENGTH: * use full names when generating a locale name, * e.g. "United States" for US. - * @draft ICU 54 + * @stable ICU 54 */ UDISPCTX_LENGTH_FULL = (UDISPCTX_TYPE_DISPLAY_LENGTH<<8) + 0, /** * A possible setting for DISPLAY_LENGTH: * use short names when generating a locale name, * e.g. "U.S." for US. - * @draft ICU 54 + * @stable ICU 54 */ UDISPCTX_LENGTH_SHORT = (UDISPCTX_TYPE_DISPLAY_LENGTH<<8) + 1 -#endif /* U_HIDE_DRAFT_API */ }; /** * @stable ICU 51 diff --git a/icu4c/source/i18n/unicode/unum.h b/icu4c/source/i18n/unicode/unum.h index 3341a9ea7a9..015fd635fcd 100644 --- a/icu4c/source/i18n/unicode/unum.h +++ b/icu4c/source/i18n/unicode/unum.h @@ -213,14 +213,12 @@ typedef enum UNumberFormatStyle { * @stable ICU 53 */ UNUM_CURRENCY_ACCOUNTING=12, -#ifndef U_HIDE_DRAFT_API /** * Currency format with a currency symbol given CASH usage, e.g., * "NT$3" instead of "NT$3.23". - * @draft ICU 54 + * @stable ICU 54 */ UNUM_CASH_CURRENCY=13, -#endif /* U_HIDE_DRAFT_API */ #ifndef U_HIDE_DRAFT_API /** * Decimal format expressed using compact notation @@ -955,15 +953,13 @@ typedef enum UNumberFormatAttribute { /* TODO: test C API when it becomes @draft */ #endif /* U_HIDE_INTERNAL_API */ -#ifndef U_HIDE_DRAFT_API /** * if this attribute is set to 0, it is set to UNUM_CURRENCY_STANDARD purpose, * otherwise it is UNUM_CURRENCY_CASH purpose * Default: 0 (UNUM_CURRENCY_STANDARD purpose) - * @draft ICU 54 + * @stable ICU 54 */ UNUM_CURRENCY_USAGE = 23, -#endif /* U_HIDE_DRAFT_API */ /* The following cannot be #ifndef U_HIDE_INTERNAL_API, needed in .h file variable declararions */ /** One below the first bitfield-boolean item. @@ -985,17 +981,15 @@ typedef enum UNumberFormatAttribute { */ UNUM_PARSE_NO_EXPONENT, -#ifndef U_HIDE_DRAFT_API /** * if this attribute is set to 1, specifies that, if the pattern contains a * decimal mark the input is required to have one. If this attribute is set to 0, * specifies that input does not have to contain a decimal mark. * Has no effect on formatting. * Default: 0 (unset) - * @draft ICU 54 + * @stable ICU 54 */ UNUM_PARSE_DECIMAL_MARK_REQUIRED = 0x1002, -#endif /* U_HIDE_DRAFT_API */ /* The following cannot be #ifndef U_HIDE_INTERNAL_API, needed in .h file variable declararions */ /** Limit of boolean attributes. @@ -1273,12 +1267,10 @@ typedef enum UNumberFormatSymbol { */ UNUM_NINE_DIGIT_SYMBOL = 26, -#ifndef U_HIDE_DRAFT_API /** Multiplication sign - * @draft ICU 54 + * @stable ICU 54 */ UNUM_EXPONENT_MULTIPLICATION_SYMBOL = 27, -#endif /* U_HIDE_DRAFT_API */ /** count symbol constants */ UNUM_FORMAT_SYMBOL_COUNT = 28 diff --git a/icu4c/source/io/unicode/ustdio.h b/icu4c/source/io/unicode/ustdio.h index 16bcf35eecf..251a2b5b89e 100644 --- a/icu4c/source/io/unicode/ustdio.h +++ b/icu4c/source/io/unicode/ustdio.h @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1998-2014, International Business Machines +* Copyright (C) 1998-2015, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -243,7 +243,6 @@ u_fopen(const char *filename, const char *locale, const char *codepage); -#ifndef U_HIDE_DRAFT_API /** * Open a UFILE with a UChar* filename * A UFILE is a wrapper around a FILE* that is locale and codepage aware. @@ -259,14 +258,13 @@ u_fopen(const char *filename, * read from the file. If this paramter is NULL the system default codepage * will be used. * @return A new UFILE, or NULL if an error occurred. - * @draft ICU 54 + * @stable ICU 54 */ -U_DRAFT UFILE* U_EXPORT2 +U_STABLE UFILE* U_EXPORT2 u_fopen_u(const UChar *filename, const char *perm, const char *locale, const char *codepage); -#endif /* U_HIDE_DRAFT_API */ /** * Open a UFILE on top of an existing FILE* stream. The FILE* stream