ICU 75.1 75.1

Public Member Functions
icu::message2::FormattableObject Class Referenceabstract

`FormattableObject` is an abstract class that can be implemented in order to define an arbitrary class that can be passed to a custom formatter or selector function. More...

`#include <messageformat2_formattable.h>`

Inheritance diagram for icu::message2::FormattableObject:

## Public Member Functions
virtual const UnicodeString & | tag () const =0
| Returns an arbitrary string representing the type of this object. More...
virtual | ~FormattableObject ()
| 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...

## Detailed Description

`FormattableObject` is an abstract class that can be implemented in order to define an arbitrary class that can be passed to a custom formatter or selector function.

To be passed in such a way, it must be wrapped in a `Formattable` object.

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 46 of file messageformat2_formattable.h.

## Constructor & Destructor Documentation

## ◆ ~FormattableObject()

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

## ◆ tag()

virtual const UnicodeString& icu::message2::FormattableObject::tag | ( |  | ) | const
| pure virtual

Returns an arbitrary string representing the type of this object.

It's up to the implementor of this class, as well as the implementors of any custom functions that rely on particular values of this tag corresponding to particular classes that the object contents can be downcast to, to ensure that the type tags are used soundly.

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