Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::Language Class Reference

Language object. More...

Inheritance diagram for gem::Language:
Collaboration diagram for gem::Language:

Public Member Functions

 Language ()=default
 Default constructor.
 Language (const String &language, const String &region=String(), const String &script=String(), EScriptVariant variant=SV_Native)
 All purpose constructor.
 Language (const Language &)=default
 Default copy constructor.
 Language (Language &&)=default
 Default move constructor noexcept is deduced.
Languageoperator= (const Language &language)=default
 Default copy assignment.
Languageoperator= (Language &&language)=default
 Default move assignment noexcept is deduced.
bool operator== (const Language &lang) const
 Comparison operator equal.
bool operator!= (const Language &lang) const
 Comparison operator not equal.
LanguagesetName (const String &name) noexcept
 Set the language name.
const StringRef getName () const noexcept
 Get the language name.
LanguagesetLanguageCode (const String &code) noexcept
 Set the ISO 639-3 three letter language code.
const StringRef getLanguageCode () const noexcept
 Get the ISO 639-3 three letter language code.
LanguagesetRegionCode (const String &code) noexcept
 Set the ISO 3166-1 three letter region code.
const StringRef getRegionCode () const noexcept
 Get the ISO 3166-1 three letter region code.
LanguagesetScriptCode (const String &code) noexcept
 Set the ISO 15924 four letter script code.
const StringRef getScriptCode () const noexcept
 Get the ISO 15924 four letter script code.
LanguagesetScriptVariant (EScriptVariant variant) noexcept
 Set the script variant.
EScriptVariant getScriptVariant () const noexcept
 Get the script variant.
bool isRightToLeft () const noexcept
 Return true if and only if the text is right to left.
const StringRef toString () const noexcept
 String representation of the language.

Detailed Description

Language object.

Implements share-read / copy-on-write Api object over ILanguage.

Constructor & Destructor Documentation

◆ Language()

gem::Language::Language ( const String & language,
const String & region = String(),
const String & script = String(),
EScriptVariant variant = SV_Native )
inline

All purpose constructor.

Parameters
[in]languageThe language code
[in]regionThe region code
[in]scriptThe script code
[in]variantThe script variant

Member Function Documentation

◆ getLanguageCode()

const StringRef gem::Language::getLanguageCode ( ) const
inlinenoexcept

Get the ISO 639-3 three letter language code.

Returns
The language code

◆ getName()

const StringRef gem::Language::getName ( ) const
inlinenoexcept

Get the language name.

Returns
The language name

◆ getRegionCode()

const StringRef gem::Language::getRegionCode ( ) const
inlinenoexcept

Get the ISO 3166-1 three letter region code.

Returns
The region code

◆ getScriptCode()

const StringRef gem::Language::getScriptCode ( ) const
inlinenoexcept

Get the ISO 15924 four letter script code.

It is available only when variant is transcription or transliteration.

Returns
The script code

◆ getScriptVariant()

EScriptVariant gem::Language::getScriptVariant ( ) const
inlinenoexcept

Get the script variant.

Returns
The script variant

◆ isRightToLeft()

bool gem::Language::isRightToLeft ( ) const
inlinenoexcept

Return true if and only if the text is right to left.

Returns
True if the text is right to left

◆ operator!=()

bool gem::Language::operator!= ( const Language & lang) const
inline

Comparison operator not equal.

Parameters
langThe language to compare
Returns
True if the languages are not equal

◆ operator=() [1/2]

Language & gem::Language::operator= ( const Language & language)
default

Default copy assignment.

Returns
A reference to the object
Parameters
languageThe language to copy

◆ operator=() [2/2]

Language & gem::Language::operator= ( Language && language)
default

Default move assignment noexcept is deduced.

Parameters
languageThe language to move
Returns
A reference to the object

◆ operator==()

bool gem::Language::operator== ( const Language & lang) const
inline

Comparison operator equal.

Parameters
langThe language to compare
Returns
True if the languages are equal

◆ setLanguageCode()

Language & gem::Language::setLanguageCode ( const String & code)
inlinenoexcept

Set the ISO 639-3 three letter language code.

Parameters
[in]codeThe language code
Returns
A reference to the object

◆ setName()

Language & gem::Language::setName ( const String & name)
inlinenoexcept

Set the language name.

Parameters
[in]nameThe language name
Returns
A reference to the object

◆ setRegionCode()

Language & gem::Language::setRegionCode ( const String & code)
inlinenoexcept

Set the ISO 3166-1 three letter region code.

Parameters
[in]codeThe region code
Returns
A reference to the object

◆ setScriptCode()

Language & gem::Language::setScriptCode ( const String & code)
inlinenoexcept

Set the ISO 15924 four letter script code.

It is available only when variant is transcription or transliteration.

Parameters
[in]codeThe script code
Returns
A reference to the object

◆ setScriptVariant()

Language & gem::Language::setScriptVariant ( EScriptVariant variant)
inlinenoexcept

Set the script variant.

Parameters
[in]variantThe script variant
Returns
A reference to the object

◆ toString()

const StringRef gem::Language::toString ( ) const
inlinenoexcept

String representation of the language.

Returns
The language as a string