NWengine 0.9
Loading...
Searching...
No Matches
Loader< T > Class Template Reference

Public Member Functions

TGetFromCache (void *identifier)
 Get the asset from the cache based on the identifier.
 
TLoadFromFileOrGetFromCache (void *identifier, const char *path, void *data)
 Load the asset from file or get it from the cache based on the identifier and file path.
 
TLoadFromFile (const char *path, void *data=nullptr)
 Load the asset from file based on the file path.
 
TLoadFromBuffer (void *buffer, void *data)
 Load the asset from a buffer.
 
TLoadFromBufferOrGetFromCache (void *identifier, void *buffer, void *data)
 Load the asset from a buffer or get it from the cache based on the identifier.
 

Member Function Documentation

◆ GetFromCache()

template<typename T >
T * Loader< T >::GetFromCache ( void * identifier)
inline

Get the asset from the cache based on the identifier.

Parameters
identifierThe identifier of the asset.
Returns
The asset from the cache.

◆ LoadFromBuffer()

template<typename T >
T * Loader< T >::LoadFromBuffer ( void * buffer,
void * data )
inline

Load the asset from a buffer.

Parameters
bufferThe buffer containing the asset data.
dataAdditional data for loading the asset.
Returns
The loaded asset.

◆ LoadFromBufferOrGetFromCache()

template<typename T >
T * Loader< T >::LoadFromBufferOrGetFromCache ( void * identifier,
void * buffer,
void * data )
inline

Load the asset from a buffer or get it from the cache based on the identifier.

Parameters
identifierThe identifier of the asset.
bufferThe buffer containing the asset data.
dataAdditional data for loading the asset.
Returns
The loaded asset.

◆ LoadFromFile()

template<typename T >
T * Loader< T >::LoadFromFile ( const char * path,
void * data = nullptr )
inline

Load the asset from file based on the file path.

Parameters
pathThe file path of the asset.
dataAdditional data for loading the asset.
Returns
The loaded asset.

◆ LoadFromFileOrGetFromCache()

template<typename T >
T * Loader< T >::LoadFromFileOrGetFromCache ( void * identifier,
const char * path,
void * data )
inline

Load the asset from file or get it from the cache based on the identifier and file path.

Parameters
identifierThe identifier of the asset.
pathThe file path of the asset.
dataAdditional data for loading the asset.
Returns
The loaded asset.

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