ICU 76.1 76.1
|
A FormattedValue
represents the result of formatting a message2::Formattable
.
More...
#include <messageformat2_formattable.h>
Public Member Functions | |
FormattedValue (const UnicodeString &) | |
Formatted string constructor. | |
FormattedValue (number::FormattedNumber &&) | |
Formatted number constructor. | |
FormattedValue () | |
Default constructor. | |
bool | isString () const |
Returns true iff this is a formatted string. | |
bool | isNumber () const |
Returns true iff this is a formatted number. | |
const UnicodeString & | getString () const |
Gets the string contents of this value. | |
const number::FormattedNumber & | getNumber () const |
Gets the number contents of this value. | |
FormattedValue & | operator= (FormattedValue &&) noexcept |
Move assignment operator: The source FormattedValue will be left in a valid but undefined state. | |
FormattedValue (FormattedValue &&other) | |
Move constructor: The source FormattedValue will be left in a valid but undefined state. | |
virtual | ~FormattedValue () |
Destructor. | |
Public Member Functions inherited from icu::UObject | |
virtual | ~UObject () |
Destructor. | |
virtual UClassID | getDynamicClassID () const |
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class. | |
A FormattedValue
represents the result of formatting a message2::Formattable
.
It contains either a string or a formatted number. (More types could be added in the future.)
FormattedValue
is immutable and movable. It is not copyable.
Definition at line 586 of file messageformat2_formattable.h.
|
explicit |
Formatted string constructor.
|
explicit |
Formatted number constructor.
|
inline |
Default constructor.
Leaves the FormattedValue in a valid but undefined state.
Definition at line 606 of file messageformat2_formattable.h.
|
inline |
Move constructor: The source FormattedValue will be left in a valid but undefined state.
Definition at line 656 of file messageformat2_formattable.h.
|
virtual |
Destructor.
|
inline |
Gets the number contents of this value.
If !isNumber(), then the result is undefined.
Definition at line 640 of file messageformat2_formattable.h.
|
inline |
Gets the string contents of this value.
If !isString(), then the result is undefined.
Definition at line 632 of file messageformat2_formattable.h.
|
inline |
Returns true iff this is a formatted number.
Definition at line 624 of file messageformat2_formattable.h.
|
inline |
Returns true iff this is a formatted string.
Definition at line 615 of file messageformat2_formattable.h.
|
noexcept |
Move assignment operator: The source FormattedValue will be left in a valid but undefined state.