mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-20119 ICU4C 63 API promotion & change report (#161)
* ICU-20119 ICU4C 63 API promotion, work in progress. * ICU-20119 ICU4C 63 API promotion, work in progress. * ICU-20119 ICU 63 API promotion & change report * ICU-20119 ICU4C 63 API change report, new draft, still work in progress. * ICU-20119 ICU4C 63 API change report, another new draft, still work in progress. * ICU-20119 ICU4C 63 API change report, another new draft. * ICU-20119 ICU4C 63 API change report, after @preview revert. Hopefully the final rev. * ICU-20119 ICU4C 63 API change report, clean up a few minor html errors.
This commit is contained in:
parent
8fb353c749
commit
19a29f956e
19 changed files with 1638 additions and 925 deletions
File diff suppressed because it is too large
Load diff
|
@ -85,7 +85,7 @@ ulocimp_getCountry(const char *localeID,
|
|||
* @return the length of the locale ID.
|
||||
* @internal ICU 63
|
||||
*/
|
||||
U_STABLE int32_t U_EXPORT2
|
||||
U_CAPI int32_t U_EXPORT2
|
||||
ulocimp_forLanguageTag(const char* langtag,
|
||||
int32_t tagLen,
|
||||
char* localeID,
|
||||
|
|
|
@ -237,13 +237,12 @@ class StringByteSink : public ByteSink {
|
|||
* @stable ICU 4.2
|
||||
*/
|
||||
StringByteSink(StringClass* dest) : dest_(dest) { }
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Constructs a ByteSink that reserves append capacity and will append bytes to the dest string.
|
||||
*
|
||||
* @param dest pointer to string object to append to
|
||||
* @param initialAppendCapacity capacity beyond dest->length() to be reserve()d
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
StringByteSink(StringClass* dest, int32_t initialAppendCapacity) : dest_(dest) {
|
||||
if (initialAppendCapacity > 0 &&
|
||||
|
@ -251,7 +250,6 @@ class StringByteSink : public ByteSink {
|
|||
dest->reserve(dest->length() + initialAppendCapacity);
|
||||
}
|
||||
}
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Append "bytes[0,n-1]" to this.
|
||||
* @param data the pointer to the bytes
|
||||
|
|
|
@ -194,7 +194,6 @@ public:
|
|||
char16_t *dest, int32_t destCapacity, Edits *edits,
|
||||
UErrorCode &errorCode);
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Lowercases a UTF-8 string and optionally records edits.
|
||||
* Casing is locale-dependent and context-sensitive.
|
||||
|
@ -214,7 +213,7 @@ public:
|
|||
* which must not indicate a failure before the function call.
|
||||
*
|
||||
* @see ucasemap_utf8ToLower
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static void utf8ToLower(
|
||||
const char *locale, uint32_t options,
|
||||
|
@ -240,7 +239,7 @@ public:
|
|||
* which must not indicate a failure before the function call.
|
||||
*
|
||||
* @see ucasemap_utf8ToUpper
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static void utf8ToUpper(
|
||||
const char *locale, uint32_t options,
|
||||
|
@ -280,7 +279,7 @@ public:
|
|||
* which must not indicate a failure before the function call.
|
||||
*
|
||||
* @see ucasemap_utf8ToTitle
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static void utf8ToTitle(
|
||||
const char *locale, uint32_t options, BreakIterator *iter,
|
||||
|
@ -311,13 +310,12 @@ public:
|
|||
* which must not indicate a failure before the function call.
|
||||
*
|
||||
* @see ucasemap_utf8FoldCase
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static void utf8Fold(
|
||||
uint32_t options,
|
||||
StringPiece src, ByteSink &sink, Edits *edits,
|
||||
UErrorCode &errorCode);
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Lowercases a UTF-8 string and optionally records edits.
|
||||
|
|
|
@ -86,7 +86,7 @@ public:
|
|||
/**
|
||||
* Copy constructor.
|
||||
* @param other source edits
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
Edits(const Edits &other) :
|
||||
array(stackArray), capacity(STACK_CAPACITY), length(other.length),
|
||||
|
@ -98,7 +98,7 @@ public:
|
|||
* Move constructor, might leave src empty.
|
||||
* This object will have the same contents that the source object had.
|
||||
* @param src source edits
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
Edits(Edits &&src) U_NOEXCEPT :
|
||||
array(stackArray), capacity(STACK_CAPACITY), length(src.length),
|
||||
|
@ -117,7 +117,7 @@ public:
|
|||
* Assignment operator.
|
||||
* @param other source edits
|
||||
* @return *this
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
Edits &operator=(const Edits &other);
|
||||
|
||||
|
@ -127,7 +127,7 @@ public:
|
|||
* The behavior is undefined if *this and src are the same object.
|
||||
* @param src source edits
|
||||
* @return *this
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
Edits &operator=(Edits &&src) U_NOEXCEPT;
|
||||
|
||||
|
@ -173,13 +173,11 @@ public:
|
|||
*/
|
||||
UBool hasChanges() const { return numChanges != 0; }
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* @return the number of change edits
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
int32_t numberOfChanges() const { return numChanges; }
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Access to the list of edits.
|
||||
|
@ -202,7 +200,7 @@ public:
|
|||
struct U_COMMON_API Iterator U_FINAL : public UMemory {
|
||||
/**
|
||||
* Default constructor, empty iterator.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
Iterator() :
|
||||
array(nullptr), index(0), length(0),
|
||||
|
@ -253,7 +251,6 @@ public:
|
|||
return findIndex(i, TRUE, errorCode) == 0;
|
||||
}
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Moves the iterator to the edit that contains the destination index.
|
||||
* The destination index may be found in a no-change edit
|
||||
|
@ -271,7 +268,7 @@ public:
|
|||
* or else the function returns immediately. Check for U_FAILURE()
|
||||
* on output or use with function chaining. (See User Guide for details.)
|
||||
* @return TRUE if the edit for the destination index was found
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
UBool findDestinationIndex(int32_t i, UErrorCode &errorCode) {
|
||||
return findIndex(i, FALSE, errorCode) == 0;
|
||||
|
@ -297,7 +294,7 @@ public:
|
|||
* or else the function returns immediately. Check for U_FAILURE()
|
||||
* on output or use with function chaining. (See User Guide for details.)
|
||||
* @return destination index; undefined if i is not 0..string length
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
int32_t destinationIndexFromSourceIndex(int32_t i, UErrorCode &errorCode);
|
||||
|
||||
|
@ -321,10 +318,9 @@ public:
|
|||
* or else the function returns immediately. Check for U_FAILURE()
|
||||
* on output or use with function chaining. (See User Guide for details.)
|
||||
* @return source index; undefined if i is not 0..string length
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
int32_t sourceIndexFromDestinationIndex(int32_t i, UErrorCode &errorCode);
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Returns whether the edit currently represented by the iterator is a change edit.
|
||||
|
@ -475,7 +471,6 @@ public:
|
|||
return Iterator(array, length, FALSE, FALSE);
|
||||
}
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Merges the two input Edits and appends the result to this object.
|
||||
*
|
||||
|
@ -501,10 +496,9 @@ public:
|
|||
* or else the function returns immediately. Check for U_FAILURE()
|
||||
* on output or use with function chaining. (See User Guide for details.)
|
||||
* @return *this, with the merged edits appended
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
Edits &mergeAndAppend(const Edits &ab, const Edits &bc, UErrorCode &errorCode);
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
private:
|
||||
void releaseArray() U_NOEXCEPT;
|
||||
|
|
|
@ -67,16 +67,14 @@ class U_COMMON_API FilteredBreakIteratorBuilder : public UObject {
|
|||
static FilteredBreakIteratorBuilder *createInstance(UErrorCode &status);
|
||||
#endif /* U_HIDE_DEPRECATED_API */
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Construct an empty FilteredBreakIteratorBuilder.
|
||||
* In this state, it will not suppress any segment boundaries.
|
||||
* @param status The error code.
|
||||
* @return the new builder
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
static FilteredBreakIteratorBuilder *createEmptyInstance(UErrorCode &status);
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
/**
|
||||
* Suppress a certain string from being the end of a segment.
|
||||
|
@ -114,7 +112,6 @@ class U_COMMON_API FilteredBreakIteratorBuilder : public UObject {
|
|||
*/
|
||||
virtual BreakIterator *build(BreakIterator* adoptBreakIterator, UErrorCode& status) = 0;
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Wrap (adopt) an existing break iterator in a new filtered instance.
|
||||
* The resulting BreakIterator is owned by the caller.
|
||||
|
@ -126,12 +123,11 @@ class U_COMMON_API FilteredBreakIteratorBuilder : public UObject {
|
|||
* @param adoptBreakIterator the break iterator to adopt
|
||||
* @param status error code
|
||||
* @return the new BreakIterator, owned by the caller.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
inline BreakIterator *wrapIteratorWithFilter(BreakIterator* adoptBreakIterator, UErrorCode& status) {
|
||||
return build(adoptBreakIterator, status);
|
||||
}
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
protected:
|
||||
/**
|
||||
|
|
|
@ -284,6 +284,7 @@ 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.
|
||||
|
@ -292,6 +293,7 @@ public:
|
|||
* @draft ICU 63
|
||||
*/
|
||||
Locale(Locale&& other) U_NOEXCEPT;
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
|
@ -308,6 +310,7 @@ 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.
|
||||
|
@ -318,6 +321,7 @@ public:
|
|||
* @draft ICU 63
|
||||
*/
|
||||
Locale& operator=(Locale&& other) U_NOEXCEPT;
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Checks if two locale keys are the same.
|
||||
|
@ -601,7 +605,6 @@ public:
|
|||
*
|
||||
* @param iterator an STL style output iterator to write the keywords to.
|
||||
* @param status error information if creating set of keywords failed.
|
||||
* @return a set of strings with all keywords.
|
||||
* @draft ICU 63
|
||||
*/
|
||||
template<typename StringClass, typename OutputIterator>
|
||||
|
@ -616,7 +619,6 @@ public:
|
|||
*
|
||||
* @param iterator an STL style output iterator to write the keywords to.
|
||||
* @param status error information if creating set of keywords failed.
|
||||
* @return a set of strings with all keywords.
|
||||
* @draft ICU 63
|
||||
*/
|
||||
template<typename StringClass, typename OutputIterator>
|
||||
|
|
|
@ -241,7 +241,7 @@ public:
|
|||
* pass the U_SUCCESS() test, or else the function returns
|
||||
* immediately. Check for U_FAILURE() on output or use with
|
||||
* function chaining. (See User Guide for details.)
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
virtual void
|
||||
normalizeUTF8(uint32_t options, StringPiece src, ByteSink &sink,
|
||||
|
@ -391,7 +391,7 @@ public:
|
|||
* immediately. Check for U_FAILURE() on output or use with
|
||||
* function chaining. (See User Guide for details.)
|
||||
* @return TRUE if s is normalized
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
virtual UBool
|
||||
isNormalizedUTF8(StringPiece s, UErrorCode &errorCode) const;
|
||||
|
@ -559,7 +559,7 @@ public:
|
|||
* pass the U_SUCCESS() test, or else the function returns
|
||||
* immediately. Check for U_FAILURE() on output or use with
|
||||
* function chaining. (See User Guide for details.)
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
virtual void
|
||||
normalizeUTF8(uint32_t options, StringPiece src, ByteSink &sink,
|
||||
|
@ -686,7 +686,7 @@ public:
|
|||
* immediately. Check for U_FAILURE() on output or use with
|
||||
* function chaining. (See User Guide for details.)
|
||||
* @return TRUE if s is normalized
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
virtual UBool
|
||||
isNormalizedUTF8(StringPiece s, UErrorCode &errorCode) const U_OVERRIDE;
|
||||
|
|
|
@ -39,8 +39,6 @@
|
|||
*/
|
||||
#define U_FOLD_CASE_EXCLUDE_SPECIAL_I 1
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Titlecase the string as a whole rather than each word.
|
||||
* (Titlecase only the character at index 0, possibly adjusted.)
|
||||
|
@ -50,7 +48,7 @@
|
|||
* including both an options bit and an explicit BreakIterator.
|
||||
*
|
||||
* @see U_TITLECASE_ADJUST_TO_CASED
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
#define U_TITLECASE_WHOLE_STRING 0x20
|
||||
|
||||
|
@ -63,12 +61,10 @@
|
|||
* including both an options bit and an explicit BreakIterator.
|
||||
*
|
||||
* @see U_TITLECASE_ADJUST_TO_CASED
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
#define U_TITLECASE_SENTENCES 0x40
|
||||
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Do not lowercase non-initial parts of words when titlecasing.
|
||||
* Option bit for titlecasing APIs that take an options bit set.
|
||||
|
@ -112,8 +108,6 @@
|
|||
*/
|
||||
#define U_TITLECASE_NO_BREAK_ADJUSTMENT 0x200
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Adjust each titlecasing BreakIterator index to the next cased character.
|
||||
* (See the Unicode Standard, chapter 3, Default Case Conversion, R3 toTitlecase(X).)
|
||||
|
@ -130,7 +124,7 @@
|
|||
* It is an error to specify multiple titlecasing adjustment options together.
|
||||
*
|
||||
* @see U_TITLECASE_NO_BREAK_ADJUSTMENT
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
#define U_TITLECASE_ADJUST_TO_CASED 0x400
|
||||
|
||||
|
@ -141,7 +135,7 @@
|
|||
* @see CaseMap
|
||||
* @see Edits
|
||||
* @see Normalizer2
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
#define U_EDITS_NO_RESET 0x2000
|
||||
|
||||
|
@ -153,12 +147,10 @@
|
|||
* @see CaseMap
|
||||
* @see Edits
|
||||
* @see Normalizer2
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
#define U_OMIT_UNCHANGED_TEXT 0x4000
|
||||
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Option bit for u_strCaseCompare, u_strcasecmp, unorm_compare, etc:
|
||||
* Compare strings in code point order instead of code unit order.
|
||||
|
|
|
@ -2572,6 +2572,7 @@ u_hasBinaryProperty(UChar32 c, UProperty which);
|
|||
* @see UProperty
|
||||
* @see u_hasBinaryProperty
|
||||
* @see Unicode::fromUSet
|
||||
* @draft ICU 63
|
||||
*/
|
||||
U_CAPI const USet * U_EXPORT2
|
||||
u_getBinaryPropertySet(UProperty property, UErrorCode *pErrorCode);
|
||||
|
@ -2750,6 +2751,7 @@ u_getIntPropertyMaxValue(UProperty which);
|
|||
* @return the property as a map
|
||||
* @see UProperty
|
||||
* @see u_getIntPropertyValue
|
||||
* @draft ICU 63
|
||||
*/
|
||||
U_CAPI const UCPMap * U_EXPORT2
|
||||
u_getIntPropertyMap(UProperty property, UErrorCode *pErrorCode);
|
||||
|
|
|
@ -45,6 +45,7 @@ enum UCPMapRangeOption {
|
|||
/**
|
||||
* ucpmap_getRange() enumerates all same-value ranges as stored in the map.
|
||||
* Most users should use this option.
|
||||
* @draft ICU 63
|
||||
*/
|
||||
UCPMAP_RANGE_NORMAL,
|
||||
/**
|
||||
|
@ -60,6 +61,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
|
||||
*/
|
||||
UCPMAP_RANGE_FIXED_LEAD_SURROGATES,
|
||||
/**
|
||||
|
@ -75,6 +77,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
|
||||
*/
|
||||
UCPMAP_RANGE_FIXED_ALL_SURROGATES
|
||||
};
|
||||
|
|
|
@ -190,8 +190,6 @@ U_STABLE UEnumeration* U_EXPORT2
|
|||
uenum_openUCharStringsEnumeration(const UChar* const strings[], int32_t count,
|
||||
UErrorCode* ec);
|
||||
|
||||
/* Note: next function is not hidden as draft, as it is used internally (it was formerly an internal function). */
|
||||
|
||||
/**
|
||||
* Given an array of const char* strings (invariant chars only), return a UEnumeration. String pointers from 0..count-1 must not be null.
|
||||
* Do not free or modify either the string array or the characters it points to until this object has been destroyed with uenum_close.
|
||||
|
|
|
@ -213,8 +213,6 @@
|
|||
} \
|
||||
}
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Get a code point from a string at a random-access offset,
|
||||
* without changing the offset.
|
||||
|
@ -236,7 +234,7 @@
|
|||
* @param length string length
|
||||
* @param c output UChar32 variable
|
||||
* @see U16_GET_UNSAFE
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
#define U16_GET_OR_FFFD(s, start, i, length, c) { \
|
||||
(c)=(s)[i]; \
|
||||
|
@ -258,8 +256,6 @@
|
|||
} \
|
||||
}
|
||||
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/* definitions with forward iteration --------------------------------------- */
|
||||
|
||||
/**
|
||||
|
@ -320,8 +316,6 @@
|
|||
} \
|
||||
}
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Get a code point from a string at a code point boundary offset,
|
||||
* and advance the offset to the next code point boundary.
|
||||
|
@ -341,7 +335,7 @@
|
|||
* @param length string length
|
||||
* @param c output UChar32 variable
|
||||
* @see U16_NEXT_UNSAFE
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
#define U16_NEXT_OR_FFFD(s, i, length, c) { \
|
||||
(c)=(s)[(i)++]; \
|
||||
|
@ -356,8 +350,6 @@
|
|||
} \
|
||||
}
|
||||
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Append a code point to a string, overwriting 1 or 2 code units.
|
||||
* The offset points to the current end of the string contents
|
||||
|
@ -585,8 +577,6 @@
|
|||
} \
|
||||
}
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Move the string offset from one code point boundary to the previous one
|
||||
* and get the code point between them.
|
||||
|
@ -605,7 +595,7 @@
|
|||
* @param i string offset, must be start<i
|
||||
* @param c output UChar32 variable
|
||||
* @see U16_PREV_UNSAFE
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
#define U16_PREV_OR_FFFD(s, start, i, c) { \
|
||||
(c)=(s)[--(i)]; \
|
||||
|
@ -620,8 +610,6 @@
|
|||
} \
|
||||
}
|
||||
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Move the string offset from one code point boundary to the previous one.
|
||||
* (Pre-decrementing backward iteration.)
|
||||
|
|
|
@ -235,7 +235,6 @@ public:
|
|||
*/
|
||||
virtual const DateFormatSymbols* getDateFormatSymbols(void) const;
|
||||
|
||||
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since it is virtual */
|
||||
/**
|
||||
* Set a particular UDisplayContext value in the formatter, such as
|
||||
* UDISPCTX_CAPITALIZATION_FOR_STANDALONE. Note: For getContext, see
|
||||
|
|
|
@ -38,7 +38,7 @@ class U_I18N_API CurrencyUnit: public MeasureUnit {
|
|||
public:
|
||||
/**
|
||||
* Default constructor. Initializes currency code to "XXX" (no currency).
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
CurrencyUnit();
|
||||
|
||||
|
@ -59,17 +59,15 @@ class U_I18N_API CurrencyUnit: public MeasureUnit {
|
|||
*/
|
||||
CurrencyUnit(const CurrencyUnit& other);
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Copy constructor from MeasureUnit. This constructor allows you to
|
||||
* restore a CurrencyUnit that was sliced to MeasureUnit.
|
||||
*
|
||||
* @param measureUnit The MeasureUnit to copy from.
|
||||
* @param ec Set to a failing value if the MeasureUnit is not a currency.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
CurrencyUnit(const MeasureUnit& measureUnit, UErrorCode &ec);
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
/**
|
||||
* Assignment operator
|
||||
|
|
|
@ -181,7 +181,6 @@ public:
|
|||
*/
|
||||
DecimalFormatSymbols(const Locale& locale, UErrorCode& status);
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Creates a DecimalFormatSymbols instance for the given locale with digits and symbols
|
||||
* corresponding to the given NumberingSystem.
|
||||
|
@ -196,10 +195,9 @@ public:
|
|||
* @param ns The numbering system.
|
||||
* @param status Input/output parameter, set to success or
|
||||
* failure code upon return.
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
DecimalFormatSymbols(const Locale& locale, const NumberingSystem& ns, UErrorCode& status);
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
/**
|
||||
* Create a DecimalFormatSymbols object for the default locale.
|
||||
|
|
|
@ -1027,14 +1027,14 @@ public:
|
|||
* Get the rounding mode. This will always return NumberFormat::ERoundingMode::kRoundUnnecessary
|
||||
* if the subclass does not support rounding.
|
||||
* @return A rounding mode
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
virtual ERoundingMode getRoundingMode(void) const;
|
||||
|
||||
/**
|
||||
* Set the rounding mode. If a subclass does not support rounding, this will do nothing.
|
||||
* @param roundingMode A rounding mode
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
virtual void setRoundingMode(ERoundingMode roundingMode);
|
||||
|
||||
|
|
|
@ -1012,14 +1012,14 @@ public:
|
|||
/**
|
||||
* Get the rounding mode.
|
||||
* @return A rounding mode
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
virtual ERoundingMode getRoundingMode(void) const;
|
||||
|
||||
/**
|
||||
* Set the rounding mode.
|
||||
* @param roundingMode A rounding mode
|
||||
* @draft ICU 60
|
||||
* @stable ICU 60
|
||||
*/
|
||||
virtual void setRoundingMode(ERoundingMode roundingMode);
|
||||
|
||||
|
|
|
@ -515,14 +515,11 @@ public class StableAPI {
|
|||
}
|
||||
|
||||
|
||||
static private String replList[] = { "[ ]*\\([ ]*void[ ]*\\)[ ]*", "()", // cleanup
|
||||
" , ", ", ", // cleanup
|
||||
"[ ]*\\*[ ]*", "* ",
|
||||
"[ ]*=[ ]*0[ ]*$", "=0", // cleanup pure virtual
|
||||
"\\)[ ]*const", ") const", // This just cleans up the spacing.
|
||||
|
||||
"^const [ ]*", "const ", // cleanup
|
||||
//"([,)])[ ]*const [ ]*", "\1", // TODO: notify about this difference, separately - remove const from param
|
||||
static private String replList[] = { "[ ]*\\([ ]*void[ ]*\\)", "() ", // (void) => ()
|
||||
"[ ]*,", ", ", // No spaces preceding commas.
|
||||
"[ ]*\\*[ ]*", "* ", // No spaces preceding '*'.
|
||||
"[ ]*=[ ]*0[ ]*$", "=0 ", // No spaces in " = 0".
|
||||
"[ ]{2,}", " ", // Multiple spaces collapse to single.
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -530,8 +527,9 @@ public class StableAPI {
|
|||
*/
|
||||
static private String simplifyList[] = {
|
||||
"[ ]*=[ ]*0[ ]*$", "", // remove pure virtual - TODO: notify about this difference, separately
|
||||
"\\)[ ]*const[ ]*$", ")", // TODO: notify about this difference, separately - remove const from function type
|
||||
"[ ]*U_NOEXCEPT[ ]*", "" // remove U_NOEXCEPT (this was fixed in Doxyfile, but fixing here so it is retroactive)
|
||||
"[ ]*U_NOEXCEPT", "", // remove U_NOEXCEPT (this was fixed in Doxyfile, but fixing here so it is retroactive)
|
||||
"[ ]*U_OVERRIDE", "", // remove U_OVERRIDE
|
||||
"\\s+$", "" // remove trailing spaces.
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -639,6 +637,9 @@ public class StableAPI {
|
|||
}
|
||||
|
||||
private void simplifyPrototype() {
|
||||
if (prototype.startsWith("#define")) {
|
||||
return;
|
||||
}
|
||||
final String prototype0 = prototype;
|
||||
for (int i = 0; i < simplifyList.length; i+= 2) {
|
||||
prototype = prototype.replaceAll(simplifyList[i+0],simplifyList[i+1]);
|
||||
|
|
Loading…
Add table
Reference in a new issue