mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
Add U_HIDE_DRAFT_API
This commit is contained in:
parent
d4929069a4
commit
96b1bacfb0
2 changed files with 25 additions and 0 deletions
|
@ -406,9 +406,19 @@ public:
|
|||
src.ptr=nullptr;
|
||||
}
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Construct a LocalArray with a specified length.
|
||||
*
|
||||
* @param p Pointer to the array to adopt.
|
||||
* @param length The length of the array.
|
||||
* @return A LocalArray with a length field.
|
||||
* @draft ICU 67
|
||||
*/
|
||||
static LocalArray<T> withLength(T *p, int32_t length) {
|
||||
return LocalArray(p, length);
|
||||
}
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
|
@ -549,7 +559,16 @@ public:
|
|||
}
|
||||
#endif /* U_HIDE_DRAFT_API */
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* The length of the array contained in the LocalArray. The size must be
|
||||
* provided when the LocalArray is constructed.
|
||||
*
|
||||
* @return The length of the array, or -1 if unknown.
|
||||
* @draft ICU 67
|
||||
*/
|
||||
int32_t length() const { return fLength; }
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
private:
|
||||
int32_t fLength = -1;
|
||||
|
|
|
@ -31,6 +31,7 @@ U_NAMESPACE_BEGIN
|
|||
|
||||
class StringEnumeration;
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Enumeration for unit complexity. There are three levels:
|
||||
*
|
||||
|
@ -223,6 +224,7 @@ typedef enum UMeasureSIPrefix {
|
|||
*/
|
||||
UMEASURE_SI_PREFIX_YOCTO = -24
|
||||
} UMeasureSIPrefix;
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* A unit such as length, mass, volume, currency, etc. A unit is
|
||||
|
@ -253,6 +255,7 @@ class U_I18N_API MeasureUnit: public UObject {
|
|||
*/
|
||||
MeasureUnit(MeasureUnit &&other) noexcept;
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Construct a MeasureUnit from a CLDR Sequence Unit Identifier, defined in UTS 35.
|
||||
* Validates and canonicalizes the identifier.
|
||||
|
@ -266,6 +269,7 @@ class U_I18N_API MeasureUnit: public UObject {
|
|||
* @draft ICU 67
|
||||
*/
|
||||
static MeasureUnit forIdentifier(StringPiece identifier, UErrorCode& status);
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Copy assignment operator.
|
||||
|
@ -326,6 +330,7 @@ class U_I18N_API MeasureUnit: public UObject {
|
|||
*/
|
||||
const char *getSubtype() const;
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Get the CLDR Sequence Unit Identifier for this MeasureUnit, as defined in UTS 35.
|
||||
*
|
||||
|
@ -452,6 +457,7 @@ class U_I18N_API MeasureUnit: public UObject {
|
|||
* @return An array of compound units, owned by the caller.
|
||||
*/
|
||||
LocalArray<MeasureUnit> getCompoundUnits(UErrorCode& status) const;
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* getAvailable gets all of the available units.
|
||||
|
|
Loading…
Add table
Reference in a new issue