Loading...
Searching...
No Matches
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.
U_I18N_API MessageArguments & | operator= (MessageArguments &&) noexcept
| Move operator: The source MessageArguments will be left in a valid but undefined state.
U_I18N_API | MessageArguments ()=default
| Default constructor.
virtual U_I18N_API | ~MessageArguments ()
| Destructor.
Public Member Functions inherited from icu::UObject
virtual | ~UObject ()
| Destructor.
virtual UClassID | getDynamicClassID () const
| ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.

## 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, U_I18N_API, and U_MEMORY_ALLOCATION_ERROR.

Referenced by MessageArguments(), operator=(), and ~MessageArguments().

## 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.

References MessageArguments(), and U_I18N_API.

## ~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.

References MessageArguments(), and U_I18N_API.

## 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.

References MessageArguments(), and U_I18N_API.

## Friends And Related Symbol Documentation

## MessageContext

friend class MessageContext

friend

Definition at line 101 of file messageformat2_arguments.h.

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

- i18n/unicode/messageformat2_arguments.h