|
ICU 75.1
75.1
|
The mutable Operator::Builder class allows the operator to be constructed incrementally.
More...
#include <messageformat2_data_model.h>
Public Member Functions | |
| Builder & | setReserved (Reserved &&reserved) |
| Sets this operator to be a reserved sequence. More... | |
| Builder & | setFunctionName (FunctionName &&func) |
Sets this operator to be a function annotation and sets its name to func. More... | |
| Builder & | addOption (const UnicodeString &key, Operand &&value, UErrorCode &status) noexcept |
| Sets this operator to be a function annotation and adds a single option. More... | |
| Operator | build (UErrorCode &status) |
Constructs a new immutable Operator using the reserved annotation or the function name and options that were previously set. More... | |
| Builder (UErrorCode &status) | |
| Default constructor. More... | |
| virtual | ~Builder () |
| Destructor. More... | |
| Builder (const Builder &)=delete | |
| Builder & | operator= (const Builder &)=delete |
| Builder (Builder &&)=delete | |
| Builder & | operator= (Builder &&)=delete |
Friends | |
| class | Operator |
The mutable Operator::Builder class allows the operator to be constructed incrementally.
Builder is not copyable or movable.
Definition at line 1105 of file messageformat2_data_model.h.
| icu::message2::data_model::Operator::Builder::Builder | ( | UErrorCode & | status | ) |
Default constructor.
Returns a Builder with no function name or reserved sequence set.
| status | Input/output error code. |
|
virtual |
Destructor.
|
noexcept |
Sets this operator to be a function annotation and adds a single option.
If a reserved sequence was previously set, clears it.
| key | The name of the option. |
| value | The value (right-hand side) of the option. |
| status | Input/output error code. |
| Operator icu::message2::data_model::Operator::Builder::build | ( | UErrorCode & | status | ) |
Constructs a new immutable Operator using the reserved annotation or the function name and options that were previously set.
If neither setReserved() nor setFunctionName() was previously 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. |
| Builder& icu::message2::data_model::Operator::Builder::setFunctionName | ( | FunctionName && | func | ) |
Sets this operator to be a function annotation and sets its name to func.
If a reserved sequence was previously set, clears it.
| func | The function name. |
Sets this operator to be a reserved sequence.
If a function name and/or options were previously set, clears them.
| reserved | The reserved sequence to set as the contents of this Operator. (Passed by move.) |