]> git.saurik.com Git - apple/icu.git/blob - icuSources/i18n/number_utypes.h
ICU-64260.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / number_utypes.h
1 // © 2018 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3
4 #include "unicode/utypes.h"
5
6 #if !UCONFIG_NO_FORMATTING
7 #ifndef __SOURCE_NUMBER_UTYPES_H__
8 #define __SOURCE_NUMBER_UTYPES_H__
9
10 #include "unicode/numberformatter.h"
11 #include "number_types.h"
12 #include "number_decimalquantity.h"
13 #include "number_stringbuilder.h"
14 #include "formattedval_impl.h"
15
16 U_NAMESPACE_BEGIN namespace number {
17 namespace impl {
18
19
20 /** Helper function used in upluralrules.cpp */
21 const DecimalQuantity* validateUFormattedNumberToDecimalQuantity(
22 const UFormattedNumber* uresult, UErrorCode& status);
23
24
25 /**
26 * Struct for data used by FormattedNumber.
27 *
28 * This struct is held internally by the C++ version FormattedNumber since the member types are not
29 * declared in the public header file.
30 *
31 * The DecimalQuantity is not currently being used by FormattedNumber, but at some point it could be used
32 * to add a toDecNumber() or similar method.
33 */
34 class UFormattedNumberData : public FormattedValueNumberStringBuilderImpl {
35 public:
36 UFormattedNumberData() : FormattedValueNumberStringBuilderImpl(0) {}
37 virtual ~UFormattedNumberData();
38
39 DecimalQuantity quantity;
40 };
41
42
43 } // namespace impl
44 } // namespace number
45 U_NAMESPACE_END
46
47 #endif //__SOURCE_NUMBER_UTYPES_H__
48 #endif /* #if !UCONFIG_NO_FORMATTING */