ICU 75.1 75.1

Public Member Functions | Friends
icu::message2::data_model::Option Class Reference

An `Option` pairs an option name with an Operand. More...

`#include <messageformat2_data_model.h>`

Inheritance diagram for icu::message2::data_model::Option:

## Public Member Functions
const Operand & | getValue () const
| Accesses the right-hand side of the option. More...
const UnicodeString & | getName () const
| Accesses the left-hand side of the option. More...
| Option (const UnicodeString &n, Operand &&r)
| Constructor. More...
| Option ()
| Default constructor. More...
| Option (const Option &other)
| Copy constructor. More...
Option & | operator= (Option other) noexcept
| Assignment operator. More...
virtual | ~Option ()
| Destructor. More...
Public Member Functions inherited from icu::UObject
virtual | ~UObject ()
| Destructor. More...
virtual UClassID | getDynamicClassID () const
| ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class. More...

## Friends
void | swap (Option &o1, Option &o2) noexcept
| Non-member swap function. More...

## Detailed Description

An `Option` pairs an option name with an Operand.

`Option` is immutable, copyable and 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 838 of file messageformat2_data_model.h.

## Constructor & Destructor Documentation

## ◆ Option() [1/3]

icu::message2::data_model::Option::Option | ( | const UnicodeString & | n,
|  | Operand && | r
| ) |  |
| inline

Constructor.

Returns an `Option` representing the named option "name=rand".

Parameters

  n | The name of the option.
  r | The value of the option.

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 868 of file messageformat2_data_model.h.

## ◆ Option() [2/3]

icu::message2::data_model::Option::Option | ( |  | ) |
| inline

Default constructor.

Returns an Option in a valid but undefined state.

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 876 of file messageformat2_data_model.h.

## ◆ Option() [3/3]

icu::message2::data_model::Option::Option | ( | const Option & | other | ) |

Copy constructor.

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

Deprecated:
  This API is for technology preview only.

## ◆ ~Option()

virtual icu::message2::data_model::Option::~Option | ( |  | ) |
| 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

## ◆ getName()

const UnicodeString& icu::message2::data_model::Option::getName | ( |  | ) | const
| inline

Accesses the left-hand side of the option.

Returns
  A reference to the option name.

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 857 of file messageformat2_data_model.h.

## ◆ getValue()

const Operand& icu::message2::data_model::Option::getValue | ( |  | ) | const
| inline

Accesses the right-hand side of the option.

Returns
  A reference to the operand.

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 848 of file messageformat2_data_model.h.

## ◆ operator=()

Option& icu::message2::data_model::Option::operator= | ( | Option | other | ) |
| noexcept

Assignment operator.

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

Deprecated:
  This API is for technology preview only.

## Friends And Related Function Documentation

## ◆ swap

void swap | ( | Option & | o1,
|  | Option & | o2
| ) |  |
| friend

Non-member swap function.

Parameters

  o1 | will get o2's contents
  o2 | will get o1's contents

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 885 of file messageformat2_data_model.h.

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

- i18n/unicode/messageformat2_data_model.h