ICU-10394 api promo 50->52 as per PMC

X-SVN-Rev: 34396
This commit is contained in:
Steven R. Loomis 2013-09-19 00:44:08 +00:00
parent c2356dc2c9
commit 37562f403e
22 changed files with 1071 additions and 644 deletions

File diff suppressed because it is too large Load Diff

View File

@ -44,7 +44,7 @@
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
// Forward Declarations // Forward Declarations
void U_CALLCONV locale_available_init(); void U_CALLCONV locale_available_init(); /**< @internal */
/** /**
* A <code>Locale</code> object represents a specific geographical, political, * A <code>Locale</code> object represents a specific geographical, political,
@ -745,6 +745,9 @@ private:
*/ */
friend Locale *locale_set_default_internal(const char *, UErrorCode& status); friend Locale *locale_set_default_internal(const char *, UErrorCode& status);
/**
* @internal
*/
friend void locale_available_init(); friend void locale_available_init();
}; };

View File

@ -247,29 +247,26 @@ enum UMessagePatternArgType {
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_ARG_TYPE_SELECT, UMSGPAT_ARG_TYPE_SELECT,
#ifndef U_HIDE_DRAFT_API
/** /**
* The argument is an ordinal-number PluralFormat * The argument is an ordinal-number PluralFormat
* with the same style parts sequence and semantics as UMSGPAT_ARG_TYPE_PLURAL. * with the same style parts sequence and semantics as UMSGPAT_ARG_TYPE_PLURAL.
* @draft ICU 50 * @stable ICU 50
*/ */
UMSGPAT_ARG_TYPE_SELECTORDINAL UMSGPAT_ARG_TYPE_SELECTORDINAL
#endif /* U_HIDE_DRAFT_API */
}; };
/** /**
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
typedef enum UMessagePatternArgType UMessagePatternArgType; typedef enum UMessagePatternArgType UMessagePatternArgType;
#ifndef U_HIDE_DRAFT_API
/** /**
* \def UMSGPAT_ARG_TYPE_HAS_PLURAL_STYLE
* Returns TRUE if the argument type has a plural style part sequence and semantics, * Returns TRUE if the argument type has a plural style part sequence and semantics,
* for example UMSGPAT_ARG_TYPE_PLURAL and UMSGPAT_ARG_TYPE_SELECTORDINAL. * for example UMSGPAT_ARG_TYPE_PLURAL and UMSGPAT_ARG_TYPE_SELECTORDINAL.
* @draft ICU 50 * @stable ICU 50
*/ */
#define UMSGPAT_ARG_TYPE_HAS_PLURAL_STYLE(argType) \ #define UMSGPAT_ARG_TYPE_HAS_PLURAL_STYLE(argType) \
((argType)==UMSGPAT_ARG_TYPE_PLURAL || (argType)==UMSGPAT_ARG_TYPE_SELECTORDINAL) ((argType)==UMSGPAT_ARG_TYPE_PLURAL || (argType)==UMSGPAT_ARG_TYPE_SELECTORDINAL)
#endif /* U_HIDE_DRAFT_API */
enum { enum {
/** /**

View File

@ -1,7 +1,7 @@
/* /*
******************************************************************************* *******************************************************************************
* *
* Copyright (C) 2002-2012, International Business Machines * Copyright (C) 2002-2013, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
******************************************************************************* *******************************************************************************
@ -171,7 +171,6 @@ uenum_openFromStringEnumeration(icu::StringEnumeration* adopted, UErrorCode* ec)
#endif #endif
#ifndef U_HIDE_DRAFT_API
/** /**
* Given an array of const UChar* strings, return a UEnumeration. String pointers from 0..count-1 must not be null. * Given an array of const UChar* strings, return a UEnumeration. String pointers from 0..count-1 must not be null.
* Do not free or modify either the string array or the characters it points to until this object has been destroyed with uenum_close. * Do not free or modify either the string array or the characters it points to until this object has been destroyed with uenum_close.
@ -181,12 +180,11 @@ uenum_openFromStringEnumeration(icu::StringEnumeration* adopted, UErrorCode* ec)
* @param ec error code * @param ec error code
* @return the new UEnumeration object. Caller is responsible for calling uenum_close to free memory. * @return the new UEnumeration object. Caller is responsible for calling uenum_close to free memory.
* @see uenum_close * @see uenum_close
* @draft ICU 50 * @stable ICU 50
*/ */
U_DRAFT UEnumeration* U_EXPORT2 U_STABLE UEnumeration* U_EXPORT2
uenum_openUCharStringsEnumeration(const UChar* const strings[], int32_t count, uenum_openUCharStringsEnumeration(const UChar* const strings[], int32_t count,
UErrorCode* ec); UErrorCode* ec);
#endif
/* Note: next function is not hidden as draft, as it is used internally (it was formerly an internal function). */ /* Note: next function is not hidden as draft, as it is used internally (it was formerly an internal function). */
@ -199,11 +197,10 @@ uenum_openUCharStringsEnumeration(const UChar* const strings[], int32_t count,
* @param ec error code * @param ec error code
* @return the new UEnumeration object. Caller is responsible for calling uenum_close to free memory * @return the new UEnumeration object. Caller is responsible for calling uenum_close to free memory
* @see uenum_close * @see uenum_close
* @draft ICU 50 * @stable ICU 50
*/ */
U_DRAFT UEnumeration* U_EXPORT2 U_STABLE UEnumeration* U_EXPORT2
uenum_openCharStringsEnumeration(const char* const strings[], int32_t count, uenum_openCharStringsEnumeration(const char* const strings[], int32_t count,
UErrorCode* ec); UErrorCode* ec);
#endif #endif

View File

@ -23,7 +23,7 @@
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
// Forward Declarations. // Forward Declarations.
void UnicodeSet_initInclusion(int32_t src, UErrorCode &status); void UnicodeSet_initInclusion(int32_t src, UErrorCode &status); /**< @internal */
class BMPSet; class BMPSet;
class ParsePosition; class ParsePosition;

View File

@ -1,7 +1,7 @@
/* /*
******************************************************************************* *******************************************************************************
* *
* Copyright (C) 2003-2012, International Business Machines * Copyright (C) 2003-2013, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
******************************************************************************* *******************************************************************************
@ -86,7 +86,7 @@ typedef enum UTraceFunctionNumber {
UTRACE_UCOL_NEXTSORTKEYPART, UTRACE_UCOL_NEXTSORTKEYPART,
UTRACE_UCOL_STRCOLLITER, UTRACE_UCOL_STRCOLLITER,
UTRACE_UCOL_OPEN_FROM_SHORT_STRING, UTRACE_UCOL_OPEN_FROM_SHORT_STRING,
UTRACE_UCOL_STRCOLLUTF8, /**< @draft ICU 50 */ UTRACE_UCOL_STRCOLLUTF8, /**< @stable ICU 50 */
UTRACE_COLLATION_LIMIT UTRACE_COLLATION_LIMIT
} UTraceFunctionNumber; } UTraceFunctionNumber;

View File

@ -19,7 +19,6 @@
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#ifndef U_HIDE_DRAFT_API
#include "unicode/locid.h" #include "unicode/locid.h"
#include "unicode/ugender.h" #include "unicode/ugender.h"
@ -35,7 +34,7 @@ void GenderInfo_initCache(UErrorCode &status);
/** /**
* GenderInfo computes the gender of a list as a whole given the gender of * GenderInfo computes the gender of a list as a whole given the gender of
* each element. * each element.
* @draft ICU 50 * @stable ICU 50
*/ */
class U_I18N_API GenderInfo : public UObject { class U_I18N_API GenderInfo : public UObject {
public: public:
@ -52,7 +51,7 @@ public:
* this locale. The returned object is immutable, so it is * this locale. The returned object is immutable, so it is
* declared as const. Caller does not own the returned * declared as const. Caller does not own the returned
* pointer, so it must not attempt to free it. * pointer, so it must not attempt to free it.
* @draft ICU 50 * @stable ICU 50
*/ */
static const GenderInfo* U_EXPORT2 getInstance(const Locale& locale, UErrorCode& status); static const GenderInfo* U_EXPORT2 getInstance(const Locale& locale, UErrorCode& status);
@ -65,14 +64,14 @@ public:
* @param status Output param set to success/failure code on exit, which * @param status Output param set to success/failure code on exit, which
* must not indicate a failure before the function call. * must not indicate a failure before the function call.
* @return the gender of the whole list. * @return the gender of the whole list.
* @draft ICU 50 * @stable ICU 50
*/ */
UGender getListGender(const UGender* genders, int32_t length, UErrorCode& status) const; UGender getListGender(const UGender* genders, int32_t length, UErrorCode& status) const;
/** /**
* Destructor. * Destructor.
* *
* @draft ICU 50 * @stable ICU 50
*/ */
virtual ~GenderInfo(); virtual ~GenderInfo();
@ -106,7 +105,6 @@ private:
U_NAMESPACE_END U_NAMESPACE_END
#endif /* U_HIDE_DRAFT_API */
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif // _GENDER #endif // _GENDER

View File

@ -36,7 +36,7 @@
U_CDECL_BEGIN U_CDECL_BEGIN
// Forward declaration. // Forward declaration.
struct UHashtable; struct UHashtable;
typedef struct UHashtable UHashtable; typedef struct UHashtable UHashtable; /**< @internal */
U_CDECL_END U_CDECL_END
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN

View File

@ -193,7 +193,6 @@ public:
*/ */
PluralFormat(const Locale& locale, const PluralRules& rules, UErrorCode& status); PluralFormat(const Locale& locale, const PluralRules& rules, UErrorCode& status);
#ifndef U_HIDE_DRAFT_API
/** /**
* Creates a new <code>PluralFormat</code> for the plural type. * Creates a new <code>PluralFormat</code> for the plural type.
* The standard number formatting will be done using the given locale. * The standard number formatting will be done using the given locale.
@ -202,10 +201,9 @@ public:
* @param type The plural type (e.g., cardinal or ordinal). * @param type The plural type (e.g., cardinal or ordinal).
* @param status output param set to success/failure code on exit, which * @param status output param set to success/failure code on exit, which
* must not indicate a failure before the function call. * must not indicate a failure before the function call.
* @draft ICU 50 * @stable ICU 50
*/ */
PluralFormat(const Locale& locale, UPluralType type, UErrorCode& status); PluralFormat(const Locale& locale, UPluralType type, UErrorCode& status);
#endif /* U_HIDE_DRAFT_API */
/** /**
* Creates a new cardinal-number <code>PluralFormat</code> for a given pattern string. * Creates a new cardinal-number <code>PluralFormat</code> for a given pattern string.
@ -269,7 +267,6 @@ public:
const UnicodeString& pattern, const UnicodeString& pattern,
UErrorCode& status); UErrorCode& status);
#ifndef U_HIDE_DRAFT_API
/** /**
* Creates a new <code>PluralFormat</code> for a plural type, a * Creates a new <code>PluralFormat</code> for a plural type, a
* pattern and a locale. * pattern and a locale.
@ -281,13 +278,12 @@ public:
* errors are returned to status if the pattern is invalid. * errors are returned to status if the pattern is invalid.
* @param status output param set to success/failure code on exit, which * @param status output param set to success/failure code on exit, which
* must not indicate a failure before the function call. * must not indicate a failure before the function call.
* @draft ICU 50 * @stable ICU 50
*/ */
PluralFormat(const Locale& locale, PluralFormat(const Locale& locale,
UPluralType type, UPluralType type,
const UnicodeString& pattern, const UnicodeString& pattern,
UErrorCode& status); UErrorCode& status);
#endif /* U_HIDE_DRAFT_API */
/** /**
* copy constructor. * copy constructor.
@ -531,7 +527,7 @@ public:
private: private:
#endif #endif
/** /**
* @internal * @internal
*/ */
class U_I18N_API PluralSelector : public UMemory { class U_I18N_API PluralSelector : public UMemory {
public: public:
@ -543,6 +539,7 @@ private:
* @param number The number to be plural-formatted. * @param number The number to be plural-formatted.
* @param ec Error code. * @param ec Error code.
* @return The selected PluralFormat keyword. * @return The selected PluralFormat keyword.
* @internal
*/ */
virtual UnicodeString select(void *context, double number, UErrorCode& ec) const = 0; virtual UnicodeString select(void *context, double number, UErrorCode& ec) const = 0;
}; };
@ -557,7 +554,7 @@ private:
virtual ~PluralSelectorAdapter(); virtual ~PluralSelectorAdapter();
virtual UnicodeString select(void *context, double number, UErrorCode& /*ec*/) const; virtual UnicodeString select(void *context, double number, UErrorCode& /*ec*/) const; /**< @internal */
void reset(); void reset();
@ -585,7 +582,7 @@ private:
UnicodeString& format(const Formattable& numberObject, double number, UnicodeString& format(const Formattable& numberObject, double number,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPosition& pos, FieldPosition& pos,
UErrorCode& status) const; UErrorCode& status) const; /**< @internal */
/** /**
* Finds the PluralFormat sub-message for the given number, or the "other" sub-message. * Finds the PluralFormat sub-message for the given number, or the "other" sub-message.
@ -600,7 +597,7 @@ private:
*/ */
static int32_t findSubMessage( static int32_t findSubMessage(
const MessagePattern& pattern, int32_t partIndex, const MessagePattern& pattern, int32_t partIndex,
const PluralSelector& selector, void *context, double number, UErrorCode& ec); const PluralSelector& selector, void *context, double number, UErrorCode& ec); /**< @internal */
friend class MessageFormat; friend class MessageFormat;
}; };

View File

@ -264,7 +264,6 @@ public:
*/ */
static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UErrorCode& status); static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UErrorCode& status);
#ifndef U_HIDE_DRAFT_API
/** /**
* Provides access to the predefined <code>PluralRules</code> for a given * Provides access to the predefined <code>PluralRules</code> for a given
* locale and the plural type. * locale and the plural type.
@ -279,7 +278,7 @@ public:
* the rules for the closest parent in the locale hierarchy * the rules for the closest parent in the locale hierarchy
* that has one will be returned. The final fallback always * that has one will be returned. The final fallback always
* returns the default 'other' rules. * returns the default 'other' rules.
* @draft ICU 50 * @stable ICU 50
*/ */
static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UPluralType type, UErrorCode& status); static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UPluralType type, UErrorCode& status);
@ -298,8 +297,6 @@ public:
*/ */
static UBool hasOverride(const Locale &locale); static UBool hasOverride(const Locale &locale);
#endif /* U_HIDE_DRAFT_API */
/** /**
* Given a number, returns the keyword of the first rule that applies to * Given a number, returns the keyword of the first rule that applies to
* the number. This function can be used with isKeyword* functions to * the number. This function can be used with isKeyword* functions to
@ -321,7 +318,7 @@ public:
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
UnicodeString select(double number) const; UnicodeString select(double number) const;
/** /**
* @internal * @internal
*/ */

