chromium/third_party/icu/source/i18n/number_rounding.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

#include "charstr.h"
#include "uassert.h"
#include "unicode/numberformatter.h"
#include "number_types.h"
#include "number_decimalquantity.h"
#include "double-conversion.h"
#include "number_roundingutils.h"
#include "number_skeletons.h"
#include "number_decnum.h"
#include "putilimp.h"
#include "string_segment.h"

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


DoubleToStringConverter;
StringSegment;

void number::impl::parseIncrementOption(const StringSegment &segment,
                                        Precision &outPrecision,
                                        UErrorCode &status) {}

namespace {

int32_t getRoundingMagnitudeFraction(int maxFrac) {}

int32_t getRoundingMagnitudeSignificant(const DecimalQuantity &value, int maxSig) {}

int32_t getDisplayMagnitudeFraction(int minFrac) {}

int32_t getDisplayMagnitudeSignificant(const DecimalQuantity &value, int minSig) {}

}


MultiplierProducer::~MultiplierProducer() = default;


Precision Precision::unlimited() {}

FractionPrecision Precision::integer() {}

FractionPrecision Precision::fixedFraction(int32_t minMaxFractionPlaces) {}

FractionPrecision Precision::minFraction(int32_t minFractionPlaces) {}

FractionPrecision Precision::maxFraction(int32_t maxFractionPlaces) {}

FractionPrecision Precision::minMaxFraction(int32_t minFractionPlaces, int32_t maxFractionPlaces) {}

Precision Precision::fixedSignificantDigits(int32_t minMaxSignificantDigits) {}

Precision Precision::minSignificantDigits(int32_t minSignificantDigits) {}

Precision Precision::maxSignificantDigits(int32_t maxSignificantDigits) {}

Precision Precision::minMaxSignificantDigits(int32_t minSignificantDigits, int32_t maxSignificantDigits) {}

Precision Precision::trailingZeroDisplay(UNumberTrailingZeroDisplay trailingZeroDisplay) const {}

IncrementPrecision Precision::increment(double roundingIncrement) {}

IncrementPrecision Precision::incrementExact(uint64_t mantissa, int16_t magnitude) {}

CurrencyPrecision Precision::currency(UCurrencyUsage currencyUsage) {}

Precision FractionPrecision::withSignificantDigits(
        int32_t minSignificantDigits,
        int32_t maxSignificantDigits,
        UNumberRoundingPriority priority) const {}

Precision FractionPrecision::withMinDigits(int32_t minSignificantDigits) const {}

Precision FractionPrecision::withMaxDigits(int32_t maxSignificantDigits) const {}

// Private method on base class
Precision Precision::withCurrency(const CurrencyUnit &currency, UErrorCode &status) const {}

// Public method on CurrencyPrecision subclass
Precision CurrencyPrecision::withCurrency(const CurrencyUnit &currency) const {}

Precision IncrementPrecision::withMinFraction(int32_t minFrac) const {}

FractionPrecision Precision::constructFraction(int32_t minFrac, int32_t maxFrac) {}

Precision Precision::constructSignificant(int32_t minSig, int32_t maxSig) {}

Precision
Precision::constructFractionSignificant(
        const FractionPrecision &base,
        int32_t minSig,
        int32_t maxSig,
        UNumberRoundingPriority priority,
        bool retain) {}

IncrementPrecision Precision::constructIncrement(uint64_t increment, digits_t magnitude) {}

CurrencyPrecision Precision::constructCurrency(UCurrencyUsage usage) {}


RoundingImpl::RoundingImpl(const Precision& precision, UNumberFormatRoundingMode roundingMode,
                           const CurrencyUnit& currency, UErrorCode& status)
        :{}

RoundingImpl RoundingImpl::passThrough() {}

bool RoundingImpl::isSignificantDigits() const {}

int32_t
RoundingImpl::chooseMultiplierAndApply(impl::DecimalQuantity &input, const impl::MultiplierProducer &producer,
                                  UErrorCode &status) {}

/** This is the method that contains the actual rounding logic. */
void RoundingImpl::apply(impl::DecimalQuantity &value, UErrorCode& status) const {}

void RoundingImpl::apply(impl::DecimalQuantity &value, int32_t minInt, UErrorCode /*status*/) {}

#endif /* #if !UCONFIG_NO_FORMATTING */