summaryrefslogtreecommitdiff
path: root/deps/icu-small/source/i18n/unicode/formattedvalue.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/icu-small/source/i18n/unicode/formattedvalue.h')
-rw-r--r--deps/icu-small/source/i18n/unicode/formattedvalue.h23
1 files changed, 19 insertions, 4 deletions
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__