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

The mutable Markup::Builder class allows the markup to be constructed incrementally. More...

#include <messageformat2_data_model.h>

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

Public Member Functions

BuildersetName (const UnicodeString &n)
 Sets the name of this markup.
 
BuildersetOpen ()
 Sets this to be an opening markup.
 
BuildersetClose ()
 Sets this to be an closing markup.
 
BuildersetStandalone ()
 Sets this to be a standalone markup.
 
BuilderaddOption (const UnicodeString &key, Operand &&value, UErrorCode &status) noexcept
 Adds a single option.
 
BuilderaddAttribute (const UnicodeString &key, Operand &&value, UErrorCode &status) noexcept
 Adds a single attribute.
 
Markup build (UErrorCode &status)
 Constructs a new immutable Markup using the name and type and (optionally) options and attributes that were previously set.
 
 Builder (UErrorCode &status)
 Default constructor.
 
virtual ~Builder ()
 Destructor.
 

Friends

class Markup
 
class message2::Parser
 

Detailed Description

The mutable Markup::Builder class allows the markup 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 1358 of file messageformat2_data_model.h.

Constructor & Destructor Documentation

◆ Builder()

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

Default constructor.

Returns a Builder with no name, type, options, or attributes 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::Markup::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::Markup::Builder::addAttribute ( const UnicodeString key,
Operand &&  value,
UErrorCode status 
)
noexcept

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.

◆ addOption()

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

Adds a single option.

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()

Markup icu::message2::data_model::Markup::Builder::build ( UErrorCode status)

Constructs a new immutable Markup using the name and type and (optionally) options and attributes that were previously set.

If setName() and at least one of setOpen(), setClose(), and setStandalone() were not 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 Markup.
Internal:
Do not use. This API is for internal use only. ICU 75.0 technology preview
Deprecated:
This API is for technology preview only.

◆ setClose()

Builder & icu::message2::data_model::Markup::Builder::setClose ( )
inline

Sets this to be an closing markup.

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.

Definition at line 1407 of file messageformat2_data_model.h.

◆ setName()

Builder & icu::message2::data_model::Markup::Builder::setName ( const UnicodeString n)
inline

Sets the name of this markup.

Parameters
nA string representing the 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.

Definition at line 1389 of file messageformat2_data_model.h.

◆ setOpen()

Builder & icu::message2::data_model::Markup::Builder::setOpen ( )
inline

Sets this to be an opening markup.

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.

Definition at line 1398 of file messageformat2_data_model.h.

◆ setStandalone()

Builder & icu::message2::data_model::Markup::Builder::setStandalone ( )
inline

Sets this to be a standalone markup.

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.

Definition at line 1416 of file messageformat2_data_model.h.

Friends And Related Symbol Documentation

◆ Markup

Definition at line 1360 of file messageformat2_data_model.h.

◆ message2::Parser

friend class message2::Parser
friend

Definition at line 1361 of file messageformat2_data_model.h.


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