]> granicus.if.org Git - icu/commitdiff
Add U_HIDE_DRAFT_API
authorShane F. Carr <shane@unicode.org>
Fri, 17 Jan 2020 18:27:38 +0000 (19:27 +0100)
committerShane F. Carr <shane@unicode.org>
Fri, 17 Jan 2020 18:27:38 +0000 (19:27 +0100)
icu4c/source/common/unicode/localpointer.h
icu4c/source/i18n/unicode/measunit.h

index b6f8b15c7fbfd3dcc5770f9dc01b4e2f47f3e729..cf6782a007866d616cfb50821ac328d6ec7a5329 100644 (file)
@@ -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;
index 4ec0f62684f21b665510f94d3d78acdaba59524d..f3bc07fc417af146f63365c16058477aaf2a3eea 100644 (file)
@@ -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.