ICU 78.3 78.3

Public Member Functions | Friends
icu::message2::data_model::Operator::Builder Class Reference

The mutable `Operator::Builder` class allows the operator to be constructed incrementally. More...

`#include <messageformat2_data_model.h>`

Inheritance diagram for icu::message2::data_model::Operator::Builder:

## Public Member Functions
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 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

## Detailed Description

The mutable `Operator::Builder` class allows the operator to be constructed incrementally.

Builder is not copyable or movable.

Internal:
  Do not use. This API is for internal use only. ICU 75 technology preview

Deprecated:
  This API is for technology preview only.

Definition at line 798 of file messageformat2_data_model.h.

## Constructor & Destructor Documentation

## ◆ Builder()

icu::message2::data_model::Operator::Builder::Builder | ( | UErrorCode & | status | ) |

Default constructor.

Returns a Builder with no function name or options set.

Parameters

  status | Input/output error code.

Internal:
  Do not use. This API is for internal use only. ICU 75 technology preview

Deprecated:
  This API is for technology preview only.

## ◆ ~Builder()

virtual icu::message2::data_model::Operator::Builder::~Builder | ( |  | ) |
| virtual

Destructor.

Internal:
  Do not use. This API is for internal use only. ICU 75 technology preview

Deprecated:
  This API is for technology preview only.

## Member Function Documentation

## ◆ addOption()

Builder& icu::message2::data_model::Operator::Builder::addOption | ( | const UnicodeString & | key,
|  | Operand && | value,
|  | UErrorCode & | status
| ) |  |
| noexcept

Sets this operator to be a function annotation and adds a single option.

Parameters

  key | The name of the option.
  value | The value (right-hand side) of the option.
  status | Input/output error code.

Returns
  A reference to the builder.

Internal:
  Do not use. This API is for internal use only. ICU 75 technology preview

Deprecated:
  This API is for technology preview only.

## ◆ build()

Operator icu::message2::data_model::Operator::Builder::build | ( | UErrorCode & | status | ) |

Constructs a new immutable `Operator` using the function name and options that were previously set.

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.

Parameters

  status | Input/output error code.

Returns
  The new Operator

Internal:
  Do not use. This API is for internal use only. ICU 75 technology preview

Deprecated:
  This API is for technology preview only.

## ◆ setFunctionName()

Builder& icu::message2::data_model::Operator::Builder::setFunctionName | ( | FunctionName && | func | ) |

Sets this operator to be a function annotation and sets its name to `func`.

Parameters

  func | The function name.

Returns
  A reference to the builder.

Internal:
  Do not use. This API is for internal use only. ICU 75 technology preview

Deprecated:
  This API is for technology preview only.

The documentation for this class was generated from the following file:

- i18n/unicode/messageformat2_data_model.h