ICU 76.1 76.1
Loading...
Searching...
No Matches
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, ... etc. 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)=default
 Copies the DisplayOptions.
 
DisplayOptionsoperator= (DisplayOptions &&other) noexcept=default
 Moves the DisplayOptions.
 
 DisplayOptions (const DisplayOptions &other)=default
 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:

.setGrammaticalCase(UDISPOPT_GRAMMATICAL_CASE_DATIVE)
.setPluralCategory(UDISPOPT_PLURAL_CATEGORY_FEW)
.build();
Represents all the display options that are supported by CLDR such as grammatical case,...
static Builder builder()
Creates a builder with the UNDEFINED values for all the parameters.
"Smart pointer" base class; do not use directly: use LocalPointer etc.
@ UDISPOPT_PLURAL_CATEGORY_FEW
@ UDISPOPT_GRAMMATICAL_CASE_DATIVE
Stable:
ICU 72

Definition at line 43 of file displayoptions.h.

Constructor & Destructor Documentation

◆ DisplayOptions()

icu::DisplayOptions::DisplayOptions ( const DisplayOptions other)
default

Copies the DisplayOptions.

Parameters
otherThe options to copy.
Stable:
ICU 72

Member Function Documentation

◆ builder()

static Builder icu::DisplayOptions::builder ( )
static

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

Returns
Builder
Stable:
ICU 72

◆ copyToBuilder()

Builder icu::DisplayOptions::copyToBuilder ( ) const

Creates a builder with the same parameters from this object.

Returns
Builder
Stable:
ICU 72

◆ getCapitalization()

UDisplayOptionsCapitalization icu::DisplayOptions::getCapitalization ( ) const
inline

Gets the capitalization.

Returns
UDisplayOptionsCapitalization
Stable:
ICU 72

Definition at line 203 of file displayoptions.h.

◆ getDisplayLength()

UDisplayOptionsDisplayLength icu::DisplayOptions::getDisplayLength ( ) const
inline

Gets the display length.

Returns
UDisplayOptionsDisplayLength
Stable:
ICU 72

Definition at line 219 of file displayoptions.h.

◆ getGrammaticalCase()

UDisplayOptionsGrammaticalCase icu::DisplayOptions::getGrammaticalCase ( ) const
inline

Gets the grammatical case.

Returns
UDisplayOptionsGrammaticalCase
Stable:
ICU 72

Definition at line 179 of file displayoptions.h.

◆ getNameStyle()

UDisplayOptionsNameStyle icu::DisplayOptions::getNameStyle ( ) const
inline

Gets the dialect handling.

Returns
UDisplayOptionsNameStyle
Stable:
ICU 72

Definition at line 211 of file displayoptions.h.

◆ getNounClass()

UDisplayOptionsNounClass icu::DisplayOptions::getNounClass ( ) const
inline

Gets the noun class.

Returns
UDisplayOptionsNounClass
Stable:
ICU 72

Definition at line 187 of file displayoptions.h.

◆ getPluralCategory()

UDisplayOptionsPluralCategory icu::DisplayOptions::getPluralCategory ( ) const
inline

Gets the plural category.

Returns
UDisplayOptionsPluralCategory
Stable:
ICU 72

Definition at line 195 of file displayoptions.h.

◆ getSubstituteHandling()

UDisplayOptionsSubstituteHandling icu::DisplayOptions::getSubstituteHandling ( ) const
inline

Gets the substitute handling.

Returns
UDisplayOptionsSubstituteHandling
Stable:
ICU 72

Definition at line 227 of file displayoptions.h.

◆ operator=() [1/2]

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

Copies the DisplayOptions.

Parameters
otherThe options to copy.
Stable:
ICU 72

◆ operator=() [2/2]

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

Moves the DisplayOptions.

Parameters
otherThe options to move from.
Stable:
ICU 72

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