+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 2008-2014, Google, International Business Machines Corporation
#if !UCONFIG_NO_FORMATTING
+#ifndef U_HIDE_DEPRECATED_API
#include "unicode/unistr.h"
#include "unicode/tmunit.h"
#include "unicode/numfmt.h"
#include "unicode/plurrule.h"
-#ifndef U_HIDE_DEPRECATED_API
/**
* Constants for various styles.
};
typedef enum UTimeUnitFormatStyle UTimeUnitFormatStyle; /**< @deprecated ICU 53 */
-#endif /* U_HIDE_DEPRECATED_API */
-
+#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
class Hashtable;
class UVector;
-#ifndef U_HIDE_DEPRECATED_API
+struct TimeUnitFormatReadSink;
/**
* Format or parse a TimeUnitAmount, using plural rules for the units where available.
/**
* Create TimeUnitFormat with default locale, and full name style.
* Use setLocale and/or setFormat to modify.
- * @stable ICU 4.2
+ * @deprecated ICU 53
*/
TimeUnitFormat(UErrorCode& status);
/**
* Create TimeUnitFormat given locale, and full name style.
- * @stable ICU 4.2
+ * @deprecated ICU 53
*/
TimeUnitFormat(const Locale& locale, UErrorCode& status);
/**
* Create TimeUnitFormat given locale and style.
- * @stable ICU 4.8
+ * @deprecated ICU 53
*/
TimeUnitFormat(const Locale& locale, UTimeUnitFormatStyle style, UErrorCode& status);
/**
* Copy constructor.
- * @stable ICU 4.2
+ * @deprecated ICU 53
*/
TimeUnitFormat(const TimeUnitFormat&);
/**
* deconstructor
- * @stable ICU 4.2
+ * @deprecated ICU 53
*/
virtual ~TimeUnitFormat();
* Clone this Format object polymorphically. The caller owns the result and
* should delete it when done.
* @return A copy of the object.
- * @stable ICU 4.2
+ * @deprecated ICU 53
*/
virtual Format* clone(void) const;
/**
* Assignment operator
- * @stable ICU 4.2
+ * @deprecated ICU 53
*/
TimeUnitFormat& operator=(const TimeUnitFormat& other);
* Objects of different subclasses are considered unequal.
* @param other the object to be compared with.
* @return true if the given Format objects are not semantically equal.
- * @stable ICU 4.2
+ * @deprecated ICU 53
*/
UBool operator!=(const Format& other) const;
* Set the locale used for formatting or parsing.
* @param locale the locale to be set
* @param status output param set to success/failure code on exit
- * @stable ICU 4.2
+ * @deprecated ICU 53
*/
void setLocale(const Locale& locale, UErrorCode& status);
* Set the number format used for formatting or parsing.
* @param format the number formatter to be set
* @param status output param set to success/failure code on exit
- * @stable ICU 4.2
+ * @deprecated ICU 53
*/
void setNumberFormat(const NumberFormat& format, UErrorCode& status);
/**
* Parse a TimeUnitAmount.
* @see Format#parseObject(const UnicodeString&, Formattable&, ParsePosition&) const;
- * @stable ICU 4.2
+ * @deprecated ICU 53
*/
virtual void parseObject(const UnicodeString& source,
Formattable& result,
* . erived::getStaticClassID()) ...
* </pre>
* @return The class ID for all objects of this class.
- * @stable ICU 4.2
+ * @deprecated ICU 53
*/
static UClassID U_EXPORT2 getStaticClassID(void);
* @return The class ID for this object. All objects of a
* given class have the same class ID. Objects of
* other classes have different class IDs.
- * @stable ICU 4.2
+ * @deprecated ICU 53
*/
virtual UClassID getDynamicClassID(void) const;
// UTIMEUNIT_YEAR.
static const char* getTimeUnitName(TimeUnit::UTimeUnitFields field, UErrorCode& status);
+ friend struct TimeUnitFormatReadSink;
};
inline UBool
return !operator==(other);
}
-#endif /* U_HIDE_DEPRECATED_API */
-
U_NAMESPACE_END
+#endif // U_SHOW_CPLUSPLUS_API
+#endif /* U_HIDE_DEPRECATED_API */
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif // __TMUTFMT_H__