]> granicus.if.org Git - icu/commitdiff
ICU-7468 Use C++ "using" in Format class hierarchy, so inheritance of format() and...
authorAndy Heninger <andy.heninger@gmail.com>
Thu, 21 Mar 2013 22:09:06 +0000 (22:09 +0000)
committerAndy Heninger <andy.heninger@gmail.com>
Thu, 21 Mar 2013 22:09:06 +0000 (22:09 +0000)
X-SVN-Rev: 33457

12 files changed:
icu4c/source/i18n/choicfmt.cpp
icu4c/source/i18n/decimfmt.cpp
icu4c/source/i18n/rbnf.cpp
icu4c/source/i18n/smpdtfmt.cpp
icu4c/source/i18n/unicode/choicfmt.h
icu4c/source/i18n/unicode/datefmt.h
icu4c/source/i18n/unicode/decimfmt.h
icu4c/source/i18n/unicode/msgfmt.h
icu4c/source/i18n/unicode/numfmt.h
icu4c/source/i18n/unicode/plurfmt.h
icu4c/source/i18n/unicode/rbnf.h
icu4c/source/i18n/unicode/smpdtfmt.h

index 79a722bdfee66984d414e4e7a44c2d09c35ef950..8c16fc7750ede9a264af067e1b9f2dca2c6958bb 100644 (file)
@@ -1,6 +1,6 @@
 /*
 *******************************************************************************
-* Copyright (C) 1997-2012, International Business Machines Corporation and    *
+* Copyright (C) 1997-2013, International Business Machines Corporation and    *
 * others. All Rights Reserved.                                                *
 *******************************************************************************
 *
@@ -490,18 +490,6 @@ ChoiceFormat::format(const Formattable* objs,
     return appendTo;
 }
 
-// -------------------------------------
-// Formats an array of objects. Checks if the data type of the objects
-// to get the right value for formatting.  
-
-UnicodeString&
-ChoiceFormat::format(const Formattable& obj, 
-                     UnicodeString& appendTo, 
-                     FieldPosition& pos,
-                     UErrorCode& status) const
-{
-    return NumberFormat::format(obj, appendTo, pos, status);
-}
 // -------------------------------------
 
 void
@@ -571,17 +559,6 @@ ChoiceFormat::matchStringUntilLimitPart(
     }
 }
 
-// -------------------------------------
-// Parses the text and return the Formattable object.  
-
-void
-ChoiceFormat::parse(const UnicodeString& text, 
-                    Formattable& result,
-                    UErrorCode& status) const
-{
-    NumberFormat::parse(text, result, status);
-}
-
 // -------------------------------------
 
 Format*
index de6e2ec3e222bb62c3e47d4cd4bb42b5685e150d..6c3a9825a2a69ede4960e9fc30f26ae82493ab37 100644 (file)
@@ -1492,15 +1492,6 @@ DecimalFormat::_format(const DigitList &number,
     return subformat(appendTo, handler, adjustedNum, FALSE, status);
 }
 
-UnicodeString&
-DecimalFormat::format(  const Formattable& obj,
-                        UnicodeString& appendTo,
-                        FieldPosition& fieldPosition,
-                        UErrorCode& status) const
-{
-    return NumberFormat::format(obj, appendTo, fieldPosition, status);
-}
-
 /**
  * Return true if a grouping separator belongs at the given
  * position, based on whether grouping is in use and the values of
@@ -1900,14 +1891,6 @@ void DecimalFormat::addPadding(UnicodeString& appendTo,
 
 //------------------------------------------------------------------------------
 
-void
-DecimalFormat::parse(const UnicodeString& text,
-                     Formattable& result,
-                     UErrorCode& status) const
-{
-    NumberFormat::parse(text, result, status);
-}
-
 void
 DecimalFormat::parse(const UnicodeString& text,
                      Formattable& result,
index 43be8581cd7c47acb19465c764f4bbbf02f96f03..682d449f38a6a6c53cc3ef29d7f2e593cb9b84cb 100644 (file)
@@ -1,6 +1,6 @@
 /*
 *******************************************************************************
-* Copyright (C) 1997-2012, International Business Machines Corporation
+* Copyright (C) 1997-2013, International Business Machines Corporation
 * and others. All Rights Reserved.
 *******************************************************************************
 */
