]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/unicode/plurfmt.h
ICU-66108.tar.gz
[apple/icu.git] / icuSources / i18n / unicode / plurfmt.h
index f7099d81e2314f22038f1d1927771c497cdcbf47..2c2116586f6e8419770e92e497afd7fca8643e05 100644 (file)
@@ -1,3 +1,5 @@
+// © 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
@@ -14,6 +16,8 @@
 
 #include "unicode/utypes.h"
 
+#if U_SHOW_CPLUSPLUS_API
+
 /**
  * \file
  * \brief C++ API: PluralFormat object
@@ -446,7 +450,7 @@ public:
      * 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.
@@ -518,17 +522,9 @@ public:
      */
      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:
@@ -540,14 +536,11 @@ private:
          * @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) {
@@ -555,17 +548,13 @@ private:
 
         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;
@@ -583,7 +572,7 @@ private:
     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.
@@ -611,5 +600,7 @@ U_NAMESPACE_END
 
 #endif /* #if !UCONFIG_NO_FORMATTING */
 
+#endif /* U_SHOW_CPLUSPLUS_API */
+
 #endif // _PLURFMT
 //eof