ICU 77.1
77.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. More... | |
const VariableName & | getVariable () const |
Accesses the left-hand side of the binding. More... | |
UBool | isLocal () const |
Returns true if and only if this binding represents a local declaration. More... | |
Binding (const VariableName &v, Expression &&e) | |
Constructor. More... | |
Binding (const Binding &other) | |
Copy constructor. More... | |
Binding & | operator= (Binding) noexcept |
Copy assignment operator. More... | |
Binding () | |
Default constructor. More... | |
virtual | ~Binding () |
Destructor. More... | |
![]() | |
virtual | ~UObject () |
Destructor. More... | |
virtual UClassID | getDynamicClassID () const |
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class. More... | |
Static Public Member Functions | |
static Binding | input (UnicodeString &&variableName, Expression &&rhs, UErrorCode &errorCode) |
Constructor for input binding. More... | |
Friends | |
class | message2::Checker |
class | message2::MessageFormatter |
class | message2::Parser |
class | message2::Serializer |
void | swap (Binding &b1, Binding &b2) noexcept |
Non-member swap function. More... | |
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 2036 of file messageformat2_data_model.h.
|
inline |
Constructor.
v | A variable name. |
e | An expression. |
Definition at line 2088 of file messageformat2_data_model.h.
icu::message2::data_model::Binding::Binding | ( | const Binding & | other | ) |
Copy constructor.
|
inline |
Default constructor.
Puts the Binding into a valid but undefined state.
Definition at line 2127 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 2055 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 |
|
inline |
Returns true if and only if this binding represents a local declaration.
Otherwise, it's an input declaration.
Definition at line 2078 of file messageformat2_data_model.h.
Copy assignment operator.
Non-member swap function.
b1 | will get b2's contents |
b2 | will get b1's contents |
Definition at line 2097 of file messageformat2_data_model.h.