@@ -1110,16 +1110,6 @@ RuleBasedNumberFormat::format(int64_t number,
 }
 
 
-// make linker happy
-UnicodeString&
-RuleBasedNumberFormat::format(const Formattable& obj,
-                              UnicodeString& toAppendTo,
-                              FieldPosition& pos,
-                              UErrorCode& status) const
-{
-    return NumberFormat::format(obj, toAppendTo, pos, status);
-}
-
 UnicodeString&
 RuleBasedNumberFormat::format(double number,
                               const UnicodeString& ruleSetName,
index 8ebd0d171f263ec5504073141c1d2b07360ddf92..56bb041c008a77d5795713a8084b76d999cc087b 100644 (file)
@@ -2037,21 +2037,6 @@ ExitParse:
     }
 }
 
-UDate
-SimpleDateFormat::parse( const UnicodeString& text,
-                         ParsePosition& pos) const {
-    // redefined here because the other parse() function hides this function's
-    // cunterpart on DateFormat
-    return DateFormat::parse(text, pos);
-}
-
-UDate
-SimpleDateFormat::parse(const UnicodeString& text, UErrorCode& status) const
-{
-    // redefined here because the other parse() function hides this function's
-    // counterpart on DateFormat
-    return DateFormat::parse(text, status);
-}
 //----------------------------------------------------------------------
 
 static UBool
index 5de7826c22d57b0ebe46a4048a114f7060497c90..cfd520624dc53aec3ab8c1ad2fe147d003f07fc4 100644 (file)
@@ -1,6 +1,6 @@
 /*
 ********************************************************************************
-*   Copyright (C) 1997-2011, International Business Machines
+*   Copyright (C) 1997-2013, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 ********************************************************************************
 *
@@ -420,67 +420,8 @@ public:
                                   UnicodeString& appendTo,
                                   FieldPosition& pos,
                                   UErrorCode& success) const;
-    /**
-     * Formats an object using this object's choices.
-     *
-     *
-     * @param obj       The object to be formatted.
-     * @param appendTo  Output parameter to receive result.
-     *                  Result is appended to existing contents.
-     * @param pos       On input: an alignment field, if desired.
-     *                  On output: the offsets of the alignment field.
-     * @param status    Output param set to success/failure code on
-     *                  exit.
-     * @return          Reference to 'appendTo' parameter.
-     * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
-     */
-    virtual UnicodeString& format(const Formattable& obj,
-                                  UnicodeString& appendTo,
-                                  FieldPosition& pos,
-                                  UErrorCode& status) const;
-
-    /**
-     * Redeclared NumberFormat method.
-     *
-     * @param obj       The object to be formatted.
-     * @param appendTo  Output parameter to receive result.
-     *                  Result is appended to existing contents.
-     * @param status    Output param set to success/failure code on
-     *                  exit.
-     * @return          Reference to 'appendTo' parameter.
-     * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
-     */
-    UnicodeString& format(const Formattable& obj,
-                          UnicodeString& appendTo,
-                          UErrorCode& status) const;
-
-    /**
-     * Redeclared NumberFormat method.
-     * Formats a double number. These methods call the NumberFormat
-     * pure virtual format() methods with the default FieldPosition.
-     *
-     * @param number    The value to be formatted.
-     * @param appendTo  Output parameter to receive result.
-     *                  Result is appended to existing contents.
-     * @return          Reference to 'appendTo' parameter.
-     * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
-     */
-    UnicodeString& format(  double number,
-                            UnicodeString& appendTo) const;
 
