ICU 75.1 75.1
Loading...
Searching...
No Matches
Public Member Functions | Friends
icu::message2::data_model::Expression::Builder Class Reference

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

#include <messageformat2_data_model.h>

Inheritance diagram for icu::message2::data_model::Expression::Builder:
icu::UMemory

Public Member Functions

BuildersetOperand (Operand &&rAnd)
 Sets the operand of this expression.
 
BuildersetOperator (Operator &&rAtor)
 Sets the operator of this expression.
 
BuilderaddAttribute (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.
 

Friends

class Expression
 
class message2::Parser
 

Detailed Description

The mutable Expression::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 1582 of file messageformat2_data_model.h.

Constructor & Destructor Documentation

◆ Builder()

icu::message2::data_model::Expression::Builder::Builder ( UErrorCode status)

Default constructor.

Returns a Builder with no operator or operand 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::Expression::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

◆ addAttribute()

Builder & icu::message2::data_model::Expression::Builder::addAttribute ( const UnicodeString key,
Operand &&  value,
UErrorCode status 
)

Adds a single attribute.

Parameters
keyThe name of the attribute.
valueThe value (right-hand side) of the attribute.
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()

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.

Parameters
statusInput/output error code.
Returns
The new Expression.
Internal:
Do not use. This API is for internal use only. ICU 75.0 technology preview
Deprecated:
This API is for technology preview only.

◆ setOperand()

Builder & icu::message2::data_model::Expression::Builder::setOperand ( Operand &&  rAnd)

Sets the operand of this expression.

Parameters
rAndThe operand to set. 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.

◆ setOperator()

Builder & icu::message2::data_model::Expression::Builder::setOperator ( Operator &&  rAtor)

Sets the operator of this expression.

Parameters
rAtorThe operator to set. 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

◆ Expression

Definition at line 1584 of file messageformat2_data_model.h.

◆ message2::Parser

friend class message2::Parser
friend

Definition at line 1585 of file messageformat2_data_model.h.


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