ICU 64.2  64.2
Public Member Functions | Friends
icu::number::UnlocalizedNumberFormatter Class Reference

A NumberFormatter that does not yet have a locale. More...

#include <numberformatter.h>

Inheritance diagram for icu::number::UnlocalizedNumberFormatter:
icu::number::NumberFormatterSettings< Derived > icu::UMemory

Public Member Functions

LocalizedNumberFormatter locale (const icu::Locale &locale) const &
 Associate the given locale with the number formatter. More...
 
LocalizedNumberFormatter locale (const icu::Locale &locale) &&
 Overload of locale() for use on an rvalue reference. More...
 
 UnlocalizedNumberFormatter ()=default
 Default constructor: puts the formatter into a valid but undefined state. More...
 
 UnlocalizedNumberFormatter (const UnlocalizedNumberFormatter &other)
 Returns a copy of this UnlocalizedNumberFormatter. More...
 
 UnlocalizedNumberFormatter (UnlocalizedNumberFormatter &&src) U_NOEXCEPT
 Move constructor: The source UnlocalizedNumberFormatter will be left in a valid but undefined state. More...
 
UnlocalizedNumberFormatteroperator= (const UnlocalizedNumberFormatter &other)
 Copy assignment operator. More...
 
UnlocalizedNumberFormatteroperator= (UnlocalizedNumberFormatter &&src) U_NOEXCEPT
 Move assignment operator: The source UnlocalizedNumberFormatter will be left in a valid but undefined state. More...
 
- Public Member Functions inherited from icu::number::NumberFormatterSettings< Derived >
Derived notation (const Notation &notation) const &
 Specifies the notation style (simple, scientific, or compact) for rendering numbers. More...
 
Derived notation (const Notation &notation) &&
 Overload of notation() for use on an rvalue reference. More...
 
Derived unit (const icu::MeasureUnit &unit) const &
 Specifies the unit (unit of measure, currency, or percent) to associate with rendered numbers. More...
 
Derived unit (const icu::MeasureUnit &unit) &&
 Overload of unit() for use on an rvalue reference. More...
 
Derived adoptUnit (icu::MeasureUnit *unit) const &
 Like unit(), but takes ownership of a pointer. More...
 
Derived adoptUnit (icu::MeasureUnit *unit) &&
 Overload of adoptUnit() for use on an rvalue reference. More...
 
Derived perUnit (const icu::MeasureUnit &perUnit) const &
 Sets a unit to be used in the denominator. More...
 
Derived perUnit (const icu::MeasureUnit &perUnit) &&
 Overload of perUnit() for use on an rvalue reference. More...
 
Derived adoptPerUnit (icu::MeasureUnit *perUnit) const &
 Like perUnit(), but takes ownership of a pointer. More...
 
Derived adoptPerUnit (icu::MeasureUnit *perUnit) &&
 Overload of adoptPerUnit() for use on an rvalue reference. More...
 
Derived precision (const Precision &precision) const &
 Specifies the rounding precision to use when formatting numbers. More...
 
Derived precision (const Precision &precision) &&
 Overload of precision() for use on an rvalue reference. More...
 
Derived roundingMode (UNumberFormatRoundingMode roundingMode) const &
 Specifies how to determine the direction to round a number when it has more digits than fit in the desired precision. More...
 
Derived roundingMode (UNumberFormatRoundingMode roundingMode) &&
 Overload of roundingMode() for use on an rvalue reference. More...
 
Derived grouping (UNumberGroupingStrategy strategy) const &
 Specifies the grouping strategy to use when formatting numbers. More...
 
Derived grouping (UNumberGroupingStrategy strategy) &&
 Overload of grouping() for use on an rvalue reference. More...
 
Derived integerWidth (const IntegerWidth &style) const &
 Specifies the minimum and maximum number of digits to render before the decimal mark. More...
 
Derived integerWidth (const IntegerWidth &style) &&
 Overload of integerWidth() for use on an rvalue reference. More...
 
Derived symbols (const DecimalFormatSymbols &symbols) const &
 Specifies the symbols (decimal separator, grouping separator, percent sign, numerals, etc.) to use when rendering numbers. More...
 
Derived symbols (const DecimalFormatSymbols &symbols) &&
 Overload of symbols() for use on an rvalue reference. More...
 
Derived adoptSymbols (NumberingSystem *symbols) const &
 Specifies that the given numbering system should be used when fetching symbols. More...
 
Derived adoptSymbols (NumberingSystem *symbols) &&
 Overload of adoptSymbols() for use on an rvalue reference. More...
 
Derived unitWidth (UNumberUnitWidth width) const &
 Sets the width of the unit (measure unit or currency). More...
 
Derived unitWidth (UNumberUnitWidth width) &&
 Overload of unitWidth() for use on an rvalue reference. More...
 