-    /**
-     * Redeclared NumberFormat method.
-     * Formats an int32_t number. These methods call the NumberFormat
-     * pure virtual format() methods with the default FieldPosition.
-     *
-     * @param number    The value to be formatted.
-     * @param appendTo  Output parameter to receive result.
-     *                  Result is appended to existing contents.
-     * @return          Reference to 'appendTo' parameter.
-     * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
-     */
-    UnicodeString& format(  int32_t number,
-                            UnicodeString& appendTo) const;
+   using NumberFormat::parse;
 
    /**
     * Looks for the longest match of any message string on the input text and,
@@ -500,22 +441,6 @@ public:
                        Formattable& result,
                        ParsePosition& parsePosition) const;
 
-    /**
-     * Looks for the longest match of any message string on the input text and,
-     * if there is a match, sets the result object to the corresponding range's number.
-     *
-     * If no string matches, then the UErrorCode is set to U_INVALID_FORMAT_ERROR.
-     *
-     * @param text           The text to be parsed.
-     * @param result         Formattable to be set to the parse result.
-     *                       If parse fails, return contents are undefined.
-     * @param status         Output param with the formatted string.
-     * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
-     */
-    virtual void parse(const UnicodeString& text,
-                       Formattable& result,
-                       UErrorCode& status) const;
-
     /**
      * Returns a unique class ID POLYMORPHICALLY. Part of ICU's "poor man's RTTI".
      *
@@ -659,26 +584,7 @@ private:
     // int32_t         fCount;
 };
 
-inline UnicodeString&
-ChoiceFormat::format(const Formattable& obj,
-                     UnicodeString& appendTo,
-                     UErrorCode& status) const {
-    // Don't use Format:: - use immediate base class only,
-    // in case immediate base modifies behavior later.
-    return NumberFormat::format(obj, appendTo, status);
-}
-
-inline UnicodeString&
-ChoiceFormat::format(double number,
-                     UnicodeString& appendTo) const {
-    return NumberFormat::format(number, appendTo);
-}
-
-inline UnicodeString&
-ChoiceFormat::format(int32_t number,
-                     UnicodeString& appendTo) const {
-    return NumberFormat::format(number, appendTo);
-}
+
 U_NAMESPACE_END
 
 #endif  // U_HIDE_DEPRECATED_API
index 14f40e35ba033dfe6b8834171d4d73a50ab2155d..1741c64541f0bd6fb950b2554cfb95cf6cb8c787 100644 (file)
@@ -1,6 +1,6 @@
 /*
  ********************************************************************************
- *   Copyright (C) 1997-2012, International Business Machines
+ *   Copyright (C) 1997-2013, International Business Machines
  *   Corporation and others.  All Rights Reserved.
  ********************************************************************************
  *
@@ -372,20 +372,6 @@ public:
      */
     UnicodeString& format(UDate date, UnicodeString& appendTo) const;
 
-    /**
-     * Redeclared Format method.
-     *
-     * @param obj       The object to be formatted into a string.
-     * @param appendTo  Output parameter to receive result.
-     *                  Result is appended to existing contents.
-     * @param status    Output param filled with success/failure status.
-     * @return          Reference to 'appendTo' parameter.
-     * @stable ICU 2.0
-     */
-    UnicodeString& format(const Formattable& obj,
-                          UnicodeString& appendTo,
-                          UErrorCode& status) const;
-
     /**
      * Parse a date/time string. For example, a time text "07/10/96 4:5 PM, PDT"
      * will be parsed into a UDate that is equivalent to Date(837039928046).
@@ -781,12 +767,6 @@ public:
 #endif  /* U_HIDE_OBSOLETE_API */
 };
 
-inline UnicodeString&
-DateFormat::format(const Formattable& obj,
-                   UnicodeString& appendTo,
-                   UErrorCode& status) const {
-    return Format::format(obj, appendTo, status);
-}
 U_NAMESPACE_END
 
 #endif /* #if !UCONFIG_NO_FORMATTING */
index d5a6852c146e90d42dec074b5f417dc50c1e4ac2..cbe559a7fd011911c57c51a9db8f0190866927cc 100644 (file)
@@ -1104,79 +1104,8 @@ public:
                                   FieldPosition& pos,
                                   UErrorCode& status) const;
 
+   using NumberFormat::parse;
 
