ICU 76.1 76.1
|
A Binding
pairs a variable name with an expression.
More...
#include <messageformat2_data_model.h>
Public Member Functions | |
const Expression & | getValue () const |
Accesses the right-hand side of a binding. | |
const VariableName & | getVariable () const |
Accesses the left-hand side of the binding. | |
UBool | isLocal () const |
Returns true if and only if this binding represents a local declaration. | |
Binding (const VariableName &v, Expression &&e) | |
Constructor. | |
Binding (const Binding &other) | |
Copy constructor. | |
Binding & | operator= (Binding) noexcept |
Copy assignment operator. | |
Binding () | |
Default constructor. | |
virtual | ~Binding () |
Destructor. | |
![]() | |
virtual | ~UObject () |
Destructor. | |
virtual UClassID | getDynamicClassID () const |
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class. | |
Static Public Member Functions | |
static Binding | input (UnicodeString &&variableName, Expression &&rhs, UErrorCode &errorCode) |
Constructor for input binding. | |
Friends | |
class | message2::Checker |
class | message2::MessageFormatter |
class | message2::Parser |
class | message2::Serializer |
void | swap (Binding &b1, Binding &b2) noexcept |
Non-member swap function. | |
A Binding
pairs a variable name with an expression.
It corresponds to the Declaration
interface defined in https://github.com/unicode-org/message-format-wg/blob/main/spec/data-model.md#messages
Binding
is immutable and copyable. It is not movable.
Definition at line 2034 of file messageformat2_data_model.h.
|
inline |
Constructor.
v | A variable name. |
e | An expression. |
Definition at line 2086 of file messageformat2_data_model.h.
Referenced by Binding(), input(), operator=(), and swap.
icu::message2::data_model::Binding::Binding | ( | const Binding & | other | ) |
Copy constructor.
References Binding().
|
inline |
Default constructor.
Puts the Binding into a valid but undefined state.
Definition at line 2125 of file messageformat2_data_model.h.
|
virtual |
Destructor.
const Expression & icu::message2::data_model::Binding::getValue | ( | ) | const |
Accesses the right-hand side of a binding.
|
inline |
Accesses the left-hand side of the binding.
Definition at line 2053 of file messageformat2_data_model.h.
|
static |
Constructor for input binding.
variableName | The variable name (left-hand side) of the binding. Passed by move. |
rhs | The right-hand side of the input binding. Passed by move. rhs must have an operand that is a variable reference to variableName . If rhs has an operator, it must be a function call. If either of these properties is violated, errorCode is set to U_INVALID_STATE_ERROR. |
errorCode | Input/output error code |
References Binding().
|
inline |
Returns true if and only if this binding represents a local declaration.
Otherwise, it's an input declaration.
Definition at line 2076 of file messageformat2_data_model.h.
Copy assignment operator.
References Binding().
|
friend |
Definition at line 2134 of file messageformat2_data_model.h.
|
friend |
Definition at line 2135 of file messageformat2_data_model.h.
|
friend |
Definition at line 2136 of file messageformat2_data_model.h.
|
friend |
Definition at line 2137 of file messageformat2_data_model.h.
Non-member swap function.
b1 | will get b2's contents |
b2 | will get b1's contents |
Definition at line 2095 of file messageformat2_data_model.h.
References Binding(), and swap.
Referenced by swap.