chromium/third_party/icu/source/i18n/number_patternstring.cpp

// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html

#include "unicode/utypes.h"

#if !UCONFIG_NO_FORMATTING

// Allow implicit conversion from char16_t* to UnicodeString for this file:
// Helpful in toString methods and elsewhere.
#define UNISTR_FROM_STRING_EXPLICIT
#define UNISTR_FROM_CHAR_EXPLICIT

#include "uassert.h"
#include "number_patternstring.h"
#include "unicode/utf16.h"
#include "number_utils.h"
#include "number_roundingutils.h"
#include "number_mapper.h"

usingnamespaceicu;
usingnamespaceicu::number;
usingnamespaceicu::number::impl;


void PatternParser::parseToPatternInfo(const UnicodeString& patternString, ParsedPatternInfo& patternInfo,
                                       UErrorCode& status) {}

DecimalFormatProperties
PatternParser::parseToProperties(const UnicodeString& pattern, IgnoreRounding ignoreRounding,
                                 UErrorCode& status) {}

DecimalFormatProperties PatternParser::parseToProperties(const UnicodeString& pattern,
                                                         UErrorCode& status) {}

void
PatternParser::parseToExistingProperties(const UnicodeString& pattern, DecimalFormatProperties& properties,
                                         IgnoreRounding ignoreRounding, UErrorCode& status) {}


char16_t ParsedPatternInfo::charAt(int32_t flags, int32_t index) const {}

int32_t ParsedPatternInfo::length(int32_t flags) const {}

int32_t ParsedPatternInfo::getLengthFromEndpoints(const Endpoints& endpoints) {}

UnicodeString ParsedPatternInfo::getString(int32_t flags) const {}

const Endpoints& ParsedPatternInfo::getEndpoints(int32_t flags) const {}

bool ParsedPatternInfo::positiveHasPlusSign() const {}

bool ParsedPatternInfo::hasNegativeSubpattern() const {}

bool ParsedPatternInfo::negativeHasMinusSign() const {}

bool ParsedPatternInfo::hasCurrencySign() const {}

bool ParsedPatternInfo::containsSymbolType(AffixPatternType type, UErrorCode& status) const {}

bool ParsedPatternInfo::hasBody() const {}

bool ParsedPatternInfo::currencyAsDecimal() const {}

/////////////////////////////////////////////////////
/// BEGIN RECURSIVE DESCENT PARSER IMPLEMENTATION ///
/////////////////////////////////////////////////////

UChar32 ParsedPatternInfo::ParserState::peek() {}

UChar32 ParsedPatternInfo::ParserState::peek2() {}

UChar32 ParsedPatternInfo::ParserState::next() {}

void ParsedPatternInfo::consumePattern(const UnicodeString& patternString, UErrorCode& status) {}

void ParsedPatternInfo::consumeSubpattern(UErrorCode& status) {}

void ParsedPatternInfo::consumePadding(PadPosition paddingLocation, UErrorCode& status) {}

void ParsedPatternInfo::consumeAffix(Endpoints& endpoints, UErrorCode& status) {}

void ParsedPatternInfo::consumeLiteral(UErrorCode& status) {}

void ParsedPatternInfo::consumeFormat(UErrorCode& status) {}

void ParsedPatternInfo::consumeIntegerFormat(UErrorCode& status) {}

void ParsedPatternInfo::consumeFractionFormat(UErrorCode& status) {}

void ParsedPatternInfo::consumeExponent(UErrorCode& status) {}

///////////////////////////////////////////////////
/// END RECURSIVE DESCENT PARSER IMPLEMENTATION ///
///////////////////////////////////////////////////

void PatternParser::parseToExistingPropertiesImpl(const UnicodeString& pattern,
                                                  DecimalFormatProperties& properties,
                                                  IgnoreRounding ignoreRounding, UErrorCode& status) {}

void
PatternParser::patternInfoToProperties(DecimalFormatProperties& properties, ParsedPatternInfo& patternInfo,
                                       IgnoreRounding _ignoreRounding, UErrorCode& status) {}

///////////////////////////////////////////////////////////////////
/// End PatternStringParser.java; begin PatternStringUtils.java ///
///////////////////////////////////////////////////////////////////

// Determine whether a given roundingIncrement should be ignored for formatting
// based on the current maxFrac value (maximum fraction digits). For example a
// roundingIncrement of 0.01 should be ignored if maxFrac is 1, but not if maxFrac
// is 2 or more. Note that roundingIncrements are rounded in significance, so
// a roundingIncrement of 0.006 is treated like 0.01 for this determination, i.e.
// it should not be ignored if maxFrac is 2 or more (but a roundingIncrement of
// 0.005 is treated like 0.001 for significance). This is the reason for the
// initial doubling below.
// roundIncr must be non-zero.
bool PatternStringUtils::ignoreRoundingIncrement(double roundIncr, int32_t maxFrac) {}

UnicodeString PatternStringUtils::propertiesToPatternString(const DecimalFormatProperties& properties,
                                                            UErrorCode& status) {}

int PatternStringUtils::escapePaddingString(UnicodeString input, UnicodeString& output, int startIndex,
                                            UErrorCode& status) {}

UnicodeString
PatternStringUtils::convertLocalized(const UnicodeString& input, const DecimalFormatSymbols& symbols,
                                     bool toLocalized, UErrorCode& status) {}

void PatternStringUtils::patternInfoToStringBuilder(const AffixPatternProvider& patternInfo, bool isPrefix,
                                                    PatternSignType patternSignType,
                                                    bool approximately,
                                                    StandardPlural::Form plural,
                                                    bool perMilleReplacesPercent,
                                                    bool dropCurrencySymbols,
                                                    UnicodeString& output) {}

PatternSignType PatternStringUtils::resolveSignDisplay(UNumberSignDisplay signDisplay, Signum signum) {}

#endif /* #if !UCONFIG_NO_FORMATTING */