ICU-20795 ICU4C 65.1 API promotion draft
- includes new APIChangeReport.md - the 'simplification' section is no longer new - uses tools from [ICU-20162] #807 Includes non-promotion fixes: - utrace.h: UTRACE_UDATA_BUNDLE
This commit is contained in:
parent
a4cab7947e
commit
5a3ea669aa
File diff suppressed because it is too large
Load Diff
1092
icu4c/APIChangeReport.md
Normal file
1092
icu4c/APIChangeReport.md
Normal file
File diff suppressed because it is too large
Load Diff
@ -287,16 +287,14 @@ public:
|
||||
*/
|
||||
Locale(const Locale& other);
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Move constructor; might leave source in bogus state.
|
||||
* This locale will have the same contents that the source locale had.
|
||||
*
|
||||
* @param other The Locale object being moved in.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
Locale(Locale&& other) U_NOEXCEPT;
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
@ -313,7 +311,6 @@ public:
|
||||
*/
|
||||
Locale& operator=(const Locale& other);
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Move assignment operator; might leave source in bogus state.
|
||||
* This locale will have the same contents that the source locale had.
|
||||
@ -321,10 +318,9 @@ public:
|
||||
*
|
||||
* @param other The Locale object being moved in.
|
||||
* @return *this
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
Locale& operator=(Locale&& other) U_NOEXCEPT;
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Checks if two locale keys are the same.
|
||||
@ -392,7 +388,6 @@ public:
|
||||
UErrorCode& success);
|
||||
#endif /* U_HIDE_SYSTEM_API */
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Returns a Locale for the specified BCP47 language tag string.
|
||||
* If the specified language tag contains any ill-formed subtags,
|
||||
@ -408,7 +403,7 @@ public:
|
||||
* @param tag the input BCP47 language tag.
|
||||
* @param status error information if creating the Locale failed.
|
||||
* @return the Locale for the specified BCP47 language tag.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
static Locale U_EXPORT2 forLanguageTag(StringPiece tag, UErrorCode& status);
|
||||
|
||||
@ -423,7 +418,7 @@ public:
|
||||
* @param sink the output sink receiving the BCP47 language
|
||||
* tag for this Locale.
|
||||
* @param status error information if creating the language tag failed.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
void toLanguageTag(ByteSink& sink, UErrorCode& status) const;
|
||||
|
||||
@ -435,11 +430,10 @@ public:
|
||||
*
|
||||
* @param status error information if creating the language tag failed.
|
||||
* @return the BCP47 language tag for this Locale.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
template<typename StringClass>
|
||||
inline StringClass toLanguageTag(UErrorCode& status) const;
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Creates a locale which has had minimal canonicalization
|
||||
@ -511,7 +505,6 @@ public:
|
||||
*/
|
||||
const char * getBaseName() const;
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Add the likely subtags for this Locale, per the algorithm described
|
||||
* in the following CLDR technical report:
|
||||
@ -539,7 +532,7 @@ public:
|
||||
* @param status error information if maximizing this Locale failed.
|
||||
* If this Locale is not well-formed, the error code is
|
||||
* U_ILLEGAL_ARGUMENT_ERROR.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
void addLikelySubtags(UErrorCode& status);
|
||||
|
||||
@ -570,10 +563,9 @@ public:
|
||||
* @param status error information if maximizing this Locale failed.
|
||||
* If this Locale is not well-formed, the error code is
|
||||
* U_ILLEGAL_ARGUMENT_ERROR.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
void minimizeSubtags(UErrorCode& status);
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Gets the list of keywords for the specified locale.
|
||||
@ -586,8 +578,6 @@ public:
|
||||
*/
|
||||
StringEnumeration * createKeywords(UErrorCode &status) const;
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Gets the list of Unicode keywords for the specified locale.
|
||||
*
|
||||
@ -595,7 +585,7 @@ public:
|
||||
* @return pointer to StringEnumeration class, or NULL if there are no keywords.
|
||||
* Client must dispose of it by calling delete.
|
||||
* @see getUnicodeKeywords
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
StringEnumeration * createUnicodeKeywords(UErrorCode &status) const;
|
||||
|
||||
@ -608,7 +598,7 @@ public:
|
||||
*
|
||||
* @param iterator an STL style output iterator to write the keywords to.
|
||||
* @param status error information if creating set of keywords failed.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
template<typename StringClass, typename OutputIterator>
|
||||
inline void getKeywords(OutputIterator iterator, UErrorCode& status) const;
|
||||
@ -622,13 +612,11 @@ public:
|
||||
*
|
||||
* @param iterator an STL style output iterator to write the keywords to.
|
||||
* @param status error information if creating set of keywords failed.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
template<typename StringClass, typename OutputIterator>
|
||||
inline void getUnicodeKeywords(OutputIterator iterator, UErrorCode& status) const;
|
||||
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Gets the value for a keyword.
|
||||
*
|
||||
@ -647,7 +635,6 @@ public:
|
||||
*/
|
||||
int32_t getKeywordValue(const char* keywordName, char *buffer, int32_t bufferCapacity, UErrorCode &status) const;
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Gets the value for a keyword.
|
||||
*
|
||||
@ -659,7 +646,7 @@ public:
|
||||
* @param keywordName name of the keyword for which we want the value.
|
||||
* @param sink the sink to receive the keyword value.
|
||||
* @param status error information if getting the value failed.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
void getKeywordValue(StringPiece keywordName, ByteSink& sink, UErrorCode& status) const;
|
||||
|
||||
@ -674,7 +661,7 @@ public:
|
||||
* @param keywordName name of the keyword for which we want the value.
|
||||
* @param status error information if getting the value failed.
|
||||
* @return the keyword value.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
template<typename StringClass>
|
||||
inline StringClass getKeywordValue(StringPiece keywordName, UErrorCode& status) const;
|
||||
@ -690,7 +677,7 @@ public:
|
||||
* @param keywordName name of the keyword for which we want the value.
|
||||
* @param sink the sink to receive the keyword value.
|
||||
* @param status error information if getting the value failed.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
void getUnicodeKeywordValue(StringPiece keywordName, ByteSink& sink, UErrorCode& status) const;
|
||||
|
||||
@ -705,11 +692,10 @@ public:
|
||||
* @param keywordName name of the keyword for which we want the value.
|
||||
* @param status error information if getting the value failed.
|
||||
* @return the keyword value.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
template<typename StringClass>
|
||||
inline StringClass getUnicodeKeywordValue(StringPiece keywordName, UErrorCode& status) const;
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Sets or removes the value for a keyword.
|
||||
@ -732,7 +718,6 @@ public:
|
||||
*/
|
||||
void setKeywordValue(const char* keywordName, const char* keywordValue, UErrorCode &status);
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Sets or removes the value for a keyword.
|
||||
*
|
||||
@ -749,7 +734,7 @@ public:
|
||||
* NULL, will result in the keyword being removed. No error is given if
|
||||
* that keyword does not exist.
|
||||
* @param status Returns any error information while performing this operation.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
void setKeywordValue(StringPiece keywordName, StringPiece keywordValue, UErrorCode& status);
|
||||
|
||||
@ -769,10 +754,9 @@ public:
|
||||
* NULL, will result in the keyword being removed. No error is given if
|
||||
* that keyword does not exist.
|
||||
* @param status Returns any error information while performing this operation.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
void setUnicodeKeywordValue(StringPiece keywordName, StringPiece keywordValue, UErrorCode& status);
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* returns the locale's three-letter language code, as specified
|
||||
|
@ -2578,8 +2578,6 @@ typedef enum UVerticalOrientation {
|
||||
U_STABLE UBool U_EXPORT2
|
||||
u_hasBinaryProperty(UChar32 c, UProperty which);
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Returns a frozen USet for a binary property.
|
||||
* The library retains ownership over the returned object.
|
||||
@ -2593,13 +2591,11 @@ u_hasBinaryProperty(UChar32 c, UProperty which);
|
||||
* @see UProperty
|
||||
* @see u_hasBinaryProperty
|
||||
* @see Unicode::fromUSet
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI const USet * U_EXPORT2
|
||||
u_getBinaryPropertySet(UProperty property, UErrorCode *pErrorCode);
|
||||
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Check if a code point has the Alphabetic Unicode property.
|
||||
* Same as u_hasBinaryProperty(c, UCHAR_ALPHABETIC).
|
||||
@ -2757,8 +2753,6 @@ u_getIntPropertyMinValue(UProperty which);
|
||||
U_STABLE int32_t U_EXPORT2
|
||||
u_getIntPropertyMaxValue(UProperty which);
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Returns an immutable UCPMap for an enumerated/catalog/int-valued property.
|
||||
* The library retains ownership over the returned object.
|
||||
@ -2772,13 +2766,11 @@ u_getIntPropertyMaxValue(UProperty which);
|
||||
* @return the property as a map
|
||||
* @see UProperty
|
||||
* @see u_getIntPropertyValue
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI const UCPMap * U_EXPORT2
|
||||
u_getIntPropertyMap(UProperty property, UErrorCode *pErrorCode);
|
||||
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Get the numeric value for a Unicode code point as defined in the
|
||||
* Unicode Character Database.
|
||||
|
@ -9,8 +9,6 @@
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
|
||||
U_CDECL_BEGIN
|
||||
|
||||
/**
|
||||
@ -28,7 +26,7 @@ U_CDECL_BEGIN
|
||||
*
|
||||
* @see UCPTrie
|
||||
* @see UMutableCPTrie
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
typedef struct UCPMap UCPMap;
|
||||
|
||||
@ -39,13 +37,13 @@ typedef struct UCPMap UCPMap;
|
||||
* @see ucpmap_getRange
|
||||
* @see ucptrie_getRange
|
||||
* @see umutablecptrie_getRange
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
enum UCPMapRangeOption {
|
||||
/**
|
||||
* ucpmap_getRange() enumerates all same-value ranges as stored in the map.
|
||||
* Most users should use this option.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UCPMAP_RANGE_NORMAL,
|
||||
/**
|
||||
@ -61,7 +59,7 @@ enum UCPMapRangeOption {
|
||||
* special values optimized for UTF-16 string processing
|
||||
* or for special error behavior for unpaired surrogates,
|
||||
* but those values are not to be associated with the lead surrogate code *points*.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UCPMAP_RANGE_FIXED_LEAD_SURROGATES,
|
||||
/**
|
||||
@ -77,7 +75,7 @@ enum UCPMapRangeOption {
|
||||
* special values optimized for UTF-16 string processing
|
||||
* or for special error behavior for unpaired surrogates,
|
||||
* but those values are not to be associated with the lead surrogate code *points*.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UCPMAP_RANGE_FIXED_ALL_SURROGATES
|
||||
};
|
||||
@ -93,7 +91,7 @@ typedef enum UCPMapRangeOption UCPMapRangeOption;
|
||||
* @param c the code point
|
||||
* @return the map value,
|
||||
* or an implementation-defined error value if the code point is not in the range 0..U+10FFFF
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI uint32_t U_EXPORT2
|
||||
ucpmap_get(const UCPMap *map, UChar32 c);
|
||||
@ -110,7 +108,7 @@ ucpmap_get(const UCPMap *map, UChar32 c);
|
||||
* @param context an opaque pointer, as passed into the getRange function
|
||||
* @param value a value from the map
|
||||
* @return the modified value
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
typedef uint32_t U_CALLCONV
|
||||
UCPMapValueFilter(const void *context, uint32_t value);
|
||||
@ -149,7 +147,7 @@ UCPMapValueFilter(const void *context, uint32_t value);
|
||||
* may have been modified by filter(context, map value)
|
||||
* if that function pointer is not NULL
|
||||
* @return the range end code point, or -1 if start is not a valid code point
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI UChar32 U_EXPORT2
|
||||
ucpmap_getRange(const UCPMap *map, UChar32 start,
|
||||
@ -158,5 +156,4 @@ ucpmap_getRange(const UCPMap *map, UChar32 start,
|
||||
|
||||
U_CDECL_END
|
||||
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
#endif
|
||||
|
@ -9,8 +9,6 @@
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
|
||||
#include "unicode/localpointer.h"
|
||||
#include "unicode/ucpmap.h"
|
||||
#include "unicode/utf8.h"
|
||||
@ -55,7 +53,7 @@ typedef union UCPTrieData {
|
||||
* The macros will return bogus values, or may crash, if used on the wrong type or value width.
|
||||
*
|
||||
* @see UMutableCPTrie
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
struct UCPTrie {
|
||||
#ifndef U_IN_DOXYGEN
|
||||
@ -115,23 +113,23 @@ typedef struct UCPTrie UCPTrie;
|
||||
* @see umutablecptrie_buildImmutable
|
||||
* @see ucptrie_openFromBinary
|
||||
* @see ucptrie_getType
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
enum UCPTrieType {
|
||||
/**
|
||||
* For ucptrie_openFromBinary() to accept any type.
|
||||
* ucptrie_getType() will return the actual type.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UCPTRIE_TYPE_ANY = -1,
|
||||
/**
|
||||
* Fast/simple/larger BMP data structure. Use functions and "fast" macros.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UCPTRIE_TYPE_FAST,
|
||||
/**
|
||||
* Small/slower BMP data structure. Use functions and "small" macros.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UCPTRIE_TYPE_SMALL
|
||||
};
|
||||
@ -145,30 +143,30 @@ typedef enum UCPTrieType UCPTrieType;
|
||||
* @see umutablecptrie_buildImmutable
|
||||
* @see ucptrie_openFromBinary
|
||||
* @see ucptrie_getValueWidth
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
enum UCPTrieValueWidth {
|
||||
/**
|
||||
* For ucptrie_openFromBinary() to accept any data value width.
|
||||
* ucptrie_getValueWidth() will return the actual data value width.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UCPTRIE_VALUE_BITS_ANY = -1,
|
||||
/**
|
||||
* The trie stores 16 bits per data value.
|
||||
* It returns them as unsigned values 0..0xffff=65535.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UCPTRIE_VALUE_BITS_16,
|
||||
/**
|
||||
* The trie stores 32 bits per data value.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UCPTRIE_VALUE_BITS_32,
|
||||
/**
|
||||
* The trie stores 8 bits per data value.
|
||||
* It returns them as unsigned values 0..0xff=255.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UCPTRIE_VALUE_BITS_8
|
||||
};
|
||||
@ -200,7 +198,7 @@ typedef enum UCPTrieValueWidth UCPTrieValueWidth;
|
||||
* @see umutablecptrie_open
|
||||
* @see umutablecptrie_buildImmutable
|
||||
* @see ucptrie_toBinary
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI UCPTrie * U_EXPORT2
|
||||
ucptrie_openFromBinary(UCPTrieType type, UCPTrieValueWidth valueWidth,
|
||||
@ -211,7 +209,7 @@ ucptrie_openFromBinary(UCPTrieType type, UCPTrieValueWidth valueWidth,
|
||||
* Closes a trie and releases associated memory.
|
||||
*
|
||||
* @param trie the trie
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI void U_EXPORT2
|
||||
ucptrie_close(UCPTrie *trie);
|
||||
@ -223,7 +221,7 @@ ucptrie_close(UCPTrie *trie);
|
||||
* @return the trie type
|
||||
* @see ucptrie_openFromBinary
|
||||
* @see UCPTRIE_TYPE_ANY
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI UCPTrieType U_EXPORT2
|
||||
ucptrie_getType(const UCPTrie *trie);
|
||||
@ -235,7 +233,7 @@ ucptrie_getType(const UCPTrie *trie);
|
||||
* @return the number of bits in a trie data value
|
||||
* @see ucptrie_openFromBinary
|
||||
* @see UCPTRIE_VALUE_BITS_ANY
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI UCPTrieValueWidth U_EXPORT2
|
||||
ucptrie_getValueWidth(const UCPTrie *trie);
|
||||
@ -252,7 +250,7 @@ ucptrie_getValueWidth(const UCPTrie *trie);
|
||||
* @param c the code point
|
||||
* @return the trie value,
|
||||
* or the trie error value if the code point is not in the range 0..U+10FFFF
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI uint32_t U_EXPORT2
|
||||
ucptrie_get(const UCPTrie *trie, UChar32 c);
|
||||
@ -291,7 +289,7 @@ ucptrie_get(const UCPTrie *trie, UChar32 c);
|
||||
* may have been modified by filter(context, trie value)
|
||||
* if that function pointer is not NULL
|
||||
* @return the range end code point, or -1 if start is not a valid code point
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI UChar32 U_EXPORT2
|
||||
ucptrie_getRange(const UCPTrie *trie, UChar32 start,
|
||||
@ -311,7 +309,7 @@ ucptrie_getRange(const UCPTrie *trie, UChar32 start,
|
||||
* @return the number of bytes written or (if buffer overflow) needed for the trie
|
||||
*
|
||||
* @see ucptrie_openFromBinary()
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI int32_t U_EXPORT2
|
||||
ucptrie_toBinary(const UCPTrie *trie, void *data, int32_t capacity, UErrorCode *pErrorCode);
|
||||
@ -322,7 +320,7 @@ ucptrie_toBinary(const UCPTrie *trie, void *data, int32_t capacity, UErrorCode *
|
||||
* Do not use this macro in any other way.
|
||||
*
|
||||
* @see UCPTRIE_VALUE_BITS_16
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
#define UCPTRIE_16(trie, i) ((trie)->data.ptr16[i])
|
||||
|
||||
@ -332,7 +330,7 @@ ucptrie_toBinary(const UCPTrie *trie, void *data, int32_t capacity, UErrorCode *
|
||||
* Do not use this macro in any other way.
|
||||
*
|
||||
* @see UCPTRIE_VALUE_BITS_32
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
#define UCPTRIE_32(trie, i) ((trie)->data.ptr32[i])
|
||||
|
||||
@ -342,7 +340,7 @@ ucptrie_toBinary(const UCPTrie *trie, void *data, int32_t capacity, UErrorCode *
|
||||
* Do not use this macro in any other way.
|
||||
*
|
||||
* @see UCPTRIE_VALUE_BITS_8
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
#define UCPTRIE_8(trie, i) ((trie)->data.ptr8[i])
|
||||
|
||||
@ -354,7 +352,7 @@ ucptrie_toBinary(const UCPTrie *trie, void *data, int32_t capacity, UErrorCode *
|
||||
* @param dataAccess UCPTRIE_16, UCPTRIE_32, or UCPTRIE_8 according to the trie’s value width
|
||||
* @param c (UChar32, in) the input code point
|
||||
* @return The code point's trie value.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
#define UCPTRIE_FAST_GET(trie, dataAccess, c) dataAccess(trie, _UCPTRIE_CP_INDEX(trie, 0xffff, c))
|
||||
|
||||
@ -366,7 +364,7 @@ ucptrie_toBinary(const UCPTrie *trie, void *data, int32_t capacity, UErrorCode *
|
||||
* @param dataAccess UCPTRIE_16, UCPTRIE_32, or UCPTRIE_8 according to the trie’s value width
|
||||
* @param c (UChar32, in) the input code point
|
||||
* @return The code point's trie value.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
#define UCPTRIE_SMALL_GET(trie, dataAccess, c) \
|
||||
dataAccess(trie, _UCPTRIE_CP_INDEX(trie, UCPTRIE_SMALL_MAX, c))
|
||||
@ -382,7 +380,7 @@ ucptrie_toBinary(const UCPTrie *trie, void *data, int32_t capacity, UErrorCode *
|
||||
* @param limit (const UChar *, in) the limit pointer for the text, or NULL if NUL-terminated
|
||||
* @param c (UChar32, out) variable for the code point
|
||||
* @param result (out) variable for the trie lookup result
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
#define UCPTRIE_FAST_U16_NEXT(trie, dataAccess, src, limit, c, result) UPRV_BLOCK_MACRO_BEGIN { \
|
||||
(c) = *(src)++; \
|
||||
@ -413,7 +411,7 @@ ucptrie_toBinary(const UCPTrie *trie, void *data, int32_t capacity, UErrorCode *
|
||||
* @param src (const UChar *, in/out) the source text pointer
|
||||
* @param c (UChar32, out) variable for the code point
|
||||
* @param result (out) variable for the trie lookup result
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
#define UCPTRIE_FAST_U16_PREV(trie, dataAccess, start, src, c, result) UPRV_BLOCK_MACRO_BEGIN { \
|
||||
(c) = *--(src); \
|
||||
@ -447,7 +445,7 @@ ucptrie_toBinary(const UCPTrie *trie, void *data, int32_t capacity, UErrorCode *
|
||||
* @param src (const char *, in/out) the source text pointer
|
||||
* @param limit (const char *, in) the limit pointer for the text (must not be NULL)
|
||||
* @param result (out) variable for the trie lookup result
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
#define UCPTRIE_FAST_U8_NEXT(trie, dataAccess, src, limit, result) UPRV_BLOCK_MACRO_BEGIN { \
|
||||
int32_t __lead = (uint8_t)*(src)++; \
|
||||
@ -493,7 +491,7 @@ ucptrie_toBinary(const UCPTrie *trie, void *data, int32_t capacity, UErrorCode *
|
||||
* @param start (const char *, in) the start pointer for the text
|
||||
* @param src (const char *, in/out) the source text pointer
|
||||
* @param result (out) variable for the trie lookup result
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
#define UCPTRIE_FAST_U8_PREV(trie, dataAccess, start, src, result) UPRV_BLOCK_MACRO_BEGIN { \
|
||||
int32_t __index = (uint8_t)*--(src); \
|
||||
@ -513,7 +511,7 @@ ucptrie_toBinary(const UCPTrie *trie, void *data, int32_t capacity, UErrorCode *
|
||||
* @param dataAccess UCPTRIE_16, UCPTRIE_32, or UCPTRIE_8 according to the trie’s value width
|
||||
* @param c (UChar32, in) the input code point; must be U+0000..U+007F
|
||||
* @return The ASCII code point's trie value.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
#define UCPTRIE_ASCII_GET(trie, dataAccess, c) dataAccess(trie, c)
|
||||
|
||||
@ -526,7 +524,7 @@ ucptrie_toBinary(const UCPTrie *trie, void *data, int32_t capacity, UErrorCode *
|
||||
* @param dataAccess UCPTRIE_16, UCPTRIE_32, or UCPTRIE_8 according to the trie’s value width
|
||||
* @param c (UChar32, in) the input code point, must be U+0000..U+FFFF
|
||||
* @return The BMP code point's trie value.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
#define UCPTRIE_FAST_BMP_GET(trie, dataAccess, c) dataAccess(trie, _UCPTRIE_FAST_INDEX(trie, c))
|
||||
|
||||
@ -538,7 +536,7 @@ ucptrie_toBinary(const UCPTrie *trie, void *data, int32_t capacity, UErrorCode *
|
||||
* @param dataAccess UCPTRIE_16, UCPTRIE_32, or UCPTRIE_8 according to the trie’s value width
|
||||
* @param c (UChar32, in) the input code point, must be U+10000..U+10FFFF
|
||||
* @return The supplementary code point's trie value.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
#define UCPTRIE_FAST_SUPP_GET(trie, dataAccess, c) dataAccess(trie, _UCPTRIE_SMALL_INDEX(trie, c))
|
||||
|
||||
@ -635,7 +633,7 @@ U_NAMESPACE_BEGIN
|
||||
*
|
||||
* @see LocalPointerBase
|
||||
* @see LocalPointer
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_DEFINE_LOCAL_OPEN_POINTER(LocalUCPTriePointer, UCPTrie, ucptrie_close);
|
||||
|
||||
@ -643,5 +641,4 @@ U_NAMESPACE_END
|
||||
|
||||
#endif // U_SHOW_CPLUSPLUS_API
|
||||
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
#endif
|
||||
|
@ -9,8 +9,6 @@
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
|
||||
#include "unicode/localpointer.h"
|
||||
#include "unicode/ucpmap.h"
|
||||
#include "unicode/ucptrie.h"
|
||||
@ -44,7 +42,7 @@ U_CDECL_BEGIN
|
||||
*
|
||||
* @see UCPTrie
|
||||
* @see umutablecptrie_buildImmutable
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
typedef struct UMutableCPTrie UMutableCPTrie;
|
||||
|
||||
@ -59,7 +57,7 @@ typedef struct UMutableCPTrie UMutableCPTrie;
|
||||
* @param errorValue the value for out-of-range code points and ill-formed UTF-8/16
|
||||
* @param pErrorCode an in/out ICU UErrorCode
|
||||
* @return the trie
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI UMutableCPTrie * U_EXPORT2
|
||||
umutablecptrie_open(uint32_t initialValue, uint32_t errorValue, UErrorCode *pErrorCode);
|
||||
@ -71,7 +69,7 @@ umutablecptrie_open(uint32_t initialValue, uint32_t errorValue, UErrorCode *pErr
|
||||
* @param other the trie to clone
|
||||
* @param pErrorCode an in/out ICU UErrorCode
|
||||
* @return the trie clone
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI UMutableCPTrie * U_EXPORT2
|
||||
umutablecptrie_clone(const UMutableCPTrie *other, UErrorCode *pErrorCode);
|
||||
@ -80,7 +78,7 @@ umutablecptrie_clone(const UMutableCPTrie *other, UErrorCode *pErrorCode);
|
||||
* Closes a mutable trie and releases associated memory.
|
||||
*
|
||||
* @param trie the trie
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI void U_EXPORT2
|
||||
umutablecptrie_close(UMutableCPTrie *trie);
|
||||
@ -96,7 +94,7 @@ U_NAMESPACE_BEGIN
|
||||
*
|
||||
* @see LocalPointerBase
|
||||
* @see LocalPointer
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_DEFINE_LOCAL_OPEN_POINTER(LocalUMutableCPTriePointer, UMutableCPTrie, umutablecptrie_close);
|
||||
|
||||
@ -111,7 +109,7 @@ U_NAMESPACE_END
|
||||
* @param map the source map
|
||||
* @param pErrorCode an in/out ICU UErrorCode
|
||||
* @return the mutable trie
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI UMutableCPTrie * U_EXPORT2
|
||||
umutablecptrie_fromUCPMap(const UCPMap *map, UErrorCode *pErrorCode);
|
||||
@ -123,7 +121,7 @@ umutablecptrie_fromUCPMap(const UCPMap *map, UErrorCode *pErrorCode);
|
||||
* @param trie the immutable trie
|
||||
* @param pErrorCode an in/out ICU UErrorCode
|
||||
* @return the mutable trie
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI UMutableCPTrie * U_EXPORT2
|
||||
umutablecptrie_fromUCPTrie(const UCPTrie *trie, UErrorCode *pErrorCode);
|
||||
@ -134,7 +132,7 @@ umutablecptrie_fromUCPTrie(const UCPTrie *trie, UErrorCode *pErrorCode);
|
||||
* @param trie the trie
|
||||
* @param c the code point
|
||||
* @return the value
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI uint32_t U_EXPORT2
|
||||
umutablecptrie_get(const UMutableCPTrie *trie, UChar32 c);
|
||||
@ -166,7 +164,7 @@ umutablecptrie_get(const UMutableCPTrie *trie, UChar32 c);
|
||||
* may have been modified by filter(context, trie value)
|
||||
* if that function pointer is not NULL
|
||||
* @return the range end code point, or -1 if start is not a valid code point
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI UChar32 U_EXPORT2
|
||||
umutablecptrie_getRange(const UMutableCPTrie *trie, UChar32 start,
|
||||
@ -180,7 +178,7 @@ umutablecptrie_getRange(const UMutableCPTrie *trie, UChar32 start,
|
||||
* @param c the code point
|
||||
* @param value the value
|
||||
* @param pErrorCode an in/out ICU UErrorCode
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI void U_EXPORT2
|
||||
umutablecptrie_set(UMutableCPTrie *trie, UChar32 c, uint32_t value, UErrorCode *pErrorCode);
|
||||
@ -194,7 +192,7 @@ umutablecptrie_set(UMutableCPTrie *trie, UChar32 c, uint32_t value, UErrorCode *
|
||||
* @param end the last code point to get the value (inclusive)
|
||||
* @param value the value
|
||||
* @param pErrorCode an in/out ICU UErrorCode
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI void U_EXPORT2
|
||||
umutablecptrie_setRange(UMutableCPTrie *trie,
|
||||
@ -229,7 +227,7 @@ umutablecptrie_setRange(UMutableCPTrie *trie,
|
||||
* @param pErrorCode an in/out ICU UErrorCode
|
||||
*
|
||||
* @see umutablecptrie_fromUCPTrie
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
U_CAPI UCPTrie * U_EXPORT2
|
||||
umutablecptrie_buildImmutable(UMutableCPTrie *trie, UCPTrieType type, UCPTrieValueWidth valueWidth,
|
||||
@ -237,5 +235,4 @@ umutablecptrie_buildImmutable(UMutableCPTrie *trie, UCPTrieType type, UCPTrieVal
|
||||
|
||||
U_CDECL_END
|
||||
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
#endif
|
||||
|
@ -141,6 +141,7 @@ typedef enum UTraceFunctionNumber {
|
||||
* Indicates that a resource bundle was opened.
|
||||
*
|
||||
* Provides one C-style string to UTraceData: file name.
|
||||
* @draft ICU 65
|
||||
*/
|
||||
UTRACE_UDATA_BUNDLE,
|
||||
|
||||
|
@ -1334,7 +1334,6 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
||||
*/
|
||||
virtual void setMultiplier(int32_t newValue);
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Gets the power of ten by which number should be multiplied before formatting, which
|
||||
* can be combined with setMultiplier() to multiply by any arbitrary decimal value.
|
||||
@ -1345,7 +1344,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
||||
* This method is analogous to UNUM_SCALE in getAttribute.
|
||||
*
|
||||
* @return the current value of the power-of-ten multiplier.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
int32_t getMultiplierScale(void) const;
|
||||
|
||||
@ -1366,10 +1365,9 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
||||
* This method is analogous to UNUM_SCALE in setAttribute.
|
||||
*
|
||||
* @param newValue the new value of the power-of-ten multiplier.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
void setMultiplierScale(int32_t newValue);
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
/**
|
||||
* Get the rounding increment.
|
||||
|
@ -9,7 +9,6 @@
|
||||
#if U_SHOW_CPLUSPLUS_API
|
||||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
|
||||
#include "unicode/appendable.h"
|
||||
#include "unicode/fpositer.h"
|
||||
@ -27,6 +26,7 @@ U_NAMESPACE_BEGIN
|
||||
*/
|
||||
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Represents a span of a string containing a given field.
|
||||
*
|
||||
@ -234,6 +234,7 @@ class U_I18N_API ConstrainedFieldPosition : public UMemory {
|
||||
int8_t fConstraint = 0;
|
||||
};
|
||||
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* An abstract formatted value: a string with associated field attributes.
|
||||
@ -287,6 +288,7 @@ class U_I18N_API FormattedValue /* not : public UObject because this is an inter
|
||||
*/
|
||||
virtual Appendable& appendTo(Appendable& appendable, UErrorCode& status) const = 0;
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Iterates over field positions in the FormattedValue. This lets you determine the position
|
||||
* of specific types of substrings, like a month or a decimal separator.
|
||||
@ -310,12 +312,12 @@ class U_I18N_API FormattedValue /* not : public UObject because this is an inter
|
||||
* @draft ICU 64
|
||||
*/
|
||||
virtual UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const = 0;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
|
@ -239,7 +239,7 @@ class U_I18N_API ListFormatter : public UObject{
|
||||
UnicodeString& format(const UnicodeString items[], int32_t n_items,
|
||||
UnicodeString & appendTo, FieldPositionIterator* posIter,
|
||||
UErrorCode& errorCode) const;
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
|
@ -26,8 +26,6 @@
|
||||
#include "unicode/unumberformatter.h"
|
||||
#include "unicode/uobject.h"
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* \file
|
||||
* \brief C++ API: Library for localized number formatting introduced in ICU 60.
|
||||
@ -171,21 +169,21 @@ void touchRangeLocales(impl::RangeMacroProps& macros);
|
||||
/**
|
||||
* Extra name reserved in case it is needed in the future.
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
typedef Notation CompactNotation;
|
||||
|
||||
/**
|
||||
* Extra name reserved in case it is needed in the future.
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
typedef Notation SimpleNotation;
|
||||
|
||||
/**
|
||||
* A class that defines the notation style to be used when formatting numbers in NumberFormatter.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
class U_I18N_API Notation : public UMemory {
|
||||
public:
|
||||
@ -211,7 +209,7 @@ class U_I18N_API Notation : public UMemory {
|
||||
* </pre>
|
||||
*
|
||||
* @return A ScientificNotation for chaining or passing to the NumberFormatter notation() setter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static ScientificNotation scientific();
|
||||
|
||||
@ -235,7 +233,7 @@ class U_I18N_API Notation : public UMemory {
|
||||
* </pre>
|
||||
*
|
||||
* @return A ScientificNotation for chaining or passing to the NumberFormatter notation() setter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static ScientificNotation engineering();
|
||||
|
||||
@ -278,7 +276,7 @@ class U_I18N_API Notation : public UMemory {
|
||||
* </pre>
|
||||
*
|
||||
* @return A CompactNotation for passing to the NumberFormatter notation() setter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static CompactNotation compactShort();
|
||||
|
||||
@ -302,7 +300,7 @@ class U_I18N_API Notation : public UMemory {
|
||||
* </pre>
|
||||
*
|
||||
* @return A CompactNotation for passing to the NumberFormatter notation() setter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static CompactNotation compactLong();
|
||||
|
||||
@ -328,7 +326,7 @@ class U_I18N_API Notation : public UMemory {
|
||||
* </pre>
|
||||
*
|
||||
* @return A SimpleNotation for passing to the NumberFormatter notation() setter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static SimpleNotation simple();
|
||||
|
||||
@ -395,7 +393,7 @@ class U_I18N_API Notation : public UMemory {
|
||||
* <p>
|
||||
* To create a ScientificNotation, use one of the factory methods in {@link Notation}.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
class U_I18N_API ScientificNotation : public Notation {
|
||||
public:
|
||||
@ -410,7 +408,7 @@ class U_I18N_API ScientificNotation : public Notation {
|
||||
* @param minExponentDigits
|
||||
* The minimum number of digits to show in the exponent.
|
||||
* @return A ScientificNotation, for chaining.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
ScientificNotation withMinExponentDigits(int32_t minExponentDigits) const;
|
||||
|
||||
@ -425,7 +423,7 @@ class U_I18N_API ScientificNotation : public Notation {
|
||||
* @param exponentSignDisplay
|
||||
* The strategy for displaying the sign in the exponent.
|
||||
* @return A ScientificNotation, for chaining.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
ScientificNotation withExponentSignDisplay(UNumberSignDisplay exponentSignDisplay) const;
|
||||
|
||||
@ -446,7 +444,7 @@ class U_I18N_API ScientificNotation : public Notation {
|
||||
/**
|
||||
* Extra name reserved in case it is needed in the future.
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
typedef Precision SignificantDigitsPrecision;
|
||||
|
||||
@ -456,7 +454,7 @@ typedef Precision SignificantDigitsPrecision;
|
||||
* <p>
|
||||
* To create a Precision, use one of the factory methods.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
class U_I18N_API Precision : public UMemory {
|
||||
|
||||
@ -476,7 +474,7 @@ class U_I18N_API Precision : public UMemory {
|
||||
* http://www.serpentine.com/blog/2011/06/29/here-be-dragons-advances-in-problems-you-didnt-even-know-you-had/
|
||||
*
|
||||
* @return A Precision for chaining or passing to the NumberFormatter precision() setter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static Precision unlimited();
|
||||
|
||||
@ -484,7 +482,7 @@ class U_I18N_API Precision : public UMemory {
|
||||
* Show numbers rounded if necessary to the nearest integer.
|
||||
*
|
||||
* @return A FractionPrecision for chaining or passing to the NumberFormatter precision() setter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static FractionPrecision integer();
|
||||
|
||||
@ -513,7 +511,7 @@ class U_I18N_API Precision : public UMemory {
|
||||
* The minimum and maximum number of numerals to display after the decimal separator (rounding if too
|
||||
* long or padding with zeros if too short).
|
||||
* @return A FractionPrecision for chaining or passing to the NumberFormatter precision() setter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static FractionPrecision fixedFraction(int32_t minMaxFractionPlaces);
|
||||
|
||||
@ -528,7 +526,7 @@ class U_I18N_API Precision : public UMemory {
|
||||
* The minimum number of numerals to display after the decimal separator (padding with zeros if
|
||||
* necessary).
|
||||
* @return A FractionPrecision for chaining or passing to the NumberFormatter precision() setter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static FractionPrecision minFraction(int32_t minFractionPlaces);
|
||||
|
||||
@ -540,7 +538,7 @@ class U_I18N_API Precision : public UMemory {
|
||||
* @param maxFractionPlaces
|
||||
* The maximum number of numerals to display after the decimal mark (rounding if necessary).
|
||||
* @return A FractionPrecision for chaining or passing to the NumberFormatter precision() setter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static FractionPrecision maxFraction(int32_t maxFractionPlaces);
|
||||
|
||||
@ -555,7 +553,7 @@ class U_I18N_API Precision : public UMemory {
|
||||
* @param maxFractionPlaces
|
||||
* The maximum number of numerals to display after the decimal separator (rounding if necessary).
|
||||
* @return A FractionPrecision for chaining or passing to the NumberFormatter precision() setter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static FractionPrecision minMaxFraction(int32_t minFractionPlaces, int32_t maxFractionPlaces);
|
||||
|
||||
@ -570,7 +568,7 @@ class U_I18N_API Precision : public UMemory {
|
||||
* The minimum and maximum number of significant digits to display (rounding if too long or padding with
|
||||
* zeros if too short).
|
||||
* @return A precision for chaining or passing to the NumberFormatter precision() setter.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
static SignificantDigitsPrecision fixedSignificantDigits(int32_t minMaxSignificantDigits);
|
||||
|
||||
@ -584,7 +582,7 @@ class U_I18N_API Precision : public UMemory {
|
||||
* @param minSignificantDigits
|
||||
* The minimum number of significant digits to display (padding with zeros if too short).
|
||||
* @return A precision for chaining or passing to the NumberFormatter precision() setter.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
static SignificantDigitsPrecision minSignificantDigits(int32_t minSignificantDigits);
|
||||
|
||||
@ -594,7 +592,7 @@ class U_I18N_API Precision : public UMemory {
|
||||
* @param maxSignificantDigits
|
||||
* The maximum number of significant digits to display (rounding if too long).
|
||||
* @return A precision for chaining or passing to the NumberFormatter precision() setter.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
static SignificantDigitsPrecision maxSignificantDigits(int32_t maxSignificantDigits);
|
||||
|
||||
@ -607,7 +605,7 @@ class U_I18N_API Precision : public UMemory {
|
||||
* @param maxSignificantDigits
|
||||
* The maximum number of significant digits to display (rounding if necessary).
|
||||
* @return A precision for chaining or passing to the NumberFormatter precision() setter.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
static SignificantDigitsPrecision minMaxSignificantDigits(int32_t minSignificantDigits,
|
||||
int32_t maxSignificantDigits);
|
||||
@ -629,7 +627,7 @@ class U_I18N_API Precision : public UMemory {
|
||||
* @param roundingIncrement
|
||||
* The increment to which to round numbers.
|
||||
* @return A precision for chaining or passing to the NumberFormatter precision() setter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static IncrementPrecision increment(double roundingIncrement);
|
||||
|
||||
@ -648,7 +646,7 @@ class U_I18N_API Precision : public UMemory {
|
||||
* Either STANDARD (for digital transactions) or CASH (for transactions where the rounding increment may
|
||||
* be limited by the available denominations of cash or coins).
|
||||
* @return A CurrencyPrecision for chaining or passing to the NumberFormatter precision() setter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static CurrencyPrecision currency(UCurrencyUsage currencyUsage);
|
||||
|
||||
@ -775,7 +773,7 @@ class U_I18N_API Precision : public UMemory {
|
||||
* <p>
|
||||
* To create a FractionPrecision, use one of the factory methods on Precision.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
class U_I18N_API FractionPrecision : public Precision {
|
||||
public:
|
||||
@ -793,7 +791,7 @@ class U_I18N_API FractionPrecision : public Precision {
|
||||
* @param minSignificantDigits
|
||||
* The number of significant figures to guarantee.
|
||||
* @return A precision for chaining or passing to the NumberFormatter precision() setter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
Precision withMinDigits(int32_t minSignificantDigits) const;
|
||||
|
||||
@ -812,7 +810,7 @@ class U_I18N_API FractionPrecision : public Precision {
|
||||
* @param maxSignificantDigits
|
||||
* Round the number to no more than this number of significant figures.
|
||||
* @return A precision for chaining or passing to the NumberFormatter precision() setter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
Precision withMaxDigits(int32_t maxSignificantDigits) const;
|
||||
|
||||
@ -831,7 +829,7 @@ class U_I18N_API FractionPrecision : public Precision {
|
||||
* <p>
|
||||
* To create a CurrencyPrecision, use one of the factory methods on Precision.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
class U_I18N_API CurrencyPrecision : public Precision {
|
||||
public:
|
||||
@ -850,7 +848,7 @@ class U_I18N_API CurrencyPrecision : public Precision {
|
||||
* @param currency
|
||||
* The currency to associate with this rounding precision.
|
||||
* @return A precision for chaining or passing to the NumberFormatter precision() setter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
Precision withCurrency(const CurrencyUnit ¤cy) const;
|
||||
|
||||
@ -869,7 +867,7 @@ class U_I18N_API CurrencyPrecision : public Precision {
|
||||
* <p>
|
||||
* To create an IncrementPrecision, use one of the factory methods on Precision.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
class U_I18N_API IncrementPrecision : public Precision {
|
||||
public:
|
||||
@ -886,7 +884,7 @@ class U_I18N_API IncrementPrecision : public Precision {
|
||||
*
|
||||
* @param minFrac The minimum number of digits after the decimal separator.
|
||||
* @return A precision for chaining or passing to the NumberFormatter precision() setter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
Precision withMinFraction(int32_t minFrac) const;
|
||||
|
||||
@ -904,7 +902,7 @@ class U_I18N_API IncrementPrecision : public Precision {
|
||||
* <p>
|
||||
* To create an IntegerWidth, use one of the factory methods.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
* @see NumberFormatter
|
||||
*/
|
||||
class U_I18N_API IntegerWidth : public UMemory {
|
||||
@ -918,7 +916,7 @@ class U_I18N_API IntegerWidth : public UMemory {
|
||||
* @param minInt
|
||||
* The minimum number of places before the decimal separator.
|
||||
* @return An IntegerWidth for chaining or passing to the NumberFormatter integerWidth() setter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static IntegerWidth zeroFillTo(int32_t minInt);
|
||||
|
||||
@ -931,7 +929,7 @@ class U_I18N_API IntegerWidth : public UMemory {
|
||||
* The maximum number of places before the decimal separator. maxInt == -1 means no
|
||||
* truncation.
|
||||
* @return An IntegerWidth for passing to the NumberFormatter integerWidth() setter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
IntegerWidth truncateAt(int32_t maxInt);
|
||||
|
||||
@ -998,7 +996,7 @@ class U_I18N_API IntegerWidth : public UMemory {
|
||||
* <p>
|
||||
* To create a Scale, use one of the factory methods.
|
||||
*
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
class U_I18N_API Scale : public UMemory {
|
||||
public:
|
||||
@ -1006,7 +1004,7 @@ class U_I18N_API Scale : public UMemory {
|
||||
* Do not change the value of numbers when formatting or parsing.
|
||||
*
|
||||
* @return A Scale to prevent any multiplication.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
static Scale none();
|
||||
|
||||
@ -1018,7 +1016,7 @@ class U_I18N_API Scale : public UMemory {
|
||||
* </pre>
|
||||
*
|
||||
* @return A Scale for passing to the setter in NumberFormatter.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
static Scale powerOfTen(int32_t power);
|
||||
|
||||
@ -1032,7 +1030,7 @@ class U_I18N_API Scale : public UMemory {
|
||||
* Also see the version of this method that takes a double.
|
||||
*
|
||||
* @return A Scale for passing to the setter in NumberFormatter.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
static Scale byDecimal(StringPiece multiplicand);
|
||||
|
||||
@ -1042,7 +1040,7 @@ class U_I18N_API Scale : public UMemory {
|
||||
* This method takes a double; also see the version of this method that takes an exact decimal.
|
||||
*
|
||||
* @return A Scale for passing to the setter in NumberFormatter.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
static Scale byDouble(double multiplicand);
|
||||
|
||||
@ -1050,26 +1048,26 @@ class U_I18N_API Scale : public UMemory {
|
||||
* Multiply a number by both a power of ten and by an arbitrary double value.
|
||||
*
|
||||
* @return A Scale for passing to the setter in NumberFormatter.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
static Scale byDoubleAndPowerOfTen(double multiplicand, int32_t power);
|
||||
|
||||
// We need a custom destructor for the DecNum, which means we need to declare
|
||||
// the copy/move constructor/assignment quartet.
|
||||
|
||||
/** @draft ICU 62 */
|
||||
/** @stable ICU 62 */
|
||||
Scale(const Scale& other);
|
||||
|
||||
/** @draft ICU 62 */
|
||||
/** @stable ICU 62 */
|
||||
Scale& operator=(const Scale& other);
|
||||
|
||||
/** @draft ICU 62 */
|
||||
/** @stable ICU 62 */
|
||||
Scale(Scale&& src) U_NOEXCEPT;
|
||||
|
||||
/** @draft ICU 62 */
|
||||
/** @stable ICU 62 */
|
||||
Scale& operator=(Scale&& src) U_NOEXCEPT;
|
||||
|
||||
/** @draft ICU 62 */
|
||||
/** @stable ICU 62 */
|
||||
~Scale();
|
||||
|
||||
#ifndef U_HIDE_INTERNAL_API
|
||||
@ -1469,7 +1467,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The notation strategy to use.
|
||||
* @return The fluent chain.
|
||||
* @see Notation
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
Derived notation(const Notation ¬ation) const &;
|
||||
|
||||
@ -1480,7 +1478,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The notation strategy to use.
|
||||
* @return The fluent chain.
|
||||
* @see #notation
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Derived notation(const Notation ¬ation) &&;
|
||||
|
||||
@ -1525,7 +1523,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* @see Currency
|
||||
* @see NoUnit
|
||||
* @see #perUnit
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
Derived unit(const icu::MeasureUnit &unit) const &;
|
||||
|
||||
@ -1536,7 +1534,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The unit to render.
|
||||
* @return The fluent chain.
|
||||
* @see #unit
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Derived unit(const icu::MeasureUnit &unit) &&;
|
||||
|
||||
@ -1551,7 +1549,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* @return The fluent chain.
|
||||
* @see #unit
|
||||
* @see MeasureUnit
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
Derived adoptUnit(icu::MeasureUnit *unit) const &;
|
||||
|
||||
@ -1562,7 +1560,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The unit to render.
|
||||
* @return The fluent chain.
|
||||
* @see #adoptUnit
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Derived adoptUnit(icu::MeasureUnit *unit) &&;
|
||||
|
||||
@ -1586,7 +1584,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The unit to render in the denominator.
|
||||
* @return The fluent chain
|
||||
* @see #unit
|
||||
* @draft ICU 61
|
||||
* @stable ICU 61
|
||||
*/
|
||||
Derived perUnit(const icu::MeasureUnit &perUnit) const &;
|
||||
|
||||
@ -1597,7 +1595,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The unit to render in the denominator.
|
||||
* @return The fluent chain.
|
||||
* @see #perUnit
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Derived perUnit(const icu::MeasureUnit &perUnit) &&;
|
||||
|
||||
@ -1612,7 +1610,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* @return The fluent chain.
|
||||
* @see #perUnit
|
||||
* @see MeasureUnit
|
||||
* @draft ICU 61
|
||||
* @stable ICU 61
|
||||
*/
|
||||
Derived adoptPerUnit(icu::MeasureUnit *perUnit) const &;
|
||||
|
||||
@ -1623,7 +1621,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The unit to render in the denominator.
|
||||
* @return The fluent chain.
|
||||
* @see #adoptPerUnit
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Derived adoptPerUnit(icu::MeasureUnit *perUnit) &&;
|
||||
|
||||
@ -1655,7 +1653,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The rounding precision to use.
|
||||
* @return The fluent chain.
|
||||
* @see Precision
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Derived precision(const Precision& precision) const &;
|
||||
|
||||
@ -1666,7 +1664,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The rounding precision to use.
|
||||
* @return The fluent chain.
|
||||
* @see #precision
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Derived precision(const Precision& precision) &&;
|
||||
|
||||
@ -1686,7 +1684,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
*
|
||||
* @param roundingMode The rounding mode to use.
|
||||
* @return The fluent chain.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Derived roundingMode(UNumberFormatRoundingMode roundingMode) const &;
|
||||
|
||||
@ -1696,7 +1694,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* @param roundingMode The rounding mode to use.
|
||||
* @return The fluent chain.
|
||||
* @see #roundingMode
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Derived roundingMode(UNumberFormatRoundingMode roundingMode) &&;
|
||||
|
||||
@ -1725,7 +1723,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* @param strategy
|
||||
* The grouping strategy to use.
|
||||
* @return The fluent chain.
|
||||
* @draft ICU 61
|
||||
* @stable ICU 61
|
||||
*/
|
||||
Derived grouping(UNumberGroupingStrategy strategy) const &;
|
||||
|
||||
@ -1736,7 +1734,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The grouping strategy to use.
|
||||
* @return The fluent chain.
|
||||
* @see #grouping
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Derived grouping(UNumberGroupingStrategy strategy) &&;
|
||||
|
||||
@ -1762,7 +1760,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The integer width to use.
|
||||
* @return The fluent chain.
|
||||
* @see IntegerWidth
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
Derived integerWidth(const IntegerWidth &style) const &;
|
||||
|
||||
@ -1773,7 +1771,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The integer width to use.
|
||||
* @return The fluent chain.
|
||||
* @see #integerWidth
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Derived integerWidth(const IntegerWidth &style) &&;
|
||||
|
||||
@ -1815,7 +1813,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The DecimalFormatSymbols to use.
|
||||
* @return The fluent chain.
|
||||
* @see DecimalFormatSymbols
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
Derived symbols(const DecimalFormatSymbols &symbols) const &;
|
||||
|
||||
@ -1826,7 +1824,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The DecimalFormatSymbols to use.
|
||||
* @return The fluent chain.
|
||||
* @see #symbols
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Derived symbols(const DecimalFormatSymbols &symbols) &&;
|
||||
|
||||
@ -1861,7 +1859,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The NumberingSystem to use.
|
||||
* @return The fluent chain.
|
||||
* @see NumberingSystem
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
Derived adoptSymbols(NumberingSystem *symbols) const &;
|
||||
|
||||
@ -1872,7 +1870,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The NumberingSystem to use.
|
||||
* @return The fluent chain.
|
||||
* @see #adoptSymbols
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Derived adoptSymbols(NumberingSystem *symbols) &&;
|
||||
|
||||
@ -1899,7 +1897,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The width to use when rendering numbers.
|
||||
* @return The fluent chain
|
||||
* @see UNumberUnitWidth
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
Derived unitWidth(UNumberUnitWidth width) const &;
|
||||
|
||||
@ -1910,7 +1908,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The width to use when rendering numbers.
|
||||
* @return The fluent chain.
|
||||
* @see #unitWidth
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Derived unitWidth(UNumberUnitWidth width) &&;
|
||||
|
||||
@ -1937,7 +1935,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The sign display strategy to use when rendering numbers.
|
||||
* @return The fluent chain
|
||||
* @see UNumberSignDisplay
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
Derived sign(UNumberSignDisplay style) const &;
|
||||
|
||||
@ -1948,7 +1946,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The sign display strategy to use when rendering numbers.
|
||||
* @return The fluent chain.
|
||||
* @see #sign
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Derived sign(UNumberSignDisplay style) &&;
|
||||
|
||||
@ -1975,7 +1973,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The decimal separator display strategy to use when rendering numbers.
|
||||
* @return The fluent chain
|
||||
* @see UNumberDecimalSeparatorDisplay
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
Derived decimal(UNumberDecimalSeparatorDisplay style) const &;
|
||||
|
||||
@ -1986,7 +1984,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The decimal separator display strategy to use when rendering numbers.
|
||||
* @return The fluent chain.
|
||||
* @see #decimal
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Derived decimal(UNumberDecimalSeparatorDisplay style) &&;
|
||||
|
||||
@ -2012,7 +2010,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* @param scale
|
||||
* The scale to apply when rendering numbers.
|
||||
* @return The fluent chain
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Derived scale(const Scale &scale) const &;
|
||||
|
||||
@ -2023,7 +2021,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* The scale to apply when rendering numbers.
|
||||
* @return The fluent chain.
|
||||
* @see #scale
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Derived scale(const Scale &scale) &&;
|
||||
|
||||
@ -2080,10 +2078,11 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* behavior should produce the same skeleton.
|
||||
*
|
||||
* @return A number skeleton string with behavior corresponding to this number formatter.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
UnicodeString toSkeleton(UErrorCode& status) const;
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Returns the current (Un)LocalizedNumberFormatter as a LocalPointer
|
||||
* wrapping a heap-allocated copy of the current object.
|
||||
@ -2105,12 +2104,13 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* @draft ICU 64
|
||||
*/
|
||||
LocalPointer<Derived> clone() &&;
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
/**
|
||||
* Sets the UErrorCode if an error occurred in the fluent chain.
|
||||
* Preserves older error codes in the outErrorCode.
|
||||
* @return TRUE if U_FAILURE(outErrorCode)
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
UBool copyErrorTo(UErrorCode &outErrorCode) const {
|
||||
if (U_FAILURE(outErrorCode)) {
|
||||
@ -2143,7 +2143,7 @@ class U_I18N_API NumberFormatterSettings {
|
||||
* Instances of this class are immutable and thread-safe.
|
||||
*
|
||||
* @see NumberFormatter
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
class U_I18N_API UnlocalizedNumberFormatter
|
||||
: public NumberFormatterSettings<UnlocalizedNumberFormatter>, public UMemory {
|
||||
@ -2156,7 +2156,7 @@ class U_I18N_API UnlocalizedNumberFormatter
|
||||
* @param locale
|
||||
* The locale to use when loading data for number formatting.
|
||||
* @return The fluent chain.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
LocalizedNumberFormatter locale(const icu::Locale &locale) const &;
|
||||
|
||||
@ -2167,40 +2167,40 @@ class U_I18N_API UnlocalizedNumberFormatter
|
||||
* The locale to use when loading data for number formatting.
|
||||
* @return The fluent chain.
|
||||
* @see #locale
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
LocalizedNumberFormatter locale(const icu::Locale &locale) &&;
|
||||
|
||||
/**
|
||||
* Default constructor: puts the formatter into a valid but undefined state.
|
||||
*
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
UnlocalizedNumberFormatter() = default;
|
||||
|
||||
/**
|
||||
* Returns a copy of this UnlocalizedNumberFormatter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
UnlocalizedNumberFormatter(const UnlocalizedNumberFormatter &other);
|
||||
|
||||
/**
|
||||
* Move constructor:
|
||||
* The source UnlocalizedNumberFormatter will be left in a valid but undefined state.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
UnlocalizedNumberFormatter(UnlocalizedNumberFormatter&& src) U_NOEXCEPT;
|
||||
|
||||
/**
|
||||
* Copy assignment operator.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
UnlocalizedNumberFormatter& operator=(const UnlocalizedNumberFormatter& other);
|
||||
|
||||
/**
|
||||
* Move assignment operator:
|
||||
* The source UnlocalizedNumberFormatter will be left in a valid but undefined state.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
UnlocalizedNumberFormatter& operator=(UnlocalizedNumberFormatter&& src) U_NOEXCEPT;
|
||||
|
||||
@ -2223,7 +2223,7 @@ class U_I18N_API UnlocalizedNumberFormatter
|
||||
* Instances of this class are immutable and thread-safe.
|
||||
*
|
||||
* @see NumberFormatter
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
class U_I18N_API LocalizedNumberFormatter
|
||||
: public NumberFormatterSettings<LocalizedNumberFormatter>, public UMemory {
|
||||
@ -2237,7 +2237,7 @@ class U_I18N_API LocalizedNumberFormatter
|
||||
* @param status
|
||||
* Set to an ErrorCode if one occurred in the setter chain or during formatting.
|
||||
* @return A FormattedNumber object; call .toString() to get the string.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
FormattedNumber formatInt(int64_t value, UErrorCode &status) const;
|
||||
|
||||
@ -2250,7 +2250,7 @@ class U_I18N_API LocalizedNumberFormatter
|
||||
* @param status
|
||||
* Set to an ErrorCode if one occurred in the setter chain or during formatting.
|
||||
* @return A FormattedNumber object; call .toString() to get the string.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
FormattedNumber formatDouble(double value, UErrorCode &status) const;
|
||||
|
||||
@ -2266,7 +2266,7 @@ class U_I18N_API LocalizedNumberFormatter
|
||||
* @param status
|
||||
* Set to an ErrorCode if one occurred in the setter chain or during formatting.
|
||||
* @return A FormattedNumber object; call .toString() to get the string.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
FormattedNumber formatDecimal(StringPiece value, UErrorCode& status) const;
|
||||
|
||||
@ -2307,40 +2307,40 @@ class U_I18N_API LocalizedNumberFormatter
|
||||
* The caller owns the returned object and must delete it when finished.
|
||||
*
|
||||
* @return A Format wrapping this LocalizedNumberFormatter.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Format* toFormat(UErrorCode& status) const;
|
||||
|
||||
/**
|
||||
* Default constructor: puts the formatter into a valid but undefined state.
|
||||
*
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
LocalizedNumberFormatter() = default;
|
||||
|
||||
/**
|
||||
* Returns a copy of this LocalizedNumberFormatter.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
LocalizedNumberFormatter(const LocalizedNumberFormatter &other);
|
||||
|
||||
/**
|
||||
* Move constructor:
|
||||
* The source LocalizedNumberFormatter will be left in a valid but undefined state.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
LocalizedNumberFormatter(LocalizedNumberFormatter&& src) U_NOEXCEPT;
|
||||
|
||||
/**
|
||||
* Copy assignment operator.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
LocalizedNumberFormatter& operator=(const LocalizedNumberFormatter& other);
|
||||
|
||||
/**
|
||||
* Move assignment operator:
|
||||
* The source LocalizedNumberFormatter will be left in a valid but undefined state.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
LocalizedNumberFormatter& operator=(LocalizedNumberFormatter&& src) U_NOEXCEPT;
|
||||
|
||||
@ -2364,7 +2364,7 @@ class U_I18N_API LocalizedNumberFormatter
|
||||
|
||||
/**
|
||||
* Destruct this LocalizedNumberFormatter, cleaning up any memory it might own.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
~LocalizedNumberFormatter();
|
||||
|
||||
@ -2405,27 +2405,28 @@ class U_I18N_API LocalizedNumberFormatter
|
||||
*
|
||||
* Instances of this class are immutable and thread-safe.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
|
||||
public:
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Default constructor; makes an empty FormattedNumber.
|
||||
* @draft ICU 64
|
||||
*/
|
||||
FormattedNumber()
|
||||
: fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {}
|
||||
|
||||
#endif
|
||||
/**
|
||||
* Move constructor: Leaves the source FormattedNumber in an undefined state.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
FormattedNumber(FormattedNumber&& src) U_NOEXCEPT;
|
||||
|
||||
/**
|
||||
* Destruct an instance of FormattedNumber.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
virtual ~FormattedNumber() U_OVERRIDE;
|
||||
|
||||
@ -2437,7 +2438,7 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
|
||||
|
||||
/**
|
||||
* Move assignment: Leaves the source FormattedNumber in an undefined state.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
FormattedNumber& operator=(FormattedNumber&& src) U_NOEXCEPT;
|
||||
|
||||
@ -2447,7 +2448,7 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
|
||||
*
|
||||
* For more information, see FormattedValue::toString()
|
||||
*
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
UnicodeString toString(UErrorCode& status) const U_OVERRIDE;
|
||||
|
||||
@ -2461,10 +2462,11 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
|
||||
*
|
||||
* For more information, see FormattedValue::appendTo()
|
||||
*
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
Appendable &appendTo(Appendable& appendable, UErrorCode& status) const U_OVERRIDE;
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
// Copydoc: this method is new in ICU 64
|
||||
/** @copydoc FormattedValue::nextPosition() */
|
||||
UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const U_OVERRIDE;
|
||||
@ -2541,6 +2543,7 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
|
||||
*/
|
||||
template<typename StringClass>
|
||||
inline StringClass toDecimalNumber(UErrorCode& status) const;
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
#ifndef U_HIDE_INTERNAL_API
|
||||
|
||||
@ -2586,6 +2589,7 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
|
||||
};
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
// Note: This is draft ICU 65
|
||||
template<typename StringClass>
|
||||
StringClass FormattedNumber::toDecimalNumber(UErrorCode& status) const {
|
||||
StringClass result;
|
||||
@ -2593,12 +2597,12 @@ StringClass FormattedNumber::toDecimalNumber(UErrorCode& status) const {
|
||||
toDecimalNumber(sink, status);
|
||||
return result;
|
||||
};
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* See the main description in numberformatter.h for documentation and examples.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
class U_I18N_API NumberFormatter final {
|
||||
public:
|
||||
@ -2607,7 +2611,7 @@ class U_I18N_API NumberFormatter final {
|
||||
* the call site.
|
||||
*
|
||||
* @return An {@link UnlocalizedNumberFormatter}, to be used for chaining.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static UnlocalizedNumberFormatter with();
|
||||
|
||||
@ -2618,7 +2622,7 @@ class U_I18N_API NumberFormatter final {
|
||||
* @param locale
|
||||
* The locale from which to load formats and symbols for number formatting.
|
||||
* @return A {@link LocalizedNumberFormatter}, to be used for chaining.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static LocalizedNumberFormatter withLocale(const Locale &locale);
|
||||
|
||||
@ -2634,10 +2638,11 @@ class U_I18N_API NumberFormatter final {
|
||||
* @param status
|
||||
* Set to U_NUMBER_SKELETON_SYNTAX_ERROR if the skeleton was invalid.
|
||||
* @return An UnlocalizedNumberFormatter, to be used for chaining.
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
static UnlocalizedNumberFormatter forSkeleton(const UnicodeString& skeleton, UErrorCode& status);
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Call this method at the beginning of a NumberFormatter fluent chain to create an instance based
|
||||
* on a given number skeleton string.
|
||||
@ -2657,6 +2662,7 @@ class U_I18N_API NumberFormatter final {
|
||||
*/
|
||||
static UnlocalizedNumberFormatter forSkeleton(const UnicodeString& skeleton,
|
||||
UParseError& perror, UErrorCode& status);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Use factory methods instead of the constructor to create a NumberFormatter.
|
||||
@ -2667,8 +2673,6 @@ class U_I18N_API NumberFormatter final {
|
||||
} // namespace number
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
|
@ -17,8 +17,6 @@
|
||||
#include "unicode/fpositer.h"
|
||||
#include "unicode/numberformatter.h"
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* \file
|
||||
* \brief C++ API: Library for localized formatting of number, currency, and unit ranges.
|
||||
@ -49,7 +47,7 @@
|
||||
/**
|
||||
* Defines how to merge fields that are identical across the range sign.
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
typedef enum UNumberRangeCollapse {
|
||||
/**
|
||||
@ -58,14 +56,14 @@ typedef enum UNumberRangeCollapse {
|
||||
*
|
||||
* The heuristics used for this option are subject to change over time.
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UNUM_RANGE_COLLAPSE_AUTO,
|
||||
|
||||
/**
|
||||
* Do not collapse any part of the number. Example: "3.2 thousand kilograms – 5.3 thousand kilograms"
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UNUM_RANGE_COLLAPSE_NONE,
|
||||
|
||||
@ -73,7 +71,7 @@ typedef enum UNumberRangeCollapse {
|
||||
* Collapse the unit part of the number, but not the notation, if present. Example: "3.2 thousand – 5.3 thousand
|
||||
* kilograms"
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UNUM_RANGE_COLLAPSE_UNIT,
|
||||
|
||||
@ -81,7 +79,7 @@ typedef enum UNumberRangeCollapse {
|
||||
* Collapse any field that is equal across the range sign. May introduce ambiguity on the magnitude of the
|
||||
* number. Example: "3.2 – 5.3 thousand kilograms"
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UNUM_RANGE_COLLAPSE_ALL
|
||||
} UNumberRangeCollapse;
|
||||
@ -90,14 +88,14 @@ typedef enum UNumberRangeCollapse {
|
||||
* Defines the behavior when the two numbers in the range are identical after rounding. To programmatically detect
|
||||
* when the identity fallback is used, compare the lower and upper BigDecimals via FormattedNumber.
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
* @see NumberRangeFormatter
|
||||
*/
|
||||
typedef enum UNumberRangeIdentityFallback {
|
||||
/**
|
||||
* Show the number as a single value rather than a range. Example: "$5"
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UNUM_IDENTITY_FALLBACK_SINGLE_VALUE,
|
||||
|
||||
@ -105,7 +103,7 @@ typedef enum UNumberRangeIdentityFallback {
|
||||
* Show the number using a locale-sensitive approximation pattern. If the numbers were the same before rounding,
|
||||
* show the single value. Example: "~$5" or "$5"
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UNUM_IDENTITY_FALLBACK_APPROXIMATELY_OR_SINGLE_VALUE,
|
||||
|
||||
@ -113,7 +111,7 @@ typedef enum UNumberRangeIdentityFallback {
|
||||
* Show the number using a locale-sensitive approximation pattern. Use the range pattern always, even if the
|
||||
* inputs are the same. Example: "~$5"
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UNUM_IDENTITY_FALLBACK_APPROXIMATELY,
|
||||
|
||||
@ -121,7 +119,7 @@ typedef enum UNumberRangeIdentityFallback {
|
||||
* Show the number as the range of two equal values. Use the range pattern always, even if the inputs are the
|
||||
* same. Example (with RangeCollapse.NONE): "$5 – $5"
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UNUM_IDENTITY_FALLBACK_RANGE
|
||||
} UNumberRangeIdentityFallback;
|
||||
@ -130,14 +128,14 @@ typedef enum UNumberRangeIdentityFallback {
|
||||
* Used in the result class FormattedNumberRange to indicate to the user whether the numbers formatted in the range
|
||||
* were equal or not, and whether or not the identity fallback was applied.
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
* @see NumberRangeFormatter
|
||||
*/
|
||||
typedef enum UNumberRangeIdentityResult {
|
||||
/**
|
||||
* Used to indicate that the two numbers in the range were equal, even before any rounding rules were applied.
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
* @see NumberRangeFormatter
|
||||
*/
|
||||
UNUM_IDENTITY_RESULT_EQUAL_BEFORE_ROUNDING,
|
||||
@ -145,7 +143,7 @@ typedef enum UNumberRangeIdentityResult {
|
||||
/**
|
||||
* Used to indicate that the two numbers in the range were equal, but only after rounding rules were applied.
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
* @see NumberRangeFormatter
|
||||
*/
|
||||
UNUM_IDENTITY_RESULT_EQUAL_AFTER_ROUNDING,
|
||||
@ -153,7 +151,7 @@ typedef enum UNumberRangeIdentityResult {
|
||||
/**
|
||||
* Used to indicate that the two numbers in the range were not equal, even after rounding rules were applied.
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
* @see NumberRangeFormatter
|
||||
*/
|
||||
UNUM_IDENTITY_RESULT_NOT_EQUAL,
|
||||
@ -259,7 +257,7 @@ class U_I18N_API NumberRangeFormatterSettings {
|
||||
* @param formatter
|
||||
* The formatter to use for both numbers in the range.
|
||||
* @return The fluent chain.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
Derived numberFormatterBoth(const UnlocalizedNumberFormatter &formatter) const &;
|
||||
|
||||
@ -270,7 +268,7 @@ class U_I18N_API NumberRangeFormatterSettings {
|
||||
* The formatter to use for both numbers in the range.
|
||||
* @return The fluent chain.
|
||||
* @see #numberFormatterBoth
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
Derived numberFormatterBoth(const UnlocalizedNumberFormatter &formatter) &&;
|
||||
|
||||
@ -281,7 +279,7 @@ class U_I18N_API NumberRangeFormatterSettings {
|
||||
* The formatter to use for both numbers in the range.
|
||||
* @return The fluent chain.
|
||||
* @see #numberFormatterBoth
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
Derived numberFormatterBoth(UnlocalizedNumberFormatter &&formatter) const &;
|
||||
|
||||
@ -292,7 +290,7 @@ class U_I18N_API NumberRangeFormatterSettings {
|
||||
* The formatter to use for both numbers in the range.
|
||||
* @return The fluent chain.
|
||||
* @see #numberFormatterBoth
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
Derived numberFormatterBoth(UnlocalizedNumberFormatter &&formatter) &&;
|
||||
|
||||
@ -305,7 +303,7 @@ class U_I18N_API NumberRangeFormatterSettings {
|
||||
* @param formatterFirst
|
||||
* The formatter to use for the first number in the range.
|
||||
* @return The fluent chain.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
Derived numberFormatterFirst(const UnlocalizedNumberFormatter &formatterFirst) const &;
|
||||
|
||||
@ -316,7 +314,7 @@ class U_I18N_API NumberRangeFormatterSettings {
|
||||
* The formatter to use for the first number in the range.
|
||||
* @return The fluent chain.
|
||||
* @see #numberFormatterFirst
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
Derived numberFormatterFirst(const UnlocalizedNumberFormatter &formatterFirst) &&;
|
||||
|
||||
@ -327,7 +325,7 @@ class U_I18N_API NumberRangeFormatterSettings {
|
||||
* The formatter to use for the first number in the range.
|
||||
* @return The fluent chain.
|
||||
* @see #numberFormatterFirst
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
Derived numberFormatterFirst(UnlocalizedNumberFormatter &&formatterFirst) const &;
|
||||
|
||||
@ -338,7 +336,7 @@ class U_I18N_API NumberRangeFormatterSettings {
|
||||
* The formatter to use for the first number in the range.
|
||||
* @return The fluent chain.
|
||||
* @see #numberFormatterFirst
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
Derived numberFormatterFirst(UnlocalizedNumberFormatter &&formatterFirst) &&;
|
||||
|
||||
@ -351,7 +349,7 @@ class U_I18N_API NumberRangeFormatterSettings {
|
||||
* @param formatterSecond
|
||||
* The formatter to use for the second number in the range.
|
||||
* @return The fluent chain.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
Derived numberFormatterSecond(const UnlocalizedNumberFormatter &formatterSecond) const &;
|
||||
|
||||
@ -362,7 +360,7 @@ class U_I18N_API NumberRangeFormatterSettings {
|
||||
* The formatter to use for the second number in the range.
|
||||
* @return The fluent chain.
|
||||
* @see #numberFormatterSecond
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
Derived numberFormatterSecond(const UnlocalizedNumberFormatter &formatterSecond) &&;
|
||||
|
||||
@ -373,7 +371,7 @@ class U_I18N_API NumberRangeFormatterSettings {
|
||||
* The formatter to use for the second number in the range.
|
||||
* @return The fluent chain.
|
||||
* @see #numberFormatterSecond
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
Derived numberFormatterSecond(UnlocalizedNumberFormatter &&formatterSecond) const &;
|
||||
|
||||
@ -384,7 +382,7 @@ class U_I18N_API NumberRangeFormatterSettings {
|
||||
* The formatter to use for the second number in the range.
|
||||
* @return The fluent chain.
|
||||
* @see #numberFormatterSecond
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
Derived numberFormatterSecond(UnlocalizedNumberFormatter &&formatterSecond) &&;
|
||||
|
||||
@ -403,7 +401,7 @@ class U_I18N_API NumberRangeFormatterSettings {
|
||||
* @param collapse
|
||||
* The collapsing strategy to use for this range.
|
||||
* @return The fluent chain.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
Derived collapse(UNumberRangeCollapse collapse) const &;
|
||||
|
||||
@ -414,7 +412,7 @@ class U_I18N_API NumberRangeFormatterSettings {
|
||||
* The collapsing strategy to use for this range.
|
||||
* @return The fluent chain.
|
||||
* @see #collapse
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
Derived collapse(UNumberRangeCollapse collapse) &&;
|
||||
|
||||
@ -436,7 +434,7 @@ class U_I18N_API NumberRangeFormatterSettings {
|
||||
* @param identityFallback
|
||||
* The strategy to use when formatting two numbers that end up being the same.
|
||||
* @return The fluent chain.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
Derived identityFallback(UNumberRangeIdentityFallback identityFallback) const &;
|
||||
|
||||
@ -447,7 +445,7 @@ class U_I18N_API NumberRangeFormatterSettings {
|
||||
* The strategy to use when formatting two numbers that end up being the same.
|
||||
* @return The fluent chain.
|
||||
* @see #identityFallback
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
Derived identityFallback(UNumberRangeIdentityFallback identityFallback) &&;
|
||||
|
||||
@ -477,7 +475,7 @@ class U_I18N_API NumberRangeFormatterSettings {
|
||||
* Sets the UErrorCode if an error occurred in the fluent chain.
|
||||
* Preserves older error codes in the outErrorCode.
|
||||
* @return TRUE if U_FAILURE(outErrorCode)
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UBool copyErrorTo(UErrorCode &outErrorCode) const {
|
||||
if (U_FAILURE(outErrorCode)) {
|
||||
@ -506,7 +504,7 @@ class U_I18N_API NumberRangeFormatterSettings {
|
||||
* Instances of this class are immutable and thread-safe.
|
||||
*
|
||||
* @see NumberRangeFormatter
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
class U_I18N_API UnlocalizedNumberRangeFormatter
|
||||
: public NumberRangeFormatterSettings<UnlocalizedNumberRangeFormatter>, public UMemory {
|
||||
@ -519,7 +517,7 @@ class U_I18N_API UnlocalizedNumberRangeFormatter
|
||||
* @param locale
|
||||
* The locale to use when loading data for number formatting.
|
||||
* @return The fluent chain.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
LocalizedNumberRangeFormatter locale(const icu::Locale &locale) const &;
|
||||
|
||||
@ -530,40 +528,40 @@ class U_I18N_API UnlocalizedNumberRangeFormatter
|
||||
* The locale to use when loading data for number formatting.
|
||||
* @return The fluent chain.
|
||||
* @see #locale
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
LocalizedNumberRangeFormatter locale(const icu::Locale &locale) &&;
|
||||
|
||||
/**
|
||||
* Default constructor: puts the formatter into a valid but undefined state.
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UnlocalizedNumberRangeFormatter() = default;
|
||||
|
||||
/**
|
||||
* Returns a copy of this UnlocalizedNumberRangeFormatter.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UnlocalizedNumberRangeFormatter(const UnlocalizedNumberRangeFormatter &other);
|
||||
|
||||
/**
|
||||
* Move constructor:
|
||||
* The source UnlocalizedNumberRangeFormatter will be left in a valid but undefined state.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UnlocalizedNumberRangeFormatter(UnlocalizedNumberRangeFormatter&& src) U_NOEXCEPT;
|
||||
|
||||
/**
|
||||
* Copy assignment operator.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UnlocalizedNumberRangeFormatter& operator=(const UnlocalizedNumberRangeFormatter& other);
|
||||
|
||||
/**
|
||||
* Move assignment operator:
|
||||
* The source UnlocalizedNumberRangeFormatter will be left in a valid but undefined state.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UnlocalizedNumberRangeFormatter& operator=(UnlocalizedNumberRangeFormatter&& src) U_NOEXCEPT;
|
||||
|
||||
@ -587,7 +585,7 @@ class U_I18N_API UnlocalizedNumberRangeFormatter
|
||||
* Instances of this class are immutable and thread-safe.
|
||||
*
|
||||
* @see NumberFormatter
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
class U_I18N_API LocalizedNumberRangeFormatter
|
||||
: public NumberRangeFormatterSettings<LocalizedNumberRangeFormatter>, public UMemory {
|
||||
@ -603,7 +601,7 @@ class U_I18N_API LocalizedNumberRangeFormatter
|
||||
* @param status
|
||||
* Set if an error occurs while formatting.
|
||||
* @return A FormattedNumberRange object; call .toString() to get the string.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
FormattedNumberRange formatFormattableRange(
|
||||
const Formattable& first, const Formattable& second, UErrorCode& status) const;
|
||||
@ -611,33 +609,33 @@ class U_I18N_API LocalizedNumberRangeFormatter
|
||||
/**
|
||||
* Default constructor: puts the formatter into a valid but undefined state.
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
LocalizedNumberRangeFormatter() = default;
|
||||
|
||||
/**
|
||||
* Returns a copy of this LocalizedNumberRangeFormatter.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
LocalizedNumberRangeFormatter(const LocalizedNumberRangeFormatter &other);
|
||||
|
||||
/**
|
||||
* Move constructor:
|
||||
* The source LocalizedNumberRangeFormatter will be left in a valid but undefined state.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
LocalizedNumberRangeFormatter(LocalizedNumberRangeFormatter&& src) U_NOEXCEPT;
|
||||
|
||||
/**
|
||||
* Copy assignment operator.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
LocalizedNumberRangeFormatter& operator=(const LocalizedNumberRangeFormatter& other);
|
||||
|
||||
/**
|
||||
* Move assignment operator:
|
||||
* The source LocalizedNumberRangeFormatter will be left in a valid but undefined state.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
LocalizedNumberRangeFormatter& operator=(LocalizedNumberRangeFormatter&& src) U_NOEXCEPT;
|
||||
|
||||
@ -660,7 +658,7 @@ class U_I18N_API LocalizedNumberRangeFormatter
|
||||
|
||||
/**
|
||||
* Destruct this LocalizedNumberRangeFormatter, cleaning up any memory it might own.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
~LocalizedNumberRangeFormatter();
|
||||
|
||||
@ -695,7 +693,7 @@ class U_I18N_API LocalizedNumberRangeFormatter
|
||||
*
|
||||
* Instances of this class are immutable and thread-safe.
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
|
||||
public:
|
||||
@ -705,7 +703,7 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
|
||||
*
|
||||
* For more information, see FormattedValue::toString()
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UnicodeString toString(UErrorCode& status) const U_OVERRIDE;
|
||||
|
||||
@ -719,10 +717,11 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
|
||||
*
|
||||
* For more information, see FormattedValue::appendTo()
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
Appendable &appendTo(Appendable &appendable, UErrorCode& status) const U_OVERRIDE;
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
// Copydoc: this method is new in ICU 64
|
||||
/** @copydoc FormattedValue::nextPosition() */
|
||||
UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const U_OVERRIDE;
|
||||
@ -804,6 +803,7 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
|
||||
* @see #getFirstDecimal
|
||||
*/
|
||||
UnicodeString getSecondDecimal(UErrorCode& status) const;
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Returns whether the pair of numbers was successfully formatted as a range or whether an identity fallback was
|
||||
@ -811,7 +811,7 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
|
||||
* identity fallback was used.
|
||||
*
|
||||
* @return An indication the resulting identity situation in the formatted number range.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
* @see UNumberRangeIdentityFallback
|
||||
*/
|
||||
UNumberRangeIdentityResult getIdentityResult(UErrorCode& status) const;
|
||||
@ -829,20 +829,20 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
|
||||
/**
|
||||
* Move constructor:
|
||||
* Leaves the source FormattedNumberRange in an undefined state.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
FormattedNumberRange(FormattedNumberRange&& src) U_NOEXCEPT;
|
||||
|
||||
/**
|
||||
* Move assignment:
|
||||
* Leaves the source FormattedNumberRange in an undefined state.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
FormattedNumberRange& operator=(FormattedNumberRange&& src) U_NOEXCEPT;
|
||||
|
||||
/**
|
||||
* Destruct an instance of FormattedNumberRange, cleaning up any memory it might own.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
~FormattedNumberRange();
|
||||
|
||||
@ -872,7 +872,7 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
|
||||
/**
|
||||
* See the main description in numberrangeformatter.h for documentation and examples.
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
class U_I18N_API NumberRangeFormatter final {
|
||||
public:
|
||||
@ -881,7 +881,7 @@ class U_I18N_API NumberRangeFormatter final {
|
||||
* known at the call site.
|
||||
*
|
||||
* @return An {@link UnlocalizedNumberRangeFormatter}, to be used for chaining.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
static UnlocalizedNumberRangeFormatter with();
|
||||
|
||||
@ -892,7 +892,7 @@ class U_I18N_API NumberRangeFormatter final {
|
||||
* @param locale
|
||||
* The locale from which to load formats and symbols for number range formatting.
|
||||
* @return A {@link LocalizedNumberRangeFormatter}, to be used for chaining.
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
static LocalizedNumberRangeFormatter withLocale(const Locale &locale);
|
||||
|
||||
@ -905,8 +905,6 @@ class U_I18N_API NumberRangeFormatter final {
|
||||
} // namespace number
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
|
@ -169,13 +169,13 @@ typedef enum UDateAbsoluteUnit {
|
||||
*/
|
||||
UDAT_ABSOLUTE_NOW,
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Quarter
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
UDAT_ABSOLUTE_QUARTER,
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Hour
|
||||
* @draft ICU 65
|
||||
|
@ -41,9 +41,7 @@ struct UFormattedList;
|
||||
* @draft ICU 64
|
||||
*/
|
||||
typedef struct UFormattedList UFormattedList;
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* FieldPosition and UFieldPosition selectors for format fields
|
||||
* defined by ListFormatter.
|
||||
@ -61,7 +59,7 @@ typedef enum UListFormatterField {
|
||||
*/
|
||||
ULISTFMT_ELEMENT_FIELD
|
||||
} UListFormatterField;
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
/**
|
||||
* Open a new UListFormatter object using the rules for a given locale.
|
||||
|
@ -77,8 +77,6 @@
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* An enum declaring how to render units, including currencies. Example outputs when formatting 123 USD and 123
|
||||
* meters in <em>en-CA</em>:
|
||||
@ -95,7 +93,7 @@
|
||||
* <p>
|
||||
* This enum is similar to {@link UMeasureFormatWidth}.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
typedef enum UNumberUnitWidth {
|
||||
/**
|
||||
@ -107,7 +105,7 @@ typedef enum UNumberUnitWidth {
|
||||
* In CLDR, this option corresponds to the "Narrow" format for measure units and the "¤¤¤¤¤" placeholder for
|
||||
* currencies.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
UNUM_UNIT_WIDTH_NARROW,
|
||||
|
||||
@ -123,7 +121,7 @@ typedef enum UNumberUnitWidth {
|
||||
* In CLDR, this option corresponds to the "Short" format for measure units and the "¤" placeholder for
|
||||
* currencies.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
UNUM_UNIT_WIDTH_SHORT,
|
||||
|
||||
@ -134,7 +132,7 @@ typedef enum UNumberUnitWidth {
|
||||
* In CLDR, this option corresponds to the default format for measure units and the "¤¤¤" placeholder for
|
||||
* currencies.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
UNUM_UNIT_WIDTH_FULL_NAME,
|
||||
|
||||
@ -145,7 +143,7 @@ typedef enum UNumberUnitWidth {
|
||||
* <p>
|
||||
* In CLDR, this option corresponds to the "¤¤" placeholder for currencies.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
UNUM_UNIT_WIDTH_ISO_CODE,
|
||||
|
||||
@ -154,7 +152,7 @@ typedef enum UNumberUnitWidth {
|
||||
* monetary symbols and formats as with SHORT, but omit the currency symbol. For measure units, the behavior is
|
||||
* equivalent to not specifying the unit at all.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
UNUM_UNIT_WIDTH_HIDDEN,
|
||||
|
||||
@ -165,9 +163,7 @@ typedef enum UNumberUnitWidth {
|
||||
*/
|
||||
UNUM_UNIT_WIDTH_COUNT
|
||||
} UNumberUnitWidth;
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* An enum declaring the strategy for when and how to display grouping separators (i.e., the
|
||||
* separator, often a comma or period, after every 2-3 powers of ten). The choices are several
|
||||
@ -192,13 +188,13 @@ typedef enum UNumberUnitWidth {
|
||||
* Note: This enum specifies the strategy for grouping sizes. To set which character to use as the
|
||||
* grouping separator, use the "symbols" setter.
|
||||
*
|
||||
* @draft ICU 63
|
||||
* @stable ICU 63
|
||||
*/
|
||||
typedef enum UNumberGroupingStrategy {
|
||||
/**
|
||||
* Do not display grouping separators in any locale.
|
||||
*
|
||||
* @draft ICU 61
|
||||
* @stable ICU 61
|
||||
*/
|
||||
UNUM_GROUPING_OFF,
|
||||
|
||||
@ -214,7 +210,7 @@ typedef enum UNumberGroupingStrategy {
|
||||
* Locale data is used to determine whether to separate larger numbers into groups of 2
|
||||
* (customary in South Asia) or groups of 3 (customary in Europe and the Americas).
|
||||
*
|
||||
* @draft ICU 61
|
||||
* @stable ICU 61
|
||||
*/
|
||||
UNUM_GROUPING_MIN2,
|
||||
|
||||
@ -229,7 +225,7 @@ typedef enum UNumberGroupingStrategy {
|
||||
* Locale data is used to determine whether to separate larger numbers into groups of 2
|
||||
* (customary in South Asia) or groups of 3 (customary in Europe and the Americas).
|
||||
*
|
||||
* @draft ICU 61
|
||||
* @stable ICU 61
|
||||
*/
|
||||
UNUM_GROUPING_AUTO,
|
||||
|
||||
@ -245,7 +241,7 @@ typedef enum UNumberGroupingStrategy {
|
||||
* Locale data is used to determine whether to separate larger numbers into groups of 2
|
||||
* (customary in South Asia) or groups of 3 (customary in Europe and the Americas).
|
||||
*
|
||||
* @draft ICU 61
|
||||
* @stable ICU 61
|
||||
*/
|
||||
UNUM_GROUPING_ON_ALIGNED,
|
||||
|
||||
@ -253,7 +249,7 @@ typedef enum UNumberGroupingStrategy {
|
||||
* Use the Western defaults: groups of 3 and enabled for all numbers 1000 or greater. Do not use
|
||||
* locale data for determining the grouping strategy.
|
||||
*
|
||||
* @draft ICU 61
|
||||
* @stable ICU 61
|
||||
*/
|
||||
UNUM_GROUPING_THOUSANDS
|
||||
|
||||
@ -269,10 +265,6 @@ typedef enum UNumberGroupingStrategy {
|
||||
|
||||
} UNumberGroupingStrategy;
|
||||
|
||||
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* An enum declaring how to denote positive and negative numbers. Example outputs when formatting
|
||||
* 123, 0, and -123 in <em>en-US</em>:
|
||||
@ -290,14 +282,14 @@ typedef enum UNumberGroupingStrategy {
|
||||
* <p>
|
||||
* The exact format, including the position and the code point of the sign, differ by locale.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
typedef enum UNumberSignDisplay {
|
||||
/**
|
||||
* Show the minus sign on negative numbers, and do not show the sign on positive numbers. This is the default
|
||||
* behavior.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
UNUM_SIGN_AUTO,
|
||||
|
||||
@ -305,14 +297,14 @@ typedef enum UNumberSignDisplay {
|
||||
* Show the minus sign on negative numbers and the plus sign on positive numbers, including zero.
|
||||
* To hide the sign on zero, see {@link UNUM_SIGN_EXCEPT_ZERO}.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
UNUM_SIGN_ALWAYS,
|
||||
|
||||
/**
|
||||
* Do not show the sign on positive or negative numbers.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
UNUM_SIGN_NEVER,
|
||||
|
||||
@ -328,7 +320,7 @@ typedef enum UNumberSignDisplay {
|
||||
* AUTO sign display strategy when formatting without a currency unit. This limitation may be lifted in the
|
||||
* future.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
UNUM_SIGN_ACCOUNTING,
|
||||
|
||||
@ -338,7 +330,7 @@ typedef enum UNumberSignDisplay {
|
||||
* ACCOUNTING sign display strategy. To hide the sign on zero, see
|
||||
* {@link UNUM_SIGN_ACCOUNTING_EXCEPT_ZERO}.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
UNUM_SIGN_ACCOUNTING_ALWAYS,
|
||||
|
||||
@ -346,7 +338,7 @@ typedef enum UNumberSignDisplay {
|
||||
* Show the minus sign on negative numbers and the plus sign on positive numbers. Do not show a
|
||||
* sign on zero or NaN, unless the sign bit is set (-0.0 gets a sign).
|
||||
*
|
||||
* @draft ICU 61
|
||||
* @stable ICU 61
|
||||
*/
|
||||
UNUM_SIGN_EXCEPT_ZERO,
|
||||
|
||||
@ -356,7 +348,7 @@ typedef enum UNumberSignDisplay {
|
||||
* sign). For more information on the accounting format, see the ACCOUNTING sign display
|
||||
* strategy.
|
||||
*
|
||||
* @draft ICU 61
|
||||
* @stable ICU 61
|
||||
*/
|
||||
UNUM_SIGN_ACCOUNTING_EXCEPT_ZERO,
|
||||
|
||||
@ -367,9 +359,7 @@ typedef enum UNumberSignDisplay {
|
||||
*/
|
||||
UNUM_SIGN_COUNT
|
||||
} UNumberSignDisplay;
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* An enum declaring how to render the decimal separator.
|
||||
*
|
||||
@ -379,21 +369,21 @@ typedef enum UNumberSignDisplay {
|
||||
* <li>UNUM_DECIMAL_SEPARATOR_ALWAYS: "1.", "1.1"
|
||||
* </ul>
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
typedef enum UNumberDecimalSeparatorDisplay {
|
||||
/**
|
||||
* Show the decimal separator when there are one or more digits to display after the separator, and do not show
|
||||
* it otherwise. This is the default behavior.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
UNUM_DECIMAL_SEPARATOR_AUTO,
|
||||
|
||||
/**
|
||||
* Always show the decimal separator, even if there are no digits to display after the separator.
|
||||
*
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
UNUM_DECIMAL_SEPARATOR_ALWAYS,
|
||||
|
||||
@ -404,7 +394,6 @@ typedef enum UNumberDecimalSeparatorDisplay {
|
||||
*/
|
||||
UNUM_DECIMAL_SEPARATOR_COUNT
|
||||
} UNumberDecimalSeparatorDisplay;
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
struct UNumberFormatter;
|
||||
/**
|
||||
|
@ -473,7 +473,6 @@ typedef enum USpoofChecks {
|
||||
*/
|
||||
USPOOF_MIXED_NUMBERS = 128,
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Check that an identifier does not have a combining character following a character in which that
|
||||
* combining character would be hidden; for example 'i' followed by a U+0307 combining dot.
|
||||
@ -491,10 +490,9 @@ typedef enum USpoofChecks {
|
||||
*
|
||||
* This list and the number of combing characters considered by this check may grow over time.
|
||||
*
|
||||
* @draft ICU 62
|
||||
* @stable ICU 62
|
||||
*/
|
||||
USPOOF_HIDDEN_OVERLAY = 256,
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
/**
|
||||
* Enable all spoof checks.
|
||||
|
Loading…
Reference in New Issue
Block a user