ICU 76.1 76.1
|
A Variant pairs a list of keys with a pattern It corresponds to the Variant interface defined in https://github.com/unicode-org/message-format-wg/tree/main/spec/data-model. More...
#include <messageformat2_data_model.h>
Public Member Functions | |
const Pattern & | getPattern () const |
Accesses the pattern of the variant. | |
const SelectorKeys & | getKeys () const |
Accesses the keys of the variant. | |
Variant (const SelectorKeys &keys, Pattern &&pattern) | |
Constructor. | |
Variant & | operator= (Variant other) noexcept |
Assignment operator. | |
Variant ()=default | |
Default constructor. | |
Variant (const Variant &) | |
Copy constructor. | |
virtual | ~Variant () |
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. |
Friends | |
void | swap (Variant &v1, Variant &v2) noexcept |
Non-member swap function. |
A Variant pairs a list of keys with a pattern It corresponds to the Variant interface defined in https://github.com/unicode-org/message-format-wg/tree/main/spec/data-model.
Variant is immutable, copyable and movable.
Definition at line 1942 of file messageformat2_data_model.h.
|
inline |
Constructor.
Returns a variant that formats to pattern when keys match the selector expressions in the enclosing match construct.
keys | A reference to a SelectorKeys. |
pattern | A pattern (passed by move) |
Definition at line 1973 of file messageformat2_data_model.h.
Referenced by operator=(), swap, and Variant().
|
default |
Default constructor.
Returns a Variant in a valid but undefined state.
icu::message2::data_model::Variant::Variant | ( | const Variant & | ) |
Copy constructor.
References Variant().
|
virtual |
Destructor.
|
inline |
Accesses the keys of the variant.
Definition at line 1961 of file messageformat2_data_model.h.
|
inline |
Accesses the pattern of the variant.
Definition at line 1952 of file messageformat2_data_model.h.
Assignment operator.
References Variant().
Non-member swap function.
v1 | will get v2's contents |
v2 | will get v1's contents |
Definition at line 1982 of file messageformat2_data_model.h.
References swap, and Variant().
Referenced by swap.