ICU 75.1 75.1

Data Structures | Public Member Functions | Data Fields | Friends
icu::message2::MFDataModel Class Reference

The `MFDataModel` class describes a parsed representation of the text of a message. More...

`#include <messageformat2_data_model.h>`

Inheritance diagram for icu::message2::MFDataModel:

## Data Structures
class | Builder
| The mutable `MFDataModel::Builder` class allows the data model to be constructed incrementally. More...

## Public Member Functions
std::vector< Binding > | getLocalVariables () const
| Accesses the local variable declarations for this data model. More...
const std::vector< Expression > | getSelectors () const
| Accesses the selectors. More...
std::vector< Variant > | getVariants () const
| Accesses the variants. More...
std::vector< UnsupportedStatement > | getUnsupportedStatements () const
| Accesses the unsupported statements for this data model. More...
const Pattern & | getPattern () const
| Accesses the pattern (in a message without selectors). More...
| MFDataModel ()
| Default constructor. More...
MFDataModel & | operator= (MFDataModel) noexcept
| Assignment operator. More...
| MFDataModel (const MFDataModel &other)
| Copy constructor. More...
virtual | ~MFDataModel ()
| Destructor. More...

## Data Fields
class U_I18N_API | Builder
| The mutable `MFDataModel::Builder` class allows the data model to be constructed incrementally. More...

## Friends
class | Checker
class | MessageFormatter
class | Serializer
void | swap (MFDataModel &m1, MFDataModel &m2) noexcept
| Non-member swap function. More...

## Detailed Description

The `MFDataModel` class describes a parsed representation of the text of a message.

This representation is public as higher-level APIs for messages will need to know its public interface: for example, to re-instantiate a parsed message with different values for imported variables.

The MFDataModel API implements the specification of the abstract syntax (data model representation) for MessageFormat.

`MFDataModel` is immutable, copyable and movable.

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 2726 of file messageformat2_data_model.h.

## Constructor & Destructor Documentation

## ◆ MFDataModel() [1/2]

icu::message2::MFDataModel::MFDataModel | ( |  | ) |

Default constructor.

Puts the MFDataModel into 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.

## ◆ MFDataModel() [2/2]

icu::message2::MFDataModel::MFDataModel | ( | const MFDataModel & | other | ) |

Copy constructor.

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

Deprecated:
  This API is for technology preview only.

## ◆ ~MFDataModel()

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

## ◆ getLocalVariables()

std::vector<Binding> icu::message2::MFDataModel::getLocalVariables | ( |  | ) | const
| inline

Accesses the local variable declarations for this data model.

Returns
  A vector of bindings for local variables.

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 2770 of file messageformat2_data_model.h.

## ◆ getPattern()

const Pattern& icu::message2::MFDataModel::getPattern | ( |  | ) | const

Accesses the pattern (in a message without selectors).

Returns a reference to an empty pattern if the message has selectors.

Returns
  A reference to the pattern.

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

Deprecated:
  This API is for technology preview only.

## ◆ getSelectors()

const std::vector<Expression> icu::message2::MFDataModel::getSelectors | ( |  | ) | const
| inline

Accesses the selectors.

Returns an empty vector if this is a pattern message.

Returns
  A vector of selectors.

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 2785 of file messageformat2_data_model.h.

## ◆ getUnsupportedStatements()

std::vector<UnsupportedStatement> icu::message2::MFDataModel::getUnsupportedStatements | ( |  | ) | const
| inline

Accesses the unsupported statements for this data model.

Returns
  A vector of unsupported statements.

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 2819 of file messageformat2_data_model.h.

## ◆ getVariants()

std::vector<Variant> icu::message2::MFDataModel::getVariants | ( |  | ) | const
| inline

Accesses the variants.

Returns an empty vector if this is a pattern message.

Returns
  A vector of variants.

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 2801 of file messageformat2_data_model.h.

## ◆ operator=()

MFDataModel& icu::message2::MFDataModel::operator= | ( | MFDataModel |  | ) |
| noexcept

Assignment operator.

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 Function Documentation

## ◆ swap

void swap | ( | MFDataModel & | m1,
|  | MFDataModel & | m2
| ) |  |
| friend

Non-member swap function.

Parameters

  m1 | will get m2's contents
  m2 | will get m1's contents

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 2862 of file messageformat2_data_model.h.

## Field Documentation

## ◆ Builder

class U_I18N_API icu::message2::MFDataModel::Builder

The mutable `MFDataModel::Builder` class allows the data model to be constructed incrementally.

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 2835 of file messageformat2_data_model.h.

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

- i18n/unicode/messageformat2_data_model.h