LanguageInterface Class Reference

#include <stringresource.h>

详细描述

Class that handles string resources.

公共成员函数

MAXON_METHOD String   LoadResourceString (const Id &scope, const InternedId &keyValue)
MAXON_METHOD String   GetName () const
MAXON_METHOD Id   GetIdentifier () const
MAXON_METHOD LanguageRef  GetFallbackLanguage () const
MAXON_METHOD String   ToString (const maxon::FormatStatement *fs=nullptr) const

静态公共成员函数

static MAXON_METHOD LanguageInterface Alloc ( MAXON_SOURCE_LOCATION_DECLARATION )

私有成员函数

  MAXON_INTERFACE_NONVIRTUAL ( LanguageInterface , MAXON_REFERENCE_NORMAL , "net.maxon.interface.language")

成员函数文档编制

◆  MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( LanguageInterface   ,
MAXON_REFERENCE_NORMAL   ,
"net.maxon.interface.language"   
)
private

◆  Alloc()

static MAXON_METHOD LanguageInterface * Alloc ( MAXON_SOURCE_LOCATION_DECLARATION   )
static

Allocator for common use.

参数
[in] allocLocation Source location.

◆  LoadResourceString()

MAXON_METHOD String LoadResourceString ( const Id scope ,
const InternedId keyValue  
)

Loads a string from the resource.

参数
[in] scope The resource scope of a resource symbol.
[in] keyValue The value of a resource symbol.
返回
String .

◆  GetName()

MAXON_METHOD String GetName ( ) const

Returns the real (country-specific) name of a language.

返回
The name.

◆  GetIdentifier()

MAXON_METHOD Id GetIdentifier ( ) const

Returns the identifier of a language.

返回
The name.

◆  GetFallbackLanguage()

MAXON_METHOD LanguageRef GetFallbackLanguage ( ) const

Returns the fallback language of this language.

返回
Nullptr if the language has no fallback language (e.g. "en-US" has none because it's the root of all languages).

◆  ToString()

MAXON_METHOD String ToString ( const maxon::FormatStatement fs = nullptr ) const

Returns a String representation of this @CLASS.

参数
[in] formatStatement Nullptr or additional formatting instruction.
返回
String representation of this @CLASS.