00001 // © 2016 and later: Unicode, Inc. and others. 00002 // License & terms of use: http://www.unicode.org/copyright.html 00003 /* 00004 ******************************************************************************** 00005 * Copyright (C) 2012-2016, International Business Machines 00006 * Corporation and others. All Rights Reserved. 00007 ******************************************************************************** 00008 * 00009 * File COMPACTDECIMALFORMAT.H 00010 ******************************************************************************** 00011 */ 00012 00013 #ifndef __COMPACT_DECIMAL_FORMAT_H__ 00014 #define __COMPACT_DECIMAL_FORMAT_H__ 00015 00016 #include "unicode/utypes.h" 00022 #if !UCONFIG_NO_FORMATTING 00023 00024 #include "unicode/decimfmt.h" 00025 00026 struct UHashtable; 00027 00028 U_NAMESPACE_BEGIN 00029 00030 class PluralRules; 00031 00060 class U_I18N_API CompactDecimalFormat : public DecimalFormat { 00061 public: 00062 00073 static CompactDecimalFormat* U_EXPORT2 createInstance( 00074 const Locale& inLocale, UNumberCompactStyle style, UErrorCode& status); 00075 00082 CompactDecimalFormat(const CompactDecimalFormat& source); 00083 00088 ~CompactDecimalFormat() U_OVERRIDE; 00089 00096 CompactDecimalFormat& operator=(const CompactDecimalFormat& rhs); 00097 00105 Format* clone() const U_OVERRIDE; 00106 00107 using DecimalFormat::format; 00108 00118 void parse(const UnicodeString& text, Formattable& result, 00119 ParsePosition& parsePosition) const U_OVERRIDE; 00120 00130 void parse(const UnicodeString& text, Formattable& result, UErrorCode& status) const U_OVERRIDE; 00131 00132 #ifndef U_HIDE_INTERNAL_API 00133 00153 CurrencyAmount* parseCurrency(const UnicodeString& text, ParsePosition& pos) const U_OVERRIDE; 00154 #endif /* U_HIDE_INTERNAL_API */ 00155 00167 static UClassID U_EXPORT2 getStaticClassID(); 00168 00180 UClassID getDynamicClassID() const U_OVERRIDE; 00181 00182 private: 00183 CompactDecimalFormat(const Locale& inLocale, UNumberCompactStyle style, UErrorCode& status); 00184 }; 00185 00186 U_NAMESPACE_END 00187 00188 #endif /* #if !UCONFIG_NO_FORMATTING */ 00189 00190 #endif // __COMPACT_DECIMAL_FORMAT_H__ 00191 //eof
1.6.1