+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 2007-2014, International Business Machines Corporation and
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: PluralFormat object
* result and should delete it when done.
* @stable ICU 4.0
*/
- virtual Format* clone(void) const;
+ virtual PluralFormat* clone() const;
/**
* Formats a plural message for a number taken from a Formattable object.
*/
virtual UClassID getDynamicClassID() const;
-#if (defined(__xlC__) && (__xlC__ < 0x0C00)) || (U_PLATFORM == U_PF_OS390) || (U_PLATFORM ==U_PF_OS400)
-// Work around a compiler bug on xlC 11.1 on AIX 7.1 that would
-// prevent PluralSelectorAdapter from implementing private PluralSelector.
-// xlC error message:
-// 1540-0300 (S) The "private" member "class icu_49::PluralFormat::PluralSelector" cannot be accessed.
-public:
-#else
private:
-#endif
/**
- * @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();
PluralRules* pluralRules;
};
-#if defined(__xlC__)
-// End of xlC bug workaround, keep remaining definitions private.
-private:
-#endif
Locale locale;
MessagePattern msgPattern;
NumberFormat* numberFormat;
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.
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _PLURFMT
//eof