Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
Nz::ResourceManager< Type, Parameters > Class Template Reference

Core class that represents a resource manager. More...

Static Public Member Functions

static void Clear ()
 Clears the content of the manager.
 
static ObjectRef< Type > Get (const String &filePath)
 Gets a reference to the object loaded from file. More...
 
static const Parameters & GetDefaultParameters ()
 Gets the defaults parameters for the load. More...
 
static void Purge ()
 Purges the resource manager from every asset whose it is the only owner.
 
static void Register (const String &filePath, ObjectRef< Type > resource)
 Registers the resource under the filePath. More...
 
static void SetDefaultParameters (const Parameters &params)
 Sets the defaults parameters for the load. More...
 
static void Unregister (const String &filePath)
 Unregisters the resource under the filePath. More...
 

Detailed Description

template<typename Type, typename Parameters>
class Nz::ResourceManager< Type, Parameters >

Core class that represents a resource manager.

Member Function Documentation

◆ Get()

template<typename Type , typename Parameters >
ObjectRef< Type > Nz::ResourceManager< Type, Parameters >::Get ( const String filePath)
static

Gets a reference to the object loaded from file.

Returns
Reference to the object
Parameters
filePathPath to the asset that will be loaded

◆ GetDefaultParameters()

template<typename Type , typename Parameters >
const Parameters & Nz::ResourceManager< Type, Parameters >::GetDefaultParameters ( )
static

Gets the defaults parameters for the load.

Returns
Default parameters for loading from file

◆ Register()

template<typename Type , typename Parameters >
void Nz::ResourceManager< Type, Parameters >::Register ( const String filePath,
ObjectRef< Type >  resource 
)
static

Registers the resource under the filePath.

Parameters
filePathPath for the resource
resourceObject to associate with

◆ SetDefaultParameters()

template<typename Type , typename Parameters >
void Nz::ResourceManager< Type, Parameters >::SetDefaultParameters ( const Parameters &  params)
static

Sets the defaults parameters for the load.

Parameters
paramsDefault parameters for loading from file

◆ Unregister()

template<typename Type , typename Parameters >
void Nz::ResourceManager< Type, Parameters >::Unregister ( const String filePath)
static

Unregisters the resource under the filePath.

Parameters
filePathPath for the resource

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