|
ICU 75.1
75.1
|
The mutable UnsupportedStatement::Builder class allows the statement to be constructed incrementally.
More...
#include <messageformat2_data_model.h>
Public Member Functions | |
| Builder & | setKeyword (const UnicodeString &k) |
| Sets the keyword of this statement. More... | |
| Builder & | setBody (Reserved &&r) |
| Sets the body of this statement. More... | |
| Builder & | addExpression (Expression &&e, UErrorCode &status) |
| Adds an expression to this statement. More... | |
| UnsupportedStatement | build (UErrorCode &status) const |
Constructs a new immutable UnsupportedStatement using the keyword, body and (if applicable) expressions 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 | UnsupportedStatement |
| class | message2::Parser |
The mutable UnsupportedStatement::Builder class allows the statement to be constructed incrementally.
Builder is not copyable or movable.
Definition at line 1814 of file messageformat2_data_model.h.
| icu::message2::data_model::UnsupportedStatement::Builder::Builder | ( | UErrorCode & | status | ) |
Default constructor.
Returns a Builder with no keyword or body set.
| status | Input/output error code. |
|
virtual |
Destructor.
| Builder& icu::message2::data_model::UnsupportedStatement::Builder::addExpression | ( | Expression && | e, |
| UErrorCode & | status | ||
| ) |
Adds an expression to this statement.
| e | The expression to add. Passed by move. |
| status | Input/output error code. |
| UnsupportedStatement icu::message2::data_model::UnsupportedStatement::Builder::build | ( | UErrorCode & | status | ) | const |
Constructs a new immutable UnsupportedStatement using the keyword, body and (if applicable) expressions that were previously set.
If setKeyword() was never called, then status is set to U_INVALID_STATE_ERROR. If setBody() was never called, the body is treated as absent (not an error). If addExpression() was not called at least once, then status is set to U_INVALID_STATE_ERROR.
The builder object (this) can still be used after calling build().
| status | Input/output error code. |
Sets the body of this statement.
| r | The Reserved annotation to set as the body. Passed by move. |
| Builder& icu::message2::data_model::UnsupportedStatement::Builder::setKeyword | ( | const UnicodeString & | k | ) |
Sets the keyword of this statement.
| k | The keyword to set. |