ICU 55.1 55.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ucurr.h
Go to the documentation of this file.
1 /*
2 **********************************************************************
3 * Copyright (c) 2002-2014, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
6 */
7 #ifndef _UCURR_H_
8 #define _UCURR_H_
9
10 #include "unicode/utypes.h"
11 #include "unicode/uenum.h"
12
18 #if !UCONFIG_NO_FORMATTING
19
24 enum UCurrencyUsage {
25 #ifndef U_HIDE_DRAFT_API
26
32 UCURR_USAGE_STANDARD=0,
38 UCURR_USAGE_CASH=1,
39 #endif /* U_HIDE_DRAFT_API */
40
44 UCURR_USAGE_COUNT=2
45 };
46 typedef enum UCurrencyUsage UCurrencyUsage;
47
80 U_STABLE int32_t U_EXPORT2
81 ucurr_forLocale(const char* locale,
82 UChar* buff,
83 int32_t buffCapacity,
84 UErrorCode* ec);
85
92 typedef enum UCurrNameStyle {
98 UCURR_SYMBOL_NAME,
99
105 UCURR_LONG_NAME
106 } UCurrNameStyle;
107
108 #if !UCONFIG_NO_SERVICE
109
112 typedef const void* UCurrRegistryKey;
113
125 U_STABLE UCurrRegistryKey U_EXPORT2
126 ucurr_register(const UChar* isoCode,
127 const char* locale,
128 UErrorCode* status);
140 U_STABLE UBool U_EXPORT2
141 ucurr_unregister(UCurrRegistryKey key, UErrorCode* status);
142 #endif /* UCONFIG_NO_SERVICE */
143
161 U_STABLE const UChar* U_EXPORT2
162 ucurr_getName(const UChar* currency,
163 const char* locale,
164 UCurrNameStyle nameStyle,
165 UBool* isChoiceFormat,
166 int32_t* len,
167 UErrorCode* ec);
168
185 U_STABLE const UChar* U_EXPORT2
186 ucurr_getPluralName(const UChar* currency,
187 const char* locale,
188 UBool* isChoiceFormat,
189 const char* pluralCount,
190 int32_t* len,
191 UErrorCode* ec);
192
203 U_STABLE int32_t U_EXPORT2
204 ucurr_getDefaultFractionDigits(const UChar* currency,
205 UErrorCode* ec);
206
207 #ifndef U_HIDE_DRAFT_API
208
218 U_DRAFT int32_t U_EXPORT2
219 ucurr_getDefaultFractionDigitsForUsage(const UChar* currency,
220 const UCurrencyUsage usage,
221 UErrorCode* ec);
222 #endif /* U_HIDE_DRAFT_API */
223
234 U_STABLE double U_EXPORT2
235 ucurr_getRoundingIncrement(const UChar* currency,
236 UErrorCode* ec);
237
238 #ifndef U_HIDE_DRAFT_API
239
249 U_DRAFT double U_EXPORT2
250 ucurr_getRoundingIncrementForUsage(const UChar* currency,
251 const UCurrencyUsage usage,
252 UErrorCode* ec);
253 #endif /* U_HIDE_DRAFT_API */
254
261 typedef enum UCurrCurrencyType {
266 UCURR_ALL = INT32_MAX,
275 UCURR_COMMON = 1,
283 UCURR_UNCOMMON = 2,
289 UCURR_DEPRECATED = 4,
295 UCURR_NON_DEPRECATED = 8
296 } UCurrCurrencyType;
297
307 U_STABLE UEnumeration * U_EXPORT2
308 ucurr_openISOCurrencies(uint32_t currType, UErrorCode *pErrorCode);
309
336 U_STABLE UBool U_EXPORT2
337 ucurr_isAvailable(const UChar* isoCode,
338 UDate from,
339 UDate to,
340 UErrorCode* errorCode);
341
356 U_STABLE int32_t U_EXPORT2
357 ucurr_countCurrencies(const char* locale,
358 UDate date,
359 UErrorCode* ec);
360
380 U_STABLE int32_t U_EXPORT2
381 ucurr_forLocaleAndDate(const char* locale,
382 UDate date,
383 int32_t index,
384 UChar* buff,
385 int32_t buffCapacity,
386 UErrorCode* ec);
387
404 U_STABLE UEnumeration* U_EXPORT2
405 ucurr_getKeywordValuesForLocale(const char* key,
406 const char* locale,
407 UBool commonlyUsed,
408 UErrorCode* status);
409
419 U_STABLE int32_t U_EXPORT2
420 ucurr_getNumericCode(const UChar* currency);
421
422 #endif /* #if !UCONFIG_NO_FORMATTING */
423
424 #endif