ICU 78.1: icu::message2::MessageArguments Class Reference

ICU 78.1 78.1

Public Member Functions | Friends
icu::message2::MessageArguments Class Reference

The `MessageArguments` class represents the named arguments to a message. More...

`#include <messageformat2_arguments.h>`

Inheritance diagram for icu::message2::MessageArguments:

## Public Member Functions
U_I18N_API | MessageArguments (const std::map< UnicodeString, Formattable > &args, UErrorCode &status)
| Message arguments constructor, which takes a map and returns a container of arguments that can be passed to a `MessageFormatter`. More...
U_I18N_API MessageArguments & | operator= (MessageArguments &&) noexcept
| Move operator: The source MessageArguments will be left in a valid but undefined state. More...
U_I18N_API | MessageArguments ()=default
| Default constructor. More...
virtual U_I18N_API | ~MessageArguments ()
| 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
class | MessageContext

## Detailed Description

The `MessageArguments` class represents the named arguments to a message.

It is immutable and movable. It is not copyable.

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 47 of file messageformat2_arguments.h.

## Constructor & Destructor Documentation

## ◆ MessageArguments() [1/2]

U_I18N_API icu::message2::MessageArguments::MessageArguments | ( | const std::map< UnicodeString, Formattable > & | args,
|  | UErrorCode & | status
| ) |  |
| inline

Message arguments constructor, which takes a map and returns a container of arguments that can be passed to a `MessageFormatter`.

Parameters

  args | A reference to a map from strings (argument names) to `message2::Formattable` objects (argument values). The keys and values of the map are copied into the result.
  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.

Definition at line 60 of file messageformat2_arguments.h.

References U_FAILURE, and U_MEMORY_ALLOCATION_ERROR.

## ◆ MessageArguments() [2/2]

U_I18N_API icu::message2::MessageArguments::MessageArguments | ( |  | ) |
| default

Default constructor.

Returns an empty arguments mapping.

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

Deprecated:
  This API is for technology preview only.

## ◆ ~MessageArguments()

virtual U_I18N_API icu::message2::MessageArguments::~MessageArguments | ( |  | ) |
| 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

## ◆ operator=()

U_I18N_API MessageArguments& icu::message2::MessageArguments::operator= | ( | MessageArguments && |  | ) |
| noexcept

Move operator: The source MessageArguments will be left 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.

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

- i18n/unicode/messageformat2_arguments.h