ICU-12734 ICU4C 58 API Promotion.

X-SVN-Rev: 39318
This commit is contained in:
Andy Heninger 2016-09-21 21:20:27 +00:00
parent 9f925b0287
commit 0c77de936b
11 changed files with 50 additions and 60 deletions

View File

@ -15,8 +15,6 @@
#if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_FILTERED_BREAK_ITERATION
#ifndef U_HIDE_DRAFT_API
U_NAMESPACE_BEGIN
/**
@ -33,13 +31,13 @@ U_NAMESPACE_BEGIN
* but with "Mr." as an exception, a filtered break iterator
* would consider the string "Mr. Smith" to be a single segment.
*
* @draft ICU 56
* @stable ICU 56
*/
class U_COMMON_API FilteredBreakIteratorBuilder : public UObject {
public:
/**
* destructor.
* @draft ICU 56
* @stable ICU 56
*/
virtual ~FilteredBreakIteratorBuilder();
@ -53,7 +51,7 @@ class U_COMMON_API FilteredBreakIteratorBuilder : public UObject {
* @param where the locale.
* @param status The error code.
* @return the new builder
* @draft ICU 56
* @stable ICU 56
*/
static FilteredBreakIteratorBuilder *createInstance(const Locale& where, UErrorCode& status);
@ -62,7 +60,7 @@ class U_COMMON_API FilteredBreakIteratorBuilder : public UObject {
* In this state, it will not suppress any segment boundaries.
* @param status The error code.
* @return the new builder
* @draft ICU 56
* @stable ICU 56
*/
static FilteredBreakIteratorBuilder *createInstance(UErrorCode &status);
@ -74,7 +72,7 @@ class U_COMMON_API FilteredBreakIteratorBuilder : public UObject {
* @param status error code
* @return returns TRUE if the string was not present and now added,
* FALSE if the call was a no-op because the string was already being suppressed.
* @draft ICU 56
* @stable ICU 56
*/
virtual UBool suppressBreakAfter(const UnicodeString& string, UErrorCode& status) = 0;
@ -87,7 +85,7 @@ class U_COMMON_API FilteredBreakIteratorBuilder : public UObject {
* @param status error code
* @return returns TRUE if the string was present and now removed,
* FALSE if the call was a no-op because the string was not being suppressed.
* @draft ICU 56
* @stable ICU 56
*/
virtual UBool unsuppressBreakAfter(const UnicodeString& string, UErrorCode& status) = 0;
@ -101,14 +99,14 @@ 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 56
* @stable ICU 56
*/
virtual BreakIterator *build(BreakIterator* adoptBreakIterator, UErrorCode& status) = 0;
protected:
/**
* For subclass use
* @draft ICU 56
* @stable ICU 56
*/
FilteredBreakIteratorBuilder();
};
@ -116,8 +114,6 @@ class U_COMMON_API FilteredBreakIteratorBuilder : public UObject {
U_NAMESPACE_END
#endif /* U_HIDE_DRAFT_API */
#endif // #if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_FILTERED_BREAK_ITERATION
#endif // #ifndef FILTEREDBRK_H

View File

@ -213,18 +213,16 @@ public:
errorCode=U_MEMORY_ALLOCATION_ERROR;
}
}
#ifndef U_HIDE_DRAFT_API
#if U_HAVE_RVALUE_REFERENCES
/**
* Move constructor, leaves src with isNull().
* @param src source smart pointer
* @draft ICU 56
* @stable ICU 56
*/
LocalPointer(LocalPointer<T> &&src) U_NOEXCEPT : LocalPointerBase<T>(src.ptr) {
src.ptr=NULL;
}
#endif
#endif /* U_HIDE_DRAFT_API */
/**
* Destructor deletes the object it owns.
* @stable ICU 4.4
@ -232,19 +230,19 @@ public:
~LocalPointer() {
delete LocalPointerBase<T>::ptr;
}
#ifndef U_HIDE_DRAFT_API
#if U_HAVE_RVALUE_REFERENCES
/**
* Move assignment operator, leaves src with isNull().
* The behavior is undefined if *this and src are the same object.
* @param src source smart pointer
* @return *this
* @draft ICU 56
* @stable ICU 56
*/
LocalPointer<T> &operator=(LocalPointer<T> &&src) U_NOEXCEPT {
return moveFrom(src);
}
#endif
#ifndef U_HIDE_DRAFT_API
/**
* Move assignment, leaves src with isNull().
* The behavior is undefined if *this and src are the same object.
@ -260,22 +258,22 @@ public:
src.ptr=NULL;
return *this;
}
#endif /* U_HIDE_DRAFT_API */
/**
* Swap pointers.
* @param other other smart pointer
* @draft ICU 56
* @stable ICU 56
*/
void swap(LocalPointer<T> &other) U_NOEXCEPT {
T *temp=LocalPointerBase<T>::ptr;
LocalPointerBase<T>::ptr=other.ptr;
other.ptr=temp;
}
#endif /* U_HIDE_DRAFT_API */
/**
* Non-member LocalPointer swap function.
* @param p1 will get p2's pointer
* @param p2 will get p1's pointer
* @draft ICU 56
* @stable ICU 56
*/
friend inline void swap(LocalPointer<T> &p1, LocalPointer<T> &p2) U_NOEXCEPT {
p1.swap(p2);
@ -347,7 +345,6 @@ public:
* @stable ICU 4.4
*/
explicit LocalArray(T *p=NULL) : LocalPointerBase<T>(p) {}
#ifndef U_HIDE_DRAFT_API
/**
* Constructor takes ownership and reports an error if NULL.
*
@ -359,7 +356,7 @@ public:
* @param p simple pointer to an array of T objects that is adopted
* @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR
* if p==NULL and no other failure code had been set
* @draft ICU 56
* @stable ICU 56
*/
LocalArray(T *p, UErrorCode &errorCode) : LocalPointerBase<T>(p) {
if(p==NULL && U_SUCCESS(errorCode)) {
@ -370,13 +367,12 @@ public:
/**
* Move constructor, leaves src with isNull().
* @param src source smart pointer
* @draft ICU 56
* @stable ICU 56
*/
LocalArray(LocalArray<T> &&src) U_NOEXCEPT : LocalPointerBase<T>(src.ptr) {
src.ptr=NULL;
}
#endif
#endif /* U_HIDE_DRAFT_API */
/**
* Destructor deletes the array it owns.
* @stable ICU 4.4
@ -384,19 +380,19 @@ public:
~LocalArray() {
delete[] LocalPointerBase<T>::ptr;
}
#ifndef U_HIDE_DRAFT_API
#if U_HAVE_RVALUE_REFERENCES
/**
* Move assignment operator, leaves src with isNull().
* The behavior is undefined if *this and src are the same object.
* @param src source smart pointer
* @return *this
* @draft ICU 56
* @stable ICU 56
*/
LocalArray<T> &operator=(LocalArray<T> &&src) U_NOEXCEPT {
return moveFrom(src);
}
#endif
#ifndef U_HIDE_DRAFT_API
/**
* Move assignment, leaves src with isNull().
* The behavior is undefined if *this and src are the same object.
@ -412,22 +408,22 @@ public:
src.ptr=NULL;
return *this;
}
#endif /* U_HIDE_DRAFT_API */
/**
* Swap pointers.
* @param other other smart pointer
* @draft ICU 56
* @stable ICU 56
*/
void swap(LocalArray<T> &other) U_NOEXCEPT {
T *temp=LocalPointerBase<T>::ptr;
LocalPointerBase<T>::ptr=other.ptr;
other.ptr=temp;
}
#endif /* U_HIDE_DRAFT_API */
/**
* Non-member LocalArray swap function.
* @param p1 will get p2's pointer
* @param p2 will get p1's pointer
* @draft ICU 56
* @stable ICU 56
*/
friend inline void swap(LocalArray<T> &p1, LocalArray<T> &p2) U_NOEXCEPT {
p1.swap(p2);
@ -442,7 +438,6 @@ public:
delete[] LocalPointerBase<T>::ptr;
LocalPointerBase<T>::ptr=p;
}
#ifndef U_HIDE_DRAFT_API
/**
* Deletes the array it owns,
* and adopts (takes ownership of) the one passed in.
@ -456,7 +451,7 @@ public:
* @param p simple pointer to an array of T objects that is adopted
* @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR
* if p==NULL and no other failure code had been set
* @draft ICU 56
* @stable ICU 56
*/
void adoptInsteadAndCheckErrorCode(T *p, UErrorCode &errorCode) {
if(U_SUCCESS(errorCode)) {
@ -469,7 +464,6 @@ public:
delete[] p;
}
}
#endif /* U_HIDE_DRAFT_API */
/**
* Array item access (writable).
* No index bounds check.

View File

@ -21,6 +21,8 @@
#include "unicode/uchar.h"
#include "unicode/localpointer.h"
#ifndef U_HIDE_DRAFT_API
/**
* <code>UBiDiOrder</code> indicates the order of text.<p>
* This bidi transformation engine supports all possible combinations (4 in
@ -309,4 +311,5 @@ U_NAMESPACE_END
#endif
#endif /* U_HIDE_DRAFT_API */
#endif

View File

@ -44,12 +44,14 @@ enum UDisplayContextType {
* @stable ICU 54
*/
UDISPCTX_TYPE_DISPLAY_LENGTH = 2,
#ifndef U_HIDE_DRAFT_API
/**
* Type to retrieve the substitute handling setting, e.g.
* UDISPCTX_SUBSTITUTE, UDISPCTX_NO_SUBSTITUTE.
* @draft ICU 58
*/
UDISPCTX_TYPE_SUBSTITUTE_HANDLING = 3
#endif /* U_HIDE_DRAFT_API */
};
/**
* @stable ICU 51
@ -141,6 +143,7 @@ enum UDisplayContext {
* @stable ICU 54
*/
UDISPCTX_LENGTH_SHORT = (UDISPCTX_TYPE_DISPLAY_LENGTH<<8) + 1,
#ifndef U_HIDE_DRAFT_API
/**
* ================================
* SUBSTITUTE_HANDLING can be set to one of UDISPCTX_SUBSTITUTE or
@ -160,6 +163,7 @@ enum UDisplayContext {
* @draft ICU 58
*/
UDISPCTX_NO_SUBSTITUTE = (UDISPCTX_TYPE_SUBSTITUTE_HANDLING<<8) + 1
#endif /* U_HIDE_DRAFT_API */
};
/**

View File

@ -174,8 +174,6 @@ class UnicodeStringAppendable; // unicode/appendable.h
# endif
#endif
/* Cannot make the following #ifndef U_HIDE_DRAFT_API,
it is used to construct other non-internal constants */
/**
* \def UNISTR_OBJECT_SIZE
* Desired sizeof(UnicodeString) in bytes.
@ -207,7 +205,7 @@ class UnicodeStringAppendable; // unicode/appendable.h
* and the internal buffer would hold up to 11 UChars in that case.
*
* @see U16_MAX_LENGTH
* @draft ICU 56
* @stable ICU 56
*/
#ifndef UNISTR_OBJECT_SIZE
# define UNISTR_OBJECT_SIZE 64
@ -1904,7 +1902,6 @@ public:
*/
UnicodeString &fastCopyFrom(const UnicodeString &src);
#ifndef U_HIDE_DRAFT_API
#if U_HAVE_RVALUE_REFERENCES
/**
* Move assignment operator, might leave src in bogus state.
@ -1912,12 +1909,13 @@ public:
* The behavior is undefined if *this and src are the same object.
* @param src source string
* @return *this
* @draft ICU 56
* @stable ICU 56
*/
UnicodeString &operator=(UnicodeString &&src) U_NOEXCEPT {
return moveFrom(src);
}
#endif
#ifndef U_HIDE_DRAFT_API
/**
* Move assignment, might leave src in bogus state.
* This string will have the same contents and state that the source string had.
@ -1929,11 +1927,12 @@ public:
* @draft ICU 56
*/
UnicodeString &moveFrom(UnicodeString &src) U_NOEXCEPT;
#endif /* U_HIDE_DRAFT_API */
/**
* Swap strings.
* @param other other string
* @draft ICU 56
* @stable ICU 56
*/
void swap(UnicodeString &other) U_NOEXCEPT;
@ -1941,13 +1940,12 @@ public:
* Non-member UnicodeString swap function.
* @param s1 will get s2's contents and state
* @param s2 will get s1's contents and state
* @draft ICU 56
* @stable ICU 56
*/
friend U_COMMON_API inline void U_EXPORT2
swap(UnicodeString &s1, UnicodeString &s2) U_NOEXCEPT {
s1.swap(s2);
}
#endif /* U_HIDE_DRAFT_API */
/**
* Assignment operator. Replace the characters in this UnicodeString
@ -3214,17 +3212,15 @@ public:
*/
UnicodeString(const UnicodeString& that);
#ifndef U_HIDE_DRAFT_API
#if U_HAVE_RVALUE_REFERENCES
/**
* Move constructor, might leave src in bogus state.
* This string will have the same contents and state that the source string had.
* @param src source string
* @draft ICU 56
* @stable ICU 56
*/
UnicodeString(UnicodeString &&src) U_NOEXCEPT;
#endif
#endif /* U_HIDE_DRAFT_API */
/**
* 'Substring' constructor from tail of source string.

View File

@ -159,7 +159,6 @@ public:
FieldPositionIterator* posIter,
UErrorCode& status) const;
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since it is virtual. */
/**
* Format a long number using base-10 representation.
*
@ -169,7 +168,7 @@ public:
* @param pos On input: an alignment field, if desired.
* On output: the offsets of the alignment field.
* @return Reference to 'appendTo' parameter.
* @draft ICU 56
* @stable ICU 56
*/
virtual UnicodeString& format(int32_t number,
UnicodeString& appendTo,

View File

@ -118,7 +118,6 @@ public:
*/
UBool operator!=(const DateTimePatternGenerator& other) const;
#ifndef U_HIDE_DRAFT_API
/**
* Utility to return a unique skeleton from a given pattern. For example,
* both "MMM-dd" and "dd/MMM" produce the skeleton "MMMdd".
@ -127,10 +126,9 @@ public:
* @param status Output param set to success/failure code on exit,
* which must not indicate a failure before the function call.
* @return skeleton such as "MMMdd"
* @draft ICU 56
* @stable ICU 56
*/
static UnicodeString staticGetSkeleton(const UnicodeString& pattern, UErrorCode& status);
#endif /* U_HIDE_DRAFT_API */
/**
* Utility to return a unique skeleton from a given pattern. For example,
@ -151,7 +149,6 @@ public:
return staticGetSkeleton(pattern, status);
}*/
#ifndef U_HIDE_DRAFT_API
/**
* Utility to return a unique base skeleton from a given pattern. This is
* the same as the skeleton, except that differences in length are minimized
@ -163,10 +160,9 @@ public:
* @param status Output param set to success/failure code on exit,
* which must not indicate a failure before the function call.
* @return base skeleton, such as "MMMd"
* @draft ICU 56
* @stable ICU 56
*/
static UnicodeString staticGetBaseSkeleton(const UnicodeString& pattern, UErrorCode& status);
#endif /* U_HIDE_DRAFT_API */
/**
* Utility to return a unique base skeleton from a given pattern. This is

View File

@ -210,6 +210,7 @@ class U_I18N_API MeasureFormat : public Format {
FieldPosition &pos,
UErrorCode &status) const;
#ifndef U_HIDE_DRAFT_API
/**
* Gets the display name of the specified {@link MeasureUnit} corresponding to the current
* locale and format width.
@ -222,6 +223,7 @@ class U_I18N_API MeasureFormat : public Format {
* @draft ICU 58
*/
UnicodeString getUnitDisplayName(const MeasureUnit& unit, UErrorCode &status) const;
#endif /* U_HIDE_DRAFT_API */
/**

View File

@ -889,20 +889,18 @@ typedef enum UDateFormatBooleanAttribute {
* @stable ICU 53
*/
UDAT_PARSE_ALLOW_NUMERIC = 1,
#ifndef U_HIDE_DRAFT_API
/**
* indicates tolerance of a partial literal match
* e.g. accepting "--mon-02-march-2011" for a pattern of "'--: 'EEE-WW-MMMM-yyyy"
* @draft ICU 56
* @stable ICU 56
*/
UDAT_PARSE_PARTIAL_LITERAL_MATCH = 2,
/**
* indicates tolerance of pattern mismatch between input data and specified format pattern.
* e.g. accepting "September" for a month pattern of MMM ("Sep")
* @draft ICU 56
* @stable ICU 56
*/
UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH = 3,
#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_DEPRECATED_API
/**
* One more than the highest normal UDateFormatBooleanAttribute value.

View File

@ -221,29 +221,27 @@ typedef enum UNumberFormatStyle {
* @stable ICU 54
*/
UNUM_CASH_CURRENCY=13,
#ifndef U_HIDE_DRAFT_API
/**
* Decimal format expressed using compact notation
* (short form, corresponds to UNumberCompactStyle=UNUM_SHORT)
* e.g. "23K", "45B"
* @draft ICU 56
* @stable ICU 56
*/
UNUM_DECIMAL_COMPACT_SHORT=14,
/**
* Decimal format expressed using compact notation
* (long form, corresponds to UNumberCompactStyle=UNUM_LONG)
* e.g. "23 thousand", "45 billion"
* @draft ICU 56
* @stable ICU 56
*/
UNUM_DECIMAL_COMPACT_LONG=15,
/**
* Currency format with a currency symbol, e.g., "$1.00",
* using non-accounting style for negative values (e.g. minus sign).
* Overrides any style specified using -cf- key in locale.
* @draft ICU 56
* @stable ICU 56
*/
UNUM_CURRENCY_STANDARD=16,
#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_DEPRECATED_API
/**

View File

@ -419,6 +419,7 @@ typedef enum USpoofChecks {
*/
USPOOF_WHOLE_SCRIPT_CONFUSABLE = 4,
#ifndef U_HIDE_DRAFT_API
/**
* Enable this flag in {@link uspoof_setChecks} to turn on all types of confusables. You may set
* the checks to some subset of SINGLE_SCRIPT_CONFUSABLE, MIXED_SCRIPT_CONFUSABLE, or WHOLE_SCRIPT_CONFUSABLE to
@ -429,6 +430,7 @@ typedef enum USpoofChecks {
* @draft ICU 58
*/
USPOOF_CONFUSABLE = USPOOF_SINGLE_SCRIPT_CONFUSABLE | USPOOF_MIXED_SCRIPT_CONFUSABLE | USPOOF_WHOLE_SCRIPT_CONFUSABLE,
#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_DEPRECATED_API
/**
@ -1054,6 +1056,7 @@ uspoof_checkUnicodeString(const USpoofChecker *sc,
#endif
#ifndef U_HIDE_DRAFT_API
/**
* Check the specified string for possible security issues.
* The text to be checked will typically be an identifier of some sort.
@ -1250,6 +1253,7 @@ uspoof_getCheckResultRestrictionLevel(const USpoofCheckResult *checkResult, UErr
*/
U_DRAFT const USet* U_EXPORT2
uspoof_getCheckResultNumerics(const USpoofCheckResult *checkResult, UErrorCode *status);
#endif /* U_HIDE_DRAFT_API */
/**