#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#define UNISTR_FROM_STRING_EXPLICIT
#include "number_decnum.h"
#include "number_roundingutils.h"
#include "number_skeletons.h"
#include "umutex.h"
#include "ucln_in.h"
#include "patternprops.h"
#include "unicode/ucharstriebuilder.h"
#include "number_utils.h"
#include "number_decimalquantity.h"
#include "unicode/numberformatter.h"
#include "uinvchar.h"
#include "charstr.h"
#include "string_segment.h"
#include "unicode/errorcode.h"
#include "util.h"
#include "measunit_impl.h"
usingnamespaceicu;
usingnamespaceicu::number;
usingnamespaceicu::number::impl;
usingnamespaceicu::number::impl::skeleton;
namespace {
icu::UInitOnce gNumberSkeletonsInitOnce { … };
char16_t* kSerializedStemTrie = …;
UBool U_CALLCONV cleanupNumberSkeletons() { … }
void U_CALLCONV initNumberSkeletons(UErrorCode& status) { … }
inline void appendMultiple(UnicodeString& sb, UChar32 cp, int32_t count) { … }
#define CHECK_NULL(seen, field, status) …
}
Notation stem_to_object::notation(skeleton::StemEnum stem) { … }
MeasureUnit stem_to_object::unit(skeleton::StemEnum stem) { … }
Precision stem_to_object::precision(skeleton::StemEnum stem) { … }
UNumberFormatRoundingMode stem_to_object::roundingMode(skeleton::StemEnum stem) { … }
UNumberGroupingStrategy stem_to_object::groupingStrategy(skeleton::StemEnum stem) { … }
UNumberUnitWidth stem_to_object::unitWidth(skeleton::StemEnum stem) { … }
UNumberSignDisplay stem_to_object::signDisplay(skeleton::StemEnum stem) { … }
UNumberDecimalSeparatorDisplay stem_to_object::decimalSeparatorDisplay(skeleton::StemEnum stem) { … }
void enum_to_stem_string::roundingMode(UNumberFormatRoundingMode value, UnicodeString& sb) { … }
void enum_to_stem_string::groupingStrategy(UNumberGroupingStrategy value, UnicodeString& sb) { … }
void enum_to_stem_string::unitWidth(UNumberUnitWidth value, UnicodeString& sb) { … }
void enum_to_stem_string::signDisplay(UNumberSignDisplay value, UnicodeString& sb) { … }
void
enum_to_stem_string::decimalSeparatorDisplay(UNumberDecimalSeparatorDisplay value, UnicodeString& sb) { … }
UnlocalizedNumberFormatter skeleton::create(
const UnicodeString& skeletonString, UParseError* perror, UErrorCode& status) { … }
UnicodeString skeleton::generate(const MacroProps& macros, UErrorCode& status) { … }
MacroProps skeleton::parseSkeleton(
const UnicodeString& skeletonString, int32_t& errOffset, UErrorCode& status) { … }
ParseState
skeleton::parseStem(const StringSegment& segment, const UCharsTrie& stemTrie, SeenMacroProps& seen,
MacroProps& macros, UErrorCode& status) { … }
ParseState skeleton::parseOption(ParseState stem, const StringSegment& segment, MacroProps& macros,
UErrorCode& status) { … }
void GeneratorHelpers::generateSkeleton(const MacroProps& macros, UnicodeString& sb, UErrorCode& status) { … }
bool blueprint_helpers::parseExponentWidthOption(const StringSegment& segment, MacroProps& macros,
UErrorCode&) { … }
void
blueprint_helpers::generateExponentWidthOption(int32_t minExponentDigits, UnicodeString& sb, UErrorCode&) { … }
bool
blueprint_helpers::parseExponentSignOption(const StringSegment& segment, MacroProps& macros, UErrorCode&) { … }
void blueprint_helpers::parseCurrencyOption(const StringSegment& segment, MacroProps& macros,
UErrorCode& status) { … }
void
blueprint_helpers::generateCurrencyOption(const CurrencyUnit& currency, UnicodeString& sb, UErrorCode&) { … }
void blueprint_helpers::parseMeasureUnitOption(const StringSegment& segment, MacroProps& macros,
UErrorCode& status) { … }
void blueprint_helpers::parseMeasurePerUnitOption(const StringSegment& segment, MacroProps& macros,
UErrorCode& status) { … }
void blueprint_helpers::parseIdentifierUnitOption(const StringSegment& segment, MacroProps& macros,
UErrorCode& status) { … }
void blueprint_helpers::parseUnitUsageOption(const StringSegment &segment, MacroProps ¯os,
UErrorCode &status) { … }
void blueprint_helpers::parseFractionStem(const StringSegment& segment, MacroProps& macros,
UErrorCode& status) { … }
void
blueprint_helpers::generateFractionStem(int32_t minFrac, int32_t maxFrac, UnicodeString& sb, UErrorCode&) { … }
void
blueprint_helpers::parseDigitsStem(const StringSegment& segment, MacroProps& macros, UErrorCode& status) { … }
void
blueprint_helpers::generateDigitsStem(int32_t minSig, int32_t maxSig, UnicodeString& sb, UErrorCode&) { … }
void blueprint_helpers::parseScientificStem(const StringSegment& segment, MacroProps& macros, UErrorCode& status) { … }
void blueprint_helpers::parseIntegerStem(const StringSegment& segment, MacroProps& macros, UErrorCode& status) { … }
bool blueprint_helpers::parseFracSigOption(const StringSegment& segment, MacroProps& macros,
UErrorCode& status) { … }
bool blueprint_helpers::parseTrailingZeroOption(const StringSegment& segment, MacroProps& macros, UErrorCode&) { … }
void blueprint_helpers::parseIncrementOption(const StringSegment &segment, MacroProps ¯os,
UErrorCode &status) { … }
void blueprint_helpers::generateIncrementOption(
uint32_t increment,
digits_t incrementMagnitude,
int32_t minFrac,
UnicodeString& sb,
UErrorCode&) { … }
void blueprint_helpers::parseIntegerWidthOption(const StringSegment& segment, MacroProps& macros,
UErrorCode& status) { … }
void blueprint_helpers::generateIntegerWidthOption(int32_t minInt, int32_t maxInt, UnicodeString& sb,
UErrorCode&) { … }
void blueprint_helpers::parseNumberingSystemOption(const StringSegment& segment, MacroProps& macros,
UErrorCode& status) { … }
void blueprint_helpers::generateNumberingSystemOption(const NumberingSystem& ns, UnicodeString& sb,
UErrorCode&) { … }
void blueprint_helpers::parseScaleOption(const StringSegment& segment, MacroProps& macros,
UErrorCode& status) { … }
void blueprint_helpers::generateScaleOption(int32_t magnitude, const DecNum* arbitrary, UnicodeString& sb,
UErrorCode& status) { … }
bool GeneratorHelpers::notation(const MacroProps& macros, UnicodeString& sb, UErrorCode& status) { … }
bool GeneratorHelpers::unit(const MacroProps& macros, UnicodeString& sb, UErrorCode& status) { … }
bool GeneratorHelpers::usage(const MacroProps& macros, UnicodeString& sb, UErrorCode& ) { … }
bool GeneratorHelpers::precision(const MacroProps& macros, UnicodeString& sb, UErrorCode& status) { … }
bool GeneratorHelpers::roundingMode(const MacroProps& macros, UnicodeString& sb, UErrorCode&) { … }
bool GeneratorHelpers::grouping(const MacroProps& macros, UnicodeString& sb, UErrorCode& status) { … }
bool GeneratorHelpers::integerWidth(const MacroProps& macros, UnicodeString& sb, UErrorCode& status) { … }
bool GeneratorHelpers::symbols(const MacroProps& macros, UnicodeString& sb, UErrorCode& status) { … }
bool GeneratorHelpers::unitWidth(const MacroProps& macros, UnicodeString& sb, UErrorCode&) { … }
bool GeneratorHelpers::sign(const MacroProps& macros, UnicodeString& sb, UErrorCode&) { … }
bool GeneratorHelpers::decimal(const MacroProps& macros, UnicodeString& sb, UErrorCode&) { … }
bool GeneratorHelpers::scale(const MacroProps& macros, UnicodeString& sb, UErrorCode& status) { … }
#if (U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN) && defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable: 4661)
#endif
template<typename Derived>
UnicodeString NumberFormatterSettings<Derived>::toSkeleton(UErrorCode& status) const { … }
template
class icu::number::NumberFormatterSettings<icu::number::UnlocalizedNumberFormatter>;
template
class icu::number::NumberFormatterSettings<icu::number::LocalizedNumberFormatter>;
UnlocalizedNumberFormatter
NumberFormatter::forSkeleton(const UnicodeString& skeleton, UErrorCode& status) { … }
UnlocalizedNumberFormatter
NumberFormatter::forSkeleton(const UnicodeString& skeleton, UParseError& perror, UErrorCode& status) { … }
#if (U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN) && defined(_MSC_VER)
#pragma warning(pop)
#endif
#endif