GL Studio C++ Runtime API
|
#include <gls_resource_file_mgr.h>
Classes | |
class | AutoRelease |
class | BinaryResource |
class | ResourceCache |
class | ResourceRef |
Public Member Functions | |
ResourceRef * | GetResourceRef (const char *resource_name) |
bool | AddResourceFolder (const char *url, bool silent=false) |
AutoRelease< ResourceCache > | CacheResourcesForComponent (const char *componentClassName) |
Static Public Member Functions | |
static GlsResourceFileMgr & | Instance () |
class GlsResourceFileMgr This class manages all known resource files and provides an API for objects to access the data for a named resource. This allows the runtime code to access required resources without knowing their location. Resources may be stored in individual files, in an archive file, inline data in the source code, RCDATA, etc.
bool AddResourceFolder | ( | const char * | url, |
bool | silent = false |
||
) |
Tell the resource manager to load resources from the given location This method may be called multiple times to specify multiple locations
url | path to the resources. e.g. "./resources/". This may be a directory or zip file. |
silent | if false, then a popup is displayed to the user if the location is not found |
AutoRelease< ResourceCache > CacheResourcesForComponent | ( | const char * | componentClassName | ) |
Loads resources for a given component into RAM. The resources remain cached until the ResourceCache is Released.
componentClassName | The generated class name of the component. |
ResourceRef * GetResourceRef | ( | const char * | resource_name | ) |
Get a reference to a given resource
resource_name | The unique string name of the resource (relative path to the file if using resource folders) |
|
static |