OLD | NEW |
1 /* | 1 /* |
2 ****************************************************************************** | 2 ****************************************************************************** |
3 * Copyright (C) 2010-2012, International Business Machines Corporation and | 3 * Copyright (C) 2010-2014, International Business Machines Corporation and |
4 * others. All Rights Reserved. | 4 * others. All Rights Reserved. |
5 ****************************************************************************** | 5 ****************************************************************************** |
6 */ | 6 */ |
7 | 7 |
8 #ifndef LOCDSPNM_H | 8 #ifndef LOCDSPNM_H |
9 #define LOCDSPNM_H | 9 #define LOCDSPNM_H |
10 | 10 |
11 #include "unicode/utypes.h" | 11 #include "unicode/utypes.h" |
12 | 12 |
13 /** | 13 /** |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 * dialectHandling. | 54 * dialectHandling. |
55 * | 55 * |
56 * @param locale the display locale | 56 * @param locale the display locale |
57 * @param dialectHandling how to select names for locales | 57 * @param dialectHandling how to select names for locales |
58 * @return a LocaleDisplayNames instance | 58 * @return a LocaleDisplayNames instance |
59 * @stable ICU 4.4 | 59 * @stable ICU 4.4 |
60 */ | 60 */ |
61 static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& locale, | 61 static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& locale, |
62 UDialectHandling dialectHandling); | 62 UDialectHandling dialectHandling); |
63 | 63 |
64 #ifndef U_HIDE_DRAFT_API | |
65 /** | 64 /** |
66 * Returns an instance of LocaleDisplayNames that returns names formatted | 65 * Returns an instance of LocaleDisplayNames that returns names formatted |
67 * for the provided locale, using the provided UDisplayContext settings. | 66 * for the provided locale, using the provided UDisplayContext settings. |
68 * | 67 * |
69 * @param locale the display locale | 68 * @param locale the display locale |
70 * @param contexts List of one or more context settings (e.g. for dialect | 69 * @param contexts List of one or more context settings (e.g. for dialect |
71 * handling, capitalization, etc. | 70 * handling, capitalization, etc. |
72 * @param length Number of items in the contexts list | 71 * @param length Number of items in the contexts list |
73 * @return a LocaleDisplayNames instance | 72 * @return a LocaleDisplayNames instance |
74 * @draft ICU 51 | 73 * @stable ICU 51 |
75 */ | 74 */ |
76 static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& locale, | 75 static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& locale, |
77 UDisplayContext *contexts, int32_t length); | 76 UDisplayContext *contexts, int32_t length); |
78 #endif /* U_HIDE_DRAFT_API */ | |
79 | 77 |
80 // getters for state | 78 // getters for state |
81 /** | 79 /** |
82 * Returns the locale used to determine the display names. This is | 80 * Returns the locale used to determine the display names. This is |
83 * not necessarily the same locale passed to {@link #createInstance}. | 81 * not necessarily the same locale passed to {@link #createInstance}. |
84 * @return the display locale | 82 * @return the display locale |
85 * @stable ICU 4.4 | 83 * @stable ICU 4.4 |
86 */ | 84 */ |
87 virtual const Locale& getLocale() const = 0; | 85 virtual const Locale& getLocale() const = 0; |
88 | 86 |
89 /** | 87 /** |
90 * Returns the dialect handling used in the display names. | 88 * Returns the dialect handling used in the display names. |
91 * @return the dialect handling enum | 89 * @return the dialect handling enum |
92 * @stable ICU 4.4 | 90 * @stable ICU 4.4 |
93 */ | 91 */ |
94 virtual UDialectHandling getDialectHandling() const = 0; | 92 virtual UDialectHandling getDialectHandling() const = 0; |
95 | 93 |
96 /** | 94 /** |
97 * Returns the UDisplayContext value for the specified UDisplayContextType. | 95 * Returns the UDisplayContext value for the specified UDisplayContextType. |
98 * @param type the UDisplayContextType whose value to return | 96 * @param type the UDisplayContextType whose value to return |
99 * @return the UDisplayContext for the specified type. | 97 * @return the UDisplayContext for the specified type. |
100 * @draft ICU 51 | 98 * @stable ICU 51 |
101 */ | 99 */ |
102 virtual UDisplayContext getContext(UDisplayContextType type) const = 0; | 100 virtual UDisplayContext getContext(UDisplayContextType type) const = 0; |
103 | 101 |
104 // names for entire locales | 102 // names for entire locales |
105 /** | 103 /** |
106 * Returns the display name of the provided locale. | 104 * Returns the display name of the provided locale. |
107 * @param locale the locale whose display name to return | 105 * @param locale the locale whose display name to return |
108 * @param result receives the locale's display name | 106 * @param result receives the locale's display name |
109 * @return the display name of the provided locale | 107 * @return the display name of the provided locale |
110 * @stable ICU 4.4 | 108 * @stable ICU 4.4 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 195 |
198 inline LocaleDisplayNames* LocaleDisplayNames::createInstance(const Locale& loca
le) { | 196 inline LocaleDisplayNames* LocaleDisplayNames::createInstance(const Locale& loca
le) { |
199 return LocaleDisplayNames::createInstance(locale, ULDN_STANDARD_NAMES); | 197 return LocaleDisplayNames::createInstance(locale, ULDN_STANDARD_NAMES); |
200 } | 198 } |
201 | 199 |
202 U_NAMESPACE_END | 200 U_NAMESPACE_END |
203 | 201 |
204 #endif | 202 #endif |
205 | 203 |
206 #endif | 204 #endif |
OLD | NEW |