OGRE
13.6
Object-Oriented Graphics Rendering Engine
|
This singleton class manages the list of resource groups, and notifying the various resource managers of their obligations to load / unload resources in a group. More...
#include <OgreResourceGroupManager.h>
Classes | |
struct | ResourceDeclaration |
Nested struct defining a resource declaration. More... | |
struct | ResourceLocation |
Resource location entry. More... | |
Public Types | |
typedef std::vector< ResourceLocation > | LocationList |
List of possible file locations. More... | |
typedef std::list< ResourceDeclaration > | ResourceDeclarationList |
List of resource declarations. More... | |
typedef MapIterator< ResourceManagerMap > | ResourceManagerIterator |
typedef std::map< String, ResourceManager * > | ResourceManagerMap |
Public Member Functions | |
ResourceGroupManager () | |
virtual | ~ResourceGroupManager () |
ScriptLoader * | _findScriptLoader (const String &pattern) const |
Method used to directly query for registered script loaders. More... | |
ResourceManager * | _getResourceManager (const String &resourceType) const |
Internal method for getting a registered ResourceManager. More... | |
void | _notifyAllResourcesRemoved (ResourceManager *manager) const |
Internal method called by ResourceManager when all resources for that manager are removed. More... | |
void | _notifyCustomStageEnded (void) const |
Notify this manager that one custom loading stage has been completed. More... | |
void | _notifyCustomStageStarted (const String &description) const |
Notify this manager that one custom loading stage has been started. More... | |
void | _notifyResourceCreated (ResourcePtr &res) const |
Internal method called by ResourceManager when a resource is created. More... | |
void | _notifyResourceGroupChanged (const String &oldGroup, Resource *res) const |
Internal method to notify the group manager that a resource has changed group (only applicable for autodetect group) More... | |
void | _notifyResourceRemoved (const ResourcePtr &res) const |
Internal method called by ResourceManager when a resource is removed. More... | |
void | _registerResourceManager (const String &resourceType, ResourceManager *rm) |
Internal method for registering a ResourceManager (which should be a singleton). More... | |
void | _registerScriptLoader (ScriptLoader *su) |
Internal method for registering a ScriptLoader. More... | |
void | _unregisterResourceManager (const String &resourceType) |
Internal method for unregistering a ResourceManager. More... | |
void | _unregisterScriptLoader (ScriptLoader *su) |
Internal method for unregistering a ScriptLoader. More... | |
void | addResourceGroupListener (ResourceGroupListener *l) |
Adds a ResourceGroupListener which will be called back during resource loading events. More... | |
void | addResourceLocation (const String &name, const String &locType, const String &resGroup=DEFAULT_RESOURCE_GROUP_NAME, bool recursive=false, bool readOnly=true) |
Adds a location to the list of searchable locations for a Resource type. More... | |
void | clearResourceGroup (const String &name) |
Clears a resource group. More... | |
DataStreamPtr | createResource (const String &filename, const String &groupName=DEFAULT_RESOURCE_GROUP_NAME, bool overwrite=false, const String &locationPattern=BLANKSTRING) |
Create a new resource file in a given group. More... | |
void | createResourceGroup (const String &name, bool inGlobalPool=!OGRE_RESOURCEMANAGER_STRICT) |
Create a resource group. More... | |
void | declareResource (const String &name, const String &resourceType, const String &groupName, ManualResourceLoader *loader, const NameValuePairList &loadParameters=NameValuePairList()) |
Declares a resource to be a part of a resource group, allowing you to load and unload it as part of the group. More... | |
void | declareResource (const String &name, const String &resourceType, const String &groupName=DEFAULT_RESOURCE_GROUP_NAME, const NameValuePairList &loadParameters=NameValuePairList()) |
Declares a resource to be a part of a resource group, allowing you to load and unload it as part of the group. More... | |
void | deleteMatchingResources (const String &filePattern, const String &groupName=DEFAULT_RESOURCE_GROUP_NAME, const String &locationPattern=BLANKSTRING) |
Delete all matching resource files. More... | |
void | deleteResource (const String &filename, const String &groupName=DEFAULT_RESOURCE_GROUP_NAME, const String &locationPattern=BLANKSTRING) |
Delete a single resource file. More... | |
void | destroyResourceGroup (const String &name) |
Destroys a resource group, clearing it first, destroying the resources which are part of it, and then removing it from the list of resource groups. More... | |
const String & | findGroupContainingResource (const String &filename) const |
Find the group in which a resource exists. More... | |
FileInfoListPtr | findResourceFileInfo (const String &group, const String &pattern, bool dirs=false) const |
Find all files or directories matching a given pattern in a group and get some detailed information about them. More... | |
StringVectorPtr | findResourceLocation (const String &groupName, const String &pattern) const |
Find all resource location names matching a given pattern in a resource group. More... | |
StringVectorPtr | findResourceNames (const String &groupName, const String &pattern, bool dirs=false) const |
Find all file or directory names matching a given pattern in a resource group. More... | |
uint32 | getCustomStagesForResourceGroup (const String &group) |
ResourceLoadingListener * | getLoadingListener () const |
Returns the current loading listener. More... | |
ResourceDeclarationList | getResourceDeclarationList (const String &groupName) const |
Get the list of resource declarations for the specified group name. More... | |
StringVector | getResourceGroups (void) const |
Get a list of the currently defined resource groups. More... | |
const LocationList & | getResourceLocationList (const String &groupName) const |
Get the list of resource locations for the specified group name. More... | |
ResourceManagerIterator | getResourceManagerIterator () |
const ResourceManagerMap & | getResourceManagers () const |
Get the registered resource managers. More... | |
const String & | getWorldResourceGroupName (void) const |
Gets the resource group that 'world' resources will use. More... | |
void | initialiseAllResourceGroups (void) |
Initialise all resource groups which are yet to be initialised. More... | |
void | initialiseResourceGroup (const String &name) |
Initialises a resource group. More... | |
bool | isResourceGroupInGlobalPool (const String &name) const |
Checks the status of a resource group. More... | |
bool | isResourceGroupInitialised (const String &name) const |
Checks the status of a resource group. More... | |
bool | isResourceGroupLoaded (const String &name) const |
Checks the status of a resource group. More... | |
FileInfoListPtr | listResourceFileInfo (const String &groupName, bool dirs=false) const |
List all files in a resource group with accompanying information. More... | |
StringVectorPtr | listResourceLocations (const String &groupName) const |
List all resource locations in a resource group. More... | |
StringVectorPtr | listResourceNames (const String &groupName, bool dirs=false) const |
List all file or directory names in a resource group. More... | |
void | loadResourceGroup (const String &name) |
Loads a resource group. More... | |
DataStreamPtr | openResource (const String &resourceName, const String &groupName, bool searchGroupsIfNotFound, Resource *resourceBeingLoaded=0) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. if the resource is not found in the group specified, other groups will be searched. More... | |
DataStreamPtr | openResource (const String &resourceName, const String &groupName=DEFAULT_RESOURCE_GROUP_NAME, Resource *resourceBeingLoaded=NULL, bool throwOnFailure=true) const |
Open a single resource by name and return a DataStream pointing at the source of the data. More... | |
DataStreamList | openResources (const String &pattern, const String &groupName=DEFAULT_RESOURCE_GROUP_NAME) const |
Open all resources matching a given pattern (which can contain the character '*' as a wildcard), and return a collection of DataStream objects on them. More... | |
void | prepareResourceGroup (const String &name) |
Prepares a resource group. More... | |
void | removeResourceGroupListener (ResourceGroupListener *l) |
Removes a ResourceGroupListener. More... | |
void | removeResourceLocation (const String &name, const String &resGroup=DEFAULT_RESOURCE_GROUP_NAME) |
Removes a resource location from the search path. More... | |
bool | resourceExists (const String &group, const String &filename) const |
Find out if the named file exists in a group. More... | |
bool | resourceExistsInAnyGroup (const String &filename) const |
Find out if the named file exists in any group. More... | |
bool | resourceGroupExists (const String &name) const |
bool | resourceLocationExists (const String &name, const String &resGroup=DEFAULT_RESOURCE_GROUP_NAME) const |
Verify if a resource location exists for the given group. More... | |
time_t | resourceModifiedTime (const String &group, const String &filename) const |
Retrieve the modification time of a given file. More... | |
void | setCustomStagesForResourceGroup (const String &group, uint32 stageCount) |
Declare the number custom loading stages for a resource group. More... | |
void | setLoadingListener (ResourceLoadingListener *listener) |
Sets a new loading listener. More... | |
void | setWorldResourceGroupName (const String &groupName) |
Sets the resource group that 'world' resources will use. More... | |
void | shutdownAll (void) |
Shutdown all ResourceManagers, performed as part of clean-up. More... | |
void | undeclareResource (const String &name, const String &groupName) |
Undeclare a resource. More... | |
void | unloadResourceGroup (const String &name, bool reloadableOnly=true) |
Unloads a resource group. More... | |
void | unloadUnreferencedResourcesInGroup (const String &name, bool reloadableOnly=true) |
Unload all resources which are not referenced by any other object. More... | |
Public Member Functions inherited from Ogre::Singleton< ResourceGroupManager > | |
Singleton (void) | |
~Singleton (void) | |
Static Public Member Functions | |
static ResourceGroupManager & | getSingleton (void) |
Get the singleton instance. More... | |
static ResourceGroupManager * | getSingletonPtr (void) |
Get the singleton instance. More... | |
Static Public Member Functions inherited from Ogre::Singleton< ResourceGroupManager > | |
static ResourceGroupManager & | getSingleton (void) |
Get the singleton instance. More... | |
static ResourceGroupManager * | getSingletonPtr (void) |
Get the singleton instance. More... | |
Static Public Attributes | |
static const String | AUTODETECT_RESOURCE_GROUP_NAME |
same as RGN_AUTODETECT More... | |
static const String | DEFAULT_RESOURCE_GROUP_NAME |
same as RGN_DEFAULT More... | |
static const String | INTERNAL_RESOURCE_GROUP_NAME |
same as RGN_INTERNAL More... | |
static const long | RESOURCE_SYSTEM_NUM_REFERENCE_COUNTS |
The number of reference counts held per resource by the resource system. More... | |
This singleton class manages the list of resource groups, and notifying the various resource managers of their obligations to load / unload resources in a group.
It also provides facilities to monitor resource loading per group (to do progress bars etc), provided the resources that are required are pre-registered.
Defining new resource groups, and declaring the resources you intend to use in advance is optional, however it is a very useful feature. In addition, if a ResourceManager supports the definition of resources through scripts, then this is the class which drives the locating of the scripts and telling the ResourceManager to parse them.
typedef std::list<ResourceDeclaration> Ogre::ResourceGroupManager::ResourceDeclarationList |
List of resource declarations.
typedef std::map<String, ResourceManager*> Ogre::ResourceGroupManager::ResourceManagerMap |
typedef std::vector<ResourceLocation> Ogre::ResourceGroupManager::LocationList |
List of possible file locations.
Ogre::ResourceGroupManager::ResourceGroupManager | ( | ) |
|
virtual |
void Ogre::ResourceGroupManager::createResourceGroup | ( | const String & | name, |
bool | inGlobalPool = !OGRE_RESOURCEMANAGER_STRICT |
||
) |
Create a resource group.
name | The name to give the resource group. |
inGlobalPool | if true the resource will be loaded even a different group was requested in the load method as a parameter. |
void Ogre::ResourceGroupManager::initialiseResourceGroup | ( | const String & | name | ) |
Initialises a resource group.
name | The name of the resource group to initialise |
void Ogre::ResourceGroupManager::initialiseAllResourceGroups | ( | void | ) |
Initialise all resource groups which are yet to be initialised.
void Ogre::ResourceGroupManager::prepareResourceGroup | ( | const String & | name | ) |
Prepares a resource group.
Prepares any created resources which are part of the named group. Note that resources must have already been created by calling ResourceManager::createResource, or declared using declareResource() or in a script (such as .material and .overlay). The latter requires that initialiseResourceGroup() has been called.
When this method is called, this class will callback any ResourceGroupListener which have been registered to update them on progress.
name | The name of the resource group to prepare. |
void Ogre::ResourceGroupManager::loadResourceGroup | ( | const String & | name | ) |
Loads a resource group.
Loads any created resources which are part of the named group. Note that resources must have already been created by calling ResourceManager::createResource, or declared using declareResource() or in a script (such as .material and .overlay). The latter requires that initialiseResourceGroup() has been called.
When this method is called, this class will callback any ResourceGroupListeners which have been registered to update them on progress.
name | The name of the resource group to load. |
void Ogre::ResourceGroupManager::unloadResourceGroup | ( | const String & | name, |
bool | reloadableOnly = true |
||
) |
Unloads a resource group.
This method unloads all the resources that have been declared as being part of the named resource group. Note that these resources will still exist in their respective ResourceManager classes, but will be in an unloaded state. If you want to remove them entirely, you should use clearResourceGroup() or destroyResourceGroup().
name | The name to of the resource group to unload. |
reloadableOnly | If set to true, only unload the resource that is reloadable. Because some resources isn't reloadable, they will be unloaded but can't load them later. Thus, you might not want to them unloaded. Or, you might unload all of them, and then populate them manually later. |
void Ogre::ResourceGroupManager::unloadUnreferencedResourcesInGroup | ( | const String & | name, |
bool | reloadableOnly = true |
||
) |
Unload all resources which are not referenced by any other object.
This method behaves like unloadResourceGroup(), except that it only unloads resources in the group which are not in use, ie not referenced by other objects. This allows you to free up some memory selectively whilst still keeping the group around (and the resources present, just not using much memory).
name | The name of the group to check for unreferenced resources |
reloadableOnly | If true (the default), only unloads resources which can be subsequently automatically reloaded |
void Ogre::ResourceGroupManager::clearResourceGroup | ( | const String & | name | ) |
Clears a resource group.
name | The name to of the resource group to clear. |
void Ogre::ResourceGroupManager::destroyResourceGroup | ( | const String & | name | ) |
Destroys a resource group, clearing it first, destroying the resources which are part of it, and then removing it from the list of resource groups.
name | The name of the resource group to destroy. |
bool Ogre::ResourceGroupManager::isResourceGroupInitialised | ( | const String & | name | ) | const |
Checks the status of a resource group.
name | The name to of the resource group to access. |
bool Ogre::ResourceGroupManager::isResourceGroupLoaded | ( | const String & | name | ) | const |
Checks the status of a resource group.
name | The name to of the resource group to access. |
bool Ogre::ResourceGroupManager::resourceGroupExists | ( | const String & | name | ) | const |
void Ogre::ResourceGroupManager::addResourceLocation | ( | const String & | name, |
const String & | locType, | ||
const String & | resGroup = DEFAULT_RESOURCE_GROUP_NAME , |
||
bool | recursive = false , |
||
bool | readOnly = true |
||
) |
Adds a location to the list of searchable locations for a Resource type.
name | The name of the location, e.g. './data' or '/compressed/gamedata.zip' |
locType | A string identifying the location type, e.g. 'FileSystem' (for folders), 'Zip' etc. Must map to a registered plugin which deals with this type (FileSystem and Zip should always be available) |
resGroup | the resource group which this location should apply to; defaults to the General group which applies to all non-specific resources. |
recursive | If the resource location has a concept of recursive directory traversal, enabling this option will mean you can load resources in subdirectories using only their unqualified name. The default is to disable this so that resources in subdirectories with the same name are still unique. |
readOnly | whether the Archive is read only |
void Ogre::ResourceGroupManager::removeResourceLocation | ( | const String & | name, |
const String & | resGroup = DEFAULT_RESOURCE_GROUP_NAME |
||
) |
Removes a resource location from the search path.
bool Ogre::ResourceGroupManager::resourceLocationExists | ( | const String & | name, |
const String & | resGroup = DEFAULT_RESOURCE_GROUP_NAME |
||
) | const |
Verify if a resource location exists for the given group.
void Ogre::ResourceGroupManager::declareResource | ( | const String & | name, |
const String & | resourceType, | ||
const String & | groupName = DEFAULT_RESOURCE_GROUP_NAME , |
||
const NameValuePairList & | loadParameters = NameValuePairList() |
||
) |
Declares a resource to be a part of a resource group, allowing you to load and unload it as part of the group.
name | The resource name. |
resourceType | The type of the resource. Ogre comes preconfigured with a number of resource types: .. but more can be added by plugin ResourceManager classes. |
groupName | The name of the group to which it will belong. |
loadParameters | A list of name / value pairs which supply custom parameters to the resource which will be required before it can be loaded. These are specific to the resource type. |
void Ogre::ResourceGroupManager::declareResource | ( | const String & | name, |
const String & | resourceType, | ||
const String & | groupName, | ||
ManualResourceLoader * | loader, | ||
const NameValuePairList & | loadParameters = NameValuePairList() |
||
) |
Declares a resource to be a part of a resource group, allowing you to load and unload it as part of the group.
name | The resource name. |
resourceType | The type of the resource. Ogre comes preconfigured with a number of resource types: .. but more can be added by plugin ResourceManager classes. |
groupName | The name of the group to which it will belong. |
loadParameters | A list of name / value pairs which supply custom parameters to the resource which will be required before it can be loaded. These are specific to the resource type. |
loader | Pointer to a ManualResourceLoader implementation which will be called when the Resource wishes to load. If supplied, the resource is manually loaded, otherwise it'll loading from file automatic. |
void Ogre::ResourceGroupManager::undeclareResource | ( | const String & | name, |
const String & | groupName | ||
) |
Undeclare a resource.
name | The name of the resource. |
groupName | The name of the group this resource was declared in. |
|
inline |
Open a single resource by name and return a DataStream pointing at the source of the data.
resourceName | The name of the resource to locate. Even if resource locations are added recursively, you must provide a fully qualified name to this method. You can find out the matching fully qualified names by using the find() method if you need to. |
groupName | The name of the resource group; this determines which locations are searched. If you're loading a Resource using RGN_AUTODETECT, you must also provide the resourceBeingLoaded parameter to enable the group membership to be changed |
resourceBeingLoaded | Optional pointer to the resource being loaded, which you should supply if you want |
throwOnFailure | throw an exception. Returns nullptr otherwise |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. if the resource is not found in the group specified, other groups will be searched.
DataStreamList Ogre::ResourceGroupManager::openResources | ( | const String & | pattern, |
const String & | groupName = DEFAULT_RESOURCE_GROUP_NAME |
||
) | const |
Open all resources matching a given pattern (which can contain the character '*' as a wildcard), and return a collection of DataStream objects on them.
pattern | The pattern to look for. If resource locations have been added recursively, subdirectories will be searched too so this does not need to be fully qualified. |
groupName | The resource group; this determines which locations are searched. |
StringVectorPtr Ogre::ResourceGroupManager::listResourceNames | ( | const String & | groupName, |
bool | dirs = false |
||
) | const |
List all file or directory names in a resource group.
groupName | The name of the group |
dirs | If true, directory names will be returned instead of file names |
FileInfoListPtr Ogre::ResourceGroupManager::listResourceFileInfo | ( | const String & | groupName, |
bool | dirs = false |
||
) | const |
List all files in a resource group with accompanying information.
groupName | The name of the group |
dirs | If true, directory names will be returned instead of file names |
StringVectorPtr Ogre::ResourceGroupManager::findResourceNames | ( | const String & | groupName, |
const String & | pattern, | ||
bool | dirs = false |
||
) | const |
Find all file or directory names matching a given pattern in a resource group.
groupName | The name of the group |
pattern | The pattern to search for; wildcards (*) are allowed |
dirs | Set to true if you want the directories to be listed instead of files |
bool Ogre::ResourceGroupManager::resourceExists | ( | const String & | group, |
const String & | filename | ||
) | const |
Find out if the named file exists in a group.
group | The name of the resource group |
filename | Fully qualified name of the file to test for |
bool Ogre::ResourceGroupManager::resourceExistsInAnyGroup | ( | const String & | filename | ) | const |
Find out if the named file exists in any group.
filename | Fully qualified name of the file to test for |
const String& Ogre::ResourceGroupManager::findGroupContainingResource | ( | const String & | filename | ) | const |
Find the group in which a resource exists.
filename | Fully qualified name of the file the resource should be found as |
FileInfoListPtr Ogre::ResourceGroupManager::findResourceFileInfo | ( | const String & | group, |
const String & | pattern, | ||
bool | dirs = false |
||
) | const |
Find all files or directories matching a given pattern in a group and get some detailed information about them.
group | The name of the resource group |
pattern | The pattern to search for; wildcards (*) are allowed |
dirs | Set to true if you want the directories to be listed instead of files |
time_t Ogre::ResourceGroupManager::resourceModifiedTime | ( | const String & | group, |
const String & | filename | ||
) | const |
Retrieve the modification time of a given file.
StringVectorPtr Ogre::ResourceGroupManager::listResourceLocations | ( | const String & | groupName | ) | const |
List all resource locations in a resource group.
groupName | The name of the group |
StringVectorPtr Ogre::ResourceGroupManager::findResourceLocation | ( | const String & | groupName, |
const String & | pattern | ||
) | const |
Find all resource location names matching a given pattern in a resource group.
groupName | The name of the group |
pattern | The pattern to search for; wildcards (*) are allowed |
DataStreamPtr Ogre::ResourceGroupManager::createResource | ( | const String & | filename, |
const String & | groupName = DEFAULT_RESOURCE_GROUP_NAME , |
||
bool | overwrite = false , |
||
const String & | locationPattern = BLANKSTRING |
||
) |
Create a new resource file in a given group.
filename | The name of the file to create |
groupName | The name of the group in which to create the file |
overwrite | If true, an existing file will be overwritten, if false an error will occur if the file already exists |
locationPattern | If the resource group contains multiple locations, then usually the file will be created in the first writable location. If you want to be more specific, you can include a location pattern here and only locations which match that pattern (as determined by StringUtil::match) will be considered candidates for creation. |
void Ogre::ResourceGroupManager::deleteResource | ( | const String & | filename, |
const String & | groupName = DEFAULT_RESOURCE_GROUP_NAME , |
||
const String & | locationPattern = BLANKSTRING |
||
) |
Delete a single resource file.
filename | The name of the file to delete. |
groupName | The name of the group in which to search |
locationPattern | If the resource group contains multiple locations, then usually first matching file found in any location will be deleted. If you want to be more specific, you can include a location pattern here and only locations which match that pattern (as determined by StringUtil::match) will be considered candidates for deletion. |
void Ogre::ResourceGroupManager::deleteMatchingResources | ( | const String & | filePattern, |
const String & | groupName = DEFAULT_RESOURCE_GROUP_NAME , |
||
const String & | locationPattern = BLANKSTRING |
||
) |
Delete all matching resource files.
filePattern | The pattern (see StringUtil::match) of the files to delete. |
groupName | The name of the group in which to search |
locationPattern | If the resource group contains multiple locations, then usually all matching files in any location will be deleted. If you want to be more specific, you can include a location pattern here and only locations which match that pattern (as determined by StringUtil::match) will be considered candidates for deletion. |
void Ogre::ResourceGroupManager::addResourceGroupListener | ( | ResourceGroupListener * | l | ) |
Adds a ResourceGroupListener which will be called back during resource loading events.
void Ogre::ResourceGroupManager::removeResourceGroupListener | ( | ResourceGroupListener * | l | ) |
Removes a ResourceGroupListener.
|
inline |
Sets the resource group that 'world' resources will use.
|
inline |
Gets the resource group that 'world' resources will use.
void Ogre::ResourceGroupManager::setCustomStagesForResourceGroup | ( | const String & | group, |
uint32 | stageCount | ||
) |
Declare the number custom loading stages for a resource group.
This allows you to include them in a loading progress report.
group | The name of the resource group |
stageCount | The number of extra stages |
bool Ogre::ResourceGroupManager::isResourceGroupInGlobalPool | ( | const String & | name | ) | const |
Checks the status of a resource group.
name | The name to of the resource group to access. |
void Ogre::ResourceGroupManager::shutdownAll | ( | void | ) |
Shutdown all ResourceManagers, performed as part of clean-up.
void Ogre::ResourceGroupManager::_registerResourceManager | ( | const String & | resourceType, |
ResourceManager * | rm | ||
) |
Internal method for registering a ResourceManager (which should be a singleton).
Creators of plugins can register new ResourceManagers this way if they wish.
resourceType | String identifying the resource type, must be unique. |
rm | Pointer to the ResourceManager instance. |
void Ogre::ResourceGroupManager::_unregisterResourceManager | ( | const String & | resourceType | ) |
Internal method for unregistering a ResourceManager.
resourceType | String identifying the resource type. |
|
inline |
Get the registered resource managers.
|
inline |
void Ogre::ResourceGroupManager::_registerScriptLoader | ( | ScriptLoader * | su | ) |
Internal method for registering a ScriptLoader.
su | Pointer to the ScriptLoader instance. |
void Ogre::ResourceGroupManager::_unregisterScriptLoader | ( | ScriptLoader * | su | ) |
Internal method for unregistering a ScriptLoader.
su | Pointer to the ScriptLoader instance. |
ScriptLoader* Ogre::ResourceGroupManager::_findScriptLoader | ( | const String & | pattern | ) | const |
Method used to directly query for registered script loaders.
pattern | The specific script pattern (e.g. *.material) the script loader handles |
ResourceManager* Ogre::ResourceGroupManager::_getResourceManager | ( | const String & | resourceType | ) | const |
Internal method for getting a registered ResourceManager.
resourceType | String identifying the resource type. |
void Ogre::ResourceGroupManager::_notifyResourceCreated | ( | ResourcePtr & | res | ) | const |
Internal method called by ResourceManager when a resource is created.
res | Weak reference to resource |
void Ogre::ResourceGroupManager::_notifyResourceRemoved | ( | const ResourcePtr & | res | ) | const |
Internal method called by ResourceManager when a resource is removed.
res | Weak reference to resource |
void Ogre::ResourceGroupManager::_notifyResourceGroupChanged | ( | const String & | oldGroup, |
Resource * | res | ||
) | const |
Internal method to notify the group manager that a resource has changed group (only applicable for autodetect group)
void Ogre::ResourceGroupManager::_notifyAllResourcesRemoved | ( | ResourceManager * | manager | ) | const |
Internal method called by ResourceManager when all resources for that manager are removed.
manager | Pointer to the manager for which all resources are being removed |
void Ogre::ResourceGroupManager::_notifyCustomStageStarted | ( | const String & | description | ) | const |
Notify this manager that one custom loading stage has been started.
User code should call this method the number of times equal to the value declared in setCustomStagesForResourceGroup.
void Ogre::ResourceGroupManager::_notifyCustomStageEnded | ( | void | ) | const |
Notify this manager that one custom loading stage has been completed.
User code should call this method the number of times equal to the value declared setCustomStagesForResourceGroup.
StringVector Ogre::ResourceGroupManager::getResourceGroups | ( | void | ) | const |
Get a list of the currently defined resource groups.
ResourceDeclarationList Ogre::ResourceGroupManager::getResourceDeclarationList | ( | const String & | groupName | ) | const |
Get the list of resource declarations for the specified group name.
groupName | The name of the group |
const LocationList& Ogre::ResourceGroupManager::getResourceLocationList | ( | const String & | groupName | ) | const |
Get the list of resource locations for the specified group name.
groupName | The name of the group |
void Ogre::ResourceGroupManager::setLoadingListener | ( | ResourceLoadingListener * | listener | ) |
Sets a new loading listener.
ResourceLoadingListener* Ogre::ResourceGroupManager::getLoadingListener | ( | ) | const |
Returns the current loading listener.
|
static |
Get the singleton instance.
|
static |
Get the singleton instance.
|
static |
same as RGN_DEFAULT
|
static |
same as RGN_INTERNAL
|
static |
same as RGN_AUTODETECT
|
static |
The number of reference counts held per resource by the resource system.