1 // © 2017 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 && !UPRV_INCOMPLETE_CPP11_SUPPORT
7 #ifndef __NUMBER_LONGNAMES_H__
8 #define __NUMBER_LONGNAMES_H__
9 
10 #include "unicode/uversion.h"
11 #include "number_utils.h"
12 #include "number_modifiers.h"
13 
14 U_NAMESPACE_BEGIN namespace number {
15 namespace impl {
16 
17 class LongNameHandler : public MicroPropsGenerator, public UMemory {
18   public:
19     static LongNameHandler
20     forCurrencyLongNames(const Locale &loc, const CurrencyUnit &currency, const PluralRules *rules,
21                          const MicroPropsGenerator *parent, UErrorCode &status);
22 
23     static LongNameHandler
24     forMeasureUnit(const Locale &loc, const MeasureUnit &unit, const UNumberUnitWidth &width,
25                    const PluralRules *rules, const MicroPropsGenerator *parent, UErrorCode &status);
26 
27     void
28     processQuantity(DecimalQuantity &quantity, MicroProps &micros, UErrorCode &status) const U_OVERRIDE;
29 
30   private:
31     SimpleModifier fModifiers[StandardPlural::Form::COUNT];
32     const PluralRules *rules;
33     const MicroPropsGenerator *parent;
34 
35     LongNameHandler(const PluralRules *rules, const MicroPropsGenerator *parent)
36             : rules(rules), parent(parent) {}
37 
38     static void simpleFormatsToModifiers(const UnicodeString *simpleFormats, Field field,
39                                          SimpleModifier *output, UErrorCode &status);
40 };
41 
42 }  // namespace impl
43 }  // namespace number
44 U_NAMESPACE_END
45 
46 #endif //__NUMBER_LONGNAMES_H__
47 
48 #endif /* #if !UCONFIG_NO_FORMATTING */
49