return *this;
}
+#ifndef U_HIDE_DRAFT_API
/**
* Returns the state of this trie as a 64-bit integer.
* The state value is never 0.
pos_ = bytes_ + (state & kState64PosMask);
return *this;
}
+#endif /* U_HIDE_DRAFT_API */
/**
* BytesTrie state object, for saving a trie's current state
*/
Locale build(UErrorCode& status);
+#ifndef U_HIDE_DRAFT_API
/**
* Sets the UErrorCode if an error occurred while recording sets.
* Preserves older error codes in the outErrorCode.
* @draft ICU 65
*/
UBool copyErrorTo(UErrorCode &outErrorCode) const;
+#endif /* U_HIDE_DRAFT_API */
private:
friend class LocaleMatcher::Result;
return *this;
}
+#ifndef U_HIDE_DRAFT_API
/**
* Returns the state of this trie as a 64-bit integer.
* The state value is never 0.
pos_ = uchars_ + (state & kState64PosMask);
return *this;
}
+#endif /* U_HIDE_DRAFT_API */
/**
* UCharsTrie state object, for saving a trie's current state
const UnicodeSet* inclusions,
UErrorCode &status);
-#ifndef U_HIDE_DRAFT_API // Skipped: ucpmap.h is draft only.
+ // UCPMap is now stable ICU 63
void applyIntPropertyValue(const UCPMap *map,
UCPMapValueFilter *filter, const void *context,
UErrorCode &errorCode);
-#endif /* U_HIDE_DRAFT_API */
/**
* Set the new pattern to cache.
* should only be called if this calendar is not lenient.
* @see #isLenient
* @see #validateField(int, int&)
- * @internal
*/
void validateFields(UErrorCode &status);
* <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);
* 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;
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);
*/
-#ifndef U_HIDE_DRAFT_API
+// 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.
/**
* Represents a span of a string containing a given field.
*
/** @draft ICU 64 */
~ConstrainedFieldPosition();
+#ifndef U_HIDE_DRAFT_API
/**
* Resets this ConstrainedFieldPosition to its initial state, as if it were newly created:
*
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;
};
-#endif // U_HIDE_DRAFT_API
-
+// 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.
*/
virtual Appendable& appendTo(Appendable& appendable, UErrorCode& status) const = 0;
-#ifndef U_HIDE_DRAFT_API
/**
* Iterates over field positions in the FormattedValue. This lets you determine the position
* of specific types of substrings, like a month or a decimal separator.
* @draft ICU 64
*/
virtual UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const = 0;
-#endif
};
class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
public:
-#ifndef U_HIDE_DRAFT_API
+ // Default constructor cannot have #ifndef U_HIDE_DRAFT_API
/**
* Default constructor; makes an empty FormattedNumber.
* @draft ICU 64
*/
FormattedNumber()
: fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {}
-#endif
+
/**
* Move constructor: Leaves the source FormattedNumber in an undefined state.
* @stable ICU 62
*/
Appendable &appendTo(Appendable& appendable, UErrorCode& status) const U_OVERRIDE;
-#ifndef U_HIDE_DRAFT_API
// Copydoc: this method is new in ICU 64
/** @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,
* @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
*/
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.
* @draft ICU 64
*/
LocalPointer<Derived> clone() &&;
+#endif /* U_HIDE_DRAFT_API */
/**
* Sets the UErrorCode if an error occurred in the fluent chain.
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.
*/
Appendable &appendTo(Appendable &appendable, UErrorCode& status) const U_OVERRIDE;
-#ifndef U_HIDE_DRAFT_API
// Copydoc: this method is new in ICU 64
/** @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,
/**
* Internal constructor from data type. Adopts the data pointer.
- * @internal
*/
explicit FormattedNumberRange(impl::UFormattedNumberRangeData *results)
: fData(results), fErrorCode(U_ZERO_ERROR) {}
private:
/**
- * @internal
+ * @internal (private)
*/
class U_I18N_API PluralSelector : public UMemory {
public:
* @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) {
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();
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.
* @draft ICU 64
*/
typedef struct UFormattedList UFormattedList;
+#endif /* U_HIDE_DRAFT_API */
+#ifndef U_HIDE_DRAFT_API
/**
* FieldPosition and UFieldPosition selectors for format fields
* defined by ListFormatter.