mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-20438 64rc BRS, update U_HIDE_ conditionals
This commit is contained in:
parent
be3a4d1858
commit
74ff0bf1a4
16 changed files with 357 additions and 20 deletions
|
@ -9,6 +9,7 @@
|
|||
#include "unicode/utypes.h"
|
||||
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* \file
|
||||
* \brief C++ API: Builder API for Locale
|
||||
|
@ -17,7 +18,6 @@
|
|||
U_NAMESPACE_BEGIN
|
||||
class CharString;
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* <code>LocaleBuilder</code> is used to build instances of <code>Locale</code>
|
||||
* from values configured by the setters. Unlike the <code>Locale</code>
|
||||
|
@ -281,8 +281,8 @@ private:
|
|||
icu::Locale *extensions_; // Pointer not object. Storage for all other fields.
|
||||
|
||||
};
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
#endif // __LOCALEBUILDER_H__
|
||||
|
|
|
@ -224,6 +224,8 @@ public:
|
|||
LocalPointer(LocalPointer<T> &&src) U_NOEXCEPT : LocalPointerBase<T>(src.ptr) {
|
||||
src.ptr=NULL;
|
||||
}
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Constructs a LocalPointer from a C++11 std::unique_ptr.
|
||||
* The LocalPointer steals the object owned by the std::unique_ptr.
|
||||
|
@ -236,6 +238,8 @@ public:
|
|||
*/
|
||||
explicit LocalPointer(std::unique_ptr<T> &&p)
|
||||
: LocalPointerBase<T>(p.release()) {}
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
/**
|
||||
* Destructor deletes the object it owns.
|
||||
* @stable ICU 4.4
|
||||
|
@ -256,6 +260,8 @@ public:
|
|||
src.ptr=NULL;
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Move-assign from an std::unique_ptr to this LocalPointer.
|
||||
* Steals the pointer from the std::unique_ptr.
|
||||
|
@ -268,6 +274,8 @@ public:
|
|||
adoptInstead(p.release());
|
||||
return *this;
|
||||
}
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
/**
|
||||
* Swap pointers.
|
||||
* @param other other smart pointer
|
||||
|
@ -323,6 +331,8 @@ public:
|
|||
delete p;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Conversion operator to a C++11 std::unique_ptr.
|
||||
* Disowns the object and gives it to the returned std::unique_ptr.
|
||||
|
@ -337,6 +347,7 @@ public:
|
|||
operator std::unique_ptr<T> () && {
|
||||
return std::unique_ptr<T>(LocalPointerBase<T>::orphan());
|
||||
}
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -394,6 +405,8 @@ public:
|
|||
LocalArray(LocalArray<T> &&src) U_NOEXCEPT : LocalPointerBase<T>(src.ptr) {
|
||||
src.ptr=NULL;
|
||||
}
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Constructs a LocalArray from a C++11 std::unique_ptr of an array type.
|
||||
* The LocalPointer steals the array owned by the std::unique_ptr.
|
||||
|
@ -406,6 +419,8 @@ public:
|
|||
*/
|
||||
explicit LocalArray(std::unique_ptr<T[]> &&p)
|
||||
: LocalPointerBase<T>(p.release()) {}
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
/**
|
||||
* Destructor deletes the array it owns.
|
||||
* @stable ICU 4.4
|
||||
|
@ -426,6 +441,8 @@ public:
|
|||
src.ptr=NULL;
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Move-assign from an std::unique_ptr to this LocalPointer.
|
||||
* Steals the array from the std::unique_ptr.
|
||||
|
@ -438,6 +455,8 @@ public:
|
|||
adoptInstead(p.release());
|
||||
return *this;
|
||||
}
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
/**
|
||||
* Swap pointers.
|
||||
* @param other other smart pointer
|
||||
|
@ -501,6 +520,8 @@ public:
|
|||
* @stable ICU 4.4
|
||||
*/
|
||||
T &operator[](ptrdiff_t i) const { return LocalPointerBase<T>::ptr[i]; }
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Conversion operator to a C++11 std::unique_ptr.
|
||||
* Disowns the object and gives it to the returned std::unique_ptr.
|
||||
|
@ -515,6 +536,7 @@ public:
|
|||
operator std::unique_ptr<T[]> () && {
|
||||
return std::unique_ptr<T[]>(LocalPointerBase<T>::orphan());
|
||||
}
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -54,6 +54,7 @@ class U_I18N_API CurrencyUnit: public MeasureUnit {
|
|||
*/
|
||||
CurrencyUnit(ConstChar16Ptr isoCode, UErrorCode &ec);
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Construct an object with the given ISO currency code.
|
||||
*
|
||||
|
@ -64,6 +65,7 @@ class U_I18N_API CurrencyUnit: public MeasureUnit {
|
|||
* @draft ICU 64
|
||||
*/
|
||||
CurrencyUnit(StringPiece isoCode, UErrorCode &ec);
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
/**
|
||||
* Copy constructor
|
||||
|
|
|
@ -2111,7 +2111,9 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
|||
* @draft ICU 64
|
||||
*/
|
||||
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.
|
||||
|
@ -2125,7 +2127,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
|||
* @deprecated ICU 64
|
||||
*/
|
||||
const number::LocalizedNumberFormatter& toNumberFormatter() const;
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
#endif /* U_HIDE_DEPRECATED_API */
|
||||
|
||||
/**
|
||||
* Return the class ID for this class. This is useful only for
|
||||
|
|
|
@ -564,6 +564,7 @@ private:
|
|||
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
|
||||
UDateTimePatternField getFieldAndWidthIndices(const char* key, UDateTimePGDisplayWidth* widthP) const;
|
||||
void setFieldDisplayName(UDateTimePatternField field, UDateTimePGDisplayWidth width, const UnicodeString& value);
|
||||
UnicodeString& getMutableFieldDisplayName(UDateTimePatternField field, UDateTimePGDisplayWidth width);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
|
||||
#include "unicode/appendable.h"
|
||||
#include "unicode/fpositer.h"
|
||||
|
@ -310,5 +311,6 @@ class U_I18N_API FormattedValue /* not : public UObject because this is an inter
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
#endif // __FORMATTEDVALUE_H__
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -13,6 +13,7 @@
|
|||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
|
||||
#include "unicode/measunit.h"
|
||||
|
||||
|
@ -23,7 +24,6 @@
|
|||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Dimensionless unit for percent and permille.
|
||||
* @see NumberFormatter
|
||||
|
@ -100,10 +100,10 @@ private:
|
|||
NoUnit(const char* subtype);
|
||||
|
||||
};
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif // __NOUNIT_H__
|
||||
|
|
|
@ -112,6 +112,7 @@ class IntegerWidth;
|
|||
|
||||
namespace impl {
|
||||
|
||||
#ifndef U_HIDE_INTERNAL_API
|
||||
/**
|
||||
* Datatype for minimum/maximum fraction digits. Must be able to hold kMaxIntFracSig.
|
||||
*
|
||||
|
@ -126,6 +127,7 @@ typedef int16_t digits_t;
|
|||
* @internal
|
||||
*/
|
||||
static constexpr int32_t DEFAULT_THRESHOLD = 3;
|
||||
#endif /* U_HIDE_INTERNAL_API */
|
||||
|
||||
// Forward declarations:
|
||||
class Padder;
|
||||
|
|
|
@ -20,12 +20,14 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#ifndef U_HIDE_INTERNAL_API
|
||||
/**
|
||||
* \def NUMSYS_NAME_CAPACITY
|
||||
* Size of a numbering system name.
|
||||
* @internal
|
||||
*/
|
||||
#define NUMSYS_NAME_CAPACITY 8
|
||||
#endif /* U_HIDE_INTERNAL_API */
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -348,6 +348,7 @@ public:
|
|||
*/
|
||||
UnicodeString select(double number) const;
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Given a formatted number, returns the keyword of the first rule
|
||||
* that applies to the number. This function can be used with
|
||||
|
@ -364,6 +365,7 @@ public:
|
|||
* @draft ICU 64
|
||||
*/
|
||||
UnicodeString select(const number::FormattedNumber& number, UErrorCode& status) const;
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
#ifndef U_HIDE_INTERNAL_API
|
||||
/**
|
||||
|
|
|
@ -248,7 +248,7 @@ class NumberFormat;
|
|||
class UnicodeString;
|
||||
class FormattedRelativeDateTimeData;
|
||||
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* An immutable class containing the result of a relative datetime formatting operation.
|
||||
*
|
||||
|
@ -311,7 +311,7 @@ class U_I18N_API FormattedRelativeDateTime : public UMemory, public FormattedVal
|
|||
: fData(nullptr), fErrorCode(errorCode) {}
|
||||
friend class RelativeDateTimeFormatter;
|
||||
};
|
||||
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
/**
|
||||
* Formats simple relative dates. There are two types of relative dates that
|
||||
|
@ -476,6 +476,7 @@ public:
|
|||
UnicodeString& appendTo,
|
||||
UErrorCode& status) const;
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Formats a relative date with a quantity such as "in 5 days" or
|
||||
* "3 months ago"
|
||||
|
@ -498,6 +499,7 @@ public:
|
|||
UDateDirection direction,
|
||||
UDateRelativeUnit unit,
|
||||
UErrorCode& status) const;
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
/**
|
||||
* Formats a relative date without a quantity.
|
||||
|
@ -521,6 +523,7 @@ public:
|
|||
UnicodeString& appendTo,
|
||||
UErrorCode& status) const;
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Formats a relative date without a quantity.
|
||||
*
|
||||
|
@ -540,6 +543,7 @@ public:
|
|||
UDateDirection direction,
|
||||
UDateAbsoluteUnit unit,
|
||||
UErrorCode& status) const;
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
/**
|
||||
* Format a combination of URelativeDateTimeUnit and numeric offset
|
||||
|
@ -567,6 +571,7 @@ public:
|
|||
UnicodeString& appendTo,
|
||||
UErrorCode& status) const;
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Format a combination of URelativeDateTimeUnit and numeric offset
|
||||
* using a numeric style, e.g. "1 week ago", "in 1 week",
|
||||
|
@ -589,6 +594,7 @@ public:
|
|||
double offset,
|
||||
URelativeDateTimeUnit unit,
|
||||
UErrorCode& status) const;
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
/**
|
||||
* Format a combination of URelativeDateTimeUnit and numeric offset
|
||||
|
@ -616,6 +622,7 @@ public:
|
|||
UnicodeString& appendTo,
|
||||
UErrorCode& status) const;
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Format a combination of URelativeDateTimeUnit and numeric offset
|
||||
* using a text style if possible, e.g. "last week", "this week",
|
||||
|
@ -638,6 +645,7 @@ public:
|
|||
double offset,
|
||||
URelativeDateTimeUnit unit,
|
||||
UErrorCode& status) const;
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
/**
|
||||
* Combines a relative date string and a time string in this object's
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
|
||||
#include "unicode/ufieldpositer.h"
|
||||
|
||||
|
@ -77,7 +78,7 @@ typedef enum UFieldCategory {
|
|||
#ifndef U_HIDE_INTERNAL_API
|
||||
/** @internal */
|
||||
UFIELD_CATEGORY_COUNT,
|
||||
#endif
|
||||
#endif /* U_HIDE_INTERNAL_API */
|
||||
|
||||
/**
|
||||
* Category for spans in a list.
|
||||
|
@ -434,5 +435,6 @@ U_NAMESPACE_END
|
|||
#endif // U_SHOW_CPLUSPLUS_API
|
||||
|
||||
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
#endif // __UFORMATTEDVALUE_H__
|
||||
|
|
|
@ -375,17 +375,19 @@ typedef enum UNumberFormatFields {
|
|||
UNUM_PERMILL_FIELD,
|
||||
/** @stable ICU 49 */
|
||||
UNUM_SIGN_FIELD,
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/** @draft ICU 64 */
|
||||
UNUM_MEASURE_UNIT_FIELD,
|
||||
/** @draft ICU 64 */
|
||||
UNUM_COMPACT_FIELD,
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
#ifndef U_HIDE_DEPRECATED_API
|
||||
/**
|
||||
* One more than the highest normal UNumberFormatFields value.
|
||||
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
|
||||
*/
|
||||
UNUM_FIELD_COUNT
|
||||
UNUM_FIELD_COUNT = UNUM_SIGN_FIELD + 3
|
||||
#endif /* U_HIDE_DEPRECATED_API */
|
||||
} UNumberFormatFields;
|
||||
|
||||
|
@ -1097,19 +1099,14 @@ typedef enum UNumberFormatAttribute {
|
|||
*/
|
||||
UNUM_SIGN_ALWAYS_SHOWN = 0x1004,
|
||||
|
||||
/** Limit of boolean attributes.
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
#ifndef U_HIDE_INTERNAL_API
|
||||
/** Limit of boolean attributes. (value should
|
||||
* not depend on U_HIDE conditionals)
|
||||
* @internal */
|
||||
UNUM_LIMIT_BOOLEAN_ATTRIBUTE = 0x1005,
|
||||
|
||||
#else /* U_HIDE_DRAFT_API */
|
||||
#ifndef U_HIDE_INTERNAL_API
|
||||
|
||||
/** Limit of boolean attributes.
|
||||
* @internal */
|
||||
UNUM_LIMIT_BOOLEAN_ATTRIBUTE = 0x1003,
|
||||
|
||||
#endif /* U_HIDE_INTERNAL_API */
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
} UNumberFormatAttribute;
|
||||
|
||||
|
|
|
@ -152,6 +152,7 @@ uplrules_select(const UPluralRules *uplrules,
|
|||
UChar *keyword, int32_t capacity,
|
||||
UErrorCode *status);
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Given a formatted number, returns the keyword of the first rule
|
||||
* that applies to the number, according to the supplied UPluralRules object.
|
||||
|
@ -174,6 +175,7 @@ uplrules_selectFormatted(const UPluralRules *uplrules,
|
|||
const struct UFormattedNumber* number,
|
||||
UChar *keyword, int32_t capacity,
|
||||
UErrorCode *status);
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
#ifndef U_HIDE_INTERNAL_API
|
||||
/**
|
||||
|
|
|
@ -252,7 +252,7 @@ ureldatefmt_open( const char* locale,
|
|||
U_STABLE void U_EXPORT2
|
||||
ureldatefmt_close(URelativeDateTimeFormatter *reldatefmt);
|
||||
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
struct UFormattedRelativeDateTime;
|
||||
/**
|
||||
* Opaque struct to contain the results of a URelativeDateTimeFormatter operation.
|
||||
|
@ -297,6 +297,7 @@ ureldatefmt_resultAsValue(const UFormattedRelativeDateTime* ufrdt, UErrorCode* e
|
|||
*/
|
||||
U_DRAFT void U_EXPORT2
|
||||
ureldatefmt_closeResult(UFormattedRelativeDateTime* ufrdt);
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
|
||||
#if U_SHOW_CPLUSPLUS_API
|
||||
|
@ -314,6 +315,7 @@ U_NAMESPACE_BEGIN
|
|||
*/
|
||||
U_DEFINE_LOCAL_OPEN_POINTER(LocalURelativeDateTimeFormatterPointer, URelativeDateTimeFormatter, ureldatefmt_close);
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* \class LocalUFormattedRelativeDateTimePointer
|
||||
* "Smart pointer" class, closes a UFormattedRelativeDateTime via ureldatefmt_closeResult().
|
||||
|
@ -324,6 +326,7 @@ U_DEFINE_LOCAL_OPEN_POINTER(LocalURelativeDateTimeFormatterPointer, URelativeDat
|
|||
* @draft ICU 64
|
||||
*/
|
||||
U_DEFINE_LOCAL_OPEN_POINTER(LocalUFormattedRelativeDateTimePointer, UFormattedRelativeDateTime, ureldatefmt_closeResult);
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
|
@ -365,6 +368,7 @@ ureldatefmt_formatNumeric( const URelativeDateTimeFormatter* reldatefmt,
|
|||
int32_t resultCapacity,
|
||||
UErrorCode* status);
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Format a combination of URelativeDateTimeUnit and numeric
|
||||
* offset using a numeric style, e.g. "1 week ago", "in 1 week",
|
||||
|
@ -395,6 +399,7 @@ ureldatefmt_formatNumericToResult(
|
|||
URelativeDateTimeUnit unit,
|
||||
UFormattedRelativeDateTime* result,
|
||||
UErrorCode* status);
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
/**
|
||||
* Format a combination of URelativeDateTimeUnit and numeric offset
|
||||
|
@ -432,6 +437,7 @@ ureldatefmt_format( const URelativeDateTimeFormatter* reldatefmt,
|
|||
int32_t resultCapacity,
|
||||
UErrorCode* status);
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Format a combination of URelativeDateTimeUnit and numeric offset
|
||||
* using a text style if possible, e.g. "last week", "this week",
|
||||
|
@ -465,6 +471,7 @@ ureldatefmt_formatToResult(
|
|||
URelativeDateTimeUnit unit,
|
||||
UFormattedRelativeDateTime* result,
|
||||
UErrorCode* status);
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
/**
|
||||
* Combines a relative date string and a time string in this object's
|
||||
|
|
Loading…
Add table
Reference in a new issue