From: Shane Carr Date: Wed, 28 Mar 2018 01:08:47 +0000 (+0000) Subject: ICU-13634 Merging trunk to branch X-Git-Tag: release-62-rc~200^2~65 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b4670fd29dd7865521bde03f4502eced79ea63c;p=icu ICU-13634 Merging trunk to branch X-SVN-Rev: 41162 --- 1b4670fd29dd7865521bde03f4502eced79ea63c diff --cc icu4c/source/i18n/unicode/numberformatter.h index 9c79c92492b,3fbb33cceea..21e42c11b0d --- a/icu4c/source/i18n/unicode/numberformatter.h +++ b/icu4c/source/i18n/unicode/numberformatter.h @@@ -984,9 -1249,7 +987,11 @@@ class U_I18N_API SymbolsWrapper : publi /** @internal */ SymbolsWrapper &operator=(const SymbolsWrapper &other); + /** @internal */ + SymbolsWrapper &operator=(SymbolsWrapper&& src) U_NOEXCEPT; + + #ifndef U_HIDE_INTERNAL_API ++ /** * The provided object is copied, but we do not adopt it. * @internal @@@ -1034,7 -1297,8 +1039,9 @@@ } return FALSE; } + + #endif // U_HIDE_INTERNAL_API + private: enum SymbolsPointerType { SYMPTR_NONE, SYMPTR_DFS, SYMPTR_NS @@@ -1067,18 -1325,10 +1076,19 @@@ class U_I18N_API Grouper : public UMemo // Future: static Grouper forProperties(DecimalFormatProperties& properties); /** @internal */ - Grouper(int16_t grouping1, int16_t grouping2, int16_t minGrouping) - : fGrouping1(grouping1), fGrouping2(grouping2), fMinGrouping(minGrouping) {} + Grouper(int16_t grouping1, int16_t grouping2, int16_t minGrouping, UGroupingStrategy strategy) + : fGrouping1(grouping1), + fGrouping2(grouping2), + fMinGrouping(minGrouping), + fStrategy(strategy) {} + #endif // U_HIDE_INTERNAL_API + /** @internal */ + int16_t getPrimary() const; + + /** @internal */ + int16_t getSecondary() const; + private: /** * The grouping sizes, with the following special values: @@@ -1123,14 -1367,9 +1133,15 @@@ // To allow NumberFormatterImpl to access isBogus() and perform other operations: friend class NumberFormatterImpl; + + // To allow NumberParserImpl to perform setLocaleData(): + friend class ::icu::numparse::impl::NumberParserImpl; + + // To allow access to the skeleton generation code: + friend class impl::GeneratorHelpers; }; + // Do not enclose entire Padder with #ifndef U_HIDE_INTERNAL_API, needed for a protected field /** @internal */ class U_I18N_API Padder : public UMemory { public: @@@ -1139,10 -1379,8 +1151,11 @@@ /** @internal */ static Padder codePoints(UChar32 cp, int32_t targetWidth, UNumberFormatPadPosition position); + #endif // U_HIDE_INTERNAL_API + /** @internal */ + static Padder forProperties(const DecimalFormatProperties& properties); + private: UChar32 fWidth; // -3 = error; -2 = bogus; -1 = no padding union { @@@ -1189,46 -1427,9 +1202,47 @@@ // To allow NumberFormatterImpl to access isBogus() and perform other operations: friend class impl::NumberFormatterImpl; + + // To allow access to the skeleton generation code: + friend class impl::GeneratorHelpers; }; + // Do not enclose entire MacroProps with #ifndef U_HIDE_INTERNAL_API, needed for a protected field +/** @internal */ +class U_I18N_API Multiplier : public UMemory { + public: + /** @internal */ + static Multiplier magnitude(int32_t magnitudeMultiplier); + + /** @internal */ + static Multiplier integer(int32_t multiplier); + + private: + int32_t magnitudeMultiplier; + int32_t multiplier; + + Multiplier(int32_t magnitudeMultiplier, int32_t multiplier); + + Multiplier() : magnitudeMultiplier(0), multiplier(1) {} + + bool isValid() const { + return magnitudeMultiplier != 0 || multiplier != 1; + } + + // To allow MacroProps/MicroProps to initialize empty instances: + friend struct MacroProps; + friend struct MicroProps; + + // To allow NumberFormatterImpl to access isBogus() and perform other operations: + friend class impl::NumberFormatterImpl; + + // To allow the helper class MultiplierChain access to private fields: + friend class impl::MultiplierChain; + + // To allow access to the skeleton generation code: + friend class impl::GeneratorHelpers; +}; + /** @internal */ struct U_I18N_API MacroProps : public UMemory { /** @internal */