ICU 75.1 75.1
Loading...
Searching...
No Matches
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:
icu::UMemory

Public Member Functions

BuildersetReserved (Reserved &&reserved)
 Sets this operator to be a reserved sequence.
 
BuildersetFunctionName (FunctionName &&func)
 Sets this operator to be a function annotation and sets its name to func.
 
BuilderaddOption (const UnicodeString &key, Operand &&value, UErrorCode &status) noexcept
 Sets this operator to be a function annotation and adds a single option.
 
Operator build (UErrorCode &status)
 Constructs a new immutable Operator using the reserved annotation or the function name and options that were previously set.
 
 Builder (UErrorCode &status)
 Default constructor.
 
virtual ~Builder ()
 Destructor.
 

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.0 technology preview
Deprecated:
This API is for technology preview only.

Definition at line 1089 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 reserved sequence set.

Parameters
statusInput/output error code.
Internal:
Do not use. This API is for internal use only. ICU 75.0 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.0 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.

If a reserved sequence was previously set, clears it.

Parameters
keyThe name of the option.
valueThe value (right-hand side) of the option.
statusInput/output error code.
Returns
A reference to the builder.
Internal:
Do not use. This API is for internal use only. ICU 75.0 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 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.

Parameters
statusInput/output error code.
Returns
The new Operator
Internal:
Do not use. This API is for internal use only. ICU 75.0 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.

If a reserved sequence was previously set, clears it.

Parameters
funcThe function name.
Returns
A reference to the builder.
Internal:
Do not use. This API is for internal use only. ICU 75.0 technology preview
Deprecated:
This API is for technology preview only.

◆ setReserved()

Builder & icu::message2::data_model::Operator::Builder::setReserved ( Reserved &&  reserved)

Sets this operator to be a reserved sequence.

If a function name and/or options were previously set, clears them.

Parameters
reservedThe reserved sequence to set as the contents of this Operator. (Passed by move.)
Returns
A reference to the builder.
Internal:
Do not use. This API is for internal use only. ICU 75.0 technology preview
Deprecated:
This API is for technology preview only.

Friends And Related Symbol Documentation

◆ Operator

friend class Operator
friend

Definition at line 1091 of file messageformat2_data_model.h.


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