View File

@ -8,14 +8,13 @@
#define __TZFMT_H #define __TZFMT_H
/** /**
* \file * \file
* \brief C++ API: TimeZoneFormat * \brief C++ API: TimeZoneFormat
*/ */
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#ifndef U_HIDE_DRAFT_API
#include "unicode/format.h" #include "unicode/format.h"
#include "unicode/timezone.h" #include "unicode/timezone.h"
@ -25,37 +24,37 @@ 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.
* @draft ICU 50 * @stable ICU 50
*/ */
typedef enum UTimeZoneFormatStyle { typedef enum UTimeZoneFormatStyle {
/** /**
* Generic location format, such as "United States Time (New York)", "Italy Time" * Generic location format, such as "United States Time (New York)", "Italy Time"
* @draft ICU 50 * @stable 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".
* @draft ICU 50 * @stable 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".
* @draft ICU 50 * @stable 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".
* @draft ICU 50 * @stable ICU 50
*/ */
UTZFMT_STYLE_SPECIFIC_LONG, UTZFMT_STYLE_SPECIFIC_LONG,
/** /**
* Specific short format, such as "EST", "PDT". * Specific short format, such as "EST", "PDT".
* @draft ICU 50 * @stable ICU 50
*/ */
UTZFMT_STYLE_SPECIFIC_SHORT, UTZFMT_STYLE_SPECIFIC_SHORT,
/** /**
* Localized GMT offset format, such as "GMT-05:00", "UTC+0100" * Localized GMT offset format, such as "GMT-05:00", "UTC+0100"
* @draft ICU 50 * @stable ICU 50
*/ */
UTZFMT_STYLE_LOCALIZED_GMT, UTZFMT_STYLE_LOCALIZED_GMT,
#ifndef U_HIDE_DRAFT_API #ifndef U_HIDE_DRAFT_API
@ -155,27 +154,27 @@ typedef enum UTimeZoneFormatStyle {
/** /**
* Constants for GMT offset pattern types. * Constants for GMT offset pattern types.
* @draft ICU 50 * @stable ICU 50
*/ */
typedef enum UTimeZoneFormatGMTOffsetPatternType { typedef enum UTimeZoneFormatGMTOffsetPatternType {
/** /**
* Positive offset with hours and minutes fields * Positive offset with hours and minutes fields
* @draft ICU 50 * @stable ICU 50
*/ */
UTZFMT_PAT_POSITIVE_HM, UTZFMT_PAT_POSITIVE_HM,
/** /**
* Positive offset with hours, minutes and seconds fields * Positive offset with hours, minutes and seconds fields
* @draft ICU 50 * @stable ICU 50
*/ */
UTZFMT_PAT_POSITIVE_HMS, UTZFMT_PAT_POSITIVE_HMS,
/** /**
* Negative offset with hours and minutes fields * Negative offset with hours and minutes fields
* @draft ICU 50 * @stable ICU 50
*/ */
UTZFMT_PAT_NEGATIVE_HM, UTZFMT_PAT_NEGATIVE_HM,
/** /**
* Negative offset with hours, minutes and seconds fields * Negative offset with hours, minutes and seconds fields
* @draft ICU 50 * @stable ICU 50
*/ */
UTZFMT_PAT_NEGATIVE_HMS, UTZFMT_PAT_NEGATIVE_HMS,
#ifndef U_HIDE_DRAFT_API #ifndef U_HIDE_DRAFT_API
@ -203,41 +202,41 @@ typedef enum 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).
* @draft ICU 50 * @stable ICU 50
*/ */
typedef enum UTimeZoneFormatTimeType { typedef enum UTimeZoneFormatTimeType {
/** /**
* Unknown * Unknown
* @draft ICU 50 * @stable ICU 50
*/ */
UTZFMT_TIME_TYPE_UNKNOWN, UTZFMT_TIME_TYPE_UNKNOWN,
/** /**
* Standard time * Standard time
* @draft ICU 50 * @stable ICU 50
*/ */
UTZFMT_TIME_TYPE_STANDARD, UTZFMT_TIME_TYPE_STANDARD,
/** /**
* Daylight saving time * Daylight saving time
* @draft ICU 50 * @stable ICU 50
*/ */
UTZFMT_TIME_TYPE_DAYLIGHT UTZFMT_TIME_TYPE_DAYLIGHT
} UTimeZoneFormatTimeType; } UTimeZoneFormatTimeType;
/** /**
* Constants for parse option flags, used for specifying optional parse behavior. * Constants for parse option flags, used for specifying optional parse behavior.
* @draft ICU 50 * @stable ICU 50
*/ */
typedef enum UTimeZoneFormatParseOption { typedef enum UTimeZoneFormatParseOption {
/** /**
* No option. * No option.
* @draft ICU 50 * @stable 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 names * When a time zone display name is not found within a set of display names
* used for the specified style, look for the name from display names used * used for the specified style, look for the name from display names used
* by other styles. * by other styles.
* @draft ICU 50 * @stable ICU 50
*/ */
UTZFMT_PARSE_OPTION_ALL_STYLES = 0x01 UTZFMT_PARSE_OPTION_ALL_STYLES = 0x01
} UTimeZoneFormatParseOption; } UTimeZoneFormatParseOption;
@ -259,28 +258,28 @@ class UVector;
* Unicode Locale Data Markup Language (LDML)</a>. {@link TimeZoneNames} represents the * Unicode Locale Data Markup Language (LDML)</a>. {@link TimeZoneNames} represents the
* time zone display name data model and this class implements the algorithm for actual * time zone display name data model and this class implements the algorithm for actual
* formatting and parsing. * formatting and parsing.
* *
* @see SimpleDateFormat * @see SimpleDateFormat
* @see TimeZoneNames * @see TimeZoneNames
* @draft ICU 50 * @stable ICU 50
*/ */
class U_I18N_API TimeZoneFormat : public Format { class U_I18N_API TimeZoneFormat : public Format {
public: public:
/** /**
* Copy constructor. * Copy constructor.
* @draft ICU 50 * @stable ICU 50
*/ */
TimeZoneFormat(const TimeZoneFormat& other); TimeZoneFormat(const TimeZoneFormat& other);
/** /**
* Destructor. * Destructor.
* @draft ICU 50 * @stable ICU 50
*/ */
virtual ~TimeZoneFormat(); virtual ~TimeZoneFormat();
/** /**
* Assignment operator. * Assignment operator.
* @draft ICU 50 * @stable ICU 50
*/ */
TimeZoneFormat& operator=(const TimeZoneFormat& other); TimeZoneFormat& operator=(const TimeZoneFormat& other);
@ -290,7 +289,7 @@ public:
* @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 equal. * @return Return TRUE if the given Format objects are semantically equal.
* Objects of different subclasses are considered unequal. * Objects of different subclasses are considered unequal.
* @draft ICU 50 * @stable ICU 50
*/ */
virtual UBool operator==(const Format& other) const; virtual UBool operator==(const Format& other) const;
@ -298,7 +297,7 @@ public:
* 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
* @draft ICU 50 * @stable ICU 50
*/ */
virtual Format* clone() const; virtual Format* clone() const;
@ -308,14 +307,14 @@ public:
* @param status Recevies the status. * @param status Recevies the status.
* @return An instance of <code>TimeZoneFormat</code> for the given locale, * @return An instance of <code>TimeZoneFormat</code> for the given locale,
* owned by the caller. * owned by the caller.
* @draft ICU 50 * @stable ICU 50
*/ */
static TimeZoneFormat* U_EXPORT2 createInstance(const Locale& locale, UErrorCode& status); static TimeZoneFormat* U_EXPORT2 createInstance(const Locale& locale, UErrorCode& 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.
* @draft ICU 50 * @stable ICU 50
*/ */
const TimeZoneNames* getTimeZoneNames() const; const TimeZoneNames* getTimeZoneNames() const;
@ -324,14 +323,14 @@ public:
* The caller should not delete the TimeZoenNames object after it is adopted * The caller should not delete the TimeZoenNames object after it is adopted
* by this call. * by this call.
* @param tznames TimeZoneNames object to be adopted. * @param tznames TimeZoneNames object to be adopted.
* @draft ICU 50 * @stable 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.
* @draft ICU 50 * @stable ICU 50
*/ */
void setTimeZoneNames(const TimeZoneNames &tznames); void setTimeZoneNames(const TimeZoneNames &tznames);
@ -340,7 +339,7 @@ public:
* @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
* @draft ICU 50 * @stable ICU 50
*/ */
UnicodeString& getGMTPattern(UnicodeString& pattern) const; UnicodeString& getGMTPattern(UnicodeString& pattern) const;
@ -350,7 +349,7 @@ public:
* @param pattern The localized GMT format pattern to be used by this object. * @param pattern The localized GMT format pattern to be used by this object.
* @param status Recieves the status. * @param status Recieves the status.
* @see #getGMTPattern * @see #getGMTPattern
* @draft ICU 50 * @stable ICU 50
*/ */
void setGMTPattern(const UnicodeString& pattern, UErrorCode& status); void setGMTPattern(const UnicodeString& pattern, UErrorCode& status);
@ -360,7 +359,7 @@ public:
* @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
* @draft ICU 50 * @stable ICU 50
*/ */
UnicodeString& getGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType type, UnicodeString& pattern) const; UnicodeString& getGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType type, UnicodeString& pattern) const;
@ -370,7 +369,7 @@ public:
* @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
* @draft ICU 50 * @stable ICU 50
*/ */
void setGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType type, const UnicodeString& pattern, UErrorCode& status); void setGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType type, const UnicodeString& pattern, UErrorCode& status);
@ -381,7 +380,7 @@ public:
* order. * order.
* @param digits Receives the decimal digits used for localized GMT format. * @param digits Receives the decimal digits used for localized GMT format.
* @see #setGMTOffsetDigits * @see #setGMTOffsetDigits
* @draft ICU 50 * @stable ICU 50
*/ */
UnicodeString& getGMTOffsetDigits(UnicodeString& digits) const; UnicodeString& getGMTOffsetDigits(UnicodeString& digits) const;
@ -395,7 +394,7 @@ public:
* @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 * @stable ICU 50
*/ */
void setGMTOffsetDigits(const UnicodeString& digits, UErrorCode& status); void setGMTOffsetDigits(const UnicodeString& digits, UErrorCode& status);
@ -404,7 +403,7 @@ public:
* @param gmtZeroFormat Receives the localized GMT string string for GMT(UTC) itself. * @param gmtZeroFormat Receives the localized GMT string string for GMT(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 * @stable ICU 50
*/ */
UnicodeString& getGMTZeroFormat(UnicodeString& gmtZeroFormat) const; UnicodeString& getGMTZeroFormat(UnicodeString& gmtZeroFormat) const;
@ -413,7 +412,7 @@ public:
* @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 * @stable ICU 50
*/ */
void setGMTZeroFormat(const UnicodeString& gmtZeroFormat, UErrorCode& status); void setGMTZeroFormat(const UnicodeString& gmtZeroFormat, UErrorCode& status);
@ -422,7 +421,7 @@ public:
* options used by this object. * options used by this object.
* @return the default parse options. * @return the default parse options.
* @see ParseOption * @see ParseOption
* @draft ICU 50 * @stable ICU 50
*/ */
uint32_t getDefaultParseOptions(void) const; uint32_t getDefaultParseOptions(void) const;
@ -432,7 +431,7 @@ public:
* 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 UTimeZoneFormatParseOption. * To specify multipe options, use bitwise flags of UTimeZoneFormatParseOption.
* @see #UTimeZoneFormatParseOption * @see #UTimeZoneFormatParseOption
* @draft ICU 50 * @stable ICU 50
*/ */
void setDefaultParseOptions(uint32_t flags); void setDefaultParseOptions(uint32_t flags);
@ -440,7 +439,7 @@ public:
/** /**
* Returns the ISO 8601 basic time zone string for the given offset. * Returns the ISO 8601 basic time zone string for the given offset.
* For example, "-08", "-0830" and "Z" * For example, "-08", "-0830" and "Z"
* *
* @param offset the offset from GMT(UTC) in milliseconds. * @param offset the offset from GMT(UTC) in milliseconds.
* @param useUtcIndicator true if ISO 8601 UTC indicator "Z" is used when the offset is 0. * @param useUtcIndicator true if ISO 8601 UTC indicator "Z" is used when the offset is 0.
* @param isShort true if shortest form is used. * @param isShort true if shortest form is used.
@ -458,7 +457,7 @@ public:
/** /**
* Returns the ISO 8601 extended time zone string for the given offset. * Returns the ISO 8601 extended time zone string for the given offset.
* For example, "-08:00", "-08:30" and "Z" * For example, "-08:00", "-08:30" and "Z"
* *
* @param offset the offset from GMT(UTC) in milliseconds. * @param offset the offset from GMT(UTC) in milliseconds.
* @param useUtcIndicator true if ISO 8601 UTC indicator "Z" is used when the offset is 0. * @param useUtcIndicator true if ISO 8601 UTC indicator "Z" is used when the offset is 0.
* @param isShort true if shortest form is used. * @param isShort true if shortest form is used.
@ -491,7 +490,7 @@ public:
* @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
* @draft ICU 50 * @stable ICU 50
*/ */
UnicodeString& formatOffsetLocalizedGMT(int32_t offset, UnicodeString& result, UErrorCode& status) const; UnicodeString& formatOffsetLocalizedGMT(int32_t offset, UnicodeString& result, UErrorCode& status) const;
@ -531,7 +530,7 @@ public:
* @return A reference to the result * @return A reference to the result
* @see #UTimeZoneFormatStyle * @see #UTimeZoneFormatStyle
* @see #UTimeZoneFormatTimeType * @see #UTimeZoneFormatTimeType
* @draft ICU 50 * @stable ICU 50
*/ */
virtual UnicodeString& format(UTimeZoneFormatStyle style, const TimeZone& tz, UDate date, virtual UnicodeString& format(UTimeZoneFormatStyle style, const TimeZone& tz, UDate date,
UnicodeString& name, UTimeZoneFormatTimeType* timeType = NULL) const; UnicodeString& name, UTimeZoneFormatTimeType* timeType = NULL) const;
@ -548,7 +547,7 @@ public:
* time zone string. * time zone string.
* @see #formatOffsetISO8601Basic * @see #formatOffsetISO8601Basic
* @see #formatOffsetISO8601Extended * @see #formatOffsetISO8601Extended
* @draft ICU 50 * @stable ICU 50
*/ */
int32_t parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos) const; int32_t parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos) const;
@ -562,7 +561,7 @@ public:
* @return The offset from GMT(UTC) in milliseconds for the given localized GMT * @return The offset from GMT(UTC) in milliseconds for the given localized GMT
* offset format string. * offset format string.
* @see #formatOffsetLocalizedGMT * @see #formatOffsetLocalizedGMT
* @draft ICU 50 * @stable ICU 50
*/ */
int32_t parseOffsetLocalizedGMT(const UnicodeString& text, ParsePosition& pos) const; int32_t parseOffsetLocalizedGMT(const UnicodeString& text, ParsePosition& pos) const;
@ -585,7 +584,7 @@ public:
/** /**
* Returns a <code>TimeZone</code> by parsing the time zone string according to * Returns a <code>TimeZone</code> by parsing the time zone string according to
* the given parse position, the specified format style and parse options. * the given parse position, the specified format style and 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.
@ -596,7 +595,7 @@ public:
* @see UTimeZoneFormatStyle * @see UTimeZoneFormatStyle
* @see UTimeZoneFormatParseOption * @see UTimeZoneFormatParseOption
* @see UTimeZoneFormatTimeType * @see UTimeZoneFormatTimeType
* @draft ICU 50 * @stable 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) const; int32_t parseOptions, UTimeZoneFormatTimeType* timeType = NULL) const;
@ -604,7 +603,7 @@ public:
/** /**
* Returns a <code>TimeZone</code> by parsing the time zone string according to * Returns a <code>TimeZone</code> by parsing the time zone string according 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.
@ -614,7 +613,7 @@ public:
* @see UTimeZoneFormatStyle * @see UTimeZoneFormatStyle
* @see UTimeZoneFormatParseOption * @see UTimeZoneFormatParseOption
* @see UTimeZoneFormatTimeType * @see UTimeZoneFormatTimeType
* @draft ICU 50 * @stable 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;
@ -632,7 +631,7 @@ public:
* @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.
* @draft ICU 50 * @stable ICU 50
*/ */
virtual UnicodeString& format(const Formattable& obj, UnicodeString& appendTo, virtual UnicodeString& format(const Formattable& obj, UnicodeString& appendTo,
FieldPosition& pos, UErrorCode& status) const; FieldPosition& pos, UErrorCode& status) const;
@ -647,19 +646,19 @@ public:
* will remain unchanged. * will remain unchanged.
* @return A newly created Formattable* object, or NULL on failure. The caller owns this and should * @return A newly created Formattable* object, or NULL on failure. The caller owns this and should
* delete it when done. * delete it when done.
* @draft ICU 50 * @stable ICU 50
*/ */
virtual void parseObject(const UnicodeString& source, Formattable& result, ParsePosition& parse_pos) const; virtual void parseObject(const UnicodeString& source, Formattable& result, 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.
* @draft ICU 50 * @stable 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.
* @draft ICU 50 * @stable ICU 50
*/ */
virtual UClassID getDynamicClassID() const; virtual UClassID getDynamicClassID() const;
@ -668,7 +667,7 @@ 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.
* @draft ICU 50 * @stable ICU 50
*/ */
TimeZoneFormat(const Locale& locale, UErrorCode& status); TimeZoneFormat(const Locale& locale, UErrorCode& status);
@ -676,7 +675,7 @@ private:
/* 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 */
@ -940,7 +939,7 @@ private:
* Reads an offset field value. This method will stop parsing when * Reads an offset field value. This method will stop parsing when
* 1) number of digits reaches <code>maxDigits</code> * 1) number of digits reaches <code>maxDigits</code>
* 2) just before already parsed number exceeds <code>maxVal</code> * 2) just before already parsed number exceeds <code>maxVal</code>
* *
* @param text the text * @param text the text
* @param start the start offset * @param start the start offset
* @param minDigits the minimum number of required digits * @param minDigits the minimum number of required digits
@ -1084,7 +1083,5 @@ private:
U_NAMESPACE_END U_NAMESPACE_END
#endif /* ndef U_HIDE_DRAFT_API */
#endif /* !UCONFIG_NO_FORMATTING */ #endif /* !UCONFIG_NO_FORMATTING */
#endif #endif

