icu::number::LocalizedNumberRangeFormatter Class Reference

A NumberRangeFormatter that has a locale associated with it; this means .formatRange() methods are available. More...

#include <numberrangeformatter.h>

Inheritance diagram for icu::number::LocalizedNumberRangeFormatter:
icu::number::NumberRangeFormatterSettings< LocalizedNumberRangeFormatter > icu::UMemory

Public Member Functions

FormattedNumberRange formatFormattableRange (const Formattable &first, const Formattable &second, UErrorCode &status) const
 Format the given Formattables to a string using the settings specified in the NumberRangeFormatter fluent setting chain.
 LocalizedNumberRangeFormatter ()
 Default constructor: puts the formatter into a valid but undefined state.
 LocalizedNumberRangeFormatter (const LocalizedNumberRangeFormatter &other)
 Returns a copy of this LocalizedNumberRangeFormatter.
 LocalizedNumberRangeFormatter (LocalizedNumberRangeFormatter &&src) U_NOEXCEPT
 Move constructor: The source LocalizedNumberRangeFormatter will be left in a valid but undefined state.
LocalizedNumberRangeFormatteroperator= (const LocalizedNumberRangeFormatter &other)
 Copy assignment operator.
LocalizedNumberRangeFormatteroperator= (LocalizedNumberRangeFormatter &&src) U_NOEXCEPT
 Move assignment operator: The source LocalizedNumberRangeFormatter will be left in a valid but undefined state.
void formatImpl (impl::UFormattedNumberRangeData &results, bool equalBeforeRounding, UErrorCode &status) const
 ~LocalizedNumberRangeFormatter ()
 Destruct this LocalizedNumberRangeFormatter, cleaning up any memory it might own.

Friends

class NumberRangeFormatterSettings< UnlocalizedNumberRangeFormatter >
class NumberRangeFormatterSettings< LocalizedNumberRangeFormatter >
class UnlocalizedNumberRangeFormatter

Detailed Description

A NumberRangeFormatter that has a locale associated with it; this means .formatRange() methods are available.

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

Definition at line 553 of file numberrangeformatter.h.


Constructor & Destructor Documentation

icu::number::LocalizedNumberRangeFormatter::LocalizedNumberRangeFormatter (  ) 

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 63
icu::number::LocalizedNumberRangeFormatter::LocalizedNumberRangeFormatter ( const LocalizedNumberRangeFormatter other  ) 

Returns a copy of this LocalizedNumberRangeFormatter.

Draft:
This API may be changed in the future versions and was introduced in ICU 63
icu::number::LocalizedNumberRangeFormatter::LocalizedNumberRangeFormatter ( LocalizedNumberRangeFormatter &&  src  ) 

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

Draft:
This API may be changed in the future versions and was introduced in ICU 63
icu::number::LocalizedNumberRangeFormatter::~LocalizedNumberRangeFormatter (  ) 

Destruct this LocalizedNumberRangeFormatter, cleaning up any memory it might own.

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

Member Function Documentation

FormattedNumberRange icu::number::LocalizedNumberRangeFormatter::formatFormattableRange ( const Formattable first,
const Formattable second,
UErrorCode status 
) const

Format the given Formattables to a string using the settings specified in the NumberRangeFormatter fluent setting chain.

Parameters:
first The first number in the range, usually to the left in LTR locales.
second The second number in the range, usually to the right in LTR locales.
status Set if an error occurs while formatting.
Returns:
A FormattedNumberRange object; call .toString() to get the string.
Draft:
This API may be changed in the future versions and was introduced in ICU 63
void icu::number::LocalizedNumberRangeFormatter::formatImpl ( impl::UFormattedNumberRangeData &  results,
bool  equalBeforeRounding,
UErrorCode status 
) const
Parameters:
results The results object. This method will mutate it to save the results.
equalBeforeRounding Whether the number was equal before copying it into a DecimalQuantity. Used for determining the identity fallback behavior.
status Set if an error occurs while formatting.
Internal:
Do not use. This API is for internal use only.
LocalizedNumberRangeFormatter& icu::number::LocalizedNumberRangeFormatter::operator= ( LocalizedNumberRangeFormatter &&  src  ) 

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

Draft:
This API may be changed in the future versions and was introduced in ICU 63
LocalizedNumberRangeFormatter& icu::number::LocalizedNumberRangeFormatter::operator= ( const LocalizedNumberRangeFormatter other  ) 

Copy assignment operator.

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

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

Generated on 12 Nov 2018 for ICU 63.1 by  doxygen 1.6.1