-    /**
-     * Format a Formattable using base-10 representation.
-     *
-     * @param obj       The value to be formatted.
-     * @param appendTo  Output parameter to receive result.
-     *                  Result is appended to existing contents.
-     * @param pos       On input: an alignment field, if desired.
-     *                  On output: the offsets of the alignment field.
-     * @param status    Error code indicating success or failure.
-     * @return          Reference to 'appendTo' parameter.
-     * @stable ICU 2.0
-     */
-    virtual UnicodeString& format(const Formattable& obj,
-                                  UnicodeString& appendTo,
-                                  FieldPosition& pos,
-                                  UErrorCode& status) const;
-
-    /**
-     * Redeclared NumberFormat method.
-     * Formats an object to produce a string.
-     *
-     * @param obj       The object to format.
-     * @param appendTo  Output parameter to receive result.
-     *                  Result is appended to existing contents.
-     * @param status    Output parameter filled in with success or failure status.
-     * @return          Reference to 'appendTo' parameter.
-     * @stable ICU 2.0
-     */
-    UnicodeString& format(const Formattable& obj,
-                          UnicodeString& appendTo,
-                          UErrorCode& status) const;
-
-    /**
-     * Redeclared NumberFormat method.
-     * Format a double number.
-     *
-     * @param number    The value to be formatted.
-     * @param appendTo  Output parameter to receive result.
-     *                  Result is appended to existing contents.
-     * @return          Reference to 'appendTo' parameter.
-     * @stable ICU 2.0
-     */
-    UnicodeString& format(double number,
-                          UnicodeString& appendTo) const;
-
-    /**
-     * Redeclared NumberFormat method.
-     * Format a long number. These methods call the NumberFormat
-     * pure virtual format() methods with the default FieldPosition.
-     *
-     * @param number    The value to be formatted.
-     * @param appendTo  Output parameter to receive result.
-     *                  Result is appended to existing contents.
-     * @return          Reference to 'appendTo' parameter.
-     * @stable ICU 2.0
-     */
-    UnicodeString& format(int32_t number,
-                          UnicodeString& appendTo) const;
-
-    /**
-     * Redeclared NumberFormat method.
-     * Format an int64 number. These methods call the NumberFormat
-     * pure virtual format() methods with the default FieldPosition.
-     *
-     * @param number    The value to be formatted.
-     * @param appendTo  Output parameter to receive result.
-     *                  Result is appended to existing contents.
-     * @return          Reference to 'appendTo' parameter.
-     * @stable ICU 2.8
-     */
-    UnicodeString& format(int64_t number,
-                          UnicodeString& appendTo) const;
    /**
     * Parse the given string using this object's choices. The method
     * does string comparisons to try to find an optimal match.
@@ -1200,19 +1129,6 @@ public:
                        Formattable& result,
                        ParsePosition& parsePosition) const;
 
-    // Declare here again to get rid of function hiding problems.
-    /**
-     * Parse the given string using this object's choices.
-     *
-     * @param text           The text to be parsed.
-     * @param result         Formattable to be set to the parse result.
-     * @param status    Output parameter filled in with success or failure status.
-     * @stable ICU 2.0
-     */
-    virtual void parse(const UnicodeString& text,
-                       Formattable& result,
-                       UErrorCode& status) const;
-
     /**
      * Parses text from the given string as a currency amount.  Unlike
      * the parse() method, this method will attempt to parse a generic
@@ -2437,29 +2353,6 @@ protected:
 #endif
 };
 
-inline UnicodeString&
-DecimalFormat::format(const Formattable& obj,
-                      UnicodeString& appendTo,
-                      UErrorCode& status) const {
-    // Don't use Format:: - use immediate base class only,
-    // in case immediate base modifies behavior later.
-    return NumberFormat::format(obj, appendTo, status);
-}
-
-inline UnicodeString&
-DecimalFormat::format(double number,
-                      UnicodeString& appendTo) const {
-    FieldPosition pos(0);
-    return format(number, appendTo, pos);
-}
-
-inline UnicodeString&
-DecimalFormat::format(int32_t number,
-                      UnicodeString& appendTo) const {
-    FieldPosition pos(0);
-    return format((int64_t)number, appendTo, pos);
-}
-
 inline const UnicodeString &
 DecimalFormat::getConstSymbol(DecimalFormatSymbols::ENumberFormatSymbol symbol) const {
     return fSymbols->getConstSymbol(symbol);
index 9988e0026b6c57ce284a0682a28f5ac81e3eb53e..652605d9fcafe998bf55c8ad8133327c61819b72 100644 (file)
@@ -1,5 +1,5 @@
 /*
-* Copyright (C) 2007-2012, International Business Machines Corporation and
+* Copyright (C) 2007-2013, International Business Machines Corporation and
 * others. All Rights Reserved.
 ********************************************************************************
 *
@@ -695,25 +695,6 @@ public:
                                   FieldPosition& pos,
                                   UErrorCode& status) const;
 
-    /**
-     * Formats the given array of arguments into a user-readable
-     * string.  The array must be stored within a single Formattable
-     * object of type kArray. If the Formattable object type is not of
-     * type kArray, then returns a failing UErrorCode.
-     *
-     * @param obj       The object to format
-     * @param appendTo  Output parameter to receive result.
-     *                  Result is appended to existing contents.
-     * @param status    Input/output error code.  If the
-     *                  pattern cannot be parsed, set to failure code.
-     * @return          Reference to 'appendTo' parameter.
-     * @stable ICU 2.0
-     */
-    UnicodeString& format(const Formattable& obj,
-                          UnicodeString& appendTo,
-                          UErrorCode& status) const;
-
-
     /**
      * Formats the given array of arguments into a user-defined argument name
      * array. This function supports both named and numbered
@@ -1092,14 +1073,6 @@ private:
     friend class MessageFormatAdapter; // getFormatTypeList() access
 };
 
-inline UnicodeString&
-MessageFormat::format(const Formattable& obj,
-                      UnicodeString& appendTo,
-                      UErrorCode& status) const {
-    return Format::format(obj, appendTo, status);
-}
-
-
 U_NAMESPACE_END
 
 #endif /* #if !UCONFIG_NO_FORMATTING */
