Lums
|
A provider for assets that are loaded and unloaded at runtime. More...
#include <Provider.hpp>
Public Member Functions | |
T & | get (int i) |
Get a resource by ID. More... | |
T & | load (int i) |
T & | unload (int i) |
T & | reload (int i) |
void | reloadAll () |
void | unloadAll () |
Public Member Functions inherited from lm::BaseProvider< T > | |
T & | get (int i) |
T & | set (int i) |
std::size_t | size () const |
Additional Inherited Members | |
Static Public Member Functions inherited from lm::Singleton< StreamProvider< T > > | |
static StreamProvider< T > & | instance () |
Protected Member Functions inherited from lm::Singleton< StreamProvider< T > > | |
Singleton ()=default | |
Singleton (const Singleton< StreamProvider< T > > &)=delete | |
Singleton< StreamProvider< T > > & | operator= (const Singleton< StreamProvider< T > > &)=delete |
Protected Attributes inherited from lm::BaseProvider< T > | |
std::vector< T * > | buffer |
A provider for assets that are loaded and unloaded at runtime.
This is a template used to create custom providers for dynamic assets. Assets should implement load(), unload() and loaded().
|
inline |
Get a resource by ID.
If the resource is not currently loaded, a call to load() will be isued.
i | The resource identifier |
|
inline |
Load a resource
i | The resource ID |
|
inline |
Reload a resource
i | The resource ID |
|
inline |
Reload every resource
|
inline |
Unload a resource
i | The resource ID |
|
inline |
Unload every resource