ICU 78.2 78.2
Loading...
Searching...
No Matches
icu::message2::data_model::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::data_model::MFDataModel:
icu::UMemory

Data Structures

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

Public Member Functions

U_I18N_API std::vector< BindinggetLocalVariables () const
 Accesses the local variable declarations for this data model.
U_I18N_API std::vector< VariableName > getSelectors () const
 Accesses the selectors.
U_I18N_API std::vector< VariantgetVariants () const
 Accesses the variants.
U_I18N_API const PatterngetPattern () const
 Accesses the pattern (in a message without selectors).
U_I18N_API MFDataModel ()
 Default constructor.
U_I18N_API MFDataModeloperator= (MFDataModel) noexcept
 Assignment operator.
U_I18N_API MFDataModel (const MFDataModel &other)
 Copy constructor.
virtual U_I18N_API ~MFDataModel ()
 Destructor.

Data Fields

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

Friends

class message2::Checker
class message2::MessageFormatter
class message2::Serializer
U_I18N_API friend void swap (MFDataModel &m1, MFDataModel &m2) noexcept
 Non-member swap function.

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

Constructor & Destructor Documentation

◆ MFDataModel() [1/2]

U_I18N_API icu::message2::data_model::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.

References U_I18N_API.

Referenced by MFDataModel(), operator=(), and swap.

◆ MFDataModel() [2/2]

U_I18N_API icu::message2::data_model::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.

References MFDataModel(), and U_I18N_API.

◆ ~MFDataModel()

virtual U_I18N_API icu::message2::data_model::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.

References U_I18N_API.

Member Function Documentation

◆ getLocalVariables()

U_I18N_API std::vector< Binding > icu::message2::data_model::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 2139 of file messageformat2_data_model.h.

References U_I18N_API.

◆ getPattern()

U_I18N_API const Pattern & icu::message2::data_model::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.

References U_I18N_API.

◆ getSelectors()

U_I18N_API std::vector< VariableName > icu::message2::data_model::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 2154 of file messageformat2_data_model.h.

References U_I18N_API.

◆ getVariants()

U_I18N_API std::vector< Variant > icu::message2::data_model::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 2170 of file messageformat2_data_model.h.

References U_I18N_API.

◆ operator=()

U_I18N_API MFDataModel & icu::message2::data_model::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.

References MFDataModel(), and U_I18N_API.

◆ message2::Checker

friend class message2::Checker
friend

Definition at line 2369 of file messageformat2_data_model.h.

◆ message2::MessageFormatter

friend class message2::MessageFormatter
friend

Definition at line 2370 of file messageformat2_data_model.h.

◆ message2::Serializer

friend class message2::Serializer
friend

Definition at line 2371 of file messageformat2_data_model.h.

◆ swap

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

Non-member swap function.

Parameters
m1will get m2's contents
m2will 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 2214 of file messageformat2_data_model.h.

References MFDataModel(), swap, and U_I18N_API.

Referenced by swap.

Field Documentation

◆ Builder

class U_I18N_API icu::message2::data_model::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 2197 of file messageformat2_data_model.h.


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