GL Studio C++ Runtime API
GlsResourceFileMgr Class Reference

Classes

class  AutoRelease
 
class  BinaryResource
 
class  ResourceCache
 
class  ResourceRef
 

Public Member Functions

ResourceRefGetResourceRef (const char *resource_name)
 
bool AddResourceFolder (const char *url, bool silent=false)
 
AutoRelease< ResourceCacheCacheResourcesForComponent (const char *componentClassName)
 

Static Public Member Functions

static GlsResourceFileMgrInstance ()
 

Member Function Documentation

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

Parameters
urlpath to the resources. e.g. "./resources/". This may be a directory or zip file.
silentif false, then a popup is displayed to the user if the location is not found
Returns
true if resources were successfully opened, false otherwise
AutoRelease<ResourceCache> CacheResourcesForComponent ( const char *  componentClassName)

Loads resources for a given component into RAM. The resources remain cached until the ResourceCache is Released.

ResourceRef* GetResourceRef ( const char *  resource_name)

Get a reference to a given resource

Parameters
resource_nameThe unique string name of the resource (relative path to the file if using resource folders)
Returns
reference to the resource or NULL if the resource was not found.
static GlsResourceFileMgr& Instance ( )
static
Returns
Reference to the GlsResourceFileMgr

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