ICU 77.1
77.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. More... | |
const SelectorKeys & | getKeys () const |
Accesses the keys of the variant. More... | |
Variant (const SelectorKeys &keys, Pattern &&pattern) | |
Constructor. More... | |
Variant & | operator= (Variant other) noexcept |
Assignment operator. More... | |
Variant ()=default | |
Default constructor. More... | |
Variant (const Variant &) | |
Copy constructor. More... | |
virtual | ~Variant () |
Destructor. More... | |
![]() | |
virtual | ~UObject () |
Destructor. More... | |
virtual UClassID | getDynamicClassID () const |
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class. More... | |
Friends | |
void | swap (Variant &v1, Variant &v2) noexcept |
Non-member swap function. More... | |
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 1944 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 1975 of file messageformat2_data_model.h.
|
default |
Default constructor.
Returns a Variant in a valid but undefined state.
icu::message2::data_model::Variant::Variant | ( | const Variant & | ) |
Copy constructor.
|
virtual |
Destructor.
|
inline |
Accesses the keys of the variant.
Definition at line 1963 of file messageformat2_data_model.h.
|
inline |
Accesses the pattern of the variant.
Definition at line 1954 of file messageformat2_data_model.h.
Assignment operator.
Non-member swap function.
v1 | will get v2's contents |
v2 | will get v1's contents |
Definition at line 1984 of file messageformat2_data_model.h.