index 86d2b5be2cfc4d8318a4c155d9043f1f06aa4ba1..b482be6c2dd75021209c531486bb162d0a09f379 100644 (file)
@@ -569,20 +569,6 @@ public:
 
 public:
 
-    /**
-     * Redeclared Format method.
-     * @param obj       The object to be formatted.
-     * @param appendTo  Output parameter to receive result.
-     *                  Result is appended to existing contents.
-     * @param status    Output parameter set to a failure error code
-     *                  when a failure occurs.
-     * @return          Reference to 'appendTo' parameter.
-     * @stable ICU 2.0
-     */
-    UnicodeString& format(const Formattable& obj,
-                          UnicodeString& appendTo,
-                          UErrorCode& status) const;
-
    /**
     * Return a long if possible (e.g. within range LONG_MAX,
     * LONG_MAX], and with no decimals), otherwise a double.  If
@@ -1127,13 +1113,6 @@ NumberFormat::isLenient() const
     return fLenient;
 }
 
-inline UnicodeString&
-NumberFormat::format(const Formattable& obj,
-                     UnicodeString& appendTo,
-                     UErrorCode& status) const {
-    return Format::format(obj, appendTo, status);
-}
-
 U_NAMESPACE_END
 
 #endif /* #if !UCONFIG_NO_FORMATTING */
index 0e45b0bfea76af24285e0a6428b04ad7a2023556..71909f47eedf0a730e49b0f00b0659b507cd2175 100644 (file)
@@ -450,10 +450,12 @@ public:
      */
     virtual Format* clone(void) const;
 
