LazyLanguageDictionaryInterface Class Reference

#include <lazylanguagestringdatadescription.h>

Inheritance diagram for LazyLanguageDictionaryInterface:

Detailed Description

Interface to manage lazy loading of LanguageDictionary for description strings.

Public Member Functions

MAXON_METHOD Result< DataDictionary > Get (const Id &languageId) const
 
MAXON_METHOD Result< void > Set (const Id &languageId, const DataDictionary &description)
 
MAXON_METHOD Result< void > SetMetaData (const AssetMetaData &meta, const CString &path)
 
MAXON_METHOD Result< void > LoadAll ()
 
MAXON_METHOD Result< LanguageDictionaryGetMetaData () const
 

Static Public Member Functions

static MAXON_METHOD const LazyLanguageDictionaryInterfaceNullValuePtr ()
 

Private Member Functions

 MAXON_INTERFACE (LazyLanguageDictionaryInterface, MAXON_REFERENCE_COPY_ON_WRITE, "net.maxon.interface.lazylanguagedictionary")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( LazyLanguageDictionaryInterface  ,
MAXON_REFERENCE_COPY_ON_WRITE  ,
"net.maxon.interface.lazylanguagedictionary"   
)
private

◆ Get()

MAXON_METHOD Result<DataDictionary> Get ( const Id languageId) const

Returns the description of the given language.

Parameters
[in]languageIdId of the language to load.
Returns
DataDescriptionDefinition on success.

◆ Set()

MAXON_METHOD Result<void> Set ( const Id languageId,
const DataDictionary &  description 
)

Stores the description for the given language.

Parameters
[in]languageIdId of the language to store.
[in]descriptionDescription to store.
Returns
OK on success.

◆ SetMetaData()

MAXON_METHOD Result<void> SetMetaData ( const AssetMetaData &  meta,
const CString path 
)

Sets the asset from which the description shall be loaded lazily.

Parameters
[in]metaAsset meta data to use for loading the strings.
[in]pathRelative path of the description within the asset.
Returns
DataDescriptionDefinition on success.

◆ LoadAll()

MAXON_METHOD Result<void> LoadAll ( )

Loads all string resources from the meta data into memory (e.g. for copying data).

Returns
OK on success.

◆ GetMetaData()

MAXON_METHOD Result<LanguageDictionary> GetMetaData ( ) const

Returns all descriptions to export.

Returns
LanguageDictionary on success.

◆ NullValuePtr()

static MAXON_METHOD const LazyLanguageDictionaryInterface* NullValuePtr ( )
static

Helper function to return the default value for an empty cow object.