Derived sign (UNumberSignDisplay style) const &
 Sets the plus/minus sign display strategy. More...
 
Derived sign (UNumberSignDisplay style) &&
 Overload of sign() for use on an rvalue reference. More...
 
Derived decimal (UNumberDecimalSeparatorDisplay style) const &
 Sets the decimal separator display strategy. More...
 
Derived decimal (UNumberDecimalSeparatorDisplay style) &&
 Overload of decimal() for use on an rvalue reference. More...
 
Derived scale (const Scale &scale) const &
 Sets a scale (multiplier) to be used to scale the number by an arbitrary amount before formatting. More...
 
Derived scale (const Scale &scale) &&
 Overload of scale() for use on an rvalue reference. More...
 
Derived padding (const impl::Padder &padder) const &
 Set the padding strategy. More...
 
Derived padding (const impl::Padder &padder) &&
 
Derived threshold (int32_t threshold) const &
 Internal fluent setter to support a custom regulation threshold. More...
 
Derived threshold (int32_t threshold) &&
 
Derived macros (const impl::MacroProps &macros) const &
 Internal fluent setter to overwrite the entire macros object. More...
 
Derived macros (const impl::MacroProps &macros) &&
 
Derived macros (impl::MacroProps &&macros) const &
 
Derived macros (impl::MacroProps &&macros) &&
 
UnicodeString toSkeleton (UErrorCode &status) const
 Creates a skeleton string representation of this number formatter. More...
 
LocalPointer< Derived > clone () const &
 Returns the current (Un)LocalizedNumberFormatter as a LocalPointer wrapping a heap-allocated copy of the current object. More...
 
LocalPointer< Derived > clone () &&
 Overload of clone for use on an rvalue reference. More...
 
UBool copyErrorTo (UErrorCode &outErrorCode) const
 Sets the UErrorCode if an error occurred in the fluent chain. More...
 

Friends

class NumberFormatterSettings< UnlocalizedNumberFormatter >
 
class NumberFormatter
 

Detailed Description

A NumberFormatter that does not yet have a locale.

In order to format numbers, a locale must be specified.

Instances of this class are immutable and thread-safe.

See also
NumberFormatter
Draft:
This API may be changed in the future versions and was introduced in ICU 60

Definition at line 2144 of file numberformatter.h.

Constructor & Destructor Documentation

◆ UnlocalizedNumberFormatter() [1/3]

icu::number::UnlocalizedNumberFormatter::UnlocalizedNumberFormatter ( )
default

Default constructor: puts the formatter into a valid but undefined state.

Draft:
This API may be changed in the future versions and was introduced in ICU 62

◆ UnlocalizedNumberFormatter() [2/3]

icu::number::UnlocalizedNumberFormatter::UnlocalizedNumberFormatter ( const UnlocalizedNumberFormatter other)

Returns a copy of this UnlocalizedNumberFormatter.

Draft:
This API may be changed in the future versions and was introduced in ICU 60

◆ UnlocalizedNumberFormatter() [3/3]

icu::number::UnlocalizedNumberFormatter::UnlocalizedNumberFormatter ( UnlocalizedNumberFormatter &&  src)

Move constructor: The source UnlocalizedNumberFormatter will be left in a valid but undefined state.

Draft:
This API may be changed in the future versions and was introduced in ICU 62

Member Function Documentation

◆ locale() [1/2]

LocalizedNumberFormatter icu::number::UnlocalizedNumberFormatter::locale ( const icu::Locale locale) const &

Associate the given locale with the number formatter.

The locale is used for picking the appropriate symbols, formats, and other data for number display.

Parameters
localeThe locale to use when loading data for number formatting.
Returns
The fluent chain.
Draft:
This API may be changed in the future versions and was introduced in ICU 60

◆ locale() [2/2]

LocalizedNumberFormatter icu::number::UnlocalizedNumberFormatter::locale ( const icu::Locale locale) &&

Overload of locale() for use on an rvalue reference.

Parameters
localeThe locale to use when loading data for number formatting.
Returns
The fluent chain.
See also
locale
Draft:
This API may be changed in the future versions and was introduced in ICU 62

◆ operator=() [1/2]

UnlocalizedNumberFormatter& icu::number::UnlocalizedNumberFormatter::operator= ( const UnlocalizedNumberFormatter other)

Copy assignment operator.

Draft:
This API may be changed in the future versions and was introduced in ICU 62

◆ operator=() [2/2]

UnlocalizedNumberFormatter& icu::number::UnlocalizedNumberFormatter::operator= ( UnlocalizedNumberFormatter &&  src)

Move assignment operator: The source UnlocalizedNumberFormatter will be left in a valid but undefined state.

Draft:
This API may be changed in the future versions and was introduced in ICU 62

The documentation for this class was generated from the following file: