12e5b6d6dSopenharmony_ci// © 2016 and later: Unicode, Inc. and others.
22e5b6d6dSopenharmony_ci// License & terms of use: http://www.unicode.org/copyright.html
32e5b6d6dSopenharmony_ci/*
42e5b6d6dSopenharmony_ci*******************************************************************************
52e5b6d6dSopenharmony_ci* Copyright (C) 2007-2016, International Business Machines Corporation and    *
62e5b6d6dSopenharmony_ci* others. All Rights Reserved.                                                *
72e5b6d6dSopenharmony_ci*******************************************************************************
82e5b6d6dSopenharmony_ci*/
92e5b6d6dSopenharmony_ci
102e5b6d6dSopenharmony_ci#ifndef RELDTFMT_H
112e5b6d6dSopenharmony_ci#define RELDTFMT_H
122e5b6d6dSopenharmony_ci
132e5b6d6dSopenharmony_ci#include "unicode/utypes.h"
142e5b6d6dSopenharmony_ci
152e5b6d6dSopenharmony_ci/**
162e5b6d6dSopenharmony_ci * \file
172e5b6d6dSopenharmony_ci * \brief C++ API: Format and parse relative dates and times.
182e5b6d6dSopenharmony_ci */
192e5b6d6dSopenharmony_ci
202e5b6d6dSopenharmony_ci#if !UCONFIG_NO_FORMATTING
212e5b6d6dSopenharmony_ci
222e5b6d6dSopenharmony_ci#include "unicode/datefmt.h"
232e5b6d6dSopenharmony_ci#include "unicode/smpdtfmt.h"
242e5b6d6dSopenharmony_ci#include "unicode/brkiter.h"
252e5b6d6dSopenharmony_ci
262e5b6d6dSopenharmony_ciU_NAMESPACE_BEGIN
272e5b6d6dSopenharmony_ci
282e5b6d6dSopenharmony_ci// forward declarations
292e5b6d6dSopenharmony_ciclass DateFormatSymbols;
302e5b6d6dSopenharmony_ciclass SimpleFormatter;
312e5b6d6dSopenharmony_ci
322e5b6d6dSopenharmony_ci// internal structure used for caching strings
332e5b6d6dSopenharmony_cistruct URelativeString;
342e5b6d6dSopenharmony_ci
352e5b6d6dSopenharmony_ci/**
362e5b6d6dSopenharmony_ci * This class is normally accessed using the kRelative or k...Relative values of EStyle as
372e5b6d6dSopenharmony_ci * parameters to DateFormat::createDateInstance.
382e5b6d6dSopenharmony_ci *
392e5b6d6dSopenharmony_ci * Example:
402e5b6d6dSopenharmony_ci *     DateFormat *fullrelative = DateFormat::createDateInstance(DateFormat::kFullRelative, loc);
412e5b6d6dSopenharmony_ci *
422e5b6d6dSopenharmony_ci * @internal ICU 3.8
432e5b6d6dSopenharmony_ci */
442e5b6d6dSopenharmony_ci
452e5b6d6dSopenharmony_ciclass RelativeDateFormat : public DateFormat {
462e5b6d6dSopenharmony_cipublic:
472e5b6d6dSopenharmony_ci    RelativeDateFormat( UDateFormatStyle timeStyle, UDateFormatStyle dateStyle, const Locale& locale, UErrorCode& status);
482e5b6d6dSopenharmony_ci
492e5b6d6dSopenharmony_ci    // overrides
502e5b6d6dSopenharmony_ci    /**
512e5b6d6dSopenharmony_ci     * Copy constructor.
522e5b6d6dSopenharmony_ci     * @internal ICU 3.8
532e5b6d6dSopenharmony_ci     */
542e5b6d6dSopenharmony_ci    RelativeDateFormat(const RelativeDateFormat&);
552e5b6d6dSopenharmony_ci
562e5b6d6dSopenharmony_ci    /**
572e5b6d6dSopenharmony_ci     * Assignment operator.
582e5b6d6dSopenharmony_ci     * @internal ICU 3.8
592e5b6d6dSopenharmony_ci     */
602e5b6d6dSopenharmony_ci    RelativeDateFormat& operator=(const RelativeDateFormat&);
612e5b6d6dSopenharmony_ci
622e5b6d6dSopenharmony_ci    /**
632e5b6d6dSopenharmony_ci     * Destructor.
642e5b6d6dSopenharmony_ci     * @internal ICU 3.8
652e5b6d6dSopenharmony_ci     */
662e5b6d6dSopenharmony_ci    virtual ~RelativeDateFormat();
672e5b6d6dSopenharmony_ci
682e5b6d6dSopenharmony_ci    /**
692e5b6d6dSopenharmony_ci     * Clone this Format object polymorphically. The caller owns the result and
702e5b6d6dSopenharmony_ci     * should delete it when done.
712e5b6d6dSopenharmony_ci     * @return    A copy of the object.
722e5b6d6dSopenharmony_ci     * @internal ICU 3.8
732e5b6d6dSopenharmony_ci     */
742e5b6d6dSopenharmony_ci    virtual RelativeDateFormat* clone() const override;
752e5b6d6dSopenharmony_ci
762e5b6d6dSopenharmony_ci    /**
772e5b6d6dSopenharmony_ci     * Return true if the given Format objects are semantically equal. Objects
782e5b6d6dSopenharmony_ci     * of different subclasses are considered unequal.
792e5b6d6dSopenharmony_ci     * @param other    the object to be compared with.
802e5b6d6dSopenharmony_ci     * @return         true if the given Format objects are semantically equal.
812e5b6d6dSopenharmony_ci     * @internal ICU 3.8
822e5b6d6dSopenharmony_ci     */
832e5b6d6dSopenharmony_ci    virtual bool operator==(const Format& other) const override;
842e5b6d6dSopenharmony_ci
852e5b6d6dSopenharmony_ci
862e5b6d6dSopenharmony_ci    using DateFormat::format;
872e5b6d6dSopenharmony_ci
882e5b6d6dSopenharmony_ci    /**
892e5b6d6dSopenharmony_ci     * Format a date or time, which is the standard millis since 24:00 GMT, Jan
902e5b6d6dSopenharmony_ci     * 1, 1970. Overrides DateFormat pure virtual method.
912e5b6d6dSopenharmony_ci     * <P>
922e5b6d6dSopenharmony_ci     * Example: using the US locale: "yyyy.MM.dd e 'at' HH:mm:ss zzz" ->>
932e5b6d6dSopenharmony_ci     * 1996.07.10 AD at 15:08:56 PDT
942e5b6d6dSopenharmony_ci     *
952e5b6d6dSopenharmony_ci     * @param cal       Calendar set to the date and time to be formatted
962e5b6d6dSopenharmony_ci     *                  into a date/time string.
972e5b6d6dSopenharmony_ci     * @param appendTo  Output parameter to receive result.
982e5b6d6dSopenharmony_ci     *                  Result is appended to existing contents.
992e5b6d6dSopenharmony_ci     * @param pos       The formatting position. On input: an alignment field,
1002e5b6d6dSopenharmony_ci     *                  if desired. On output: the offsets of the alignment field.
1012e5b6d6dSopenharmony_ci     * @return          Reference to 'appendTo' parameter.
1022e5b6d6dSopenharmony_ci     * @internal ICU 3.8
1032e5b6d6dSopenharmony_ci     */
1042e5b6d6dSopenharmony_ci    virtual UnicodeString& format(  Calendar& cal,
1052e5b6d6dSopenharmony_ci                                    UnicodeString& appendTo,
1062e5b6d6dSopenharmony_ci                                    FieldPosition& pos) const override;
1072e5b6d6dSopenharmony_ci
1082e5b6d6dSopenharmony_ci    /**
1092e5b6d6dSopenharmony_ci     * Format an object to produce a string. This method handles Formattable
1102e5b6d6dSopenharmony_ci     * objects with a UDate type. If a the Formattable object type is not a Date,
1112e5b6d6dSopenharmony_ci     * then it returns a failing UErrorCode.
1122e5b6d6dSopenharmony_ci     *
1132e5b6d6dSopenharmony_ci     * @param obj       The object to format. Must be a Date.
1142e5b6d6dSopenharmony_ci     * @param appendTo  Output parameter to receive result.
1152e5b6d6dSopenharmony_ci     *                  Result is appended to existing contents.
1162e5b6d6dSopenharmony_ci     * @param pos       On input: an alignment field, if desired.
1172e5b6d6dSopenharmony_ci     *                  On output: the offsets of the alignment field.
1182e5b6d6dSopenharmony_ci     * @param status    Output param filled with success/failure status.
1192e5b6d6dSopenharmony_ci     * @return          Reference to 'appendTo' parameter.
1202e5b6d6dSopenharmony_ci     * @internal ICU 3.8
1212e5b6d6dSopenharmony_ci     */
1222e5b6d6dSopenharmony_ci    virtual UnicodeString& format(const Formattable& obj,
1232e5b6d6dSopenharmony_ci                                  UnicodeString& appendTo,
1242e5b6d6dSopenharmony_ci                                  FieldPosition& pos,
1252e5b6d6dSopenharmony_ci                                  UErrorCode& status) const override;
1262e5b6d6dSopenharmony_ci
1272e5b6d6dSopenharmony_ci
1282e5b6d6dSopenharmony_ci    /**
1292e5b6d6dSopenharmony_ci     * Parse a date/time string beginning at the given parse position. For
1302e5b6d6dSopenharmony_ci     * example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Date
1312e5b6d6dSopenharmony_ci     * that is equivalent to Date(837039928046).
1322e5b6d6dSopenharmony_ci     * <P>
1332e5b6d6dSopenharmony_ci     * By default, parsing is lenient: If the input is not in the form used by
1342e5b6d6dSopenharmony_ci     * this object's format method but can still be parsed as a date, then the
1352e5b6d6dSopenharmony_ci     * parse succeeds. Clients may insist on strict adherence to the format by
1362e5b6d6dSopenharmony_ci     * calling setLenient(false).
1372e5b6d6dSopenharmony_ci     *
1382e5b6d6dSopenharmony_ci     * @param text  The date/time string to be parsed
1392e5b6d6dSopenharmony_ci     * @param cal   a Calendar set to the date and time to be formatted
1402e5b6d6dSopenharmony_ci     *              into a date/time string.
1412e5b6d6dSopenharmony_ci     * @param pos   On input, the position at which to start parsing; on
1422e5b6d6dSopenharmony_ci     *              output, the position at which parsing terminated, or the
1432e5b6d6dSopenharmony_ci     *              start position if the parse failed.
1442e5b6d6dSopenharmony_ci     * @return      A valid UDate if the input could be parsed.
1452e5b6d6dSopenharmony_ci     * @internal ICU 3.8
1462e5b6d6dSopenharmony_ci     */
1472e5b6d6dSopenharmony_ci    virtual void parse( const UnicodeString& text,
1482e5b6d6dSopenharmony_ci                        Calendar& cal,
1492e5b6d6dSopenharmony_ci                        ParsePosition& pos) const override;
1502e5b6d6dSopenharmony_ci
1512e5b6d6dSopenharmony_ci    /**
1522e5b6d6dSopenharmony_ci     * Parse a date/time string starting at the given parse position. For
1532e5b6d6dSopenharmony_ci     * example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Date
1542e5b6d6dSopenharmony_ci     * that is equivalent to Date(837039928046).
1552e5b6d6dSopenharmony_ci     * <P>
1562e5b6d6dSopenharmony_ci     * By default, parsing is lenient: If the input is not in the form used by
1572e5b6d6dSopenharmony_ci     * this object's format method but can still be parsed as a date, then the
1582e5b6d6dSopenharmony_ci     * parse succeeds. Clients may insist on strict adherence to the format by
1592e5b6d6dSopenharmony_ci     * calling setLenient(false).
1602e5b6d6dSopenharmony_ci     *
1612e5b6d6dSopenharmony_ci     * @see DateFormat::setLenient(boolean)
1622e5b6d6dSopenharmony_ci     *
1632e5b6d6dSopenharmony_ci     * @param text  The date/time string to be parsed
1642e5b6d6dSopenharmony_ci     * @param pos   On input, the position at which to start parsing; on
1652e5b6d6dSopenharmony_ci     *              output, the position at which parsing terminated, or the
1662e5b6d6dSopenharmony_ci     *              start position if the parse failed.
1672e5b6d6dSopenharmony_ci     * @return      A valid UDate if the input could be parsed.
1682e5b6d6dSopenharmony_ci     * @internal ICU 3.8
1692e5b6d6dSopenharmony_ci     */
1702e5b6d6dSopenharmony_ci    UDate parse( const UnicodeString& text,
1712e5b6d6dSopenharmony_ci                 ParsePosition& pos) const;
1722e5b6d6dSopenharmony_ci
1732e5b6d6dSopenharmony_ci
1742e5b6d6dSopenharmony_ci    /**
1752e5b6d6dSopenharmony_ci     * Parse a date/time string. For example, a time text "07/10/96 4:5 PM, PDT"
1762e5b6d6dSopenharmony_ci     * will be parsed into a UDate that is equivalent to Date(837039928046).
1772e5b6d6dSopenharmony_ci     * Parsing begins at the beginning of the string and proceeds as far as
1782e5b6d6dSopenharmony_ci     * possible.  Assuming no parse errors were encountered, this function
1792e5b6d6dSopenharmony_ci     * doesn't return any information about how much of the string was consumed
1802e5b6d6dSopenharmony_ci     * by the parsing.  If you need that information, use the version of
1812e5b6d6dSopenharmony_ci     * parse() that takes a ParsePosition.
1822e5b6d6dSopenharmony_ci     *
1832e5b6d6dSopenharmony_ci     * @param text  The date/time string to be parsed
1842e5b6d6dSopenharmony_ci     * @param status Filled in with U_ZERO_ERROR if the parse was successful, and with
1852e5b6d6dSopenharmony_ci     *              an error value if there was a parse error.
1862e5b6d6dSopenharmony_ci     * @return      A valid UDate if the input could be parsed.
1872e5b6d6dSopenharmony_ci     * @internal ICU 3.8
1882e5b6d6dSopenharmony_ci     */
1892e5b6d6dSopenharmony_ci    virtual UDate parse( const UnicodeString& text,
1902e5b6d6dSopenharmony_ci                        UErrorCode& status) const override;
1912e5b6d6dSopenharmony_ci
1922e5b6d6dSopenharmony_ci    /**
1932e5b6d6dSopenharmony_ci     * Return a single pattern string generated by combining the patterns for the
1942e5b6d6dSopenharmony_ci     * date and time formatters associated with this object.
1952e5b6d6dSopenharmony_ci     * @param result Output param to receive the pattern.
1962e5b6d6dSopenharmony_ci     * @return       A reference to 'result'.
1972e5b6d6dSopenharmony_ci     * @internal ICU 4.2 technology preview
1982e5b6d6dSopenharmony_ci     */
1992e5b6d6dSopenharmony_ci    virtual UnicodeString& toPattern(UnicodeString& result, UErrorCode& status) const;
2002e5b6d6dSopenharmony_ci
2012e5b6d6dSopenharmony_ci    /**
2022e5b6d6dSopenharmony_ci     * Get the date pattern for the the date formatter associated with this object.
2032e5b6d6dSopenharmony_ci     * @param result Output param to receive the date pattern.
2042e5b6d6dSopenharmony_ci     * @return       A reference to 'result'.
2052e5b6d6dSopenharmony_ci     * @internal ICU 4.2 technology preview
2062e5b6d6dSopenharmony_ci     */
2072e5b6d6dSopenharmony_ci    virtual UnicodeString& toPatternDate(UnicodeString& result, UErrorCode& status) const;
2082e5b6d6dSopenharmony_ci
2092e5b6d6dSopenharmony_ci    /**
2102e5b6d6dSopenharmony_ci     * Get the time pattern for the the time formatter associated with this object.
2112e5b6d6dSopenharmony_ci     * @param result Output param to receive the time pattern.
2122e5b6d6dSopenharmony_ci     * @return       A reference to 'result'.
2132e5b6d6dSopenharmony_ci     * @internal ICU 4.2 technology preview
2142e5b6d6dSopenharmony_ci     */
2152e5b6d6dSopenharmony_ci    virtual UnicodeString& toPatternTime(UnicodeString& result, UErrorCode& status) const;
2162e5b6d6dSopenharmony_ci
2172e5b6d6dSopenharmony_ci    /**
2182e5b6d6dSopenharmony_ci     * Apply the given unlocalized date & time pattern strings to this relative date format.
2192e5b6d6dSopenharmony_ci     * (i.e., after this call, this formatter will format dates and times according to
2202e5b6d6dSopenharmony_ci     * the new patterns)
2212e5b6d6dSopenharmony_ci     *
2222e5b6d6dSopenharmony_ci     * @param datePattern   The date pattern to be applied.
2232e5b6d6dSopenharmony_ci     * @param timePattern   The time pattern to be applied.
2242e5b6d6dSopenharmony_ci     * @internal ICU 4.2 technology preview
2252e5b6d6dSopenharmony_ci     */
2262e5b6d6dSopenharmony_ci    virtual void applyPatterns(const UnicodeString& datePattern, const UnicodeString& timePattern, UErrorCode &status);
2272e5b6d6dSopenharmony_ci
2282e5b6d6dSopenharmony_ci    /**
2292e5b6d6dSopenharmony_ci     * Gets the date/time formatting symbols (this is an object carrying
2302e5b6d6dSopenharmony_ci     * the various strings and other symbols used in formatting: e.g., month
2312e5b6d6dSopenharmony_ci     * names and abbreviations, time zone names, AM/PM strings, etc.)
2322e5b6d6dSopenharmony_ci     * @return a copy of the date-time formatting data associated
2332e5b6d6dSopenharmony_ci     * with this date-time formatter.
2342e5b6d6dSopenharmony_ci     * @internal ICU 4.8
2352e5b6d6dSopenharmony_ci     */
2362e5b6d6dSopenharmony_ci    virtual const DateFormatSymbols* getDateFormatSymbols(void) const;
2372e5b6d6dSopenharmony_ci
2382e5b6d6dSopenharmony_ci    /**
2392e5b6d6dSopenharmony_ci     * Set a particular UDisplayContext value in the formatter, such as
2402e5b6d6dSopenharmony_ci     * UDISPCTX_CAPITALIZATION_FOR_STANDALONE. Note: For getContext, see
2412e5b6d6dSopenharmony_ci     * DateFormat.
2422e5b6d6dSopenharmony_ci     * @param value The UDisplayContext value to set.
2432e5b6d6dSopenharmony_ci     * @param status Input/output status. If at entry this indicates a failure
2442e5b6d6dSopenharmony_ci     *               status, the function will do nothing; otherwise this will be
2452e5b6d6dSopenharmony_ci     *               updated with any new status from the function.
2462e5b6d6dSopenharmony_ci     * @internal ICU 53
2472e5b6d6dSopenharmony_ci     */
2482e5b6d6dSopenharmony_ci    virtual void setContext(UDisplayContext value, UErrorCode& status) override;
2492e5b6d6dSopenharmony_ci
2502e5b6d6dSopenharmony_ciprivate:
2512e5b6d6dSopenharmony_ci    SimpleDateFormat *fDateTimeFormatter;
2522e5b6d6dSopenharmony_ci    UnicodeString fDatePattern;
2532e5b6d6dSopenharmony_ci    UnicodeString fTimePattern;
2542e5b6d6dSopenharmony_ci    SimpleFormatter *fCombinedFormat;  // the {0} {1} format.
2552e5b6d6dSopenharmony_ci
2562e5b6d6dSopenharmony_ci    UDateFormatStyle fDateStyle;
2572e5b6d6dSopenharmony_ci    Locale  fLocale;
2582e5b6d6dSopenharmony_ci
2592e5b6d6dSopenharmony_ci    int32_t fDatesLen;    // Length of array
2602e5b6d6dSopenharmony_ci    URelativeString *fDates; // array of strings
2612e5b6d6dSopenharmony_ci
2622e5b6d6dSopenharmony_ci    UBool fCombinedHasDateAtStart;
2632e5b6d6dSopenharmony_ci    UBool fCapitalizationInfoSet;
2642e5b6d6dSopenharmony_ci    UBool fCapitalizationOfRelativeUnitsForUIListMenu;
2652e5b6d6dSopenharmony_ci    UBool fCapitalizationOfRelativeUnitsForStandAlone;
2662e5b6d6dSopenharmony_ci#if !UCONFIG_NO_BREAK_ITERATION
2672e5b6d6dSopenharmony_ci    BreakIterator* fCapitalizationBrkIter;
2682e5b6d6dSopenharmony_ci#else
2692e5b6d6dSopenharmony_ci    UObject* fCapitalizationBrkIter;
2702e5b6d6dSopenharmony_ci#endif
2712e5b6d6dSopenharmony_ci
2722e5b6d6dSopenharmony_ci    /**
2732e5b6d6dSopenharmony_ci     * Get the string at a specific offset.
2742e5b6d6dSopenharmony_ci     * @param day day offset ( -1, 0, 1, etc.. )
2752e5b6d6dSopenharmony_ci     * @param len on output, length of string.
2762e5b6d6dSopenharmony_ci     * @return the string, or NULL if none at that location.
2772e5b6d6dSopenharmony_ci     */
2782e5b6d6dSopenharmony_ci    const UChar *getStringForDay(int32_t day, int32_t &len, UErrorCode &status) const;
2792e5b6d6dSopenharmony_ci
2802e5b6d6dSopenharmony_ci    /**
2812e5b6d6dSopenharmony_ci     * Load the Date string array
2822e5b6d6dSopenharmony_ci     */
2832e5b6d6dSopenharmony_ci    void loadDates(UErrorCode &status);
2842e5b6d6dSopenharmony_ci
2852e5b6d6dSopenharmony_ci    /**
2862e5b6d6dSopenharmony_ci     * Set fCapitalizationOfRelativeUnitsForUIListMenu, fCapitalizationOfRelativeUnitsForStandAlone
2872e5b6d6dSopenharmony_ci     */
2882e5b6d6dSopenharmony_ci    void initCapitalizationContextInfo(const Locale& thelocale);
2892e5b6d6dSopenharmony_ci
2902e5b6d6dSopenharmony_ci    /**
2912e5b6d6dSopenharmony_ci     * @return the number of days in "until-now"
2922e5b6d6dSopenharmony_ci     */
2932e5b6d6dSopenharmony_ci    static int32_t dayDifference(Calendar &until, UErrorCode &status);
2942e5b6d6dSopenharmony_ci
2952e5b6d6dSopenharmony_ci    /**
2962e5b6d6dSopenharmony_ci     * initializes fCalendar from parameters.  Returns fCalendar as a convenience.
2972e5b6d6dSopenharmony_ci     * @param adoptZone  Zone to be adopted, or NULL for TimeZone::createDefault().
2982e5b6d6dSopenharmony_ci     * @param locale Locale of the calendar
2992e5b6d6dSopenharmony_ci     * @param status Error code
3002e5b6d6dSopenharmony_ci     * @return the newly constructed fCalendar
3012e5b6d6dSopenharmony_ci     * @internal ICU 3.8
3022e5b6d6dSopenharmony_ci     */
3032e5b6d6dSopenharmony_ci    Calendar* initializeCalendar(TimeZone* adoptZone, const Locale& locale, UErrorCode& status);
3042e5b6d6dSopenharmony_ci
3052e5b6d6dSopenharmony_cipublic:
3062e5b6d6dSopenharmony_ci    /**
3072e5b6d6dSopenharmony_ci     * Return the class ID for this class. This is useful only for comparing to
3082e5b6d6dSopenharmony_ci     * a return value from getDynamicClassID(). For example:
3092e5b6d6dSopenharmony_ci     * <pre>
3102e5b6d6dSopenharmony_ci     * .   Base* polymorphic_pointer = createPolymorphicObject();
3112e5b6d6dSopenharmony_ci     * .   if (polymorphic_pointer->getDynamicClassID() ==
3122e5b6d6dSopenharmony_ci     * .       erived::getStaticClassID()) ...
3132e5b6d6dSopenharmony_ci     * </pre>
3142e5b6d6dSopenharmony_ci     * @return          The class ID for all objects of this class.
3152e5b6d6dSopenharmony_ci     * @internal ICU 3.8
3162e5b6d6dSopenharmony_ci     */
3172e5b6d6dSopenharmony_ci    U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
3182e5b6d6dSopenharmony_ci
3192e5b6d6dSopenharmony_ci    /**
3202e5b6d6dSopenharmony_ci     * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This
3212e5b6d6dSopenharmony_ci     * method is to implement a simple version of RTTI, since not all C++
3222e5b6d6dSopenharmony_ci     * compilers support genuine RTTI. Polymorphic operator==() and clone()
3232e5b6d6dSopenharmony_ci     * methods call this method.
3242e5b6d6dSopenharmony_ci     *
3252e5b6d6dSopenharmony_ci     * @return          The class ID for this object. All objects of a
3262e5b6d6dSopenharmony_ci     *                  given class have the same class ID.  Objects of
3272e5b6d6dSopenharmony_ci     *                  other classes have different class IDs.
3282e5b6d6dSopenharmony_ci     * @internal ICU 3.8
3292e5b6d6dSopenharmony_ci     */
3302e5b6d6dSopenharmony_ci    virtual UClassID getDynamicClassID(void) const override;
3312e5b6d6dSopenharmony_ci};
3322e5b6d6dSopenharmony_ci
3332e5b6d6dSopenharmony_ci
3342e5b6d6dSopenharmony_ciU_NAMESPACE_END
3352e5b6d6dSopenharmony_ci
3362e5b6d6dSopenharmony_ci#endif /* #if !UCONFIG_NO_FORMATTING */
3372e5b6d6dSopenharmony_ci
3382e5b6d6dSopenharmony_ci#endif // RELDTFMT_H
339