summaryrefslogtreecommitdiff
path: root/deps/icu-small/source/i18n/unicode
diff options
context:
space:
mode:
Diffstat (limited to 'deps/icu-small/source/i18n/unicode')
-rw-r--r--deps/icu-small/source/i18n/unicode/alphaindex.h6
-rw-r--r--deps/icu-small/source/i18n/unicode/basictz.h12
-rw-r--r--deps/icu-small/source/i18n/unicode/calendar.h27
-rw-r--r--deps/icu-small/source/i18n/unicode/choicfmt.h9
-rw-r--r--deps/icu-small/source/i18n/unicode/coleitr.h4
-rw-r--r--deps/icu-small/source/i18n/unicode/coll.h24
-rw-r--r--deps/icu-small/source/i18n/unicode/compactdecimalformat.h7
-rw-r--r--deps/icu-small/source/i18n/unicode/curramt.h7
-rw-r--r--deps/icu-small/source/i18n/unicode/currpinf.h4
-rw-r--r--deps/icu-small/source/i18n/unicode/currunit.h7
-rw-r--r--deps/icu-small/source/i18n/unicode/datefmt.h12
-rw-r--r--deps/icu-small/source/i18n/unicode/dcfmtsym.h8
-rw-r--r--deps/icu-small/source/i18n/unicode/decimfmt.h31
-rw-r--r--deps/icu-small/source/i18n/unicode/dtfmtsym.h4
-rw-r--r--deps/icu-small/source/i18n/unicode/dtitvfmt.h6
-rw-r--r--deps/icu-small/source/i18n/unicode/dtitvinf.h6
-rw-r--r--deps/icu-small/source/i18n/unicode/dtptngen.h12
-rw-r--r--deps/icu-small/source/i18n/unicode/dtrule.h6
-rw-r--r--deps/icu-small/source/i18n/unicode/fieldpos.h4
-rw-r--r--deps/icu-small/source/i18n/unicode/fmtable.h4
-rw-r--r--deps/icu-small/source/i18n/unicode/format.h4
-rw-r--r--deps/icu-small/source/i18n/unicode/formattedvalue.h23
-rw-r--r--deps/icu-small/source/i18n/unicode/fpositer.h5
-rw-r--r--deps/icu-small/source/i18n/unicode/gender.h4
-rw-r--r--deps/icu-small/source/i18n/unicode/gregocal.h8
-rw-r--r--deps/icu-small/source/i18n/unicode/listformatter.h6
-rw-r--r--deps/icu-small/source/i18n/unicode/measfmt.h17
-rw-r--r--deps/icu-small/source/i18n/unicode/measunit.h229
-rw-r--r--deps/icu-small/source/i18n/unicode/measure.h7
-rw-r--r--deps/icu-small/source/i18n/unicode/msgfmt.h10
-rw-r--r--deps/icu-small/source/i18n/unicode/nounit.h9
-rw-r--r--deps/icu-small/source/i18n/unicode/numberformatter.h281
-rw-r--r--deps/icu-small/source/i18n/unicode/numberrangeformatter.h135
-rw-r--r--deps/icu-small/source/i18n/unicode/numfmt.h16
-rw-r--r--deps/icu-small/source/i18n/unicode/numsys.h4
-rw-r--r--deps/icu-small/source/i18n/unicode/plurfmt.h17
-rw-r--r--deps/icu-small/source/i18n/unicode/plurrule.h4
-rw-r--r--deps/icu-small/source/i18n/unicode/rbnf.h28
-rw-r--r--deps/icu-small/source/i18n/unicode/rbtz.h8
-rw-r--r--deps/icu-small/source/i18n/unicode/regex.h5
-rw-r--r--deps/icu-small/source/i18n/unicode/region.h7
-rw-r--r--deps/icu-small/source/i18n/unicode/reldatefmt.h25
-rw-r--r--deps/icu-small/source/i18n/unicode/scientificnumberformatter.h9
-rw-r--r--deps/icu-small/source/i18n/unicode/search.h7
-rwxr-xr-xdeps/icu-small/source/i18n/unicode/selfmt.h9
-rw-r--r--deps/icu-small/source/i18n/unicode/simpletz.h8
-rw-r--r--deps/icu-small/source/i18n/unicode/smpdtfmt.h8
-rw-r--r--deps/icu-small/source/i18n/unicode/sortkey.h4
-rw-r--r--deps/icu-small/source/i18n/unicode/stsearch.h9
-rw-r--r--deps/icu-small/source/i18n/unicode/tblcoll.h11
-rw-r--r--deps/icu-small/source/i18n/unicode/timezone.h14
-rw-r--r--deps/icu-small/source/i18n/unicode/tmunit.h7
-rw-r--r--deps/icu-small/source/i18n/unicode/tmutamt.h12
-rw-r--r--deps/icu-small/source/i18n/unicode/tmutfmt.h8
-rw-r--r--deps/icu-small/source/i18n/unicode/translit.h4
-rw-r--r--deps/icu-small/source/i18n/unicode/tzfmt.h7
-rw-r--r--deps/icu-small/source/i18n/unicode/tznames.h5
-rw-r--r--deps/icu-small/source/i18n/unicode/tzrule.h12
-rw-r--r--deps/icu-small/source/i18n/unicode/tztrans.h6
-rw-r--r--deps/icu-small/source/i18n/unicode/ucal.h40
-rw-r--r--deps/icu-small/source/i18n/unicode/ucol.h2
-rw-r--r--deps/icu-small/source/i18n/unicode/udat.h2
-rw-r--r--deps/icu-small/source/i18n/unicode/udatpg.h2
-rw-r--r--deps/icu-small/source/i18n/unicode/uformattedvalue.h3
-rw-r--r--deps/icu-small/source/i18n/unicode/ulistformatter.h4
-rw-r--r--deps/icu-small/source/i18n/unicode/unirepl.h4
-rw-r--r--deps/icu-small/source/i18n/unicode/unum.h4
-rw-r--r--deps/icu-small/source/i18n/unicode/unumberformatter.h71
-rw-r--r--deps/icu-small/source/i18n/unicode/usearch.h18
-rw-r--r--deps/icu-small/source/i18n/unicode/uspoof.h496
-rw-r--r--deps/icu-small/source/i18n/unicode/utrans.h11
-rw-r--r--deps/icu-small/source/i18n/unicode/vtzone.h8
72 files changed, 1209 insertions, 648 deletions
diff --git a/deps/icu-small/source/i18n/unicode/alphaindex.h b/deps/icu-small/source/i18n/unicode/alphaindex.h
index dfb6110a36..fe43995fe8 100644
--- a/deps/icu-small/source/i18n/unicode/alphaindex.h
+++ b/deps/icu-small/source/i18n/unicode/alphaindex.h
@@ -13,6 +13,9 @@
#define INDEXCHARS_H
#include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
+
#include "unicode/uobject.h"
#include "unicode/locid.h"
#include "unicode/unistr.h"
@@ -757,4 +760,7 @@ private:
U_NAMESPACE_END
#endif // !UCONFIG_NO_COLLATION
+
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif
diff --git a/deps/icu-small/source/i18n/unicode/basictz.h b/deps/icu-small/source/i18n/unicode/basictz.h
index eb62abaf0a..e1db2a8223 100644
--- a/deps/icu-small/source/i18n/unicode/basictz.h
+++ b/deps/icu-small/source/i18n/unicode/basictz.h
@@ -16,6 +16,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_FORMATTING
#include "unicode/timezone.h"
@@ -42,6 +44,14 @@ public:
virtual ~BasicTimeZone();
/**
+ * Clones this object polymorphically.
+ * The caller owns the result and should delete it when done.
+ * @return clone, or nullptr if an error occurred
+ * @stable ICU 3.8
+ */
+ virtual BasicTimeZone* clone() const = 0;
+
+ /**
* Gets the first time zone transition after the base time.
* @param base The base time.
* @param inclusive Whether the base time is inclusive or not.
@@ -211,6 +221,8 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // BASICTZ_H
//eof
diff --git a/deps/icu-small/source/i18n/unicode/calendar.h b/deps/icu-small/source/i18n/unicode/calendar.h
index 023cf053f2..2a8c2935ca 100644
--- a/deps/icu-small/source/i18n/unicode/calendar.h
+++ b/deps/icu-small/source/i18n/unicode/calendar.h
@@ -29,6 +29,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Calendar object
@@ -184,7 +186,7 @@ class BasicTimeZone;
*/
class U_I18N_API Calendar : public UObject {
public:
-
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Field IDs for date and time. Used to specify date/time fields. ERA is calendar
* specific. Example ranges given are for illustration only; see specific Calendar
@@ -227,6 +229,7 @@ public:
FIELD_COUNT = UCAL_FIELD_COUNT // See ucal.h for other fields.
#endif /* U_HIDE_DEPRECATED_API */
};
+#endif // U_FORCE_HIDE_DEPRECATED_API
#ifndef U_HIDE_DEPRECATED_API
/**
@@ -287,7 +290,7 @@ public:
* @return a polymorphic copy of this calendar.
* @stable ICU 2.0
*/
- virtual Calendar* clone(void) const = 0;
+ virtual Calendar* clone() const = 0;
/**
* Creates a Calendar using the default timezone and locale. Clients are responsible
@@ -518,6 +521,7 @@ public:
*/
UBool after(const Calendar& when, UErrorCode& status) const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* UDate Arithmetic function. Adds the specified (signed) amount of time to the given
* time field, based on the calendar's rules. For example, to subtract 5 days from
@@ -539,6 +543,7 @@ public:
* @deprecated ICU 2.6. use add(UCalendarDateFields field, int32_t amount, UErrorCode& status) instead.
*/
virtual void add(EDateFields field, int32_t amount, UErrorCode& status);
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* UDate Arithmetic function. Adds the specified (signed) amount of time to the given
@@ -632,6 +637,7 @@ public:
*/
inline void roll(UCalendarDateFields field, UBool up, UErrorCode& status);
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Time Field Rolling function. Rolls by the given amount on the given
* time field. For example, to roll the current date up by one day, call
@@ -664,6 +670,7 @@ public:
* @deprecated ICU 2.6. Use roll(UCalendarDateFields field, int32_t amount, UErrorCode& status) instead.
*/
virtual void roll(EDateFields field, int32_t amount, UErrorCode& status);
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Time Field Rolling function. Rolls by the given amount on the given
@@ -698,6 +705,7 @@ public:
*/
virtual void roll(UCalendarDateFields field, int32_t amount, UErrorCode& status);
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Return the difference between the given time and the time this
* calendar object is set to. If this calendar is set
@@ -754,6 +762,7 @@ public:
* @deprecated ICU 2.6. Use fieldDifference(UDate when, UCalendarDateFields field, UErrorCode& status).
*/
virtual int32_t fieldDifference(UDate when, EDateFields field, UErrorCode& status);
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Return the difference between the given time and the time this
@@ -1010,6 +1019,7 @@ public:
*/
uint8_t getMinimalDaysInFirstWeek(void) const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the minimum value for the given time field. e.g., for Gregorian
* DAY_OF_MONTH, 1.
@@ -1019,6 +1029,7 @@ public:
* @deprecated ICU 2.6. Use getMinimum(UCalendarDateFields field) instead.
*/
virtual int32_t getMinimum(EDateFields field) const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the minimum value for the given time field. e.g., for Gregorian
@@ -1030,6 +1041,7 @@ public:
*/
virtual int32_t getMinimum(UCalendarDateFields field) const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the maximum value for the given time field. e.g. for Gregorian DAY_OF_MONTH,
* 31.
@@ -1039,6 +1051,7 @@ public:
* @deprecated ICU 2.6. Use getMaximum(UCalendarDateFields field) instead.
*/
virtual int32_t getMaximum(EDateFields field) const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the maximum value for the given time field. e.g. for Gregorian DAY_OF_MONTH,
@@ -1050,6 +1063,7 @@ public:
*/
virtual int32_t getMaximum(UCalendarDateFields field) const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the highest minimum value for the given field if varies. Otherwise same as
* getMinimum(). For Gregorian, no difference.
@@ -1059,6 +1073,7 @@ public:
* @deprecated ICU 2.6. Use getGreatestMinimum(UCalendarDateFields field) instead.
*/
virtual int32_t getGreatestMinimum(EDateFields field) const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the highest minimum value for the given field if varies. Otherwise same as
@@ -1070,6 +1085,7 @@ public:
*/
virtual int32_t getGreatestMinimum(UCalendarDateFields field) const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the lowest maximum value for the given field if varies. Otherwise same as
* getMaximum(). e.g., for Gregorian DAY_OF_MONTH, 28.
@@ -1079,6 +1095,7 @@ public:
* @deprecated ICU 2.6. Use getLeastMaximum(UCalendarDateFields field) instead.
*/
virtual int32_t getLeastMaximum(EDateFields field) const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the lowest maximum value for the given field if varies. Otherwise same as
@@ -1895,11 +1912,13 @@ protected:
*/
int32_t fFields[UCAL_FIELD_COUNT];
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* The flags which tell if a specified time field for the calendar is set.
* @deprecated ICU 2.8 use (fStamp[n]!=kUnset)
*/
UBool fIsSet[UCAL_FIELD_COUNT];
+#endif // U_FORCE_HIDE_DEPRECATED_API
/** Special values of stamp[]
* @stable ICU 2.0
@@ -2281,7 +2300,6 @@ private:
* should only be called if this calendar is not lenient.
* @see #isLenient
* @see #validateField(int, int&)
- * @internal
*/
void validateFields(UErrorCode &status);
@@ -2291,7 +2309,6 @@ private:
* <code>U_ILLEGAL_ARGUMENT_ERROR</code> will be set. Subclasses may
* use this method in their implementation of {@link
* #validateField(int, int&)}.
- * @internal
*/
void validateField(UCalendarDateFields field, int32_t min, int32_t max, UErrorCode& status);
@@ -2529,4 +2546,6 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _CALENDAR
diff --git a/deps/icu-small/source/i18n/unicode/choicfmt.h b/deps/icu-small/source/i18n/unicode/choicfmt.h
index c9f0f1114f..3b2f48cb1f 100644
--- a/deps/icu-small/source/i18n/unicode/choicfmt.h
+++ b/deps/icu-small/source/i18n/unicode/choicfmt.h
@@ -26,13 +26,14 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Choice Format.
*/
#if !UCONFIG_NO_FORMATTING
-#ifndef U_HIDE_DEPRECATED_API
#include "unicode/fieldpos.h"
#include "unicode/format.h"
@@ -40,6 +41,8 @@
#include "unicode/numfmt.h"
#include "unicode/unistr.h"
+#ifndef U_HIDE_DEPRECATED_API
+
U_NAMESPACE_BEGIN
class MessageFormat;
@@ -248,7 +251,7 @@ public:
* @return a copy of this object
* @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/
- virtual Format* clone(void) const;
+ virtual ChoiceFormat* clone() const;
/**
* Returns true if the given Format objects are semantically equal.
@@ -592,5 +595,7 @@ U_NAMESPACE_END
#endif // U_HIDE_DEPRECATED_API
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // CHOICFMT_H
//eof
diff --git a/deps/icu-small/source/i18n/unicode/coleitr.h b/deps/icu-small/source/i18n/unicode/coleitr.h
index bf0e1d51a4..809d435e50 100644
--- a/deps/icu-small/source/i18n/unicode/coleitr.h
+++ b/deps/icu-small/source/i18n/unicode/coleitr.h
@@ -35,6 +35,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_COLLATION
#include "unicode/unistr.h"
@@ -404,4 +406,6 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_COLLATION */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif
diff --git a/deps/icu-small/source/i18n/unicode/coll.h b/deps/icu-small/source/i18n/unicode/coll.h
index 653434f54c..f5564c7394 100644
--- a/deps/icu-small/source/i18n/unicode/coll.h
+++ b/deps/icu-small/source/i18n/unicode/coll.h
@@ -54,6 +54,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_COLLATION
#include "unicode/uobject.h"
@@ -204,6 +206,7 @@ public:
// Cannot use #ifndef U_HIDE_DEPRECATED_API for the following, it is
// used by virtual methods that cannot have that conditional.
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* LESS is returned if source string is compared to be less than target
* string in the compare() method.
@@ -220,6 +223,7 @@ public:
EQUAL = UCOL_EQUAL, // 0
GREATER = UCOL_GREATER // 1
};
+#endif // U_FORCE_HIDE_DEPRECATED_API
// Collator public destructor -----------------------------------------
@@ -265,7 +269,7 @@ public:
* @return a copy of this object, owned by the caller
* @stable ICU 2.0
*/
- virtual Collator* clone(void) const = 0;
+ virtual Collator* clone() const = 0;
/**
* Creates the Collator object for the current default locale.
@@ -323,6 +327,7 @@ public:
*/
static Collator* U_EXPORT2 createInstance(const Locale& loc, UErrorCode& err);
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* The comparison function compares the character data stored in two
* different strings. Returns information about whether a string is less
@@ -336,6 +341,7 @@ public:
*/
virtual EComparisonResult compare(const UnicodeString& source,
const UnicodeString& target) const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* The comparison function compares the character data stored in two
@@ -353,6 +359,7 @@ public:
const UnicodeString& target,
UErrorCode &status) const = 0;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Does the same thing as compare but limits the comparison to a specified
* length
@@ -368,6 +375,7 @@ public:
virtual EComparisonResult compare(const UnicodeString& source,
const UnicodeString& target,
int32_t length) const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Does the same thing as compare but limits the comparison to a specified
@@ -387,6 +395,7 @@ public:
int32_t length,
UErrorCode &status) const = 0;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* The comparison function compares the character data stored in two
* different string arrays. Returns information about whether a string array
@@ -423,6 +432,7 @@ public:
virtual EComparisonResult compare(const char16_t* source, int32_t sourceLength,
const char16_t* target, int32_t targetLength)
const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* The comparison function compares the character data stored in two
@@ -527,6 +537,7 @@ public:
*/
virtual int32_t hashCode(void) const = 0;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the locale of the Collator
*
@@ -540,6 +551,7 @@ public:
* in ICU 3.0.
*/
virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const = 0;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Convenience method for comparing two strings based on the collation rules.
@@ -576,6 +588,7 @@ public:
*/
UBool equals(const UnicodeString& source, const UnicodeString& target) const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Determines the minimum strength that will be used in comparison or
* transformation.
@@ -607,6 +620,7 @@ public:
* @deprecated ICU 2.6 Use setAttribute(UCOL_STRENGTH...) instead
*/
virtual void setStrength(ECollationStrength newStrength);
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Retrieves the reordering codes for this collator.
@@ -904,6 +918,7 @@ public:
*/
virtual UColReorderCode getMaxVariable() const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Sets the variable top to the primary weight of the specified string.
*
@@ -951,6 +966,7 @@ public:
* @deprecated ICU 53 Call setMaxVariable() instead.
*/
virtual void setVariableTop(uint32_t varTop, UErrorCode &status) = 0;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the variable top value of a Collator.
@@ -972,6 +988,7 @@ public:
*/
virtual UnicodeSet *getTailoredSet(UErrorCode &status) const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Same as clone().
* The base class implementation simply calls clone().
@@ -979,7 +996,8 @@ public:
* @see clone()
* @deprecated ICU 50 no need to have two methods for cloning
*/
- virtual Collator* safeClone(void) const;
+ virtual Collator* safeClone() const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Get the sort key as an array of bytes from a UnicodeString.
@@ -1271,4 +1289,6 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_COLLATION */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif
diff --git a/deps/icu-small/source/i18n/unicode/compactdecimalformat.h b/deps/icu-small/source/i18n/unicode/compactdecimalformat.h
index 9c1e9183f4..9c1e200996 100644
--- a/deps/icu-small/source/i18n/unicode/compactdecimalformat.h
+++ b/deps/icu-small/source/i18n/unicode/compactdecimalformat.h
@@ -14,6 +14,9 @@
#define __COMPACT_DECIMAL_FORMAT_H__
#include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Compatibility APIs for compact decimal number formatting.
@@ -102,7 +105,7 @@ public:
* @return a polymorphic copy of this CompactDecimalFormat.
* @stable ICU 51
*/
- Format* clone() const U_OVERRIDE;
+ CompactDecimalFormat* clone() const U_OVERRIDE;
using DecimalFormat::format;
@@ -187,5 +190,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // __COMPACT_DECIMAL_FORMAT_H__
//eof
diff --git a/deps/icu-small/source/i18n/unicode/curramt.h b/deps/icu-small/source/i18n/unicode/curramt.h
index 03ec856e3b..65e6619db3 100644
--- a/deps/icu-small/source/i18n/unicode/curramt.h
+++ b/deps/icu-small/source/i18n/unicode/curramt.h
@@ -15,6 +15,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_FORMATTING
#include "unicode/measure.h"
@@ -79,7 +81,7 @@ class U_I18N_API CurrencyAmount: public Measure {
* have the same class as returned by getDynamicClassID().
* @stable ICU 3.0
*/
- virtual UObject* clone() const;
+ virtual CurrencyAmount* clone() const;
/**
* Destructor
@@ -129,4 +131,7 @@ inline const char16_t* CurrencyAmount::getISOCurrency() const {
U_NAMESPACE_END
#endif // !UCONFIG_NO_FORMATTING
+
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // __CURRENCYAMOUNT_H__
diff --git a/deps/icu-small/source/i18n/unicode/currpinf.h b/deps/icu-small/source/i18n/unicode/currpinf.h
index 80b0462513..1b93be0831 100644
--- a/deps/icu-small/source/i18n/unicode/currpinf.h
+++ b/deps/icu-small/source/i18n/unicode/currpinf.h
@@ -11,6 +11,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Currency Plural Information used by Decimal Format
@@ -266,5 +268,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _CURRPINFO
//eof
diff --git a/deps/icu-small/source/i18n/unicode/currunit.h b/deps/icu-small/source/i18n/unicode/currunit.h
index 63739c37fd..0446154e32 100644
--- a/deps/icu-small/source/i18n/unicode/currunit.h
+++ b/deps/icu-small/source/i18n/unicode/currunit.h
@@ -15,6 +15,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_FORMATTING
#include "unicode/measunit.h"
@@ -94,7 +96,7 @@ class U_I18N_API CurrencyUnit: public MeasureUnit {
* have the same class as returned by getDynamicClassID().
* @stable ICU 3.0
*/
- virtual UObject* clone() const;
+ virtual CurrencyUnit* clone() const;
/**
* Destructor
@@ -140,4 +142,7 @@ inline const char16_t* CurrencyUnit::getISOCurrency() const {
U_NAMESPACE_END
#endif // !UCONFIG_NO_FORMATTING
+
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // __CURRENCYUNIT_H__
diff --git a/deps/icu-small/source/i18n/unicode/datefmt.h b/deps/icu-small/source/i18n/unicode/datefmt.h
index 13c63d9376..21217e567a 100644
--- a/deps/icu-small/source/i18n/unicode/datefmt.h
+++ b/deps/icu-small/source/i18n/unicode/datefmt.h
@@ -23,6 +23,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_FORMATTING
#include "unicode/udat.h"
@@ -222,6 +224,14 @@ public:
virtual ~DateFormat();
/**
+ * Clones this object polymorphically.
+ * The caller owns the result and should delete it when done.
+ * @return clone, or nullptr if an error occurred
+ * @stable ICU 2.0
+ */
+ virtual DateFormat* clone() const = 0;
+
+ /**
* Equality operator. Returns true if the two formats have the same behavior.
* @stable ICU 2.0
*/
@@ -953,5 +963,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _DATEFMT
//eof
diff --git a/deps/icu-small/source/i18n/unicode/dcfmtsym.h b/deps/icu-small/source/i18n/unicode/dcfmtsym.h
index 55e3d8a6b3..e1e0ab6b08 100644
--- a/deps/icu-small/source/i18n/unicode/dcfmtsym.h
+++ b/deps/icu-small/source/i18n/unicode/dcfmtsym.h
@@ -28,10 +28,12 @@
#define DCFMTSYM_H
#include "unicode/utypes.h"
-#include "unicode/uchar.h"
+
+#if U_SHOW_CPLUSPLUS_API
#if !UCONFIG_NO_FORMATTING
+#include "unicode/uchar.h"
#include "unicode/uobject.h"
#include "unicode/locid.h"
#include "unicode/numsys.h"
@@ -455,13 +457,11 @@ private:
* to non-resource bundle strings,
* then regular UnicodeString copies must be used instead of fastCopyFrom().
*
- * @internal
*/
UnicodeString fSymbols[kFormatSymbolCount];
/**
* Non-symbol variable for getConstSymbol(). Always empty.
- * @internal
*/
UnicodeString fNoSymbol;
@@ -582,5 +582,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _DCFMTSYM
//eof
diff --git a/deps/icu-small/source/i18n/unicode/decimfmt.h b/deps/icu-small/source/i18n/unicode/decimfmt.h
index 097a38fb88..e539b9af23 100644
--- a/deps/icu-small/source/i18n/unicode/decimfmt.h
+++ b/deps/icu-small/source/i18n/unicode/decimfmt.h
@@ -28,6 +28,9 @@
#define DECIMFMT_H
#include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Compatibility APIs for decimal formatting.
@@ -896,7 +899,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @return a polymorphic copy of this DecimalFormat.
* @stable ICU 2.0
*/
- Format* clone(void) const U_OVERRIDE;
+ DecimalFormat* clone() const U_OVERRIDE;
/**
* Return true if the given Format objects are semantically equal.
@@ -1331,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.
@@ -1342,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;
@@ -1363,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.
@@ -2020,12 +2021,14 @@ class U_I18N_API DecimalFormat : public NumberFormat {
*/
void setCurrency(const char16_t* theCurrency, UErrorCode& ec) U_OVERRIDE;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Sets the currency used to display currency amounts. See
* setCurrency(const char16_t*, UErrorCode&).
* @deprecated ICU 3.0. Use setCurrency(const char16_t*, UErrorCode&).
*/
virtual void setCurrency(const char16_t* theCurrency);
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Sets the `Currency Usage` object used to display currency.
@@ -2113,22 +2116,6 @@ class U_I18N_API DecimalFormat : public NumberFormat {
const number::LocalizedNumberFormatter* toNumberFormatter(UErrorCode& status) const;
#endif /* U_HIDE_DRAFT_API */
-#ifndef U_HIDE_DEPRECATED_API
- /**
- * Deprecated: Like {@link #toNumberFormatter(UErrorCode&) const},
- * but does not take an error code.
- *
- * The new signature should be used in case an error occurs while returning the
- * LocalizedNumberFormatter.
- *
- * This old signature will be removed in ICU 65.
- *
- * @return A reference to an internal object.
- * @deprecated ICU 64
- */
- const number::LocalizedNumberFormatter& toNumberFormatter() const;
-#endif /* U_HIDE_DEPRECATED_API */
-
/**
* Return the class ID for this class. This is useful only for
* comparing to a return value from getDynamicClassID(). For example:
@@ -2216,5 +2203,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _DECIMFMT
//eof
diff --git a/deps/icu-small/source/i18n/unicode/dtfmtsym.h b/deps/icu-small/source/i18n/unicode/dtfmtsym.h
index ed7c189846..f9ec88272b 100644
--- a/deps/icu-small/source/i18n/unicode/dtfmtsym.h
+++ b/deps/icu-small/source/i18n/unicode/dtfmtsym.h
@@ -22,6 +22,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_FORMATTING
#include "unicode/calendar.h"
@@ -1011,5 +1013,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _DTFMTSYM
//eof
diff --git a/deps/icu-small/source/i18n/unicode/dtitvfmt.h b/deps/icu-small/source/i18n/unicode/dtitvfmt.h
index 42d77d041f..23fc02e2a7 100644
--- a/deps/icu-small/source/i18n/unicode/dtitvfmt.h
+++ b/deps/icu-small/source/i18n/unicode/dtitvfmt.h
@@ -16,6 +16,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Format and parse date interval in a language-independent manner.
@@ -432,7 +434,7 @@ public:
* @return A copy of the object.
* @stable ICU 4.0
*/
- virtual Format* clone(void) const;
+ virtual DateIntervalFormat* clone() const;
/**
* Return true if the given Format objects are semantically equal. Objects
@@ -1151,5 +1153,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _DTITVFMT_H__
//eof
diff --git a/deps/icu-small/source/i18n/unicode/dtitvinf.h b/deps/icu-small/source/i18n/unicode/dtitvinf.h
index 65f568c070..3c666231ab 100644
--- a/deps/icu-small/source/i18n/unicode/dtitvinf.h
+++ b/deps/icu-small/source/i18n/unicode/dtitvinf.h
@@ -16,6 +16,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Date/Time interval patterns for formatting date/time interval
@@ -195,7 +197,7 @@ public:
* @return a copy of the object
* @stable ICU 4.0
*/
- virtual DateIntervalInfo* clone(void) const;
+ virtual DateIntervalInfo* clone() const;
/**
* Destructor.
@@ -515,4 +517,6 @@ U_NAMESPACE_END
#endif
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif
diff --git a/deps/icu-small/source/i18n/unicode/dtptngen.h b/deps/icu-small/source/i18n/unicode/dtptngen.h
index e50c01b4e3..a71938b31c 100644
--- a/deps/icu-small/source/i18n/unicode/dtptngen.h
+++ b/deps/icu-small/source/i18n/unicode/dtptngen.h
@@ -14,6 +14,10 @@
#ifndef __DTPTNGEN_H__
#define __DTPTNGEN_H__
+#include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
+
#include "unicode/datefmt.h"
#include "unicode/locid.h"
#include "unicode/udat.h"
@@ -279,7 +283,7 @@ public:
*
* @param field The desired UDateTimePatternField, such as UDATPG_ERA_FIELD.
* @param width The desired UDateTimePGDisplayWidth, such as UDATPG_ABBREVIATED.
- * @return. The display name for field
+ * @return The display name for field
* @stable ICU 61
*/
UnicodeString getFieldDisplayName(UDateTimePatternField field, UDateTimePGDisplayWidth width) const;
@@ -561,12 +565,10 @@ private:
void setDateTimeFromCalendar(const Locale& locale, UErrorCode& status);
void setDecimalSymbols(const Locale& locale, UErrorCode& status);
UDateTimePatternField getAppendFormatNumber(const char* field) const;
-#ifndef U_HIDE_DRAFT_API
- // The following three have to be U_HIDE_DRAFT_API (though private) because UDateTimePGDisplayWidth is
+ // Note for the next 3: UDateTimePGDisplayWidth is now stable ICU 61
UDateTimePatternField getFieldAndWidthIndices(const char* key, UDateTimePGDisplayWidth* widthP) const;
void setFieldDisplayName(UDateTimePatternField field, UDateTimePGDisplayWidth width, const UnicodeString& value);
UnicodeString& getMutableFieldDisplayName(UDateTimePatternField field, UDateTimePGDisplayWidth width);
-#endif // U_HIDE_DRAFT_API
void getAppendName(UDateTimePatternField field, UnicodeString& value);
UnicodeString mapSkeletonMetacharacters(const UnicodeString& patternForm, int32_t* flags, UErrorCode& status);
const UnicodeString* getBestRaw(DateTimeMatcher& source, int32_t includeMask, DistanceInfo* missingFields, UErrorCode& status, const PtnSkeleton** specifiedSkeletonPtr = 0);
@@ -587,4 +589,6 @@ private:
U_NAMESPACE_END
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif
diff --git a/deps/icu-small/source/i18n/unicode/dtrule.h b/deps/icu-small/source/i18n/unicode/dtrule.h
index 24dfc69de1..dba28bf2dc 100644
--- a/deps/icu-small/source/i18n/unicode/dtrule.h
+++ b/deps/icu-small/source/i18n/unicode/dtrule.h
@@ -11,6 +11,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Rule for specifying date and time in an year
@@ -126,7 +128,7 @@ public:
* @return A copy of the object.
* @stable ICU 3.8
*/
- DateTimeRule* clone(void) const;
+ DateTimeRule* clone() const;
/**
* Assignment operator.
@@ -248,5 +250,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // DTRULE_H
//eof
diff --git a/deps/icu-small/source/i18n/unicode/fieldpos.h b/deps/icu-small/source/i18n/unicode/fieldpos.h
index 78561a4de7..c9849d67a3 100644
--- a/deps/icu-small/source/i18n/unicode/fieldpos.h
+++ b/deps/icu-small/source/i18n/unicode/fieldpos.h
@@ -26,6 +26,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: FieldPosition identifies the fields in a formatted output.
@@ -290,5 +292,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _FIELDPOS
//eof
diff --git a/deps/icu-small/source/i18n/unicode/fmtable.h b/deps/icu-small/source/i18n/unicode/fmtable.h
index a06c23dc3b..7bec4f6906 100644
--- a/deps/icu-small/source/i18n/unicode/fmtable.h
+++ b/deps/icu-small/source/i18n/unicode/fmtable.h
@@ -19,6 +19,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Formattable is a thin wrapper for primitive types used for formatting and parsing
@@ -751,5 +753,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif //_FMTABLE
//eof
diff --git a/deps/icu-small/source/i18n/unicode/format.h b/deps/icu-small/source/i18n/unicode/format.h
index e64cc1c6eb..28a09159bd 100644
--- a/deps/icu-small/source/i18n/unicode/format.h
+++ b/deps/icu-small/source/i18n/unicode/format.h
@@ -26,6 +26,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Base class for all formats.
@@ -303,5 +305,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _FORMAT
//eof
diff --git a/deps/icu-small/source/i18n/unicode/formattedvalue.h b/deps/icu-small/source/i18n/unicode/formattedvalue.h
index 2e24c8d99e..1b130bbdd9 100644
--- a/deps/icu-small/source/i18n/unicode/formattedvalue.h
+++ b/deps/icu-small/source/i18n/unicode/formattedvalue.h
@@ -5,8 +5,10 @@
#define __FORMATTEDVALUE_H__
#include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_FORMATTING
-#ifndef U_HIDE_DRAFT_API
#include "unicode/appendable.h"
#include "unicode/fpositer.h"
@@ -24,6 +26,10 @@ U_NAMESPACE_BEGIN
*/
+// The following cannot have #ifndef U_HIDE_DRAFT_API because
+// class FormattedValue depends on it, and FormattedValue cannot be
+// hidden becauseclass FormattedNumber (stable ICU 60) depends on it.
+#ifndef U_FORCE_HIDE_DRAFT_API
/**
* Represents a span of a string containing a given field.
*
@@ -52,6 +58,7 @@ class U_I18N_API ConstrainedFieldPosition : public UMemory {
/** @draft ICU 64 */
~ConstrainedFieldPosition();
+#ifndef U_HIDE_DRAFT_API
/**
* Resets this ConstrainedFieldPosition to its initial state, as if it were newly created:
*
@@ -221,17 +228,23 @@ class U_I18N_API ConstrainedFieldPosition : public UMemory {
int32_t field,
int32_t start,
int32_t limit);
+#endif /* U_HIDE_DRAFT_API */
private:
int64_t fContext = 0LL;
int32_t fField = 0;
int32_t fStart = 0;
int32_t fLimit = 0;
+#ifndef U_HIDE_DRAFT_API
int32_t fCategory = UFIELD_CATEGORY_UNDEFINED;
+#else /* U_HIDE_DRAFT_API */
+ int32_t fCategory = 0;
+#endif /* U_HIDE_DRAFT_API */
int8_t fConstraint = 0;
};
-
+// The following cannot have #ifndef U_HIDE_DRAFT_API because
+// class FormattedNumber (stable ICU 60) depends on it.
/**
* An abstract formatted value: a string with associated field attributes.
* Many formatters format to classes implementing FormattedValue.
@@ -308,10 +321,12 @@ class U_I18N_API FormattedValue /* not : public UObject because this is an inter
*/
virtual UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const = 0;
};
-
+#endif // U_FORCE_HIDE_DRAFT_API
U_NAMESPACE_END
-#endif /* U_HIDE_DRAFT_API */
#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // __FORMATTEDVALUE_H__
diff --git a/deps/icu-small/source/i18n/unicode/fpositer.h b/deps/icu-small/source/i18n/unicode/fpositer.h
index 81091f0ffa..ba2a838315 100644
--- a/deps/icu-small/source/i18n/unicode/fpositer.h
+++ b/deps/icu-small/source/i18n/unicode/fpositer.h
@@ -19,6 +19,9 @@
#define FPOSITER_H
#include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
+
#include "unicode/uobject.h"
/**
@@ -116,4 +119,6 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // FPOSITER_H
diff --git a/deps/icu-small/source/i18n/unicode/gender.h b/deps/icu-small/source/i18n/unicode/gender.h
index b7c31cb554..5ae111a3aa 100644
--- a/deps/icu-small/source/i18n/unicode/gender.h
+++ b/deps/icu-small/source/i18n/unicode/gender.h
@@ -25,6 +25,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_FORMATTING
#include "unicode/locid.h"
@@ -114,5 +116,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _GENDER
//eof
diff --git a/deps/icu-small/source/i18n/unicode/gregocal.h b/deps/icu-small/source/i18n/unicode/gregocal.h
index 1d881e0be7..236bd003c1 100644
--- a/deps/icu-small/source/i18n/unicode/gregocal.h
+++ b/deps/icu-small/source/i18n/unicode/gregocal.h
@@ -28,6 +28,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_FORMATTING
#include "unicode/calendar.h"
@@ -301,7 +303,7 @@ public:
* @return return a polymorphic copy of this calendar.
* @stable ICU 2.0
*/
- virtual Calendar* clone(void) const;
+ virtual GregorianCalendar* clone() const;
/**
* Sets the GregorianCalendar change date. This is the point when the switch from
@@ -350,6 +352,7 @@ public:
*/
virtual UBool isEquivalentTo(const Calendar& other) const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* (Overrides Calendar) Rolls up or down by the given amount in the specified field.
* For more information, see the documentation for Calendar::roll().
@@ -362,6 +365,7 @@ public:
* @deprecated ICU 2.6. Use roll(UCalendarDateFields field, int32_t amount, UErrorCode& status) instead.
*/
virtual void roll(EDateFields field, int32_t amount, UErrorCode& status);
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* (Overrides Calendar) Rolls up or down by the given amount in the specified field.
@@ -774,5 +778,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _GREGOCAL
//eof
diff --git a/deps/icu-small/source/i18n/unicode/listformatter.h b/deps/icu-small/source/i18n/unicode/listformatter.h
index 9ce8ec8617..88fc46cf37 100644
--- a/deps/icu-small/source/i18n/unicode/listformatter.h
+++ b/deps/icu-small/source/i18n/unicode/listformatter.h
@@ -21,6 +21,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#include "unicode/unistr.h"
#include "unicode/locid.h"
#include "unicode/formattedvalue.h"
@@ -237,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
@@ -298,4 +300,6 @@ class U_I18N_API ListFormatter : public UObject{
U_NAMESPACE_END
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // __LISTFORMATTER_H__
diff --git a/deps/icu-small/source/i18n/unicode/measfmt.h b/deps/icu-small/source/i18n/unicode/measfmt.h
index d518665e14..8f73de87fa 100644
--- a/deps/icu-small/source/i18n/unicode/measfmt.h
+++ b/deps/icu-small/source/i18n/unicode/measfmt.h
@@ -15,6 +15,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_FORMATTING
#include "unicode/format.h"
@@ -151,7 +153,7 @@ class U_I18N_API MeasureFormat : public Format {
* Clones this object polymorphically.
* @stable ICU 53
*/
- virtual Format *clone() const;
+ virtual MeasureFormat *clone() const;
/**
* Formats object to produce a string.
@@ -163,6 +165,7 @@ class U_I18N_API MeasureFormat : public Format {
FieldPosition &pos,
UErrorCode &status) const;
+#ifndef U_FORCE_HIDE_DRAFT_API
/**
* Parse a string to produce an object. This implementation sets
* status to U_UNSUPPORTED_ERROR.
@@ -173,6 +176,7 @@ class U_I18N_API MeasureFormat : public Format {
const UnicodeString &source,
Formattable &reslt,
ParsePosition &pos) const;
+#endif // U_FORCE_HIDE_DRAFT_API
/**
* Formats measure objects to produce a string. An example of such a
@@ -382,17 +386,12 @@ class U_I18N_API MeasureFormat : public Format {
int32_t bitMap, // 1=hour set, 2=minute set, 4=second set
UnicodeString &appendTo,
UErrorCode &status) const;
-
- UnicodeString &formatNumeric(
- UDate date,
- const DateFormat &dateFmt,
- UDateFormatField smallestField,
- const Formattable &smallestAmount,
- UnicodeString &appendTo,
- UErrorCode &status) const;
};
U_NAMESPACE_END
#endif // #if !UCONFIG_NO_FORMATTING
+
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // #ifndef MEASUREFORMAT_H
diff --git a/deps/icu-small/source/i18n/unicode/measunit.h b/deps/icu-small/source/i18n/unicode/measunit.h
index d8e3c73956..08f337cb5b 100644
--- a/deps/icu-small/source/i18n/unicode/measunit.h
+++ b/deps/icu-small/source/i18n/unicode/measunit.h
@@ -15,6 +15,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_FORMATTING
#include "unicode/unistr.h"
@@ -62,7 +64,7 @@ class U_I18N_API MeasureUnit: public UObject {
* have the same class as returned by getDynamicClassID().
* @stable ICU 3.0
*/
- virtual UObject* clone() const;
+ virtual MeasureUnit* clone() const;
/**
* Destructor
@@ -604,16 +606,14 @@ class U_I18N_API MeasureUnit: public UObject {
static MeasureUnit getPartPerMillion();
#endif /* U_HIDE_DRAFT_API */
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by pointer, unit of concentr: percent.
* Caller owns returned value and must free it.
* Also see {@link #getPercent()}.
* @param status ICU error code.
- * @draft ICU 63
+ * @stable ICU 63
*/
static MeasureUnit *createPercent(UErrorCode &status);
-#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_DRAFT_API
/**
@@ -624,16 +624,14 @@ class U_I18N_API MeasureUnit: public UObject {
static MeasureUnit getPercent();
#endif /* U_HIDE_DRAFT_API */
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by pointer, unit of concentr: permille.
* Caller owns returned value and must free it.
* Also see {@link #getPermille()}.
* @param status ICU error code.
- * @draft ICU 63
+ * @stable ICU 63
*/
static MeasureUnit *createPermille(UErrorCode &status);
-#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_DRAFT_API
/**
@@ -878,16 +876,14 @@ class U_I18N_API MeasureUnit: public UObject {
static MeasureUnit getMegabyte();
#endif /* U_HIDE_DRAFT_API */
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by pointer, unit of digital: petabyte.
* Caller owns returned value and must free it.
* Also see {@link #getPetabyte()}.
* @param status ICU error code.
- * @draft ICU 63
+ * @stable ICU 63
*/
static MeasureUnit *createPetabyte(UErrorCode &status);
-#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_DRAFT_API
/**
@@ -979,9 +975,7 @@ class U_I18N_API MeasureUnit: public UObject {
* @draft ICU 64
*/
static MeasureUnit *createDayPerson(UErrorCode &status);
-#endif /* U_HIDE_DRAFT_API */
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by value, unit of duration: day-person.
* Also see {@link #createDayPerson()}.
@@ -990,6 +984,24 @@ class U_I18N_API MeasureUnit: public UObject {
static MeasureUnit getDayPerson();
#endif /* U_HIDE_DRAFT_API */
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Returns by pointer, unit of duration: decade.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getDecade()}.
+ * @param status ICU error code.
+ * @draft ICU 65
+ */
+ static MeasureUnit *createDecade(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of duration: decade.
+ * Also see {@link #createDecade()}.
+ * @draft ICU 65
+ */
+ static MeasureUnit getDecade();
+#endif /* U_HIDE_DRAFT_API */
+
/**
* Returns by pointer, unit of duration: hour.
* Caller owns returned value and must free it.
@@ -1089,9 +1101,7 @@ class U_I18N_API MeasureUnit: public UObject {
* @draft ICU 64
*/
static MeasureUnit *createMonthPerson(UErrorCode &status);
-#endif /* U_HIDE_DRAFT_API */
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by value, unit of duration: month-person.
* Also see {@link #createMonthPerson()}.
@@ -1163,9 +1173,7 @@ class U_I18N_API MeasureUnit: public UObject {
* @draft ICU 64
*/
static MeasureUnit *createWeekPerson(UErrorCode &status);
-#endif /* U_HIDE_DRAFT_API */
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by value, unit of duration: week-person.
* Also see {@link #createWeekPerson()}.
@@ -1201,9 +1209,7 @@ class U_I18N_API MeasureUnit: public UObject {
* @draft ICU 64
*/
static MeasureUnit *createYearPerson(UErrorCode &status);
-#endif /* U_HIDE_DRAFT_API */
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by value, unit of duration: year-person.
* Also see {@link #createYearPerson()}.
@@ -1430,6 +1436,24 @@ class U_I18N_API MeasureUnit: public UObject {
#ifndef U_HIDE_DRAFT_API
/**
+ * Returns by pointer, unit of energy: therm-us.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getThermUs()}.
+ * @param status ICU error code.
+ * @draft ICU 65
+ */
+ static MeasureUnit *createThermUs(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of energy: therm-us.
+ * Also see {@link #createThermUs()}.
+ * @draft ICU 65
+ */
+ static MeasureUnit getThermUs();
+#endif /* U_HIDE_DRAFT_API */
+
+#ifndef U_HIDE_DRAFT_API
+ /**
* Returns by pointer, unit of force: newton.
* Caller owns returned value and must free it.
* Also see {@link #getNewton()}.
@@ -1536,6 +1560,132 @@ class U_I18N_API MeasureUnit: public UObject {
static MeasureUnit getMegahertz();
#endif /* U_HIDE_DRAFT_API */
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Returns by pointer, unit of graphics: dot-per-centimeter.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getDotPerCentimeter()}.
+ * @param status ICU error code.
+ * @draft ICU 65
+ */
+ static MeasureUnit *createDotPerCentimeter(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of graphics: dot-per-centimeter.
+ * Also see {@link #createDotPerCentimeter()}.
+ * @draft ICU 65
+ */
+ static MeasureUnit getDotPerCentimeter();
+#endif /* U_HIDE_DRAFT_API */
+
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Returns by pointer, unit of graphics: dot-per-inch.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getDotPerInch()}.
+ * @param status ICU error code.
+ * @draft ICU 65
+ */
+ static MeasureUnit *createDotPerInch(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of graphics: dot-per-inch.
+ * Also see {@link #createDotPerInch()}.
+ * @draft ICU 65
+ */
+ static MeasureUnit getDotPerInch();
+#endif /* U_HIDE_DRAFT_API */
+
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Returns by pointer, unit of graphics: em.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getEm()}.
+ * @param status ICU error code.
+ * @draft ICU 65
+ */
+ static MeasureUnit *createEm(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of graphics: em.
+ * Also see {@link #createEm()}.
+ * @draft ICU 65
+ */
+ static MeasureUnit getEm();
+#endif /* U_HIDE_DRAFT_API */
+
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Returns by pointer, unit of graphics: megapixel.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getMegapixel()}.
+ * @param status ICU error code.
+ * @draft ICU 65
+ */
+ static MeasureUnit *createMegapixel(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of graphics: megapixel.
+ * Also see {@link #createMegapixel()}.
+ * @draft ICU 65
+ */
+ static MeasureUnit getMegapixel();
+#endif /* U_HIDE_DRAFT_API */
+
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Returns by pointer, unit of graphics: pixel.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getPixel()}.
+ * @param status ICU error code.
+ * @draft ICU 65
+ */
+ static MeasureUnit *createPixel(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of graphics: pixel.
+ * Also see {@link #createPixel()}.
+ * @draft ICU 65
+ */
+ static MeasureUnit getPixel();
+#endif /* U_HIDE_DRAFT_API */
+
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Returns by pointer, unit of graphics: pixel-per-centimeter.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getPixelPerCentimeter()}.
+ * @param status ICU error code.
+ * @draft ICU 65
+ */
+ static MeasureUnit *createPixelPerCentimeter(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of graphics: pixel-per-centimeter.
+ * Also see {@link #createPixelPerCentimeter()}.
+ * @draft ICU 65
+ */
+ static MeasureUnit getPixelPerCentimeter();
+#endif /* U_HIDE_DRAFT_API */
+
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Returns by pointer, unit of graphics: pixel-per-inch.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getPixelPerInch()}.
+ * @param status ICU error code.
+ * @draft ICU 65
+ */
+ static MeasureUnit *createPixelPerInch(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of graphics: pixel-per-inch.
+ * Also see {@link #createPixelPerInch()}.
+ * @draft ICU 65
+ */
+ static MeasureUnit getPixelPerInch();
+#endif /* U_HIDE_DRAFT_API */
+
/**
* Returns by pointer, unit of length: astronomical-unit.
* Caller owns returned value and must free it.
@@ -2310,16 +2460,14 @@ class U_I18N_API MeasureUnit: public UObject {
static MeasureUnit getWatt();
#endif /* U_HIDE_DRAFT_API */
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by pointer, unit of pressure: atmosphere.
* Caller owns returned value and must free it.
* Also see {@link #getAtmosphere()}.
* @param status ICU error code.
- * @draft ICU 63
+ * @stable ICU 63
*/
static MeasureUnit *createAtmosphere(UErrorCode &status);
-#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_DRAFT_API
/**
@@ -2330,6 +2478,24 @@ class U_I18N_API MeasureUnit: public UObject {
static MeasureUnit getAtmosphere();
#endif /* U_HIDE_DRAFT_API */
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Returns by pointer, unit of pressure: bar.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getBar()}.
+ * @param status ICU error code.
+ * @draft ICU 65
+ */
+ static MeasureUnit *createBar(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of pressure: bar.
+ * Also see {@link #createBar()}.
+ * @draft ICU 65
+ */
+ static MeasureUnit getBar();
+#endif /* U_HIDE_DRAFT_API */
+
/**
* Returns by pointer, unit of pressure: hectopascal.
* Caller owns returned value and must free it.
@@ -2438,6 +2604,24 @@ class U_I18N_API MeasureUnit: public UObject {
static MeasureUnit getMillimeterOfMercury();
#endif /* U_HIDE_DRAFT_API */
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Returns by pointer, unit of pressure: pascal.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getPascal()}.
+ * @param status ICU error code.
+ * @draft ICU 65
+ */
+ static MeasureUnit *createPascal(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of pressure: pascal.
+ * Also see {@link #createPascal()}.
+ * @draft ICU 65
+ */
+ static MeasureUnit getPascal();
+#endif /* U_HIDE_DRAFT_API */
+
/**
* Returns by pointer, unit of pressure: pound-per-square-inch.
* Caller owns returned value and must free it.
@@ -3164,4 +3348,7 @@ private:
U_NAMESPACE_END
#endif // !UNCONFIG_NO_FORMATTING
+
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // __MEASUREUNIT_H__
diff --git a/deps/icu-small/source/i18n/unicode/measure.h b/deps/icu-small/source/i18n/unicode/measure.h
index 71438d5c85..a15173d739 100644
--- a/deps/icu-small/source/i18n/unicode/measure.h
+++ b/deps/icu-small/source/i18n/unicode/measure.h
@@ -15,6 +15,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: MeasureUnit object.
@@ -72,7 +74,7 @@ class U_I18N_API Measure: public UObject {
* have the same class as returned by getDynamicClassID().
* @stable ICU 3.0
*/
- virtual UObject* clone() const;
+ virtual Measure* clone() const;
/**
* Destructor
@@ -158,4 +160,7 @@ inline const MeasureUnit& Measure::getUnit() const {
U_NAMESPACE_END
#endif // !UCONFIG_NO_FORMATTING
+
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // __MEASURE_H__
diff --git a/deps/icu-small/source/i18n/unicode/msgfmt.h b/deps/icu-small/source/i18n/unicode/msgfmt.h
index 8e1bf9b45f..99b0eaeec1 100644
--- a/deps/icu-small/source/i18n/unicode/msgfmt.h
+++ b/deps/icu-small/source/i18n/unicode/msgfmt.h
@@ -21,6 +21,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Formats messages in a language-neutral way.
@@ -184,7 +186,7 @@ class NumberFormat;
* <td><i>argSkeletonText</i>
* <td><code>NumberFormatter::forSkeleton(argSkeletonText, status).locale(getLocale()).toFormat(status)</code>
* <tr>
- * <td rowspan=6><code>date</code>
+ * <td rowspan=7><code>date</code>
* <td><i>(none)</i>
* <td><code>DateFormat.createDateInstance(kDefault, getLocale(), status)</code>
* <tr>
@@ -418,7 +420,7 @@ public:
* result and should delete it when done.
* @stable ICU 2.0
*/
- virtual Format* clone(void) const;
+ virtual MessageFormat* clone() const;
/**
* Returns true if the given Format objects are semantically equal.
@@ -1087,7 +1089,7 @@ private:
class U_I18N_API DummyFormat : public Format {
public:
virtual UBool operator==(const Format&) const;
- virtual Format* clone() const;
+ virtual DummyFormat* clone() const;
virtual UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo,
UErrorCode& status) const;
@@ -1111,5 +1113,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _MSGFMT
//eof
diff --git a/deps/icu-small/source/i18n/unicode/nounit.h b/deps/icu-small/source/i18n/unicode/nounit.h
index 879849b16b..61b5c16ee3 100644
--- a/deps/icu-small/source/i18n/unicode/nounit.h
+++ b/deps/icu-small/source/i18n/unicode/nounit.h
@@ -12,11 +12,14 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_FORMATTING
-#ifndef U_HIDE_DRAFT_API
#include "unicode/measunit.h"
+#ifndef U_HIDE_DRAFT_API
+
/**
* \file
* \brief C++ API: units for percent and permille
@@ -72,7 +75,7 @@ public:
* have the same class as returned by getDynamicClassID().
* @draft ICU 60
*/
- virtual UObject* clone() const;
+ virtual NoUnit* clone() const;
/**
* Returns a unique class ID for this object POLYMORPHICALLY.
@@ -106,6 +109,8 @@ U_NAMESPACE_END
#endif /* U_HIDE_DRAFT_API */
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // __NOUNIT_H__
//eof
//
diff --git a/deps/icu-small/source/i18n/unicode/numberformatter.h b/deps/icu-small/source/i18n/unicode/numberformatter.h
index e9fe39a931..6d48f18ab5 100644
--- a/deps/icu-small/source/i18n/unicode/numberformatter.h
+++ b/deps/icu-small/source/i18n/unicode/numberformatter.h
@@ -1,15 +1,19 @@
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
+#ifndef __NUMBERFORMATTER_H__
+#define __NUMBERFORMATTER_H__
+
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_FORMATTING
-#ifndef __NUMBERFORMATTER_H__
-#define __NUMBERFORMATTER_H__
#include "unicode/appendable.h"
-#include "unicode/dcfmtsym.h"
+#include "unicode/bytestream.h"
#include "unicode/currunit.h"
+#include "unicode/dcfmtsym.h"
#include "unicode/fieldpos.h"
#include "unicode/formattedvalue.h"
#include "unicode/fpositer.h"
@@ -22,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.
@@ -85,6 +87,7 @@ U_NAMESPACE_BEGIN
// Forward declarations:
class IFixedDecimal;
class FieldPositionIteratorHandler;
+class FormattedStringBuilder;
namespace numparse {
namespace impl {
@@ -142,7 +145,6 @@ class MultiplierProducer;
class RoundingImpl;
class ScientificHandler;
class Modifier;
-class NumberStringBuilder;
class AffixPatternProvider;
class NumberPropertyMapper;
struct DecimalFormatProperties;
@@ -167,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:
@@ -207,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();
@@ -231,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();
@@ -274,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();
@@ -298,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();
@@ -324,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();
@@ -391,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:
@@ -406,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;
@@ -421,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;
@@ -442,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;
@@ -452,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 {
@@ -472,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();
@@ -480,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();
@@ -509,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);
@@ -524,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);
@@ -536,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);
@@ -551,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);
@@ -566,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);
@@ -580,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);
@@ -590,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);
@@ -603,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);
@@ -625,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);
@@ -644,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);
@@ -771,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:
@@ -789,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;
@@ -808,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;
@@ -827,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:
@@ -846,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 &currency) const;
@@ -865,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:
@@ -882,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;
@@ -900,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 {
@@ -914,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);
@@ -927,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);
@@ -994,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:
@@ -1002,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();
@@ -1014,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);
@@ -1028,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);
@@ -1038,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);
@@ -1046,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
@@ -1343,7 +1345,7 @@ class U_I18N_API Padder : public UMemory {
}
int32_t padAndApply(const impl::Modifier &mod1, const impl::Modifier &mod2,
- impl::NumberStringBuilder &string, int32_t leftIndex, int32_t rightIndex,
+ FormattedStringBuilder &string, int32_t leftIndex, int32_t rightIndex,
UErrorCode &status) const;
// To allow MacroProps/MicroProps to initialize empty instances:
@@ -1465,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 &notation) const &;
@@ -1476,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 &notation) &&;
@@ -1521,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 &;
@@ -1532,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) &&;
@@ -1547,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 &;
@@ -1558,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) &&;
@@ -1582,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 &;
@@ -1593,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) &&;
@@ -1608,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 &;
@@ -1619,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) &&;
@@ -1651,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 &;
@@ -1662,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) &&;
@@ -1682,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 &;
@@ -1692,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) &&;
@@ -1721,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 &;
@@ -1732,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) &&;
@@ -1758,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 &;
@@ -1769,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) &&;
@@ -1811,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 &;
@@ -1822,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) &&;
@@ -1857,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 &;
@@ -1868,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) &&;
@@ -1895,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 &;
@@ -1906,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) &&;
@@ -1933,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 &;
@@ -1944,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) &&;
@@ -1971,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 &;
@@ -1982,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) &&;
@@ -2008,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 &;
@@ -2019,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) &&;
@@ -2076,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.
@@ -2101,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)) {
@@ -2139,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 {
@@ -2152,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 &;
@@ -2163,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;
@@ -2219,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 {
@@ -2233,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;
@@ -2246,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;
@@ -2262,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;
@@ -2303,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;
@@ -2360,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();
@@ -2401,27 +2405,30 @@ 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:
+ // Default constructor cannot have #ifndef U_HIDE_DRAFT_API
+#ifndef U_FORCE_HIDE_DRAFT_API
/**
* Default constructor; makes an empty FormattedNumber.
* @draft ICU 64
*/
FormattedNumber()
: fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {}
+#endif // U_FORCE_HIDE_DRAFT_API
/**
* 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;
@@ -2433,7 +2440,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;
@@ -2443,7 +2450,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;
@@ -2457,7 +2464,7 @@ 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;
@@ -2465,6 +2472,7 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
/** @copydoc FormattedValue::nextPosition() */
UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const U_OVERRIDE;
+#ifndef U_HIDE_DRAFT_API
/**
* Determines the start (inclusive) and end (exclusive) indices of the next occurrence of the given
* <em>field</em> in the output string. This allows you to determine the locations of, for example,
@@ -2516,6 +2524,30 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
* @see UNumberFormatFields
*/
void getAllFieldPositions(FieldPositionIterator &iterator, UErrorCode &status) const;
+#endif /* U_HIDE_DRAFT_API */
+
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Export the formatted number as a "numeric string" conforming to the
+ * syntax defined in the Decimal Arithmetic Specification, available at
+ * http://speleotrove.com/decimal
+ *
+ * This endpoint is useful for obtaining the exact number being printed
+ * after scaling and rounding have been applied by the number formatter.
+ *
+ * Example call site:
+ *
+ * auto decimalNumber = fn.toDecimalNumber<std::string>(status);
+ *
+ * @tparam StringClass A string class compatible with StringByteSink;
+ * for example, std::string.
+ * @param status Set if an error occurs.
+ * @return A StringClass containing the numeric string.
+ * @draft ICU 65
+ */
+ template<typename StringClass>
+ inline StringClass toDecimalNumber(UErrorCode& status) const;
+#endif // U_HIDE_DRAFT_API
#ifndef U_HIDE_INTERNAL_API
@@ -2550,6 +2582,9 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
explicit FormattedNumber(UErrorCode errorCode)
: fData(nullptr), fErrorCode(errorCode) {}
+ // TODO(ICU-20775): Propose this as API.
+ void toDecimalNumber(ByteSink& sink, UErrorCode& status) const;
+
// To give LocalizedNumberFormatter format methods access to this class's constructor:
friend class LocalizedNumberFormatter;
@@ -2557,10 +2592,21 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
friend struct impl::UFormattedNumberImpl;
};
+#ifndef U_HIDE_DRAFT_API
+// Note: This is draft ICU 65
+template<typename StringClass>
+StringClass FormattedNumber::toDecimalNumber(UErrorCode& status) const {
+ StringClass result;
+ StringByteSink<StringClass> sink(&result);
+ toDecimalNumber(sink, status);
+ return result;
+};
+#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:
@@ -2569,7 +2615,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();
@@ -2580,7 +2626,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);
@@ -2596,10 +2642,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.
@@ -2619,6 +2666,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.
@@ -2629,8 +2677,9 @@ 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 */
#endif // __NUMBERFORMATTER_H__
-#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/deps/icu-small/source/i18n/unicode/numberrangeformatter.h b/deps/icu-small/source/i18n/unicode/numberrangeformatter.h
index 47c4bfe3f5..e3a72aa8b2 100644
--- a/deps/icu-small/source/i18n/unicode/numberrangeformatter.h
+++ b/deps/icu-small/source/i18n/unicode/numberrangeformatter.h
@@ -1,10 +1,15 @@
// © 2018 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#if !UCONFIG_NO_FORMATTING
#ifndef __NUMBERRANGEFORMATTER_H__
#define __NUMBERRANGEFORMATTER_H__
+#include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
+
+#if !UCONFIG_NO_FORMATTING
+
#include <atomic>
#include "unicode/appendable.h"
#include "unicode/fieldpos.h"
@@ -12,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.
@@ -44,7 +47,7 @@
/**
* Defines how to merge fields that are identical across the range sign.
*
- * @draft ICU 63
+ * @stable ICU 63
*/
typedef enum UNumberRangeCollapse {
/**
@@ -53,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,
@@ -68,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,
@@ -76,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;
@@ -85,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,
@@ -100,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,
@@ -108,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,
@@ -116,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;
@@ -125,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,
@@ -140,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,
@@ -148,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,
@@ -254,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 &;
@@ -265,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) &&;
@@ -276,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 &;
@@ -287,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) &&;
@@ -300,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 &;
@@ -311,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) &&;
@@ -322,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 &;
@@ -333,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) &&;
@@ -346,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 &;
@@ -357,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) &&;
@@ -368,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 &;
@@ -379,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) &&;
@@ -398,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 &;
@@ -409,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) &&;
@@ -431,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 &;
@@ -442,10 +445,11 @@ 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) &&;
+#ifndef U_HIDE_DRAFT_API
/**
* Returns the current (Un)LocalizedNumberRangeFormatter as a LocalPointer
* wrapping a heap-allocated copy of the current object.
@@ -467,12 +471,13 @@ class U_I18N_API NumberRangeFormatterSettings {
* @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 63
+ * @stable ICU 63
*/
UBool copyErrorTo(UErrorCode &outErrorCode) const {
if (U_FAILURE(outErrorCode)) {
@@ -501,7 +506,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 {
@@ -514,7 +519,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 &;
@@ -525,40 +530,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;
@@ -582,7 +587,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 {
@@ -598,7 +603,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;
@@ -606,33 +611,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;
@@ -651,11 +656,11 @@ class U_I18N_API LocalizedNumberRangeFormatter
void formatImpl(impl::UFormattedNumberRangeData& results, bool equalBeforeRounding,
UErrorCode& status) const;
-#endif
+#endif /* U_HIDE_INTERNAL_API */
/**
* Destruct this LocalizedNumberRangeFormatter, cleaning up any memory it might own.
- * @draft ICU 63
+ * @stable ICU 63
*/
~LocalizedNumberRangeFormatter();
@@ -690,7 +695,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:
@@ -700,7 +705,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;
@@ -714,7 +719,7 @@ 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;
@@ -722,6 +727,7 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
/** @copydoc FormattedValue::nextPosition() */
UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const U_OVERRIDE;
+#ifndef U_HIDE_DRAFT_API
/**
* Determines the start (inclusive) and end (exclusive) indices of the next occurrence of the given
* <em>field</em> in the output string. This allows you to determine the locations of, for example,
@@ -799,6 +805,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
@@ -806,7 +813,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;
@@ -824,20 +831,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();
@@ -850,7 +857,6 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
/**
* Internal constructor from data type. Adopts the data pointer.
- * @internal
*/
explicit FormattedNumberRange(impl::UFormattedNumberRangeData *results)
: fData(results), fErrorCode(U_ZERO_ERROR) {}
@@ -867,7 +873,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:
@@ -876,7 +882,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();
@@ -887,7 +893,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);
@@ -900,8 +906,9 @@ 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 */
#endif // __NUMBERRANGEFORMATTER_H__
-#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/deps/icu-small/source/i18n/unicode/numfmt.h b/deps/icu-small/source/i18n/unicode/numfmt.h
index d8704754dc..fbd4fb4e56 100644
--- a/deps/icu-small/source/i18n/unicode/numfmt.h
+++ b/deps/icu-small/source/i18n/unicode/numfmt.h
@@ -26,6 +26,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Compatibility APIs for number formatting.
@@ -261,6 +263,14 @@ public:
virtual ~NumberFormat();
/**
+ * Clones this object polymorphically.
+ * The caller owns the result and should delete it when done.
+ * @return clone, or nullptr if an error occurred
+ * @stable ICU 2.0
+ */
+ virtual NumberFormat* clone() const = 0;
+
+ /**
* Return true if the given Format objects are semantically equal.
* Objects of different subclasses are considered unequal.
* @return true if the given Format objects are semantically equal.
@@ -639,7 +649,9 @@ public:
* @param result Formattable to be set to the parse result.
* If parse fails, return contents are undefined.
* @param status Output parameter set to a failure error code
- * when a failure occurs.
+ * when a failure occurs. The error code when the
+ * string fails to parse is U_INVALID_FORMAT_ERROR,
+ * unless overridden by a subclass.
* @see NumberFormat::isParseIntegerOnly
* @stable ICU 2.0
*/
@@ -1255,5 +1267,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _NUMFMT
//eof
diff --git a/deps/icu-small/source/i18n/unicode/numsys.h b/deps/icu-small/source/i18n/unicode/numsys.h
index 9e32478cf8..4fb7f044ed 100644
--- a/deps/icu-small/source/i18n/unicode/numsys.h
+++ b/deps/icu-small/source/i18n/unicode/numsys.h
@@ -20,6 +20,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: NumberingSystem object
@@ -210,5 +212,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _NUMSYS
//eof
diff --git a/deps/icu-small/source/i18n/unicode/plurfmt.h b/deps/icu-small/source/i18n/unicode/plurfmt.h
index 6b757c8841..7373476dca 100644
--- a/deps/icu-small/source/i18n/unicode/plurfmt.h
+++ b/deps/icu-small/source/i18n/unicode/plurfmt.h
@@ -16,6 +16,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: PluralFormat object
@@ -448,7 +450,7 @@ public:
* result and should delete it when done.
* @stable ICU 4.0
*/
- virtual Format* clone(void) const;
+ virtual PluralFormat* clone() const;
/**
* Formats a plural message for a number taken from a Formattable object.
@@ -522,7 +524,7 @@ public:
private:
/**
- * @internal
+ * @internal (private)
*/
class U_I18N_API PluralSelector : public UMemory {
public:
@@ -534,14 +536,11 @@ private:
* @param number The number to be plural-formatted.
* @param ec Error code.
* @return The selected PluralFormat keyword.
- * @internal
+ * @internal (private)
*/
virtual UnicodeString select(void *context, double number, UErrorCode& ec) const = 0;
};
- /**
- * @internal
- */
class U_I18N_API PluralSelectorAdapter : public PluralSelector {
public:
PluralSelectorAdapter() : pluralRules(NULL) {
@@ -549,7 +548,7 @@ private:
virtual ~PluralSelectorAdapter();
- virtual UnicodeString select(void *context, double number, UErrorCode& /*ec*/) const; /**< @internal */
+ virtual UnicodeString select(void *context, double number, UErrorCode& /*ec*/) const;
void reset();
@@ -573,7 +572,7 @@ private:
UnicodeString& format(const Formattable& numberObject, double number,
UnicodeString& appendTo,
FieldPosition& pos,
- UErrorCode& status) const; /**< @internal */
+ UErrorCode& status) const;
/**
* Finds the PluralFormat sub-message for the given number, or the "other" sub-message.
@@ -601,5 +600,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _PLURFMT
//eof
diff --git a/deps/icu-small/source/i18n/unicode/plurrule.h b/deps/icu-small/source/i18n/unicode/plurrule.h
index 04bf3970ba..a1553567ca 100644
--- a/deps/icu-small/source/i18n/unicode/plurrule.h
+++ b/deps/icu-small/source/i18n/unicode/plurrule.h
@@ -20,6 +20,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: PluralRules object
@@ -533,5 +535,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _PLURRULE
//eof
diff --git a/deps/icu-small/source/i18n/unicode/rbnf.h b/deps/icu-small/source/i18n/unicode/rbnf.h
index f7cd85a322..1144bd2fb8 100644
--- a/deps/icu-small/source/i18n/unicode/rbnf.h
+++ b/deps/icu-small/source/i18n/unicode/rbnf.h
@@ -12,6 +12,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Rule Based Number Format
@@ -696,7 +698,7 @@ public:
* @return A copy of the object.
* @stable ICU 2.6
*/
- virtual Format* clone(void) const;
+ virtual RuleBasedNumberFormat* clone() const;
/**
* Return true if the given Format objects are semantically equal.
@@ -877,28 +879,6 @@ protected:
* @param number The number, a DigitList format Decimal Floating Point.
* @param appendTo Output parameter to receive result.
* Result is appended to existing contents.
- * @param posIter On return, can be used to iterate over positions
- * of fields generated by this format call.
- * @param status Output param filled with success/failure status.
- * @return Reference to 'appendTo' parameter.
- * @internal
- */
- virtual UnicodeString& format(const number::impl::DecimalQuantity &number,
- UnicodeString& appendTo,
- FieldPositionIterator* posIter,
- UErrorCode& status) const;
-
- /**
- * Format a decimal number.
- * The number is a DigitList wrapper onto a floating point decimal number.
- * The default implementation in NumberFormat converts the decimal number
- * to a double and formats that. Subclasses of NumberFormat that want
- * to specifically handle big decimal numbers must override this method.
- * class DecimalFormat does so.
- *
- * @param number The number, a DigitList format Decimal Floating Point.
- * @param appendTo Output parameter to receive result.
- * Result is appended to existing contents.
* @param pos On input: an alignment field, if desired.
* On output: the offsets of the alignment field.
* @param status Output param filled with success/failure status.
@@ -1135,5 +1115,7 @@ U_NAMESPACE_END
/* U_HAVE_RBNF */
#endif
+#endif /* U_SHOW_CPLUSPLUS_API */
+
/* RBNF_H */
#endif
diff --git a/deps/icu-small/source/i18n/unicode/rbtz.h b/deps/icu-small/source/i18n/unicode/rbtz.h
index 542a7c140c..95fd7ab85d 100644
--- a/deps/icu-small/source/i18n/unicode/rbtz.h
+++ b/deps/icu-small/source/i18n/unicode/rbtz.h
@@ -11,6 +11,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Rule based customizable time zone
@@ -121,7 +123,7 @@ public:
* @return A new copy of this TimeZone object.
* @stable ICU 3.8
*/
- virtual TimeZone* clone(void) const;
+ virtual RuleBasedTimeZone* clone() const;
/**
* Returns the TimeZone's adjusted GMT offset (i.e., the number of milliseconds to add
@@ -224,6 +226,7 @@ public:
*/
virtual UBool useDaylightTime(void) const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Queries if the given date is in daylight savings time in
* this time zone.
@@ -238,6 +241,7 @@ public:
* @deprecated ICU 2.4. Use Calendar::inDaylightTime() instead.
*/
virtual UBool inDaylightTime(UDate date, UErrorCode& status) const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Returns true if this zone has the same rule and offset as another zone.
@@ -359,6 +363,8 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // RBTZ_H
//eof
diff --git a/deps/icu-small/source/i18n/unicode/regex.h b/deps/icu-small/source/i18n/unicode/regex.h
index a0f9839fe7..75048af06c 100644
--- a/deps/icu-small/source/i18n/unicode/regex.h
+++ b/deps/icu-small/source/i18n/unicode/regex.h
@@ -44,6 +44,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_REGULAR_EXPRESSIONS
#include "unicode/uobject.h"
@@ -1876,4 +1878,7 @@ private:
U_NAMESPACE_END
#endif // UCONFIG_NO_REGULAR_EXPRESSIONS
+
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif
diff --git a/deps/icu-small/source/i18n/unicode/region.h b/deps/icu-small/source/i18n/unicode/region.h
index ccd63901a5..66f5f92075 100644
--- a/deps/icu-small/source/i18n/unicode/region.h
+++ b/deps/icu-small/source/i18n/unicode/region.h
@@ -16,10 +16,12 @@
*/
#include "unicode/utypes.h"
-#include "unicode/uregion.h"
+
+#if U_SHOW_CPLUSPLUS_API
#if !UCONFIG_NO_FORMATTING
+#include "unicode/uregion.h"
#include "unicode/uobject.h"
#include "unicode/uniset.h"
#include "unicode/unistr.h"
@@ -219,6 +221,9 @@ private:
U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // REGION_H
//eof
diff --git a/deps/icu-small/source/i18n/unicode/reldatefmt.h b/deps/icu-small/source/i18n/unicode/reldatefmt.h
index cfcba09026..fb691a5451 100644
--- a/deps/icu-small/source/i18n/unicode/reldatefmt.h
+++ b/deps/icu-small/source/i18n/unicode/reldatefmt.h
@@ -15,6 +15,9 @@
#define __RELDATEFMT_H
#include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
+
#include "unicode/uobject.h"
#include "unicode/udisplaycontext.h"
#include "unicode/ureldatefmt.h"
@@ -166,12 +169,24 @@ 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
+ */
+ UDAT_ABSOLUTE_HOUR,
+
+ /**
+ * Minute
+ * @draft ICU 65
+ */
+ UDAT_ABSOLUTE_MINUTE,
#endif // U_HIDE_DRAFT_API
#ifndef U_HIDE_DEPRECATED_API
@@ -179,7 +194,7 @@ typedef enum UDateAbsoluteUnit {
* One more than the highest normal UDateAbsoluteUnit value.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
- UDAT_ABSOLUTE_UNIT_COUNT = UDAT_ABSOLUTE_NOW + 2
+ UDAT_ABSOLUTE_UNIT_COUNT = UDAT_ABSOLUTE_NOW + 4
#endif // U_HIDE_DEPRECATED_API
} UDateAbsoluteUnit;
@@ -246,6 +261,7 @@ class SharedPluralRules;
class SharedBreakIterator;
class NumberFormat;
class UnicodeString;
+class FormattedRelativeDateTime;
class FormattedRelativeDateTimeData;
#ifndef U_HIDE_DRAFT_API
@@ -743,4 +759,7 @@ U_NAMESPACE_END
#endif /* !UCONFIG_NO_BREAK_ITERATION */
#endif /* !UCONFIG_NO_FORMATTING */
+
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif /* __RELDATEFMT_H */
diff --git a/deps/icu-small/source/i18n/unicode/scientificnumberformatter.h b/deps/icu-small/source/i18n/unicode/scientificnumberformatter.h
index 6c99a24662..a56b8ca268 100644
--- a/deps/icu-small/source/i18n/unicode/scientificnumberformatter.h
+++ b/deps/icu-small/source/i18n/unicode/scientificnumberformatter.h
@@ -11,6 +11,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_FORMATTING
@@ -157,7 +159,7 @@ public:
class U_I18N_API SuperscriptStyle : public Style {
public:
- virtual Style *clone() const;
+ virtual SuperscriptStyle *clone() const;
protected:
virtual UnicodeString &format(
const UnicodeString &original,
@@ -175,7 +177,7 @@ public:
: Style(),
fBeginMarkup(beginMarkup),
fEndMarkup(endMarkup) { }
- virtual Style *clone() const;
+ virtual MarkupStyle *clone() const;
protected:
virtual UnicodeString &format(
const UnicodeString &original,
@@ -214,4 +216,7 @@ U_NAMESPACE_END
#endif /* !UCONFIG_NO_FORMATTING */
+
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif
diff --git a/deps/icu-small/source/i18n/unicode/search.h b/deps/icu-small/source/i18n/unicode/search.h
index 12dd5c7727..986205c62f 100644
--- a/deps/icu-small/source/i18n/unicode/search.h
+++ b/deps/icu-small/source/i18n/unicode/search.h
@@ -14,6 +14,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: SearchIterator object.
@@ -70,8 +72,7 @@ U_NAMESPACE_BEGIN
* UErrorCode error = U_ZERO_ERROR;
* for (int pos = iter->first(error); pos != USEARCH_DONE;
* pos = iter->next(error)) {
- * printf("Found match at %d pos, length is %d\n", pos,
- * iter.getMatchLength());
+ * printf("Found match at %d pos, length is %d\n", pos, iter.getMatchedLength());
* }
* </code></pre>
*
@@ -573,4 +574,6 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_COLLATION */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif
diff --git a/deps/icu-small/source/i18n/unicode/selfmt.h b/deps/icu-small/source/i18n/unicode/selfmt.h
index 08e9d444ee..9b98f6db7a 100755
--- a/deps/icu-small/source/i18n/unicode/selfmt.h
+++ b/deps/icu-small/source/i18n/unicode/selfmt.h
@@ -18,9 +18,12 @@
#ifndef SELFMT
#define SELFMT
+#include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
+
#include "unicode/messagepattern.h"
#include "unicode/numfmt.h"
-#include "unicode/utypes.h"
/**
* \file
@@ -272,7 +275,7 @@ public:
* result and should delete it when done.
* @stable ICU 4.4
*/
- virtual Format* clone(void) const;
+ virtual SelectFormat* clone() const;
/**
* Format an object to produce a string.
@@ -365,5 +368,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _SELFMT
//eof
diff --git a/deps/icu-small/source/i18n/unicode/simpletz.h b/deps/icu-small/source/i18n/unicode/simpletz.h
index 7f5f1664cc..d7d4123187 100644
--- a/deps/icu-small/source/i18n/unicode/simpletz.h
+++ b/deps/icu-small/source/i18n/unicode/simpletz.h
@@ -28,6 +28,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: SimpleTimeZone is a concrete subclass of TimeZone.
@@ -672,6 +674,7 @@ public:
*/
virtual UBool useDaylightTime(void) const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Returns true if the given date is within the period when daylight savings time
* is in effect; false otherwise. If the TimeZone doesn't observe daylight savings
@@ -687,6 +690,7 @@ public:
* @deprecated ICU 2.4. Use Calendar::inDaylightTime() instead.
*/
virtual UBool inDaylightTime(UDate date, UErrorCode& status) const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Return true if this zone has the same rules and offset as another zone.
@@ -703,7 +707,7 @@ public:
* @return A new copy of this TimeZone object.
* @stable ICU 2.0
*/
- virtual TimeZone* clone(void) const;
+ virtual SimpleTimeZone* clone() const;
/**
* Gets the first time zone transition after the base time.
@@ -929,4 +933,6 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _SIMPLETZ
diff --git a/deps/icu-small/source/i18n/unicode/smpdtfmt.h b/deps/icu-small/source/i18n/unicode/smpdtfmt.h
index a015c5be5c..79fa817d5a 100644
--- a/deps/icu-small/source/i18n/unicode/smpdtfmt.h
+++ b/deps/icu-small/source/i18n/unicode/smpdtfmt.h
@@ -28,6 +28,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Format and parse dates in a language-independent manner.
@@ -865,7 +867,7 @@ public:
* @return A copy of the object.
* @stable ICU 2.0
*/
- virtual Format* clone(void) const;
+ virtual SimpleDateFormat* clone() const;
/**
* Return true if the given Format objects are semantically equal. Objects
@@ -1643,7 +1645,7 @@ private:
UBool fHaveDefaultCentury;
- BreakIterator* fCapitalizationBrkIter;
+ const BreakIterator* fCapitalizationBrkIter;
};
inline UDate
@@ -1656,5 +1658,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _SMPDTFMT
//eof
diff --git a/deps/icu-small/source/i18n/unicode/sortkey.h b/deps/icu-small/source/i18n/unicode/sortkey.h
index 6895be7a2b..d2d3ca9fd5 100644
--- a/deps/icu-small/source/i18n/unicode/sortkey.h
+++ b/deps/icu-small/source/i18n/unicode/sortkey.h
@@ -25,6 +25,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Keys for comparing strings multiple times.
@@ -337,4 +339,6 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_COLLATION */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif
diff --git a/deps/icu-small/source/i18n/unicode/stsearch.h b/deps/icu-small/source/i18n/unicode/stsearch.h
index 46bc51b30e..f396371143 100644
--- a/deps/icu-small/source/i18n/unicode/stsearch.h
+++ b/deps/icu-small/source/i18n/unicode/stsearch.h
@@ -14,6 +14,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Service for searching text based on RuleBasedCollator.
@@ -119,8 +121,7 @@ U_NAMESPACE_BEGIN
* pos != USEARCH_DONE;
* pos = iter.next(error))
* {
- * printf("Found match at %d pos, length is %d\n", pos,
- * iter.getMatchLength());
+ * printf("Found match at %d pos, length is %d\n", pos, iter.getMatchedLength());
* }
* </code></pre>
* <p>
@@ -412,7 +413,7 @@ public:
* @return cloned object
* @stable ICU 2.0
*/
- virtual SearchIterator * safeClone(void) const;
+ virtual StringSearch * safeClone() const;
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
@@ -502,4 +503,6 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_COLLATION */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif
diff --git a/deps/icu-small/source/i18n/unicode/tblcoll.h b/deps/icu-small/source/i18n/unicode/tblcoll.h
index 24ba213b41..f5dc135bc4 100644
--- a/deps/icu-small/source/i18n/unicode/tblcoll.h
+++ b/deps/icu-small/source/i18n/unicode/tblcoll.h
@@ -64,6 +64,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_COLLATION
#include "unicode/coll.h"
@@ -228,7 +230,7 @@ public:
* @return a copy of this object, owned by the caller
* @stable ICU 2.0
*/
- virtual Collator* clone(void) const;
+ virtual RuleBasedCollator* clone() const;
/**
* Creates a collation element iterator for the source string. The caller of
@@ -389,6 +391,7 @@ public:
*/
virtual int32_t hashCode() const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the locale of the Collator
* @param type can be either requested, valid or actual locale. For more
@@ -400,6 +403,7 @@ public:
* @deprecated ICU 2.8 likely to change in ICU 3.0, based on feedback
*/
virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the tailoring rules for this collator.
@@ -545,6 +549,7 @@ public:
*/
virtual UColReorderCode getMaxVariable() const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Sets the variable top to the primary weight of the specified string.
*
@@ -592,6 +597,7 @@ public:
* @deprecated ICU 53 Call setMaxVariable() instead.
*/
virtual void setVariableTop(uint32_t varTop, UErrorCode &status);
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the variable top value of a Collator.
@@ -874,4 +880,7 @@ private:
U_NAMESPACE_END
#endif // !UCONFIG_NO_COLLATION
+
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // TBLCOLL_H
diff --git a/deps/icu-small/source/i18n/unicode/timezone.h b/deps/icu-small/source/i18n/unicode/timezone.h
index 237ed911d0..4d321186be 100644
--- a/deps/icu-small/source/i18n/unicode/timezone.h
+++ b/deps/icu-small/source/i18n/unicode/timezone.h
@@ -31,6 +31,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: TimeZone object
@@ -321,10 +323,6 @@ public:
* zone is set to the default host time zone. This call adopts the TimeZone object
* passed in; the client is no longer responsible for deleting it.
*
- * <p>This function is not thread safe. It is an error for multiple threads
- * to concurrently attempt to set the default time zone, or for any thread
- * to attempt to reference the default zone while another thread is setting it.
- *
* @param zone A pointer to the new TimeZone object to use as the default.
* @stable ICU 2.0
*/
@@ -335,8 +333,6 @@ public:
* Same as adoptDefault(), except that the TimeZone object passed in is NOT adopted;
* the caller remains responsible for deleting it.
*
- * <p>See the thread safety note under adoptDefault().
- *
* @param zone The given timezone.
* @system
* @stable ICU 2.0
@@ -726,6 +722,7 @@ public:
*/
virtual UBool useDaylightTime(void) const = 0;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Queries if the given date is in daylight savings time in
* this time zone.
@@ -740,6 +737,7 @@ public:
* @deprecated ICU 2.4. Use Calendar::inDaylightTime() instead.
*/
virtual UBool inDaylightTime(UDate date, UErrorCode& status) const = 0;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Returns true if this zone has the same rule and offset as another zone.
@@ -758,7 +756,7 @@ public:
* @return A new copy of this TimeZone object.
* @stable ICU 2.0
*/
- virtual TimeZone* clone(void) const = 0;
+ virtual TimeZone* clone() const = 0;
/**
* Return the class ID for this class. This is useful only for
@@ -972,5 +970,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif //_TIMEZONE
//eof
diff --git a/deps/icu-small/source/i18n/unicode/tmunit.h b/deps/icu-small/source/i18n/unicode/tmunit.h
index fa59f10473..2e949ddfbd 100644
--- a/deps/icu-small/source/i18n/unicode/tmunit.h
+++ b/deps/icu-small/source/i18n/unicode/tmunit.h
@@ -16,6 +16,9 @@
* \brief C++ API: time unit object
*/
+#include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
#include "unicode/measunit.h"
@@ -70,7 +73,7 @@ public:
* Override clone.
* @stable ICU 4.2
*/
- virtual UObject* clone() const;
+ virtual TimeUnit* clone() const;
/**
* Copy operator.
@@ -132,6 +135,8 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // __TMUNIT_H__
//eof
//
diff --git a/deps/icu-small/source/i18n/unicode/tmutamt.h b/deps/icu-small/source/i18n/unicode/tmutamt.h
index 1717b7605f..5ce5922cea 100644
--- a/deps/icu-small/source/i18n/unicode/tmutamt.h
+++ b/deps/icu-small/source/i18n/unicode/tmutamt.h
@@ -16,11 +16,15 @@
* \brief C++ API: time unit amount object.
*/
-#include "unicode/measure.h"
-#include "unicode/tmunit.h"
+#include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
#if !UCONFIG_NO_FORMATTING
+#include "unicode/measure.h"
+#include "unicode/tmunit.h"
+
U_NAMESPACE_BEGIN
@@ -83,7 +87,7 @@ public:
* @return a polymorphic clone of this object. The result will have the same class as returned by getDynamicClassID().
* @stable ICU 4.2
*/
- virtual UObject* clone() const;
+ virtual TimeUnitAmount* clone() const;
/**
@@ -165,6 +169,8 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // __TMUTAMT_H__
//eof
//
diff --git a/deps/icu-small/source/i18n/unicode/tmutfmt.h b/deps/icu-small/source/i18n/unicode/tmutfmt.h
index 8f245859a6..ad871f7c09 100644
--- a/deps/icu-small/source/i18n/unicode/tmutfmt.h
+++ b/deps/icu-small/source/i18n/unicode/tmutfmt.h
@@ -18,8 +18,9 @@
*/
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_FORMATTING
-#ifndef U_HIDE_DEPRECATED_API
#include "unicode/unistr.h"
#include "unicode/tmunit.h"
@@ -28,6 +29,7 @@
#include "unicode/numfmt.h"
#include "unicode/plurrule.h"
+#ifndef U_HIDE_DEPRECATED_API
/**
* Constants for various styles.
@@ -124,7 +126,7 @@ public:
* @return A copy of the object.
* @deprecated ICU 53
*/
- virtual Format* clone(void) const;
+ virtual TimeUnitFormat* clone() const;
/**
* Assignment operator
@@ -244,5 +246,7 @@ U_NAMESPACE_END
#endif /* U_HIDE_DEPRECATED_API */
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // __TMUTFMT_H__
//eof
diff --git a/deps/icu-small/source/i18n/unicode/translit.h b/deps/icu-small/source/i18n/unicode/translit.h
index 6b4888145f..fe2568d50a 100644
--- a/deps/icu-small/source/i18n/unicode/translit.h
+++ b/deps/icu-small/source/i18n/unicode/translit.h
@@ -14,6 +14,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Tranforms text from one format to another.
@@ -1588,4 +1590,6 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_TRANSLITERATION */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif
diff --git a/deps/icu-small/source/i18n/unicode/tzfmt.h b/deps/icu-small/source/i18n/unicode/tzfmt.h
index d2aa768b8c..6d3863b1e5 100644
--- a/deps/icu-small/source/i18n/unicode/tzfmt.h
+++ b/deps/icu-small/source/i18n/unicode/tzfmt.h
@@ -16,6 +16,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_FORMATTING
#include "unicode/format.h"
@@ -305,7 +307,7 @@ public:
* @return A copy of the object
* @stable ICU 50
*/
- virtual Format* clone() const;
+ virtual TimeZoneFormat* clone() const;
/**
* Creates an instance of <code>TimeZoneFormat</code> for the given locale.
@@ -1094,4 +1096,7 @@ private:
U_NAMESPACE_END
#endif /* !UCONFIG_NO_FORMATTING */
+
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif
diff --git a/deps/icu-small/source/i18n/unicode/tznames.h b/deps/icu-small/source/i18n/unicode/tznames.h
index 399265d85a..860494221d 100644
--- a/deps/icu-small/source/i18n/unicode/tznames.h
+++ b/deps/icu-small/source/i18n/unicode/tznames.h
@@ -15,6 +15,8 @@
*/
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_FORMATTING
#include "unicode/uloc.h"
@@ -411,4 +413,7 @@ public:
U_NAMESPACE_END
#endif
+
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif
diff --git a/deps/icu-small/source/i18n/unicode/tzrule.h b/deps/icu-small/source/i18n/unicode/tzrule.h
index 171486f1c7..c6d6b9631f 100644
--- a/deps/icu-small/source/i18n/unicode/tzrule.h
+++ b/deps/icu-small/source/i18n/unicode/tzrule.h
@@ -16,6 +16,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_FORMATTING
#include "unicode/uobject.h"
@@ -45,7 +47,7 @@ public:
* @return A copy of the object.
* @stable ICU 3.8
*/
- virtual TimeZoneRule* clone(void) const = 0;
+ virtual TimeZoneRule* clone() const = 0;
/**
* Return true if the given <code>TimeZoneRule</code> objects are semantically equal. Objects
@@ -229,7 +231,7 @@ public:
* @return A copy of the object.
* @stable ICU 3.8
*/
- virtual InitialTimeZoneRule* clone(void) const;
+ virtual InitialTimeZoneRule* clone() const;
/**
* Assignment operator.
@@ -440,7 +442,7 @@ public:
* @return A copy of the object.
* @stable ICU 3.8
*/
- virtual AnnualTimeZoneRule* clone(void) const;
+ virtual AnnualTimeZoneRule* clone() const;
/**
* Assignment operator.
@@ -656,7 +658,7 @@ public:
* @return A copy of the object.
* @stable ICU 3.8
*/
- virtual TimeArrayTimeZoneRule* clone(void) const;
+ virtual TimeArrayTimeZoneRule* clone() const;
/**
* Assignment operator.
@@ -825,6 +827,8 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // TZRULE_H
//eof
diff --git a/deps/icu-small/source/i18n/unicode/tztrans.h b/deps/icu-small/source/i18n/unicode/tztrans.h
index 1276d67c31..e87fea7c3c 100644
--- a/deps/icu-small/source/i18n/unicode/tztrans.h
+++ b/deps/icu-small/source/i18n/unicode/tztrans.h
@@ -16,6 +16,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_FORMATTING
#include "unicode/uobject.h"
@@ -68,7 +70,7 @@ public:
* @return A copy of the object.
* @stable ICU 3.8
*/
- TimeZoneTransition* clone(void) const;
+ TimeZoneTransition* clone() const;
/**
* Assignment operator.
@@ -192,6 +194,8 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // TZTRANS_H
//eof
diff --git a/deps/icu-small/source/i18n/unicode/ucal.h b/deps/icu-small/source/i18n/unicode/ucal.h
index 71120b7aed..eee2ae9e22 100644
--- a/deps/icu-small/source/i18n/unicode/ucal.h
+++ b/deps/icu-small/source/i18n/unicode/ucal.h
@@ -441,11 +441,13 @@ enum UCalendarDateFields {
/* Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API,
* it is needed for layout of Calendar, DateFormat, and other objects */
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* One more than the highest normal UCalendarDateFields value.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
- UCAL_FIELD_COUNT,
+ UCAL_FIELD_COUNT,
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Field number indicating the
@@ -657,6 +659,42 @@ ucal_getDefaultTimeZone(UChar* result, int32_t resultCapacity, UErrorCode* ec);
U_STABLE void U_EXPORT2
ucal_setDefaultTimeZone(const UChar* zoneID, UErrorCode* ec);
+#ifndef U_HIDE_DRAFT_API
+
+/**
+ * Return the current host time zone. The host time zone is detected from
+ * the current host system configuration by querying the host operating
+ * system. If the host system detection routines fail, or if they specify
+ * a TimeZone or TimeZone offset which is not recognized, then the special
+ * TimeZone "Etc/Unknown" is returned.
+ *
+ * Note that host time zone and the ICU default time zone can be different.
+ *
+ * The ICU default time zone does not change once initialized unless modified
+ * by calling `ucal_setDefaultTimeZone()` or with the C++ TimeZone API,
+ * `TimeZone::adoptDefault(TimeZone*)`.
+ *
+ * If the host operating system configuration has changed since ICU has
+ * initialized then the returned value can be different than the ICU default
+ * time zone, even if the default has not changed.
+ *
+ * <p>This function is not thread safe.</p>
+ *
+ * @param result A buffer to receive the result, or NULL
+ * @param resultCapacity The capacity of the result buffer
+ * @param ec input/output error code
+ * @return The result string length, not including the terminating
+ * null
+ *
+ * @see #UCAL_UNKNOWN_ZONE_ID
+ *
+ * @draft ICU 65
+ */
+U_DRAFT int32_t U_EXPORT2
+ucal_getHostTimeZone(UChar *result, int32_t resultCapacity, UErrorCode *ec);
+
+#endif // U_HIDE_DRAFT_API
+
/**
* Return the amount of time in milliseconds that the clock is
* advanced during daylight savings time for the given time zone, or
diff --git a/deps/icu-small/source/i18n/unicode/ucol.h b/deps/icu-small/source/i18n/unicode/ucol.h
index f084ac61e6..34b5d2476a 100644
--- a/deps/icu-small/source/i18n/unicode/ucol.h
+++ b/deps/icu-small/source/i18n/unicode/ucol.h
@@ -344,11 +344,13 @@ typedef enum {
/* Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API,
* it is needed for layout of RuleBasedCollator object. */
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* One more than the highest normal UColAttribute value.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
UCOL_ATTRIBUTE_COUNT
+#endif // U_FORCE_HIDE_DEPRECATED_API
} UColAttribute;
/** Options for retrieving the rule string
diff --git a/deps/icu-small/source/i18n/unicode/udat.h b/deps/icu-small/source/i18n/unicode/udat.h
index c67a6d6d4b..bdbd080c00 100644
--- a/deps/icu-small/source/i18n/unicode/udat.h
+++ b/deps/icu-small/source/i18n/unicode/udat.h
@@ -923,11 +923,13 @@ typedef enum UDateFormatBooleanAttribute {
/* Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API,
* it is needed for layout of DateFormat object. */
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* One more than the highest normal UDateFormatBooleanAttribute value.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
UDAT_BOOLEAN_ATTRIBUTE_COUNT = 4
+#endif // U_FORCE_HIDE_DEPRECATED_API
} UDateFormatBooleanAttribute;
/**
diff --git a/deps/icu-small/source/i18n/unicode/udatpg.h b/deps/icu-small/source/i18n/unicode/udatpg.h
index 238a27b4f4..81956d1270 100644
--- a/deps/icu-small/source/i18n/unicode/udatpg.h
+++ b/deps/icu-small/source/i18n/unicode/udatpg.h
@@ -88,11 +88,13 @@ typedef enum UDateTimePatternField {
/* Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API,
* it is needed for layout of DateTimePatternGenerator object. */
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* One more than the highest normal UDateTimePatternField value.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
UDATPG_FIELD_COUNT
+#endif // U_FORCE_HIDE_DEPRECATED_API
} UDateTimePatternField;
/**
diff --git a/deps/icu-small/source/i18n/unicode/uformattedvalue.h b/deps/icu-small/source/i18n/unicode/uformattedvalue.h
index d1c2ad1e49..172558f7fb 100644
--- a/deps/icu-small/source/i18n/unicode/uformattedvalue.h
+++ b/deps/icu-small/source/i18n/unicode/uformattedvalue.h
@@ -7,10 +7,11 @@
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
-#ifndef U_HIDE_DRAFT_API
#include "unicode/ufieldpositer.h"
+#ifndef U_HIDE_DRAFT_API
+
/**
* \file
* \brief C API: Abstract operations for localized strings.
diff --git a/deps/icu-small/source/i18n/unicode/ulistformatter.h b/deps/icu-small/source/i18n/unicode/ulistformatter.h
index 4327fd5ec1..0fbf72c9ff 100644
--- a/deps/icu-small/source/i18n/unicode/ulistformatter.h
+++ b/deps/icu-small/source/i18n/unicode/ulistformatter.h
@@ -41,7 +41,7 @@ struct UFormattedList;
* @draft ICU 64
*/
typedef struct UFormattedList UFormattedList;
-#endif /* U_HIDE_DRAFT_API */
+#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_DRAFT_API
/**
@@ -61,7 +61,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.
diff --git a/deps/icu-small/source/i18n/unicode/unirepl.h b/deps/icu-small/source/i18n/unicode/unirepl.h
index 8fb25d4689..61ee37f070 100644
--- a/deps/icu-small/source/i18n/unicode/unirepl.h
+++ b/deps/icu-small/source/i18n/unicode/unirepl.h
@@ -14,6 +14,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: UnicodeReplacer
@@ -96,4 +98,6 @@ class U_I18N_API UnicodeReplacer /* not : public UObject because this is an inte
U_NAMESPACE_END
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif
diff --git a/deps/icu-small/source/i18n/unicode/unum.h b/deps/icu-small/source/i18n/unicode/unum.h
index c03131f372..77cde03533 100644
--- a/deps/icu-small/source/i18n/unicode/unum.h
+++ b/deps/icu-small/source/i18n/unicode/unum.h
@@ -338,11 +338,13 @@ enum UCurrencySpacing {
/* Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API,
* it is needed for layout of DecimalFormatSymbols object. */
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* One more than the highest normal UCurrencySpacing value.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
UNUM_CURRENCY_SPACING_COUNT
+#endif // U_FORCE_HIDE_DEPRECATED_API
};
typedef enum UCurrencySpacing UCurrencySpacing; /**< @stable ICU 4.8 */
@@ -409,7 +411,7 @@ typedef enum UNumberFormatFields {
* respectively.
*
* <p><strong>NOTE::</strong> New users with are strongly encouraged to
- * use unumf_openWithSkeletonAndLocale instead of unum_open.
+ * use unumf_openForSkeletonAndLocale instead of unum_open.
*
* @param pattern A pattern specifying the format to use.
* This parameter is ignored unless the style is
diff --git a/deps/icu-small/source/i18n/unicode/unumberformatter.h b/deps/icu-small/source/i18n/unicode/unumberformatter.h
index e4c21a4e4a..b27507f7a8 100644
--- a/deps/icu-small/source/i18n/unicode/unumberformatter.h
+++ b/deps/icu-small/source/i18n/unicode/unumberformatter.h
@@ -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,24 +330,25 @@ 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,
/**
* Show the minus sign on negative numbers and the plus sign on positive numbers. Do not show a
- * sign on zero.
+ * 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,
/**
* Use the locale-dependent accounting format on negative numbers, and show the plus sign on
- * positive numbers. Do not show a sign on zero. For more information on the accounting format,
- * see the ACCOUNTING sign display strategy.
+ * positive numbers. Do not show a sign on zero or NaN, unless the sign bit is set (-0.0 gets a
+ * 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,
@@ -366,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.
*
@@ -378,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,
@@ -403,7 +394,6 @@ typedef enum UNumberDecimalSeparatorDisplay {
*/
UNUM_DECIMAL_SEPARATOR_COUNT
} UNumberDecimalSeparatorDisplay;
-#endif /* U_HIDE_DRAFT_API */
struct UNumberFormatter;
/**
@@ -649,6 +639,13 @@ unumf_resultGetAllFieldPositions(const UFormattedNumber* uresult, UFieldPosition
UErrorCode* ec);
+// TODO(ICU-20775): Propose this as API.
+// NOTE: This is not currently implemented.
+// U_DRAFT int32_t U_EXPORT2
+// unumf_resultToDecimalNumber(const UFormattedNumber* uresult, char* buffer, int32_t bufferCapacity,
+// UErrorCode* ec);
+
+
/**
* Releases the UNumberFormatter created by unumf_openForSkeletonAndLocale().
*
diff --git a/deps/icu-small/source/i18n/unicode/usearch.h b/deps/icu-small/source/i18n/unicode/usearch.h
index 6b495ef001..d9d84b4f6a 100644
--- a/deps/icu-small/source/i18n/unicode/usearch.h
+++ b/deps/icu-small/source/i18n/unicode/usearch.h
@@ -24,7 +24,7 @@
* \file
* \brief C API: StringSearch
*
- * C Apis for an engine that provides language-sensitive text searching based
+ * C APIs for an engine that provides language-sensitive text searching based
* on the comparison rules defined in a <tt>UCollator</tt> data struct,
* see <tt>ucol.h</tt>. This ensures that language eccentricity can be
* handled, e.g. for the German collator, characters &szlig; and SS will be matched
@@ -55,7 +55,7 @@
* <p>
* This search has APIs similar to that of other text iteration mechanisms
* such as the break iterators in <tt>ubrk.h</tt>. Using these
- * APIs, it is easy to scan through text looking for all occurances of
+ * APIs, it is easy to scan through text looking for all occurrences of
* a given pattern. This search iterator allows changing of direction by
* calling a <tt>reset</tt> followed by a <tt>next</tt> or <tt>previous</tt>.
* Though a direction change can occur without calling <tt>reset</tt> first,
@@ -130,7 +130,7 @@
* pos = usearch_next(search, &status))
* {
* printf("Found match at %d pos, length is %d\n", pos,
- * usearch_getMatchLength(search));
+ * usearch_getMatchedLength(search));
* }
* }
*
@@ -479,7 +479,7 @@ U_STABLE int32_t U_EXPORT2 usearch_getMatchedLength(
* possible. If the buffer fits the matched text exactly, a null-termination
* is not possible, then a U_STRING_NOT_TERMINATED_ERROR set in status.
* Pre-flighting can be either done with length = 0 or the API
-* <tt>usearch_getMatchLength</tt>.
+* <tt>usearch_getMatchedLength</tt>.
* @param strsrch search iterator data struct
* @param result UChar buffer to store the matched string
* @param resultCapacity length of the result buffer
@@ -766,7 +766,7 @@ U_STABLE void U_EXPORT2 usearch_reset(UStringSearch *strsrch);
#ifndef U_HIDE_INTERNAL_API
/**
* Simple forward search for the pattern, starting at a specified index,
- * and using using a default set search options.
+ * and using a default set search options.
*
* This is an experimental function, and is not an official part of the
* ICU API.
@@ -783,7 +783,7 @@ U_STABLE void U_EXPORT2 usearch_reset(UStringSearch *strsrch);
* are part of a combining sequence, as described below.
*
* A match will not include a partial combining sequence. Combining
- * character sequences are considered to be inseperable units,
+ * character sequences are considered to be inseparable units,
* and either match the pattern completely, or are considered to not match
* at all. Thus, for example, an A followed a combining accent mark will
* not be found when searching for a plain (unaccented) A. (unless
@@ -792,7 +792,7 @@ U_STABLE void U_EXPORT2 usearch_reset(UStringSearch *strsrch);
* When beginning a search, the initial starting position, startIdx,
* is assumed to be an acceptable match boundary with respect to
* combining characters. A combining sequence that spans across the
- * starting point will not supress a match beginning at startIdx.
+ * starting point will not suppress a match beginning at startIdx.
*
* Characters that expand to multiple collation elements
* (German sharp-S becoming 'ss', or the composed forms of accented
@@ -843,7 +843,7 @@ U_INTERNAL UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
* are part of a combining sequence, as described below.
*
* A match will not include a partial combining sequence. Combining
- * character sequences are considered to be inseperable units,
+ * character sequences are considered to be inseparable units,
* and either match the pattern completely, or are considered to not match
* at all. Thus, for example, an A followed a combining accent mark will
* not be found when searching for a plain (unaccented) A. (unless
@@ -852,7 +852,7 @@ U_INTERNAL UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
* When beginning a search, the initial starting position, startIdx,
* is assumed to be an acceptable match boundary with respect to
* combining characters. A combining sequence that spans across the
- * starting point will not supress a match beginning at startIdx.
+ * starting point will not suppress a match beginning at startIdx.
*
* Characters that expand to multiple collation elements
* (German sharp-S becoming 'ss', or the composed forms of accented
diff --git a/deps/icu-small/source/i18n/unicode/uspoof.h b/deps/icu-small/source/i18n/unicode/uspoof.h
index d15ba4b242..63a13387b0 100644
--- a/deps/icu-small/source/i18n/unicode/uspoof.h
+++ b/deps/icu-small/source/i18n/unicode/uspoof.h
@@ -353,6 +353,8 @@
* @stable ICU 4.6
*/
+U_CDECL_BEGIN
+
struct USpoofChecker;
/**
* @stable ICU 4.2
@@ -471,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.
@@ -489,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.
@@ -674,25 +674,6 @@ uspoof_openFromSource(const char *confusables, int32_t confusablesLen,
U_STABLE void U_EXPORT2
uspoof_close(USpoofChecker *sc);
-#if U_SHOW_CPLUSPLUS_API
-
-U_NAMESPACE_BEGIN
-
-/**
- * \class LocalUSpoofCheckerPointer
- * "Smart pointer" class, closes a USpoofChecker via uspoof_close().
- * For most methods see the LocalPointerBase base class.
- *
- * @see LocalPointerBase
- * @see LocalPointer
- * @stable ICU 4.4
- */
-U_DEFINE_LOCAL_OPEN_POINTER(LocalUSpoofCheckerPointer, USpoofChecker, uspoof_close);
-
-U_NAMESPACE_END
-
-#endif
-
/**
* Clone a Spoof Checker. The clone will be set to perform the same checks
* as the original source.
@@ -901,54 +882,6 @@ U_STABLE const USet * U_EXPORT2
uspoof_getAllowedChars(const USpoofChecker *sc, UErrorCode *status);
-#if U_SHOW_CPLUSPLUS_API
-/**
- * Limit the acceptable characters to those specified by a Unicode Set.
- * Any previously specified character limit is
- * is replaced by the new settings. This includes limits on
- * characters that were set with the uspoof_setAllowedLocales() function.
- *
- * The USPOOF_CHAR_LIMIT test is automatically enabled for this
- * USoofChecker by this function.
- *
- * @param sc The USpoofChecker
- * @param chars A Unicode Set containing the list of
- * characters that are permitted. Ownership of the set
- * remains with the caller. The incoming set is cloned by
- * this function, so there are no restrictions on modifying
- * or deleting the UnicodeSet after calling this function.
- * @param status The error code, set if this function encounters a problem.
- * @stable ICU 4.2
- */
-U_STABLE void U_EXPORT2
-uspoof_setAllowedUnicodeSet(USpoofChecker *sc, const icu::UnicodeSet *chars, UErrorCode *status);
-
-
-/**
- * Get a UnicodeSet for the characters permitted in an identifier.
- * This corresponds to the limits imposed by the Set Allowed Characters /
- * UnicodeSet functions. Limitations imposed by other checks will not be
- * reflected in the set returned by this function.
- *
- * The returned set will be frozen, meaning that it cannot be modified
- * by the caller.
- *
- * Ownership of the returned set remains with the Spoof Detector. The
- * returned set will become invalid if the spoof detector is closed,
- * or if a new set of allowed characters is specified.
- *
- *
- * @param sc The USpoofChecker
- * @param status The error code, set if this function encounters a problem.
- * @return A UnicodeSet containing the characters that are permitted by
- * the USPOOF_CHAR_LIMIT test.
- * @stable ICU 4.2
- */
-U_STABLE const icu::UnicodeSet * U_EXPORT2
-uspoof_getAllowedUnicodeSet(const USpoofChecker *sc, UErrorCode *status);
-#endif
-
-
/**
* Check the specified string for possible security issues.
* The text to be checked will typically be an identifier of some sort.
@@ -1027,43 +960,6 @@ uspoof_checkUTF8(const USpoofChecker *sc,
UErrorCode *status);
-#if U_SHOW_CPLUSPLUS_API
-/**
- * Check the specified string for possible security issues.
- * The text to be checked will typically be an identifier of some sort.
- * The set of checks to be performed is specified with uspoof_setChecks().
- *
- * \note
- * Consider using the newer API, {@link uspoof_check2UnicodeString}, instead.
- * The newer API exposes additional information from the check procedure
- * and is otherwise identical to this method.
- *
- * @param sc The USpoofChecker
- * @param id A identifier to be checked for possible security issues.
- * @param position Deprecated in ICU 51. Always returns zero.
- * Originally, an out parameter for the index of the first
- * string position that failed a check.
- * This parameter may be NULL.
- * @param status The error code, set if an error occurred while attempting to
- * perform the check.
- * Spoofing or security issues detected with the input string are
- * not reported here, but through the function's return value.
- * @return An integer value with bits set for any potential security
- * or spoofing issues detected. The bits are defined by
- * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS)
- * will be zero if the input string passes all of the
- * enabled checks.
- * @see uspoof_check2UnicodeString
- * @stable ICU 4.2
- */
-U_STABLE int32_t U_EXPORT2
-uspoof_checkUnicodeString(const USpoofChecker *sc,
- const icu::UnicodeString &id,
- int32_t *position,
- UErrorCode *status);
-#endif
-
-
/**
* Check the specified string for possible security issues.
* The text to be checked will typically be an identifier of some sort.
@@ -1135,39 +1031,6 @@ uspoof_check2UTF8(const USpoofChecker *sc,
USpoofCheckResult* checkResult,
UErrorCode *status);
-#if U_SHOW_CPLUSPLUS_API
-/**
- * Check the specified string for possible security issues.
- * The text to be checked will typically be an identifier of some sort.
- * The set of checks to be performed is specified with uspoof_setChecks().
- *
- * @param sc The USpoofChecker
- * @param id A identifier to be checked for possible security issues.
- * @param checkResult An instance of USpoofCheckResult to be filled with
- * details about the identifier. Can be NULL.
- * @param status The error code, set if an error occurred while attempting to
- * perform the check.
- * Spoofing or security issues detected with the input string are
- * not reported here, but through the function's return value.
- * @return An integer value with bits set for any potential security
- * or spoofing issues detected. The bits are defined by
- * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS)
- * will be zero if the input string passes all of the
- * enabled checks. Any information in this bitmask will be
- * consistent with the information saved in the optional
- * checkResult parameter.
- * @see uspoof_openCheckResult
- * @see uspoof_check2
- * @see uspoof_check2UTF8
- * @stable ICU 58
- */
-U_STABLE int32_t U_EXPORT2
-uspoof_check2UnicodeString(const USpoofChecker *sc,
- const icu::UnicodeString &id,
- USpoofCheckResult* checkResult,
- UErrorCode *status);
-#endif
-
/**
* Create a USpoofCheckResult, used by the {@link uspoof_check2} class of functions to return
* information about the identifier. Information includes:
@@ -1199,32 +1062,6 @@ uspoof_openCheckResult(UErrorCode *status);
U_STABLE void U_EXPORT2
uspoof_closeCheckResult(USpoofCheckResult *checkResult);
-#if U_SHOW_CPLUSPLUS_API
-
-U_NAMESPACE_BEGIN
-
-/**
- * \class LocalUSpoofCheckResultPointer
- * "Smart pointer" class, closes a USpoofCheckResult via `uspoof_closeCheckResult()`.
- * For most methods see the LocalPointerBase base class.
- *
- * @see LocalPointerBase
- * @see LocalPointer
- * @stable ICU 58
- */
-
-/**
- * \cond
- * Note: Doxygen is giving a bogus warning on this U_DEFINE_LOCAL_OPEN_POINTER.
- * For now, suppress with a Doxygen cond
- */
-U_DEFINE_LOCAL_OPEN_POINTER(LocalUSpoofCheckResultPointer, USpoofCheckResult, uspoof_closeCheckResult);
-/** \endcond */
-
-U_NAMESPACE_END
-
-#endif
-
/**
* Indicates which of the spoof check(s) have failed. The value is a bitwise OR of the constants for the tests
* in question: USPOOF_RESTRICTION_LEVEL, USPOOF_CHAR_LIMIT, and so on.
@@ -1355,36 +1192,6 @@ uspoof_areConfusableUTF8(const USpoofChecker *sc,
-#if U_SHOW_CPLUSPLUS_API
-/**
- * A version of {@link uspoof_areConfusable} accepting UnicodeStrings.
- *
- * @param sc The USpoofChecker
- * @param s1 The first of the two identifiers to be compared for
- * confusability. The strings are in UTF-8 format.
- * @param s2 The second of the two identifiers to be compared for
- * confusability. The strings are in UTF-8 format.
- * @param status The error code, set if an error occurred while attempting to
- * perform the check.
- * Confusability of the identifiers is not reported here,
- * but through this function's return value.
- * @return An integer value with bit(s) set corresponding to
- * the type of confusability found, as defined by
- * enum USpoofChecks. Zero is returned if the identifiers
- * are not confusable.
- *
- * @stable ICU 4.2
- *
- * @see uspoof_areConfusable
- */
-U_STABLE int32_t U_EXPORT2
-uspoof_areConfusableUnicodeString(const USpoofChecker *sc,
- const icu::UnicodeString &s1,
- const icu::UnicodeString &s2,
- UErrorCode *status);
-#endif
-
-
/**
* Get the "skeleton" for an identifier.
* Skeletons are a transformation of the input identifier;
@@ -1463,38 +1270,6 @@ uspoof_getSkeletonUTF8(const USpoofChecker *sc,
char *dest, int32_t destCapacity,
UErrorCode *status);
-#if U_SHOW_CPLUSPLUS_API
-/**
- * Get the "skeleton" for an identifier.
- * Skeletons are a transformation of the input identifier;
- * Two identifiers are confusable if their skeletons are identical.
- * See Unicode UAX #39 for additional information.
- *
- * Using skeletons directly makes it possible to quickly check
- * whether an identifier is confusable with any of some large
- * set of existing identifiers, by creating an efficiently
- * searchable collection of the skeletons.
- *
- * @param sc The USpoofChecker.
- * @param type Deprecated in ICU 58. You may pass any number.
- * Originally, controlled which of the Unicode confusable data
- * tables to use.
- * @param id The input identifier whose skeleton will be computed.
- * @param dest The output identifier, to receive the skeleton string.
- * @param status The error code, set if an error occurred while attempting to
- * perform the check.
- * @return A reference to the destination (skeleton) string.
- *
- * @stable ICU 4.2
- */
-U_I18N_API icu::UnicodeString & U_EXPORT2
-uspoof_getSkeletonUnicodeString(const USpoofChecker *sc,
- uint32_t type,
- const icu::UnicodeString &id,
- icu::UnicodeString &dest,
- UErrorCode *status);
-#endif /* U_SHOW_CPLUSPLUS_API */
-
/**
* Get the set of Candidate Characters for Inclusion in Identifiers, as defined
* in http://unicode.org/Public/security/latest/xidmodifications.txt
@@ -1525,8 +1300,243 @@ uspoof_getInclusionSet(UErrorCode *status);
U_STABLE const USet * U_EXPORT2
uspoof_getRecommendedSet(UErrorCode *status);
+/**
+ * Serialize the data for a spoof detector into a chunk of memory.
+ * The flattened spoof detection tables can later be used to efficiently
+ * instantiate a new Spoof Detector.
+ *
+ * The serialized spoof checker includes only the data compiled from the
+ * Unicode data tables by uspoof_openFromSource(); it does not include
+ * include any other state or configuration that may have been set.
+ *
+ * @param sc the Spoof Detector whose data is to be serialized.
+ * @param data a pointer to 32-bit-aligned memory to be filled with the data,
+ * can be NULL if capacity==0
+ * @param capacity the number of bytes available at data,
+ * or 0 for preflighting
+ * @param status an in/out ICU UErrorCode; possible errors include:
+ * - U_BUFFER_OVERFLOW_ERROR if the data storage block is too small for serialization
+ * - U_ILLEGAL_ARGUMENT_ERROR the data or capacity parameters are bad
+ * @return the number of bytes written or needed for the spoof data
+ *
+ * @see utrie2_openFromSerialized()
+ * @stable ICU 4.2
+ */
+U_STABLE int32_t U_EXPORT2
+uspoof_serialize(USpoofChecker *sc,
+ void *data, int32_t capacity,
+ UErrorCode *status);
+
+U_CDECL_END
+
#if U_SHOW_CPLUSPLUS_API
+U_NAMESPACE_BEGIN
+
+/**
+ * \class LocalUSpoofCheckerPointer
+ * "Smart pointer" class, closes a USpoofChecker via uspoof_close().
+ * For most methods see the LocalPointerBase base class.
+ *
+ * @see LocalPointerBase
+ * @see LocalPointer
+ * @stable ICU 4.4
+ */
+/**
+ * \cond
+ * Note: Doxygen is giving a bogus warning on this U_DEFINE_LOCAL_OPEN_POINTER.
+ * For now, suppress with a Doxygen cond
+ */
+U_DEFINE_LOCAL_OPEN_POINTER(LocalUSpoofCheckerPointer, USpoofChecker, uspoof_close);
+/** \endcond */
+
+/**
+ * \class LocalUSpoofCheckResultPointer
+ * "Smart pointer" class, closes a USpoofCheckResult via `uspoof_closeCheckResult()`.
+ * For most methods see the LocalPointerBase base class.
+ *
+ * @see LocalPointerBase
+ * @see LocalPointer
+ * @stable ICU 58
+ */
+
+/**
+ * \cond
+ * Note: Doxygen is giving a bogus warning on this U_DEFINE_LOCAL_OPEN_POINTER.
+ * For now, suppress with a Doxygen cond
+ */
+U_DEFINE_LOCAL_OPEN_POINTER(LocalUSpoofCheckResultPointer, USpoofCheckResult, uspoof_closeCheckResult);
+/** \endcond */
+
+U_NAMESPACE_END
+
+/**
+ * Limit the acceptable characters to those specified by a Unicode Set.
+ * Any previously specified character limit is
+ * is replaced by the new settings. This includes limits on
+ * characters that were set with the uspoof_setAllowedLocales() function.
+ *
+ * The USPOOF_CHAR_LIMIT test is automatically enabled for this
+ * USoofChecker by this function.
+ *
+ * @param sc The USpoofChecker
+ * @param chars A Unicode Set containing the list of
+ * characters that are permitted. Ownership of the set
+ * remains with the caller. The incoming set is cloned by
+ * this function, so there are no restrictions on modifying
+ * or deleting the UnicodeSet after calling this function.
+ * @param status The error code, set if this function encounters a problem.
+ * @stable ICU 4.2
+ */
+U_STABLE void U_EXPORT2
+uspoof_setAllowedUnicodeSet(USpoofChecker *sc, const icu::UnicodeSet *chars, UErrorCode *status);
+
+
+/**
+ * Get a UnicodeSet for the characters permitted in an identifier.
+ * This corresponds to the limits imposed by the Set Allowed Characters /
+ * UnicodeSet functions. Limitations imposed by other checks will not be
+ * reflected in the set returned by this function.
+ *
+ * The returned set will be frozen, meaning that it cannot be modified
+ * by the caller.
+ *
+ * Ownership of the returned set remains with the Spoof Detector. The
+ * returned set will become invalid if the spoof detector is closed,
+ * or if a new set of allowed characters is specified.
+ *
+ *
+ * @param sc The USpoofChecker
+ * @param status The error code, set if this function encounters a problem.
+ * @return A UnicodeSet containing the characters that are permitted by
+ * the USPOOF_CHAR_LIMIT test.
+ * @stable ICU 4.2
+ */
+U_STABLE const icu::UnicodeSet * U_EXPORT2
+uspoof_getAllowedUnicodeSet(const USpoofChecker *sc, UErrorCode *status);
+
+/**
+ * Check the specified string for possible security issues.
+ * The text to be checked will typically be an identifier of some sort.
+ * The set of checks to be performed is specified with uspoof_setChecks().
+ *
+ * \note
+ * Consider using the newer API, {@link uspoof_check2UnicodeString}, instead.
+ * The newer API exposes additional information from the check procedure
+ * and is otherwise identical to this method.
+ *
+ * @param sc The USpoofChecker
+ * @param id A identifier to be checked for possible security issues.
+ * @param position Deprecated in ICU 51. Always returns zero.
+ * Originally, an out parameter for the index of the first
+ * string position that failed a check.
+ * This parameter may be NULL.
+ * @param status The error code, set if an error occurred while attempting to
+ * perform the check.
+ * Spoofing or security issues detected with the input string are
+ * not reported here, but through the function's return value.
+ * @return An integer value with bits set for any potential security
+ * or spoofing issues detected. The bits are defined by
+ * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS)
+ * will be zero if the input string passes all of the
+ * enabled checks.
+ * @see uspoof_check2UnicodeString
+ * @stable ICU 4.2
+ */
+U_STABLE int32_t U_EXPORT2
+uspoof_checkUnicodeString(const USpoofChecker *sc,
+ const icu::UnicodeString &id,
+ int32_t *position,
+ UErrorCode *status);
+
+/**
+ * Check the specified string for possible security issues.
+ * The text to be checked will typically be an identifier of some sort.
+ * The set of checks to be performed is specified with uspoof_setChecks().
+ *
+ * @param sc The USpoofChecker
+ * @param id A identifier to be checked for possible security issues.
+ * @param checkResult An instance of USpoofCheckResult to be filled with
+ * details about the identifier. Can be NULL.
+ * @param status The error code, set if an error occurred while attempting to
+ * perform the check.
+ * Spoofing or security issues detected with the input string are
+ * not reported here, but through the function's return value.
+ * @return An integer value with bits set for any potential security
+ * or spoofing issues detected. The bits are defined by
+ * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS)
+ * will be zero if the input string passes all of the
+ * enabled checks. Any information in this bitmask will be
+ * consistent with the information saved in the optional
+ * checkResult parameter.
+ * @see uspoof_openCheckResult
+ * @see uspoof_check2
+ * @see uspoof_check2UTF8
+ * @stable ICU 58
+ */
+U_STABLE int32_t U_EXPORT2
+uspoof_check2UnicodeString(const USpoofChecker *sc,
+ const icu::UnicodeString &id,
+ USpoofCheckResult* checkResult,
+ UErrorCode *status);
+
+/**
+ * A version of {@link uspoof_areConfusable} accepting UnicodeStrings.
+ *
+ * @param sc The USpoofChecker
+ * @param s1 The first of the two identifiers to be compared for
+ * confusability. The strings are in UTF-8 format.
+ * @param s2 The second of the two identifiers to be compared for
+ * confusability. The strings are in UTF-8 format.
+ * @param status The error code, set if an error occurred while attempting to
+ * perform the check.
+ * Confusability of the identifiers is not reported here,
+ * but through this function's return value.
+ * @return An integer value with bit(s) set corresponding to
+ * the type of confusability found, as defined by
+ * enum USpoofChecks. Zero is returned if the identifiers
+ * are not confusable.
+ *
+ * @stable ICU 4.2
+ *
+ * @see uspoof_areConfusable
+ */
+U_STABLE int32_t U_EXPORT2
+uspoof_areConfusableUnicodeString(const USpoofChecker *sc,
+ const icu::UnicodeString &s1,
+ const icu::UnicodeString &s2,
+ UErrorCode *status);
+
+/**
+ * Get the "skeleton" for an identifier.
+ * Skeletons are a transformation of the input identifier;
+ * Two identifiers are confusable if their skeletons are identical.
+ * See Unicode UAX #39 for additional information.
+ *
+ * Using skeletons directly makes it possible to quickly check
+ * whether an identifier is confusable with any of some large
+ * set of existing identifiers, by creating an efficiently
+ * searchable collection of the skeletons.
+ *
+ * @param sc The USpoofChecker.
+ * @param type Deprecated in ICU 58. You may pass any number.
+ * Originally, controlled which of the Unicode confusable data
+ * tables to use.
+ * @param id The input identifier whose skeleton will be computed.
+ * @param dest The output identifier, to receive the skeleton string.
+ * @param status The error code, set if an error occurred while attempting to
+ * perform the check.
+ * @return A reference to the destination (skeleton) string.
+ *
+ * @stable ICU 4.2
+ */
+U_I18N_API icu::UnicodeString & U_EXPORT2
+uspoof_getSkeletonUnicodeString(const USpoofChecker *sc,
+ uint32_t type,
+ const icu::UnicodeString &id,
+ icu::UnicodeString &dest,
+ UErrorCode *status);
+
/**
* Get the set of Candidate Characters for Inclusion in Identifiers, as defined
* in http://unicode.org/Public/security/latest/xidmodifications.txt
@@ -1559,34 +1569,6 @@ uspoof_getRecommendedUnicodeSet(UErrorCode *status);
#endif /* U_SHOW_CPLUSPLUS_API */
-/**
- * Serialize the data for a spoof detector into a chunk of memory.
- * The flattened spoof detection tables can later be used to efficiently
- * instantiate a new Spoof Detector.
- *
- * The serialized spoof checker includes only the data compiled from the
- * Unicode data tables by uspoof_openFromSource(); it does not include
- * include any other state or configuration that may have been set.
- *
- * @param sc the Spoof Detector whose data is to be serialized.
- * @param data a pointer to 32-bit-aligned memory to be filled with the data,
- * can be NULL if capacity==0
- * @param capacity the number of bytes available at data,
- * or 0 for preflighting
- * @param status an in/out ICU UErrorCode; possible errors include:
- * - U_BUFFER_OVERFLOW_ERROR if the data storage block is too small for serialization
- * - U_ILLEGAL_ARGUMENT_ERROR the data or capacity parameters are bad
- * @return the number of bytes written or needed for the spoof data
- *
- * @see utrie2_openFromSerialized()
- * @stable ICU 4.2
- */
-U_STABLE int32_t U_EXPORT2
-uspoof_serialize(USpoofChecker *sc,
- void *data, int32_t capacity,
- UErrorCode *status);
-
-
-#endif
+#endif /* UCONFIG_NO_NORMALIZATION */
#endif /* USPOOF_H */
diff --git a/deps/icu-small/source/i18n/unicode/utrans.h b/deps/icu-small/source/i18n/unicode/utrans.h
index 7672b4428f..56640eda96 100644
--- a/deps/icu-small/source/i18n/unicode/utrans.h
+++ b/deps/icu-small/source/i18n/unicode/utrans.h
@@ -142,7 +142,7 @@ typedef struct UTransPosition {
int32_t contextLimit;
/**
- * Beginning index, inclusive, of the text to be transliteratd.
+ * Beginning index, inclusive, of the text to be transliterated.
* INPUT/OUTPUT parameter: This parameter is advanced past
* characters that have already been transliterated by a
* transliteration operation.
@@ -151,7 +151,7 @@ typedef struct UTransPosition {
int32_t start;
/**
- * Ending index, exclusive, of the text to be transliteratd.
+ * Ending index, exclusive, of the text to be transliterated.
* INPUT/OUTPUT parameter: This parameter is updated to reflect
* changes in the length of the text, but points to the same
* logical position in the text.
@@ -389,7 +389,7 @@ utrans_trans(const UTransliterator* trans,
/**
* Transliterate the portion of the UReplaceable text buffer that can
- * be transliterated unambiguosly. This method is typically called
+ * be transliterated unambiguously. This method is typically called
* after new text has been inserted, e.g. as a result of a keyboard
* event. The transliterator will try to transliterate characters of
* <code>rep</code> between <code>index.cursor</code> and
@@ -454,8 +454,7 @@ utrans_transIncremental(const UTransliterator* trans,
* zero-terminated. Upon return, the new length is stored in
* *textLength. If textLength is NULL then the string is assumed to
* be zero-terminated.
- * @param textCapacity a pointer to the length of the text buffer.
- * Upon return,
+ * @param textCapacity the length of the text buffer
* @param start the beginning index, inclusive; <code>0 <= start <=
* limit</code>.
* @param limit pointer to the ending index, exclusive; <code>start <=
@@ -479,7 +478,7 @@ utrans_transUChars(const UTransliterator* trans,
/**
* Transliterate the portion of the UChar* text buffer that can be
- * transliterated unambiguosly. See utrans_transIncremental(). The
+ * transliterated unambiguously. See utrans_transIncremental(). The
* string is passed in in a UChar* buffer. The string is modified in
* place. If the result is longer than textCapacity, it is truncated.
* The actual length of the result is returned in *textLength, if
diff --git a/deps/icu-small/source/i18n/unicode/vtzone.h b/deps/icu-small/source/i18n/unicode/vtzone.h
index 5d16177868..43a5652d6a 100644
--- a/deps/icu-small/source/i18n/unicode/vtzone.h
+++ b/deps/icu-small/source/i18n/unicode/vtzone.h
@@ -11,6 +11,8 @@
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: RFC2445 VTIMEZONE support
@@ -185,7 +187,7 @@ public:
* @return A new copy of this TimeZone object.
* @stable ICU 3.8
*/
- virtual TimeZone* clone(void) const;
+ virtual VTimeZone* clone() const;
/**
* Returns the TimeZone's adjusted GMT offset (i.e., the number of milliseconds to add
@@ -288,6 +290,7 @@ public:
*/
virtual UBool useDaylightTime(void) const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Queries if the given date is in daylight savings time in
* this time zone.
@@ -302,6 +305,7 @@ public:
* @deprecated ICU 2.4. Use Calendar::inDaylightTime() instead.
*/
virtual UBool inDaylightTime(UDate date, UErrorCode& status) const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Returns true if this zone has the same rule and offset as another zone.
@@ -453,5 +457,7 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // VTZONE_H
//eof