View File

@ -8,13 +8,12 @@
#define __TZNAMES_H #define __TZNAMES_H
/** /**
* \file * \file
* \brief C++ API: TimeZoneNames * \brief C++ API: TimeZoneNames
*/ */
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#ifndef U_HIDE_DRAFT_API
#include "unicode/uloc.h" #include "unicode/uloc.h"
#include "unicode/unistr.h" #include "unicode/unistr.h"
@ -23,42 +22,42 @@ U_CDECL_BEGIN
/** /**
* Constants for time zone display name types. * Constants for time zone display name types.
* @draft ICU 50 * @stable ICU 50
*/ */
typedef enum UTimeZoneNameType { typedef enum UTimeZoneNameType {
/** /**
* Unknown display name type. * Unknown display name type.
* @draft ICU 50 * @stable ICU 50
*/ */
UTZNM_UNKNOWN = 0x00, UTZNM_UNKNOWN = 0x00,
/** /**
* Long display name, such as "Eastern Time". * Long display name, such as "Eastern Time".
* @draft ICU 50 * @stable 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".
* @draft ICU 50 * @stable ICU 50
*/ */
UTZNM_LONG_STANDARD = 0x02, UTZNM_LONG_STANDARD = 0x02,
/** /**
* Long display name for daylight saving time, such as "Eastern Daylight Time". * Long display name for daylight saving time, such as "Eastern Daylight Time".
* @draft ICU 50 * @stable ICU 50
*/ */
UTZNM_LONG_DAYLIGHT = 0x04, UTZNM_LONG_DAYLIGHT = 0x04,
/** /**
* Short display name, such as "ET". * Short display name, such as "ET".
* @draft ICU 50 * @stable 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".
* @draft ICU 50 * @stable 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".
* @draft ICU 50 * @stable ICU 50
*/ */
UTZNM_SHORT_DAYLIGHT = 0x20, UTZNM_SHORT_DAYLIGHT = 0x20,
#ifndef U_HIDE_DRAFT_API #ifndef U_HIDE_DRAFT_API
@ -96,14 +95,14 @@ struct MatchInfo;
* Sometimes, a time zone is mapped to a different time zone in the past. For example, "America/Indiana/Knox" * Sometimes, a time zone is mapped to a different time zone in the past. For example, "America/Indiana/Knox"
* had been moving "Eastern Time" and "Central Time" back and forth. Therefore, it is necessary that time zone * had been moving "Eastern Time" and "Central Time" back and forth. Therefore, it is necessary that time zone
* to meta zones mapping data are stored by date range. * to meta zones mapping data are stored by date range.
* *
* <p><b>Note:</b> * <p><b>Note:</b>
* The methods in this class assume that time zone IDs are already canonicalized. For example, you may not get proper * The methods in this class assume that time zone IDs are already canonicalized. For example, you may not get proper
* result returned by a method with time zone ID "America/Indiana/Indianapolis", because it's not a canonical time zone * result returned by a method with time zone ID "America/Indiana/Indianapolis", because it's not a canonical time zone
* ID (the canonical time zone ID for the time zone is "America/Indianapolis". See * ID (the canonical time zone ID for the time zone is "America/Indianapolis". See
* {@link TimeZone#getCanonicalID(const UnicodeString& id, UnicodeString& canonicalID, UErrorCode& status)} about ICU * {@link TimeZone#getCanonicalID(const UnicodeString& id, UnicodeString& canonicalID, UErrorCode& status)} about ICU
* canonical time zone IDs. * canonical time zone IDs.
* *
* <p> * <p>
* In CLDR, most of time zone display names except location names are provided through meta zones. But a time zone may * In CLDR, most of time zone display names except location names are provided through meta zones. But a time zone may
* have a specific name that is not shared with other time zones. * have a specific name that is not shared with other time zones.
@ -111,13 +110,13 @@ struct MatchInfo;
* For example, time zone "Europe/London" has English long name for standard time "Greenwich Mean Time", which is also * For example, time zone "Europe/London" has English long name for standard 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 used by a single time zone. * {@link #getTimeZoneDisplayName} is designed for accessing a name only used 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.
* *
* <p> * <p>
* The default <code>TimeZoneNames</code> implementation returned by {@link #createInstance} * The default <code>TimeZoneNames</code> implementation returned by {@link #createInstance}
* uses the locale data imported from CLDR. In CLDR, set of meta zone IDs and mappings between zone IDs and meta zone * uses the locale data imported from CLDR. In CLDR, set of meta zone IDs and mappings between zone IDs and meta zone
@ -125,13 +124,13 @@ struct MatchInfo;
* {@link #getMetaZoneID}, and {@link #getReferenceZoneID} won't be changed no matter * {@link #getMetaZoneID}, and {@link #getReferenceZoneID} won't be changed no matter
* what locale is used for getting an instance of <code>TimeZoneNames</code>. * what locale is used for getting an instance of <code>TimeZoneNames</code>.
* *
* @draft ICU 50 * @stable ICU 50
*/ */
class U_I18N_API TimeZoneNames : public UObject { class U_I18N_API TimeZoneNames : public UObject {
public: public:
/** /**
* Destructor. * Destructor.
* @draft ICU 50 * @stable ICU 50
*/ */
virtual ~TimeZoneNames(); virtual ~TimeZoneNames();
@ -139,7 +138,7 @@ public:
* 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 equal. * @return Return TRUE if the given Format objects are semantically equal.
* @draft ICU 50 * @stable ICU 50
*/ */
virtual UBool operator==(const TimeZoneNames& other) const = 0; virtual UBool operator==(const TimeZoneNames& other) const = 0;
@ -148,7 +147,7 @@ public:
* 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.
* @draft ICU 50 * @stable ICU 50
*/ */
UBool operator!=(const TimeZoneNames& other) const { return !operator==(other); } UBool operator!=(const TimeZoneNames& other) const { return !operator==(other); }
@ -156,17 +155,17 @@ public:
* 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
* @draft ICU 50 * @stable ICU 50
*/ */
virtual TimeZoneNames* clone() const = 0; virtual TimeZoneNames* clone() const = 0;
/** /**
* Returns an instance of <code>TimeZoneDisplayNames</code> for the specified locale. * Returns an instance of <code>TimeZoneDisplayNames</code> for the specified 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>
* @draft ICU 50 * @stable ICU 50
*/ */
static TimeZoneNames* U_EXPORT2 createInstance(const Locale& locale, UErrorCode& status); static TimeZoneNames* U_EXPORT2 createInstance(const Locale& locale, UErrorCode& status);
@ -174,7 +173,7 @@ public:
* 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.
* @draft ICU 50 * @stable ICU 50
*/ */
virtual StringEnumeration* getAvailableMetaZoneIDs(UErrorCode& status) const = 0; virtual StringEnumeration* getAvailableMetaZoneIDs(UErrorCode& status) const = 0;
@ -183,7 +182,7 @@ public:
* @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.
* @draft ICU 50 * @stable ICU 50
*/ */
virtual StringEnumeration* getAvailableMetaZoneIDs(const UnicodeString& tzID, UErrorCode& status) const = 0; virtual StringEnumeration* getAvailableMetaZoneIDs(const UnicodeString& tzID, UErrorCode& status) const = 0;
@ -195,7 +194,7 @@ public:
* corresponding meta zone at the given date or the implementation does not support meta zones, "bogus" state * corresponding meta zone at the given date or the implementation does not support meta zones, "bogus" state
* is set. * is set.
* @return A reference to the result. * @return A reference to the result.
* @draft ICU 50 * @stable ICU 50
*/ */
virtual UnicodeString& getMetaZoneID(const UnicodeString& tzID, UDate date, UnicodeString& mzID) const = 0; virtual UnicodeString& getMetaZoneID(const UnicodeString& tzID, UDate date, UnicodeString& mzID) const = 0;
@ -213,7 +212,7 @@ public:
* region. If the meta zone is unknown or the implementation does not support meta zones, "bogus" state * region. If the meta zone is unknown or the implementation does not support meta zones, "bogus" state
* is set. * is set.
* @return A reference to the result. * @return A reference to the result.
* @draft ICU 50 * @stable ICU 50
*/ */
virtual UnicodeString& getReferenceZoneID(const UnicodeString& mzID, const char* region, UnicodeString& tzID) const = 0; virtual UnicodeString& getReferenceZoneID(const UnicodeString& mzID, const char* region, UnicodeString& tzID) const = 0;
@ -225,7 +224,7 @@ public:
* 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.
* @draft ICU 50 * @stable 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;
@ -237,7 +236,7 @@ public:
* @param name Receives the display name for the time zone. When this object does not have a localized display name for the given * @param name Receives the display name for the time zone. When this object 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.
* @draft ICU 50 * @stable 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;
@ -253,12 +252,12 @@ public:
* </ol> * </ol>
* For example, "New York" is returned for the time zone ID "America/New_York" when this object does not have the * For example, "New York" is returned for the time zone ID "America/New_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 zone, or "bogus" state is set when a localized * @param name Receives the exemplar location name for the given time zone, or "bogus" state is set when a localized
* location name is not available and the fallback logic described above cannot extract location from the ID. * location name is not available and the fallback logic described above cannot extract location from the ID.
* @return A reference to the result. * @return A reference to the result.
* @draft ICU 50 * @stable ICU 50
*/ */
virtual UnicodeString& getExemplarLocationName(const UnicodeString& tzID, UnicodeString& name) const; virtual UnicodeString& getExemplarLocationName(const UnicodeString& tzID, UnicodeString& name) const;
@ -268,14 +267,14 @@ public:
* <b>Note:</b> This method calls the subclass's {@link #getTimeZoneDisplayName} first. When the * <b>Note:</b> This method calls the subclass's {@link #getTimeZoneDisplayName} 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, "bogus" state is set. * name for the time zone with the specified type and date, "bogus" state is set.
* @return A reference to the result. * @return A reference to the result.
* @draft ICU 50 * @stable ICU 50
*/ */
virtual UnicodeString& getDisplayName(const UnicodeString& tzID, UTimeZoneNameType type, UDate date, UnicodeString& name) const; virtual UnicodeString& getDisplayName(const UnicodeString& tzID, UTimeZoneNameType type, UDate date, UnicodeString& name) const;
@ -389,6 +388,5 @@ public:
U_NAMESPACE_END U_NAMESPACE_END
#endif /* U_HIDE_DRAFT_API */
#endif #endif
#endif #endif

View File

@ -1445,40 +1445,38 @@ ucal_getFieldDifference(UCalendar* cal,
UCalendarDateFields field, UCalendarDateFields field,
UErrorCode* status); UErrorCode* status);
#ifndef U_HIDE_DRAFT_API
/** /**
* Time zone transition types for ucal_getTimeZoneTransitionDate * Time zone transition types for ucal_getTimeZoneTransitionDate
* @draft ICU 50 * @stable ICU 50
*/ */
enum UTimeZoneTransitionType { enum UTimeZoneTransitionType {
/** /**
* Get the next transition after the current date, * Get the next transition after the current date,
* i.e. excludes the current date * i.e. excludes the current date
* @draft ICU 50 * @stable ICU 50
*/ */
UCAL_TZ_TRANSITION_NEXT, UCAL_TZ_TRANSITION_NEXT,
/** /**
* Get the next transition on or after the current date, * Get the next transition on or after the current date,
* i.e. may include the current date * i.e. may include the current date
* @draft ICU 50 * @stable ICU 50
*/ */
UCAL_TZ_TRANSITION_NEXT_INCLUSIVE, UCAL_TZ_TRANSITION_NEXT_INCLUSIVE,
/** /**
* Get the previous transition before the current date, * Get the previous transition before the current date,
* i.e. excludes the current date * i.e. excludes the current date
* @draft ICU 50 * @stable ICU 50
*/ */
UCAL_TZ_TRANSITION_PREVIOUS, UCAL_TZ_TRANSITION_PREVIOUS,
/** /**
* Get the previous transition on or before the current date, * Get the previous transition on or before the current date,
* i.e. may include the current date * i.e. may include the current date
* @draft ICU 50 * @stable ICU 50
*/ */
UCAL_TZ_TRANSITION_PREVIOUS_INCLUSIVE UCAL_TZ_TRANSITION_PREVIOUS_INCLUSIVE
}; };
/** @draft ICU 50 */ typedef enum UTimeZoneTransitionType UTimeZoneTransitionType; /**< @stable ICU 50 */
typedef enum UTimeZoneTransitionType UTimeZoneTransitionType;
/** /**
* Get the UDate for the next/previous time zone transition relative to * Get the UDate for the next/previous time zone transition relative to
@ -1493,14 +1491,12 @@ typedef enum UTimeZoneTransitionType UTimeZoneTransitionType;
* @param status A pointer to a UErrorCode to receive any errors. * @param status A pointer to a UErrorCode to receive any errors.
* @return TRUE if a valid transition time is set in *transition, FALSE * @return TRUE if a valid transition time is set in *transition, FALSE
* otherwise. * otherwise.
* @draft ICU 50 * @stable ICU 50
*/ */
U_DRAFT UBool U_EXPORT2 U_DRAFT UBool U_EXPORT2
ucal_getTimeZoneTransitionDate(const UCalendar* cal, UTimeZoneTransitionType type, ucal_getTimeZoneTransitionDate(const UCalendar* cal, UTimeZoneTransitionType type,
UDate* transition, UErrorCode* status); UDate* transition, UErrorCode* status);
#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_DRAFT_API #ifndef U_HIDE_DRAFT_API
/** /**
* Converts a system time zone ID to an equivalent Windows time zone ID. For example, * Converts a system time zone ID to an equivalent Windows time zone ID. For example,

View File

@ -533,7 +533,6 @@ ucol_strcoll( const UCollator *coll,
const UChar *target, const UChar *target,
int32_t targetLength); int32_t targetLength);
#ifndef U_HIDE_DRAFT_API
/** /**
* Compare two strings in UTF-8. * Compare two strings in UTF-8.
* The strings will be compared using the options already specified. * The strings will be compared using the options already specified.
@ -550,9 +549,9 @@ ucol_strcoll( const UCollator *coll,
* @see ucol_greater * @see ucol_greater
* @see ucol_greaterOrEqual * @see ucol_greaterOrEqual
* @see ucol_equal * @see ucol_equal
* @draft ICU 50 * @stable ICU 50
*/ */
U_DRAFT UCollationResult U_EXPORT2 U_STABLE UCollationResult U_EXPORT2
ucol_strcollUTF8( ucol_strcollUTF8(
const UCollator *coll, const UCollator *coll,
const char *source, const char *source,
@ -560,7 +559,6 @@ ucol_strcollUTF8(
const char *target, const char *target,
int32_t targetLength, int32_t targetLength,
UErrorCode *status); UErrorCode *status);
#endif /* U_HIDE_DRAFT_API */
/** /**
* Determine if one string is greater than another. * Determine if one string is greater than another.

View File

@ -169,17 +169,15 @@ typedef enum UDateFormatStyle {
/** No style */ /** No style */
UDAT_NONE = -1, UDAT_NONE = -1,
#ifndef U_HIDE_DRAFT_API
/** /**
* Use the pattern given in the parameter to udat_open * Use the pattern given in the parameter to udat_open
* @see udat_open * @see udat_open
* @draft ICU 50 * @stable ICU 50
*/ */
UDAT_PATTERN = -2, UDAT_PATTERN = -2,
/** @internal alias to UDAT_PATTERN */ /** @internal alias to UDAT_PATTERN */
UDAT_IGNORE = UDAT_PATTERN UDAT_IGNORE = UDAT_PATTERN
#endif /* U_HIDE_DRAFT_API */
} UDateFormatStyle; } UDateFormatStyle;
/* Skeletons for dates. */ /* Skeletons for dates. */

View File

@ -16,7 +16,9 @@
/** /**
* \file * \file
* \brief C API: Display context types (enum values) * \brief C API: Display context types (enum values)
* */
/**
* Display context types, for getting values of a particular setting. * Display context types, for getting values of a particular setting.
* Note, the specific numeric values are internal and may change. * Note, the specific numeric values are internal and may change.
* @draft ICU 51 * @draft ICU 51

View File

@ -11,7 +11,6 @@
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#ifndef U_HIDE_DRAFT_API
#include "unicode/localpointer.h" #include "unicode/localpointer.h"
@ -24,33 +23,33 @@
/** /**
* Genders * Genders
* @draft ICU 50 * @stable ICU 50
*/ */
enum UGender { enum UGender {
/** /**
* Male gender. * Male gender.
* @draft ICU 50 * @stable ICU 50
*/ */
UGENDER_MALE, UGENDER_MALE,
/** /**
* Female gender. * Female gender.
* @draft ICU 50 * @stable ICU 50
*/ */
UGENDER_FEMALE, UGENDER_FEMALE,
/** /**
* Neutral gender. * Neutral gender.
* @draft ICU 50 * @stable ICU 50
*/ */
UGENDER_OTHER UGENDER_OTHER
}; };
/** /**
* @draft ICU 50 * @stable ICU 50
*/ */
typedef enum UGender UGender; typedef enum UGender UGender;
/** /**
* Opaque UGenderInfo object for use in C programs. * Opaque UGenderInfo object for use in C programs.
* @draft ICU 50 * @stable ICU 50
*/ */
struct UGenderInfo; struct UGenderInfo;
typedef struct UGenderInfo UGenderInfo; typedef struct UGenderInfo UGenderInfo;
@ -58,10 +57,11 @@ typedef struct UGenderInfo UGenderInfo;
/** /**
* Opens a new UGenderInfo object given locale. * Opens a new UGenderInfo object given locale.
* @param locale The locale for which the rules are desired. * @param locale The locale for which the rules are desired.
* @param status UErrorCode pointer
* @return A UGenderInfo for the specified locale, or NULL if an error occurred. * @return A UGenderInfo for the specified locale, or NULL if an error occurred.
* @draft ICU 50 * @stable ICU 50
*/ */
U_DRAFT const UGenderInfo* U_EXPORT2 U_STABLE const UGenderInfo* U_EXPORT2
ugender_getInstance(const char *locale, UErrorCode *status); ugender_getInstance(const char *locale, UErrorCode *status);
@ -72,12 +72,11 @@ ugender_getInstance(const char *locale, UErrorCode *status);
* @param size the size of the list. * @param size the size of the list.
* @param status A pointer to a UErrorCode to receive any errors. * @param status A pointer to a UErrorCode to receive any errors.
* @return The gender of the list. * @return The gender of the list.
* @draft ICU 50 * @stable ICU 50
*/ */
U_DRAFT UGender U_EXPORT2 U_STABLE UGender U_EXPORT2
ugender_getListGender(const UGenderInfo* genderinfo, const UGender *genders, int32_t size, UErrorCode *status); ugender_getListGender(const UGenderInfo* genderinfo, const UGender *genders, int32_t size, UErrorCode *status);
#endif /* U_HIDE_DRAFT_API */
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif #endif

View File

@ -891,21 +891,19 @@ typedef enum UNumberFormatAttribute {
UNUM_MAX_NONBOOLEAN_ATTRIBUTE = 0x0FFF, UNUM_MAX_NONBOOLEAN_ATTRIBUTE = 0x0FFF,
#endif /* U_HIDE_INTERNAL_API */ #endif /* U_HIDE_INTERNAL_API */
#ifndef U_HIDE_DRAFT_API
/** If 1, specifies that if setting the "max integer digits" attribute would truncate a value, set an error status rather than silently truncating. /** If 1, specifies that if setting the "max integer digits" attribute would truncate a value, set an error status rather than silently truncating.
* For example, formatting the value 1234 with 4 max int digits would succeed, but formatting 12345 would fail. There is no effect on parsing. * For example, formatting the value 1234 with 4 max int digits would succeed, but formatting 12345 would fail. There is no effect on parsing.
* Default: 0 (not set) * Default: 0 (not set)
* @draft ICU 50 * @stable ICU 50
*/ */
UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS = 0x1000, UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS = 0x1000,
/** /**
* 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 contain an exponent, this attribute has no effect. * 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 contain an exponent, this attribute has no effect.
* Has no effect on formatting. * Has no effect on formatting.
* Default: 0 (unset) * Default: 0 (unset)
* @draft ICU 50 * @stable ICU 50
*/ */
UNUM_PARSE_NO_EXPONENT, UNUM_PARSE_NO_EXPONENT,
#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_INTERNAL_API #ifndef U_HIDE_INTERNAL_API
/** Limit of boolean attributes. /** Limit of boolean attributes.

View File

@ -37,33 +37,31 @@
* http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
*/ */
#ifndef U_HIDE_DRAFT_API
/** /**
* Type of plurals and PluralRules. * Type of plurals and PluralRules.
* @draft ICU 50 * @stable ICU 50
*/ */
enum UPluralType { enum UPluralType {
/** /**
* Plural rules for cardinal numbers: 1 file vs. 2 files. * Plural rules for cardinal numbers: 1 file vs. 2 files.
* @draft ICU 50 * @stable ICU 50
*/ */
UPLURAL_TYPE_CARDINAL, UPLURAL_TYPE_CARDINAL,
/** /**
* Plural rules for ordinal numbers: 1st file, 2nd file, 3rd file, 4th file, etc. * Plural rules for ordinal numbers: 1st file, 2nd file, 3rd file, 4th file, etc.
* @draft ICU 50 * @stable ICU 50
*/ */
UPLURAL_TYPE_ORDINAL, UPLURAL_TYPE_ORDINAL,
/** /**
* Number of Plural rules types. * Number of Plural rules types.
* @draft ICU 50 * @stable ICU 50
*/ */
UPLURAL_TYPE_COUNT UPLURAL_TYPE_COUNT
}; };
/** /**
* @draft ICU 50 * @stable ICU 50
*/ */
typedef enum UPluralType UPluralType; typedef enum UPluralType UPluralType;
#endif /* U_HIDE_DRAFT_API */
/** /**
* Opaque UPluralRules object for use in C programs. * Opaque UPluralRules object for use in C programs.
@ -84,7 +82,6 @@ typedef struct UPluralRules UPluralRules; /**< C typedef for struct UPluralRule
U_STABLE UPluralRules* U_EXPORT2 U_STABLE UPluralRules* U_EXPORT2
uplrules_open(const char *locale, UErrorCode *status); uplrules_open(const char *locale, UErrorCode *status);
#ifndef U_HIDE_DRAFT_API
/** /**
* Opens a new UPluralRules object using the predefined plural rules for a * Opens a new UPluralRules object using the predefined plural rules for a
* given locale and the plural type. * given locale and the plural type.
@ -92,11 +89,10 @@ uplrules_open(const char *locale, UErrorCode *status);
* @param type The plural type (e.g., cardinal or ordinal). * @param type The plural type (e.g., cardinal or ordinal).
* @param status A pointer to a UErrorCode to receive any errors. * @param status A pointer to a UErrorCode to receive any errors.
* @return A UPluralRules for the specified locale, or NULL if an error occurred. * @return A UPluralRules for the specified locale, or NULL if an error occurred.
* @draft ICU 50 * @stable ICU 50
*/ */
U_DRAFT UPluralRules* U_EXPORT2 U_DRAFT UPluralRules* U_EXPORT2
uplrules_openForType(const char *locale, UPluralType type, UErrorCode *status); uplrules_openForType(const char *locale, UPluralType type, UErrorCode *status);
#endif /* U_HIDE_DRAFT_API */
/** /**
* Closes a UPluralRules object. Once closed it may no longer be used. * Closes a UPluralRules object. Once closed it may no longer be used.

View File

@ -123,7 +123,7 @@ typedef enum URegionType {
* @draft ICU 52 * @draft ICU 52
*/ */
struct URegion; struct URegion;
typedef struct URegion URegion; typedef struct URegion URegion; /**< @draft ICU 52 */
/** /**
* Returns a pointer to a URegion for the specified region code: A 2-letter or 3-letter ISO 3166 * Returns a pointer to a URegion for the specified region code: A 2-letter or 3-letter ISO 3166

View File

@ -826,9 +826,9 @@ uspoof_areConfusableUTF8(const USpoofChecker *sc,
* USpoofChecker. * USpoofChecker.
* *
* @param sc The USpoofChecker * @param sc The USpoofChecker
* @param id1 The first of the two identifiers to be compared for * @param s1 The first of the two identifiers to be compared for
* confusability. The strings are in UTF-8 format. * confusability. The strings are in UTF-8 format.
* @param id2 The second of the two identifiers to be compared for * @param s2 The second of the two identifiers to be compared for
* confusability. The strings are in UTF-8 format. * confusability. The strings are in UTF-8 format.
* @param status The error code, set if an error occurred while attempting to * @param status The error code, set if an error occurred while attempting to
* perform the check. * perform the check.

View File

@ -272,10 +272,18 @@ typedef struct LEPoint LEPoint;
#ifndef U_HIDE_INTERNAL_API #ifndef U_HIDE_INTERNAL_API
/**
* \def
* @internal
*/
#ifndef LE_ASSERT_BAD_FONT #ifndef LE_ASSERT_BAD_FONT
#define LE_ASSERT_BAD_FONT 0 #define LE_ASSERT_BAD_FONT 0
#endif #endif
/**
* \def LE_DEBUG_BAD_FONT
* @internal
*/
#if LE_ASSERT_BAD_FONT #if LE_ASSERT_BAD_FONT
#include <stdio.h> #include <stdio.h>
#define LE_DEBUG_BAD_FONT(x) fprintf(stderr,"%s:%d: BAD FONT: %s\n", __FILE__, __LINE__, (x)); #define LE_DEBUG_BAD_FONT(x) fprintf(stderr,"%s:%d: BAD FONT: %s\n", __FILE__, __LINE__, (x));
@ -284,7 +292,8 @@ typedef struct LEPoint LEPoint;
#endif #endif
/** /**
* Max value representable by a uintptr * \def LE_UINTPTR_MAX
* Max value representable by a uintptr
*/ */
#ifndef UINT32_MAX #ifndef UINT32_MAX