You.i Engine
CYIAssetTranslation Class Reference

Detailed Description

An asset container which holds a shared translator that refers to a specific localisation resource.

#include <asset/YiAssetTranslation.h>

Inheritance diagram for CYIAssetTranslation:

Public Member Functions

 CYIAssetTranslation ()
 
 CYIAssetTranslation (const CYIString &path, PathType pathType=PathType::Relative)
 
virtual ~CYIAssetTranslation ()
 
const std::shared_ptr< CYITranslator > & GetTranslator ()
 
void SetTranslator (std::shared_ptr< CYITranslator > pTranslator)
 
- Public Member Functions inherited from CYIAsset
virtual ~CYIAsset ()
 
const CYIStringGetPath () const
 
CYIAssetLoadParamsGetLoadParameters () const
 
virtual std::pair< size_t, size_tGetApproximateSize () const
 
bool SetName (const CYIString &name)
 
const CYIStringGetName () const
 
bool Load ()
 
void Unload ()
 
bool IsLoaded () const
 
bool Equals (const std::shared_ptr< CYIAsset > &pAsset)
 
virtual bool Prepare ()
 

Protected Member Functions

virtual void OnUnload () override
 
- Protected Member Functions inherited from CYIAsset
 CYIAsset ()
 
ssize_t GetID () const
 
void SetPath (const CYIString &path, PathType pathType)
 
void SetApproximateSize (size_t size)
 
void SetLoaded (bool assetLoaded)
 
void SetLoadParameters (std::unique_ptr< CYIAssetLoadParams > pParams)
 
virtual void OnLoad ()
 

Additional Inherited Members

- Public Types inherited from CYIAsset
enum  PathType {
  PathType::Absolute = 0,
  PathType::Relative
}
 
- Static Protected Attributes inherited from CYIAsset
static ssize_t INVALID_ID
 

Constructor & Destructor Documentation

◆ CYIAssetTranslation() [1/2]

CYIAssetTranslation::CYIAssetTranslation ( )

◆ CYIAssetTranslation() [2/2]

CYIAssetTranslation::CYIAssetTranslation ( const CYIString path,
PathType  pathType = PathType::Relative 
)

◆ ~CYIAssetTranslation()

virtual CYIAssetTranslation::~CYIAssetTranslation ( )
virtual

Member Function Documentation

◆ GetTranslator()

const std::shared_ptr<CYITranslator>& CYIAssetTranslation::GetTranslator ( )

Returns the shared translator object.

◆ OnUnload()

virtual void CYIAssetTranslation::OnUnload ( )
overrideprotectedvirtual

Reimplemented from CYIAsset.

◆ SetTranslator()

void CYIAssetTranslation::SetTranslator ( std::shared_ptr< CYITranslator pTranslator)

Sets the shared translator object.


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