Skip to content

Commit

Permalink
ICU-21958 ICU 70 API Promotions
Browse files Browse the repository at this point in the history
  • Loading branch information
richgillam committed Aug 31, 2022
1 parent 3d935f2 commit 5334e28
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 36 deletions.
22 changes: 8 additions & 14 deletions icu4c/source/common/unicode/uchar.h
Original file line number Diff line number Diff line change
Expand Up @@ -483,57 +483,55 @@ typedef enum UProperty {
* @stable ICU 62
*/
UCHAR_EXTENDED_PICTOGRAPHIC=64,
#ifndef U_HIDE_DRAFT_API
/**
* Binary property of strings Basic_Emoji.
* See https://www.unicode.org/reports/tr51/#Emoji_Sets
*
* @draft ICU 70
* @stable ICU 70
*/
UCHAR_BASIC_EMOJI=65,
/**
* Binary property of strings Emoji_Keycap_Sequence.
* See https://www.unicode.org/reports/tr51/#Emoji_Sets
*
* @draft ICU 70
* @stable ICU 70
*/
UCHAR_EMOJI_KEYCAP_SEQUENCE=66,
/**
* Binary property of strings RGI_Emoji_Modifier_Sequence.
* See https://www.unicode.org/reports/tr51/#Emoji_Sets
*
* @draft ICU 70
* @stable ICU 70
*/
UCHAR_RGI_EMOJI_MODIFIER_SEQUENCE=67,
/**
* Binary property of strings RGI_Emoji_Flag_Sequence.
* See https://www.unicode.org/reports/tr51/#Emoji_Sets
*
* @draft ICU 70
* @stable ICU 70
*/
UCHAR_RGI_EMOJI_FLAG_SEQUENCE=68,
/**
* Binary property of strings RGI_Emoji_Tag_Sequence.
* See https://www.unicode.org/reports/tr51/#Emoji_Sets
*
* @draft ICU 70
* @stable ICU 70
*/
UCHAR_RGI_EMOJI_TAG_SEQUENCE=69,
/**
* Binary property of strings RGI_Emoji_ZWJ_Sequence.
* See https://www.unicode.org/reports/tr51/#Emoji_Sets
*
* @draft ICU 70
* @stable ICU 70
*/
UCHAR_RGI_EMOJI_ZWJ_SEQUENCE=70,
/**
* Binary property of strings RGI_Emoji.
* See https://www.unicode.org/reports/tr51/#Emoji_Sets
*
* @draft ICU 70
* @stable ICU 70
*/
UCHAR_RGI_EMOJI=71,
#endif // U_HIDE_DRAFT_API
#ifndef U_HIDE_DEPRECATED_API
/**
* One more than the last constant for binary Unicode properties.
Expand Down Expand Up @@ -2697,8 +2695,6 @@ typedef enum UVerticalOrientation {
U_CAPI UBool U_EXPORT2
u_hasBinaryProperty(UChar32 c, UProperty which);

#ifndef U_HIDE_DRAFT_API

/**
* Returns true if the property is true for the string.
* Same as u_hasBinaryProperty(single code point, which)
Expand All @@ -2721,13 +2717,11 @@ u_hasBinaryProperty(UChar32 c, UProperty which);
* @see u_getBinaryPropertySet
* @see u_getIntPropertyValue
* @see u_getUnicodeVersion
* @draft ICU 70
* @stable ICU 70
*/
U_CAPI UBool U_EXPORT2
u_stringHasBinaryProperty(const UChar *s, int32_t length, UProperty which);

#endif // U_HIDE_DRAFT_API

/**
* Returns a frozen USet for a binary property.
* The library retains ownership over the returned object.
Expand Down
4 changes: 1 addition & 3 deletions icu4c/source/common/unicode/uniset.h
Original file line number Diff line number Diff line change
Expand Up @@ -794,13 +794,11 @@ class U_COMMON_API UnicodeSet U_FINAL : public UnicodeFilter {
*/
virtual UBool isEmpty(void) const;

#ifndef U_HIDE_DRAFT_API
/**
* @return true if this set contains multi-character strings or the empty string.
* @draft ICU 70
* @stable ICU 70
*/
UBool hasStrings() const;
#endif // U_HIDE_DRAFT_API

/**
* Returns true if this set contains the given character.
Expand Down
8 changes: 2 additions & 6 deletions icu4c/source/common/unicode/uset.h
Original file line number Diff line number Diff line change
Expand Up @@ -850,15 +850,13 @@ uset_removeAllStrings(USet* set);
U_CAPI UBool U_EXPORT2
uset_isEmpty(const USet* set);

#ifndef U_HIDE_DRAFT_API
/**
* @param set the set
* @return true if this set contains multi-character strings or the empty string.
* @draft ICU 70
* @stable ICU 70
*/
U_CAPI UBool U_EXPORT2
uset_hasStrings(const USet *set);
#endif // U_HIDE_DRAFT_API

/**
* Returns true if the given USet contains the given character.
Expand Down Expand Up @@ -941,18 +939,16 @@ uset_charAt(const USet* set, int32_t charIndex);
U_CAPI int32_t U_EXPORT2
uset_size(const USet* set);

#ifndef U_HIDE_DRAFT_API
/**
* @param set the set
* @return the number of ranges in this set.
* @draft ICU 70
* @stable ICU 70
* @see uset_getItemCount
* @see uset_getItem
* @see uset_size
*/
U_CAPI int32_t U_EXPORT2
uset_getRangeCount(const USet *set);
#endif // U_HIDE_DRAFT_API

/**
* Returns the number of items in this set. An item is either a range
Expand Down
4 changes: 1 addition & 3 deletions icu4c/source/common/unicode/usetiter.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,13 @@ class U_COMMON_API UnicodeSetIterator U_FINAL : public UObject {
*/
const UnicodeString& getString();

#ifndef U_HIDE_DRAFT_API
/**
* Skips over the remaining code points/ranges, if any.
* A following call to next() or nextRange() will yield a string, if there is one.
* No-op if next() would return false, or if it would yield a string anyway.
*
* @return *this
* @draft ICU 70
* @stable ICU 70
* @see UnicodeSet#strings()
*/
inline UnicodeSetIterator &skipToStrings() {
Expand All @@ -181,7 +180,6 @@ class U_COMMON_API UnicodeSetIterator U_FINAL : public UObject {
nextElement = 0;
return *this;
}
#endif // U_HIDE_DRAFT_API

/**
* Advances the iteration position to the next element in the set,
Expand Down
4 changes: 1 addition & 3 deletions icu4c/source/i18n/unicode/numberrangeformatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -639,14 +639,12 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
*/
UNumberRangeIdentityResult getIdentityResult(UErrorCode& status) const;

#ifndef U_HIDE_DRAFT_API
/**
* Default constructor; makes an empty FormattedNumberRange.
* @draft ICU 70
* @stable ICU 70
*/
FormattedNumberRange()
: fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {}
#endif /* U_HIDE_DRAFT_API */

/**
* Copying not supported; use move constructor instead.
Expand Down
6 changes: 2 additions & 4 deletions icu4c/source/i18n/unicode/udat.h
Original file line number Diff line number Diff line change
Expand Up @@ -1532,19 +1532,17 @@ typedef enum UDateFormatSymbolType {
*/
UDAT_ZODIAC_NAMES_NARROW,

#ifndef U_HIDE_DRAFT_API
/**
* The narrow quarter names, for example 1
* @draft ICU 70
* @stable ICU 70
*/
UDAT_NARROW_QUARTERS,

/**
* The narrow standalone quarter names, for example 1
* @draft ICU 70
* @stable ICU 70
*/
UDAT_STANDALONE_NARROW_QUARTERS
#endif // U_HIDE_DRAFT_API
} UDateFormatSymbolType;

struct UDateFormatSymbols;
Expand Down
4 changes: 1 addition & 3 deletions icu4c/source/i18n/unicode/uformattedvalue.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,12 @@ typedef enum UFieldCategory {
*/
UFIELD_CATEGORY_DATE_INTERVAL_SPAN = 0x1000 + UFIELD_CATEGORY_DATE_INTERVAL,

#ifndef U_HIDE_DRAFT_API
/**
* Category for spans in a number range.
*
* @draft ICU 69
* @stable ICU 69
*/
UFIELD_CATEGORY_NUMBER_RANGE_SPAN = 0x1000 + UFIELD_CATEGORY_NUMBER,
#endif // U_HIDE_DRAFT_API

} UFieldCategory;

Expand Down

0 comments on commit 5334e28

Please sign in to comment.