ICU 77.1
77.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. More... | |
FormattedValue (number::FormattedNumber &&) | |
Formatted number constructor. More... | |
FormattedValue () | |
Default constructor. More... | |
bool | isString () const |
Returns true iff this is a formatted string. More... | |
bool | isNumber () const |
Returns true iff this is a formatted number. More... | |
const UnicodeString & | getString () const |
Gets the string contents of this value. More... | |
const number::FormattedNumber & | getNumber () const |
Gets the number contents of this value. More... | |
FormattedValue & | operator= (FormattedValue &&) noexcept |
Move assignment operator: The source FormattedValue will be left in a valid but undefined state. More... | |
FormattedValue (FormattedValue &&other) | |
Move constructor: The source FormattedValue will be left in a valid but undefined state. More... | |
virtual | ~FormattedValue () |
Destructor. More... | |
![]() | |
virtual | ~UObject () |
Destructor. More... | |
virtual UClassID | getDynamicClassID () const |
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class. More... | |
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 587 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 607 of file messageformat2_formattable.h.
|
inline |
Move constructor: The source FormattedValue will be left in a valid but undefined state.
Definition at line 657 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 641 of file messageformat2_formattable.h.
|
inline |
Gets the string contents of this value.
If !isString(), then the result is undefined.
Definition at line 633 of file messageformat2_formattable.h.
|
inline |
Returns true iff this is a formatted number.
Definition at line 625 of file messageformat2_formattable.h.
|
inline |
Returns true iff this is a formatted string.
Definition at line 616 of file messageformat2_formattable.h.
|
noexcept |
Move assignment operator: The source FormattedValue will be left in a valid but undefined state.