icu::message2::Formatter Class Referenceabstract

Interface that formatter classes must implement. More...

`#include <messageformat2_function_registry.h>`

Inheritance diagram for icu::message2::Formatter:

## Public Member Functions

virtual FormattedPlaceholder | format (FormattedPlaceholder &&toFormat, FunctionOptions &&options, UErrorCode &status) const =0
| Formats the input passed in `context` by setting an output using one of the `FormattingContext` methods or indicating an error.
virtual | ~Formatter ()
| 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.

## Detailed Description

Interface that formatter classes must implement.

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 335 of file messageformat2_function_registry.h.

## Constructor & Destructor Documentation

## ~Formatter()

virtual icu::message2::Formatter::~Formatter | ( |  | ) |

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

## format()

virtual FormattedPlaceholder icu::message2::Formatter::format | ( | FormattedPlaceholder && | toFormat,
|  | FunctionOptions && | options,
|  | UErrorCode & | status
| ) |  | const

pure virtual

Formats the input passed in `context` by setting an output using one of the `FormattingContext` methods or indicating an error.

Parameters

  toFormat | Placeholder, including a source formattable value and possibly the output of a previous formatter applied to it; see `message2::FormattedPlaceholder` for details. Passed by move.
  options | The named function options. Passed by move
  status | Input/output error code. Should not be set directly by the custom formatter, which should use `FormattingContext::setFormattingWarning()` to signal errors. The custom formatter may pass `status` to other ICU functions that can signal errors using this mechanism.

Returns
  The formatted value.

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_function_registry.h