ICU 76.1 76.1
|
The mutable Expression::Builder class allows the operator to be constructed incrementally. More...
#include <messageformat2_data_model.h>
Public Member Functions | |
Builder & | setOperand (Operand &&rAnd) |
Sets the operand of this expression. | |
Builder & | setOperator (Operator &&rAtor) |
Sets the operator of this expression. | |
Builder & | addAttribute (const UnicodeString &key, Operand &&value, UErrorCode &status) |
Adds a single attribute. | |
Expression | build (UErrorCode &status) |
Constructs a new immutable Expression using the operand and operator that were previously set. | |
Builder (UErrorCode &status) | |
Default constructor. | |
virtual | ~Builder () |
Destructor. | |
Builder (const Builder &)=delete | |
Builder & | operator= (const Builder &)=delete |
Builder (Builder &&)=delete | |
Builder & | operator= (Builder &&)=delete |
Friends | |
class | Expression |
The mutable Expression::Builder class allows the operator to be constructed incrementally.
Builder is not copyable or movable.
Definition at line 1331 of file messageformat2_data_model.h.
icu::message2::data_model::Expression::Builder::Builder | ( | UErrorCode & | status | ) |
Default constructor.
Returns a Builder with no operator or operand set.
status | Input/output error code. |
Referenced by addAttribute(), setOperand(), setOperator(), and ~Builder().
|
virtual |
Destructor.
References Builder().
Builder & icu::message2::data_model::Expression::Builder::addAttribute | ( | const UnicodeString & | key, |
Operand && | value, | ||
UErrorCode & | status ) |
Adds a single attribute.
key | The name of the attribute. |
value | The value (right-hand side) of the attribute. |
status | Input/output error code. |
References Builder().
Expression icu::message2::data_model::Expression::Builder::build | ( | UErrorCode & | status | ) |
Constructs a new immutable Expression using the operand and operator that were previously set.
If neither setOperand() nor setOperator() was previously called, or if setOperand() was called with the null operand and setOperator() was never called, then status is set to U_INVALID_STATE_ERROR.
The builder object (this) can still be used after calling build(). The build() method is non-const for internal implementation reasons, but is observably const.
status | Input/output error code. |
Sets the operand of this expression.
rAnd | The operand to set. Passed by move. |
References Builder().
Sets the operator of this expression.
rAtor | The operator to set. Passed by move. |
References Builder().
|
friend |
Definition at line 1333 of file messageformat2_data_model.h.