-    /**
-    * Redeclared Format method.
+   /**
+    * Formats a plural message for a number taken from a Formattable object.
     *
-    * @param obj       The object to be formatted into a string.
+    * @param obj       The object containing a number for which the 
+    *                  plural message should be formatted.
+    *                  The object must be of a numeric type.
     * @param appendTo  output parameter to receive result.
     *                  Result is appended to existing contents.
     * @param pos       On input: an alignment field, if desired.
index 473af3c3c0f9f9973b137403414361329e5f9616..880c740d81ce68f037c44b80cdad9183a1bfec8b 100644 (file)
@@ -808,50 +808,7 @@ public:
                                 FieldPosition& pos,
                                 UErrorCode& status) const;
 
-  /**
-   * Formats the specified number using the default ruleset.
-   * @param obj The number to format.
-   * @param toAppendTo the string that will hold the (appended) result
-   * @param pos the fieldposition
-   * @param status the status
-   * @return A textual representation of the number.
-   * @stable ICU 2.0
-   */
-  virtual UnicodeString& format(const Formattable& obj,
-                                UnicodeString& toAppendTo,
-                                FieldPosition& pos,
-                                UErrorCode& status) const;
-  /**
-   * Redeclared Format method.
-   * @param obj    the object to be formatted.
-   * @param result Output param which will receive the formatted string.
-   * @param status Output param set to success/failure code
-   * @return       A reference to 'result'.
-   * @stable ICU 2.0
-   */
-  UnicodeString& format(const Formattable& obj,
-                        UnicodeString& result,
-                        UErrorCode& status) const;
-
-  /**
-   * Redeclared NumberFormat method.
-   * @param number    the double value to be formatted.
-   * @param output    Output param which will receive the formatted string.
-   * @return          A reference to 'output'.
-   * @stable ICU 2.0
-   */
-   UnicodeString& format(double number,
-                         UnicodeString& output) const;
-
-  /**
-   * Redeclared NumberFormat method.
-   * @param number    the long value to be formatted.
-   * @param output    Output param which will receive the formatted string.
-   * @return          A reference to 'output'.
-   * @stable ICU 2.0
-   */
-   UnicodeString& format(int32_t number,
-                         UnicodeString& output) const;
+  using NumberFormat::parse;
 
   /**
    * Parses the specfied string, beginning at the specified position, according
@@ -871,18 +828,6 @@ public:
                      Formattable& result,
                      ParsePosition& parsePosition) const;
 
-
-  /**
-   * Redeclared Format method.
-   * @param text   The string to parse
-   * @param result the result of the parse, either a double or a long.
-   * @param status Output param set to failure code when a problem occurs.
-   * @stable ICU 2.0
-   */
-  virtual inline void parse(const UnicodeString& text,
-                      Formattable& result,
-                      UErrorCode& status) const;
-
 #if !UCONFIG_NO_COLLATION
 
   /**
@@ -1024,37 +969,6 @@ private:
 
 // ---------------
 
-inline UnicodeString&
-RuleBasedNumberFormat::format(const Formattable& obj,
-                              UnicodeString& result,
-                              UErrorCode& status) const
-{
-    // Don't use Format:: - use immediate base class only,
-    // in case immediate base modifies behavior later.
-    // dlf - the above comment is bogus, if there were a reason to modify
-    // it, it would be virtual, and there's no reason because it is
-    // a one-line macro in NumberFormat anyway, just like this one.
-    return NumberFormat::format(obj, result, status);
-}
-
-inline UnicodeString&
-RuleBasedNumberFormat::format(double number, UnicodeString& output) const {
-    FieldPosition pos(0);
-    return format(number, output, pos);
-}
-
-inline UnicodeString&
-RuleBasedNumberFormat::format(int32_t number, UnicodeString& output) const {
-    FieldPosition pos(0);
-    return format(number, output, pos);
-}
-
-inline void
-RuleBasedNumberFormat::parse(const UnicodeString& text, Formattable& result, UErrorCode& status) const
-{
-    NumberFormat::parse(text, result, status);
-}
-
 #if !UCONFIG_NO_COLLATION
 
 inline UBool
index 6d1c35752137dfa9878ce481cac1414baa89c7d9..7555d722e83cc7f90d90903a895c67726ba7332b 100644 (file)
@@ -901,108 +901,7 @@ public:
                                     FieldPositionIterator* posIter,
                                     UErrorCode& status) const;
 
-    /**
-     * Format a date or time, which is the standard millis since 24:00 GMT, Jan
-     * 1, 1970. Overrides DateFormat pure virtual method.
-     * <P>
-     * Example: using the US locale: "yyyy.MM.dd e 'at' HH:mm:ss zzz" ->>
-     * 1996.07.10 AD at 15:08:56 PDT
-     *
-     * @param obj       A Formattable containing the date-time value to be formatted
-     *                  into a date-time string.  If the type of the Formattable
-     *                  is a numeric type, it is treated as if it were an
-     *                  instance of Date.
-     * @param appendTo  Output parameter to receive result.
-     *                  Result is appended to existing contents.
-     * @param pos       The formatting position. On input: an alignment field,
-     *                  if desired. On output: the offsets of the alignment field.
-     * @param status    Input/output param set to success/failure code.
-     * @return          Reference to 'appendTo' parameter.
-     * @stable ICU 2.0
-     */
-    virtual UnicodeString& format(  const Formattable& obj,
-                                    UnicodeString& appendTo,
-                                    FieldPosition& pos,
-                                    UErrorCode& status) const;
-
-    /**
-     * Format a date or time, which is the standard millis since 24:00 GMT, Jan
-     * 1, 1970. Overrides DateFormat pure virtual method.
-     * <P>
-     * Example: using the US locale: "yyyy.MM.dd e 'at' HH:mm:ss zzz" ->>
-     * 1996.07.10 AD at 15:08:56 PDT
-     *
-     * @param obj       A Formattable containing the date-time value to be formatted
-     *                  into a date-time string.  If the type of the Formattable
-     *                  is a numeric type, it is treated as if it were an
-     *                  instance of Date.
-     * @param appendTo  Output parameter to receive result.
-     *                  Result is appended to existing contents.
-     * @param posIter   On return, can be used to iterate over positions
-     *                  of fields generated by this format call.  Field values
-     *                  are defined in UDateFormatField.
-     * @param status    Input/output param set to success/failure code.
-     * @return          Reference to 'appendTo' parameter.
-     * @stable ICU 4.4
-     */
-    virtual UnicodeString& format(  const Formattable& obj,
-                                    UnicodeString& appendTo,
-                                    FieldPositionIterator* posIter,
-                                    UErrorCode& status) const;
-
-    /**
-     * Redeclared DateFormat method.
-     * @param date          the Date value to be formatted.
-     * @param appendTo      Output parameter to receive result.
-     *                      Result is appended to existing contents.
-     * @param fieldPosition The formatting position. On input: an alignment field,
-     *                      if desired. On output: the offsets of the alignment field.
-     * @return              Reference to 'appendTo' parameter.
-     * @stable ICU 2.1
-     */
-    UnicodeString& format(UDate date,
-                          UnicodeString& appendTo,
-                          FieldPosition& fieldPosition) const;
-
-    /**
-     * Redeclared DateFormat method.
-     * @param date          the Date value to be formatted.
-     * @param appendTo      Output parameter to receive result.
-     *                      Result is appended to existing contents.
-     * @param posIter       On return, can be used to iterate over positions
-     *                      of fields generated by this format call.  Field values
-     *                      are defined in UDateFormatField.
-     * @param status        Input/output param set to success/failure code.
-     * @return              Reference to 'appendTo' parameter.
-     * @stable ICU 4.4
-     */
-    UnicodeString& format(UDate date,
-                          UnicodeString& appendTo,
-                          FieldPositionIterator* posIter,
-                          UErrorCode& status) const;
-
-    /**
-     * Redeclared DateFormat method.
-     * @param obj       Object to be formatted.
-     * @param appendTo  Output parameter to receive result.
-     *                  Result is appended to existing contents.
-     * @param status    Input/output success/failure code.
-     * @return          Reference to 'appendTo' parameter.
-     * @stable ICU 2.0
-     */
-    UnicodeString& format(const Formattable& obj,
-                          UnicodeString& appendTo,
-                          UErrorCode& status) const;
-
-    /**
-     * Redeclared DateFormat method.
-     * @param date      Date value to be formatted.
-     * @param appendTo  Output parameter to receive result.
-     *                  Result is appended to existing contents.
-     * @return          Reference to 'appendTo' parameter.
-     * @stable ICU 2.0
-     */
-    UnicodeString& format(UDate date, UnicodeString& appendTo) const;
+    using DateFormat::parse;
 
     /**
      * Parse a date/time string beginning at the given parse position. For
@@ -1034,75 +933,6 @@ public:
                         Calendar& cal,
                         ParsePosition& pos) const;
 
-    /**
-     * Parse a date/time string starting at the given parse position. For
-     * example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Date
-     * that is equivalent to Date(837039928046).
-     * <P>
-     * By default, parsing is lenient: If the input is not in the form used by
-     * this object's format method but can still be parsed as a date, then the
-     * parse succeeds. Clients may insist on strict adherence to the format by
-     * calling setLenient(false).
-     * @see DateFormat::setLenient(boolean)
-     * <P>
-     * Note that the normal date formats associated with some calendars - such
-     * as the Chinese lunar calendar - do not specify enough fields to enable
-     * dates to be parsed unambiguously. In the case of the Chinese lunar
-     * calendar, while the year within the current 60-year cycle is specified,
-     * the number of such cycles since the start date of the calendar (in the
-     * ERA field of the Calendar object) is not normally part of the format,
-     * and parsing may assume the wrong era. For cases such as this it is
-     * recommended that clients parse using the method
-     * parse(const UnicodeString&, Calendar& cal, ParsePosition&)
-     * with the Calendar passed in set to the current date, or to a date
-     * within the era/cycle that should be assumed if absent in the format.
-     *
-     * @param text  The date/time string to be parsed
-     * @param pos   On input, the position at which to start parsing; on
-     *              output, the position at which parsing terminated, or the
-     *              start position if the parse failed.
-     * @return      A valid UDate if the input could be parsed.
-     * @stable ICU 2.0
-     */
-    UDate parse( const UnicodeString& text,
-                 ParsePosition& pos) const;
-
-
-    /**
-     * Parse a date/time string. For example, a time text "07/10/96 4:5 PM, PDT"
-     * will be parsed into a UDate that is equivalent to Date(837039928046).
-     * Parsing begins at the beginning of the string and proceeds as far as
-     * possible.  Assuming no parse errors were encountered, this function
-     * doesn't return any information about how much of the string was consumed
-     * by the parsing.  If you need that information, use the version of
-     * parse() that takes a ParsePosition.
-     * <P>
-     * By default, parsing is lenient: If the input is not in the form used by
-     * this object's format method but can still be parsed as a date, then the
-     * parse succeeds. Clients may insist on strict adherence to the format by
-     * calling setLenient(false).
-     * @see DateFormat::setLenient(boolean)
-     * <P>
-     * Note that the normal date formats associated with some calendars - such
-     * as the Chinese lunar calendar - do not specify enough fields to enable
-     * dates to be parsed unambiguously. In the case of the Chinese lunar
-     * calendar, while the year within the current 60-year cycle is specified,
-     * the number of such cycles since the start date of the calendar (in the
-     * ERA field of the Calendar object) is not normally part of the format,
-     * and parsing may assume the wrong era. For cases such as this it is
-     * recommended that clients parse using the method
-     * parse(const UnicodeString&, Calendar& cal, ParsePosition&)
-     * with the Calendar passed in set to the current date, or to a date
-     * within the era/cycle that should be assumed if absent in the format.
-     *
-     * @param text  The date/time string to be parsed into a UDate value.
-     * @param status Filled in with U_ZERO_ERROR if the parse was successful, and with
-     *              an error value if there was a parse error.
-     * @return      A valid UDate if the input could be parsed.
-     * @stable ICU 2.0
-     */
-    virtual UDate parse( const UnicodeString& text,
-                        UErrorCode& status) const;
 
     /**
      * Set the start UDate used to interpret two-digit year strings.
@@ -1714,61 +1544,6 @@ SimpleDateFormat::get2DigitYearStart(UErrorCode& /*status*/) const
     return fDefaultCenturyStart;
 }
 
