ICU 73.2  73.2
Data Structures | Public Member Functions | Static Public Member Functions
icu::DisplayOptions Class Reference

Represents all the display options that are supported by CLDR such as grammatical case, noun class, ... More...

#include <displayoptions.h>

Data Structures

class  Builder
 Responsible for building `DisplayOptions`. More...

Public Member Functions

Builder copyToBuilder () const
 Creates a builder with the same parameters from this object.
UDisplayOptionsGrammaticalCase getGrammaticalCase () const
 Gets the grammatical case.
UDisplayOptionsNounClass getNounClass () const
 Gets the noun class.
UDisplayOptionsPluralCategory getPluralCategory () const
 Gets the plural category.
UDisplayOptionsCapitalization getCapitalization () const
 Gets the capitalization.
UDisplayOptionsNameStyle getNameStyle () const
 Gets the dialect handling.
UDisplayOptionsDisplayLength getDisplayLength () const
 Gets the display length.
UDisplayOptionsSubstituteHandling getSubstituteHandling () const
 Gets the substitute handling.
DisplayOptionsoperator= (const DisplayOptions &other)
 Copies the DisplayOptions.
DisplayOptionsoperator= (DisplayOptions &&other) noexcept
 Moves the DisplayOptions.
 DisplayOptions (const DisplayOptions &other)
 Copies the DisplayOptions.

Static Public Member Functions

static Builder builder ()
 Creates a builder with the `UNDEFINED` values for all the parameters.

Detailed Description

Represents all the display options that are supported by CLDR such as grammatical case, noun class, ...

etc. It currently supports enums, but may be extended in the future to have other types of data. It replaces a DisplayContext[] as a method parameter.

NOTE: This class is Immutable, and uses a Builder interface.

For example: ``` DisplayOptions x = DisplayOptions::builder(). .setGrammaticalCase(UDISPOPT_GRAMMATICAL_CASE_DATIVE) .setPluralCategory(UDISPOPT_PLURAL_CATEGORY_FEW) .build(); ```

Draft:
This API may be changed in the future versions and was introduced in ICU 72

Definition at line 45 of file displayoptions.h.


Constructor & Destructor Documentation

Copies the DisplayOptions.

Parameters:
otherThe options to copy.
Draft:
This API may be changed in the future versions and was introduced in ICU 72

Member Function Documentation

Creates a builder with the `UNDEFINED` values for all the parameters.

Returns:
Builder
Draft:
This API may be changed in the future versions and was introduced in ICU 72

Creates a builder with the same parameters from this object.

Returns:
Builder
Draft:
This API may be changed in the future versions and was introduced in ICU 72

Gets the capitalization.

Returns:
UDisplayOptionsCapitalization
Draft:
This API may be changed in the future versions and was introduced in ICU 72

Definition at line 205 of file displayoptions.h.

Gets the display length.

Returns:
UDisplayOptionsDisplayLength
Draft:
This API may be changed in the future versions and was introduced in ICU 72

Definition at line 221 of file displayoptions.h.

Gets the grammatical case.

Returns:
UDisplayOptionsGrammaticalCase
Draft:
This API may be changed in the future versions and was introduced in ICU 72

Definition at line 181 of file displayoptions.h.

Gets the dialect handling.

Returns:
UDisplayOptionsNameStyle
Draft:
This API may be changed in the future versions and was introduced in ICU 72

Definition at line 213 of file displayoptions.h.

Gets the noun class.

Returns:
UDisplayOptionsNounClass
Draft:
This API may be changed in the future versions and was introduced in ICU 72

Definition at line 189 of file displayoptions.h.

Gets the plural category.

Returns:
UDisplayOptionsPluralCategory
Draft:
This API may be changed in the future versions and was introduced in ICU 72

Definition at line 197 of file displayoptions.h.

Gets the substitute handling.

Returns:
UDisplayOptionsSubstituteHandling
Draft:
This API may be changed in the future versions and was introduced in ICU 72

Definition at line 229 of file displayoptions.h.

DisplayOptions& icu::DisplayOptions::operator= ( const DisplayOptions other)

Copies the DisplayOptions.

Parameters:
otherThe options to copy.
Draft:
This API may be changed in the future versions and was introduced in ICU 72
DisplayOptions& icu::DisplayOptions::operator= ( DisplayOptions &&  other)

Moves the DisplayOptions.

Parameters:
otherThe options to move from.
Draft:
This API may be changed in the future versions and was introduced in ICU 72

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