ICU 76.1 76.1
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:
icu::UObject icu::UMemory

Public Member Functions

 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.
 
MessageArgumentsoperator= (MessageArguments &&) noexcept
 Move operator: The source MessageArguments will be left in a valid but undefined state.
 
 MessageArguments ()=default
 Default constructor.
 
virtual ~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 59 of file messageformat2_arguments.h.

Constructor & Destructor Documentation

◆ MessageArguments() [1/2]

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
argsA 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.
statusInput/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 72 of file messageformat2_arguments.h.

References U_FAILURE, and U_MEMORY_ALLOCATION_ERROR.

◆ MessageArguments() [2/2]

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

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.

Friends And Related Symbol Documentation

◆ MessageContext

friend class MessageContext
friend

Definition at line 113 of file messageformat2_arguments.h.


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