-inline UnicodeString&
-SimpleDateFormat::format(const Formattable& obj,
-                         UnicodeString& appendTo,
-                         UErrorCode& status) const {
-    // Don't use Format:: - use immediate base class only,
-    // in case immediate base modifies behavior later.
-    return DateFormat::format(obj, appendTo, status);
-}
-
-inline UnicodeString&
-SimpleDateFormat::format(const Formattable& obj,
-                         UnicodeString& appendTo,
-                         FieldPosition& pos,
-                         UErrorCode& status) const
-{
-    // Don't use Format:: - use immediate base class only,
-    // in case immediate base modifies behavior later.
-    return DateFormat::format(obj, appendTo, pos, status);
-}
-
-inline UnicodeString&
-SimpleDateFormat::format(const Formattable& obj,
-                         UnicodeString& appendTo,
-                         FieldPositionIterator* posIter,
-                         UErrorCode& status) const
-{
-    // Don't use Format:: - use immediate base class only,
-    // in case immediate base modifies behavior later.
-    return DateFormat::format(obj, appendTo, posIter, status);
-}
-
-inline UnicodeString&
-SimpleDateFormat::format(UDate date,
-                         UnicodeString& appendTo,
-                         FieldPosition& fieldPosition) const {
-    // Don't use Format:: - use immediate base class only,
-    // in case immediate base modifies behavior later.
-    return DateFormat::format(date, appendTo, fieldPosition);
-}
-
-inline UnicodeString&
-SimpleDateFormat::format(UDate date,
-                         UnicodeString& appendTo,
-                         FieldPositionIterator* posIter,
-                         UErrorCode& status) const {
-    // Don't use Format:: - use immediate base class only,
-    // in case immediate base modifies behavior later.
-    return DateFormat::format(date, appendTo, posIter, status);
-}
-
-inline UnicodeString&
-SimpleDateFormat::format(UDate date, UnicodeString& appendTo) const {
-    return DateFormat::format(date, appendTo);
-}
-
 U_NAMESPACE_END
 
 #endif /* #if !UCONFIG_NO_FORMATTING */