#include <OgreResourceGroupManager.h>
Inheritance diagram for Ogre::ResourceGroupManager:
Public Types | |
typedef std::list< ResourceDeclaration > | ResourceDeclarationList |
List of resource declarations. | |
Public Member Functions | |
ResourceGroupManager () | |
virtual | ~ResourceGroupManager () |
void | createResourceGroup (const String &name) |
Create a resource group. | |
void | initialiseResourceGroup (const String &name) |
Initialises a resource group. | |
void | initialiseAllResourceGroups (void) |
Initialise all resource groups which are yet to be initialised. | |
void | loadResourceGroup (const String &name, bool loadMainResources=true, bool loadWorldGeom=true) |
Loads a resource group. | |
void | unloadResourceGroup (const String &name, bool reloadableOnly=true) |
Unloads a resource group. | |
void | unloadUnreferencedResourcesInGroup (const String &name, bool reloadableOnly=true) |
Unload all resources which are not referenced by any other object. | |
void | clearResourceGroup (const String &name) |
Clears a resource group. | |
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. | |
void | addResourceLocation (const String &name, const String &locType, const String &resGroup=DEFAULT_RESOURCE_GROUP_NAME, bool recursive=false) |
Method to add a resource location to for a given resource group. | |
void | removeResourceLocation (const String &name, const String &resGroup=DEFAULT_RESOURCE_GROUP_NAME) |
Removes a resource location from the search path. | |
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. | |
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. | |
void | undeclareResource (const String &name, const String &groupName) |
Undeclare a resource. | |
DataStreamPtr | openResource (const String &resourceName, const String &groupName=DEFAULT_RESOURCE_GROUP_NAME, bool searchGroupsIfNotFound=true, Resource *resourceBeingLoaded=0) |
Open a single resource by name and return a DataStream pointing at the source of the data. | |
DataStreamListPtr | openResources (const String &pattern, const String &groupName=DEFAULT_RESOURCE_GROUP_NAME) |
Open all resources matching a given pattern (which can contain the character '*' as a wildcard), and return a collection of DataStream objects on them. | |
StringVectorPtr | listResourceNames (const String &groupName) |
List all file names in a resource group. | |
FileInfoListPtr | listResourceFileInfo (const String &groupName) |
List all files in a resource group with accompanying information. | |
StringVectorPtr | findResourceNames (const String &groupName, const String &pattern) |
Find all file names matching a given pattern in a resource group. | |
bool | resourceExists (const String &group, const String &filename) |
Find out if the named file exists in a group. | |
bool | resourceExists (ResourceGroup *group, const String &filename) |
Find out if the named file exists in a group. | |
const String & | findGroupContainingResource (const String &filename) |
Find the group in which a resource exists. | |
FileInfoListPtr | findResourceFileInfo (const String &group, const String &pattern) |
Find all files matching a given pattern in a group and get some detailed information about them. | |
void | addResourceGroupListener (ResourceGroupListener *l) |
Adds a ResourceGroupListener which will be called back during resource loading events. | |
void | removeResourceGroupListener (ResourceGroupListener *l) |
Removes a ResourceGroupListener. | |
void | setWorldResourceGroupName (const String &groupName) |
Sets the resource group that 'world' resources will use. | |
const String & | getWorldResourceGroupName (void) const |
Sets the resource group that 'world' resources will use. | |
void | linkWorldGeometryToResourceGroup (const String &group, const String &worldGeometry, SceneManager *sceneManager) |
Associates some world geometry with a resource group, causing it to be loaded / unloaded with the resource group. | |
void | unlinkWorldGeometryFromResourceGroup (const String &group) |
Clear any link to world geometry from a resource group. | |
void | shutdownAll (void) |
Shutdown all ResourceManagers, performed as part of clean-up. | |
void | _registerResourceManager (const String &resourceType, ResourceManager *rm) |
Internal method for registering a ResourceManager (which should be a singleton). | |
void | _unregisterResourceManager (const String &resourceType) |
Internal method for unregistering a ResourceManager. | |
void | _registerScriptLoader (ScriptLoader *su) |
Internal method for registering a ScriptLoader. | |
void | _unregisterScriptLoader (ScriptLoader *su) |
Internal method for unregistering a ScriptLoader. | |
ResourceManager * | _getResourceManager (const String &resourceType) |
Internal method for getting a registered ResourceManager. | |
void | _notifyResourceCreated (ResourcePtr &res) |
Internal method called by ResourceManager when a resource is created. | |
void | _notifyResourceRemoved (ResourcePtr &res) |
Internal method called by ResourceManager when a resource is removed. | |
void | _notifyResourceGroupChanged (const String &oldGroup, Resource *res) |
Internale method to notify the group manager that a resource has changed group (only applicable for autodetect group). | |
void | _notifyAllResourcesRemoved (ResourceManager *manager) |
Internal method called by ResourceManager when all resources for that manager are removed. | |
void | _notifyWorldGeometryStageStarted (const String &description) |
Notify this manager that one stage of world geometry loading has been started. | |
void | _notifyWorldGeometryStageEnded (void) |
Notify this manager that one stage of world geometry loading has been completed. | |
StringVector | getResourceGroups (void) |
Get a list of the currently defined resource groups. | |
ResourceDeclarationList | getResourceDeclarationList (const String &groupName) |
Get the list of resource declarations for the specified group name. | |
Static Public Member Functions | |
ResourceGroupManager & | getSingleton (void) |
Override standard Singleton retrieval. | |
ResourceGroupManager * | getSingletonPtr (void) |
Override standard Singleton retrieval. | |
Static Public Attributes | |
OGRE_AUTO_MUTEX String | DEFAULT_RESOURCE_GROUP_NAME |
Default resource group name. | |
String | INTERNAL_RESOURCE_GROUP_NAME |
Internal resource group name (should be used by OGRE internal only). | |
String | BOOTSTRAP_RESOURCE_GROUP_NAME |
Bootstrap resource group name (min OGRE resources). | |
String | AUTODETECT_RESOURCE_GROUP_NAME |
Special resource group name which causes resource group to be automatically determined based on searching for the resource in all groups. | |
size_t | RESOURCE_SYSTEM_NUM_REFERENCE_COUNTS |
The number of reference counts held per resource by the resource system. | |
Protected Types | |
typedef std::map< String, ResourceManager * > | ResourceManagerMap |
Map of resource types (strings) to ResourceManagers, used to notify them to load / unload group contents. | |
typedef std::multimap< Real, ScriptLoader * > | ScriptLoaderOrderMap |
Map of loading order (Real) to ScriptLoader, used to order script parsing. | |
typedef std::vector< ResourceGroupListener * > | ResourceGroupListenerList |
typedef std::map< String, Archive * > | ResourceLocationIndex |
Resource index entry, resourcename->location. | |
typedef std::list< ResourceLocation * > | LocationList |
List of possible file locations. | |
typedef std::list< ResourcePtr > | LoadUnloadResourceList |
List of resources which can be loaded / unloaded. | |
typedef std::map< String, ResourceGroup * > | ResourceGroupMap |
Map from resource group names to groups. | |
Protected Member Functions | |
void | parseResourceGroupScripts (ResourceGroup *grp) |
Parses all the available scripts found in the resource locations for the given group, for all ResourceManagers. | |
void | createDeclaredResources (ResourceGroup *grp) |
Create all the pre-declared resources. | |
void | addCreatedResource (ResourcePtr &res, ResourceGroup &group) |
Adds a created resource to a group. | |
ResourceGroup * | getResourceGroup (const String &name) |
Get resource group. | |
void | dropGroupContents (ResourceGroup *grp) |
Drops contents of a group, leave group there, notify ResourceManagers. | |
void | deleteGroup (ResourceGroup *grp) |
Delete a group for shutdown - don't notify ResourceManagers. | |
ResourceGroup * | findGroupContainingResourceImpl (const String &filename) |
Internal find method for auto groups. | |
void | fireResourceGroupScriptingStarted (const String &groupName, size_t scriptCount) |
Internal event firing method. | |
void | fireScriptStarted (const String &scriptName) |
Internal event firing method. | |
void | fireScriptEnded (void) |
Internal event firing method. | |
void | fireResourceGroupScriptingEnded (const String &groupName) |
Internal event firing method. | |
void | fireResourceGroupLoadStarted (const String &groupName, size_t resourceCount) |
Internal event firing method. | |
void | fireResourceStarted (const ResourcePtr &resource) |
Internal event firing method. | |
void | fireResourceEnded (void) |
Internal event firing method. | |
void | fireResourceGroupLoadEnded (const String &groupName) |
Internal event firing method. | |
Protected Attributes | |
ResourceManagerMap | mResourceManagerMap |
ScriptLoaderOrderMap | mScriptLoaderOrderMap |
ResourceGroupListenerList | mResourceGroupListenerList |
ResourceGroupMap | mResourceGroupMap |
String | mWorldGroupName |
Group name for world resources. | |
ResourceGroup * | mCurrentGroup |
Stored current group - optimisation for when bulk loading a group. | |
Static Protected Attributes | |
ResourceGroupManager * | ms_Singleton |
It also provides facilities to monitor resource loading per group (to do progress bars etc), provided the resources that are required are pre-registered.
ResourceGroupManager::initialiseResourceGroup
ResourceGroupManager::loadResourceGroup
Definition at line 161 of file OgreResourceGroupManager.h.
|
List of resources which can be loaded / unloaded.
Definition at line 211 of file OgreResourceGroupManager.h. |
|
List of possible file locations.
Definition at line 209 of file OgreResourceGroupManager.h. |
|
List of resource declarations.
Definition at line 184 of file OgreResourceGroupManager.h. |
|
Definition at line 194 of file OgreResourceGroupManager.h. |
|
Map from resource group names to groups.
Definition at line 239 of file OgreResourceGroupManager.h. |
|
Resource index entry, resourcename->location.
Definition at line 198 of file OgreResourceGroupManager.h. |
|
Map of resource types (strings) to ResourceManagers, used to notify them to load / unload group contents.
Definition at line 187 of file OgreResourceGroupManager.h. |
|
Map of loading order (Real) to ScriptLoader, used to order script parsing.
Definition at line 191 of file OgreResourceGroupManager.h. |
|
|
|
|
|
Internal method for getting a registered ResourceManager.
|
|
Internal method called by ResourceManager when all resources for that manager are removed.
|
|
Internal method called by ResourceManager when a resource is created.
|
|
Internale method to notify the group manager that a resource has changed group (only applicable for autodetect group).
|
|
Internal method called by ResourceManager when a resource is removed.
|
|
Notify this manager that one stage of world geometry loading has been completed.
|
|
Notify this manager that one stage of world geometry loading has been started.
|
|
Internal method for registering a ResourceManager (which should be a singleton). Creators of plugins can register new ResourceManagers this way if they wish.
|
|
Internal method for registering a ScriptLoader.
|
|
Internal method for unregistering a ResourceManager.
|
|
Internal method for unregistering a ScriptLoader.
|
|
Adds a created resource to a group.
|
|
Adds a ResourceGroupListener which will be called back during resource loading events.
|
|
Method to add a resource location to for a given resource group.
|
|
Clears a resource group.
|
|
Create all the pre-declared resources.
|
|
Create a resource group.
|
|
Declares a resource to be a part of a resource group, allowing you to load and unload it as part of the group.
|
|
Declares a resource to be a part of a resource group, allowing you to load and unload it as part of the group.
|
|
Delete a group for shutdown - don't notify ResourceManagers.
|
|
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.
|
|
Drops contents of a group, leave group there, notify ResourceManagers.
|
|
Find the group in which a resource exists.
|
|
Internal find method for auto groups.
|
|
Find all files matching a given pattern in a group and get some detailed information about them.
|
|
Find all file names matching a given pattern in a resource group.
|
|
Internal event firing method.
|
|
Internal event firing method.
|
|
Internal event firing method.
|
|
Internal event firing method.
|
|
Internal event firing method.
|
|
Internal event firing method.
|
|
Internal event firing method.
|
|
Internal event firing method.
|
|
Get the list of resource declarations for the specified group name.
|
|
Get resource group.
|
|
Get a list of the currently defined resource groups.
|
|
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< ResourceGroupManager >. |
|
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< ResourceGroupManager >. |
|
Sets the resource group that 'world' resources will use.
Definition at line 670 of file OgreResourceGroupManager.h. References Ogre::String. |
|
Initialise all resource groups which are yet to be initialised.
|
|
Initialises a resource group.
|
|
Associates some world geometry with a resource group, causing it to be loaded / unloaded with the resource group.
|
|
List all files in a resource group with accompanying information.
|
|
List all file names in a resource group.
|
|
Loads a resource group.
|
|
Open a single resource by name and return a DataStream pointing at the source of the data.
|
|
Open all resources matching a given pattern (which can contain the character '*' as a wildcard), and return a collection of DataStream objects on them.
|
|
Parses all the available scripts found in the resource locations for the given group, for all ResourceManagers.
|
|
Removes a ResourceGroupListener.
|
|
Removes a resource location from the search path.
|
|
Find out if the named file exists in a group.
|
|
Find out if the named file exists in a group.
|
|
Sets the resource group that 'world' resources will use.
Definition at line 667 of file OgreResourceGroupManager.h. References Ogre::String. |
|
Shutdown all ResourceManagers, performed as part of clean-up.
|
|
Undeclare a resource.
|
|
Clear any link to world geometry from a resource group.
|
|
Unloads a resource group.
|
|
Unload all resources which are not referenced by any other object.
|
|
Special resource group name which causes resource group to be automatically determined based on searching for the resource in all groups.
Definition at line 172 of file OgreResourceGroupManager.h. |
|
Bootstrap resource group name (min OGRE resources).
Definition at line 170 of file OgreResourceGroupManager.h. |
|
Default resource group name.
Definition at line 166 of file OgreResourceGroupManager.h. |
|
Internal resource group name (should be used by OGRE internal only).
Definition at line 168 of file OgreResourceGroupManager.h. |
|
Stored current group - optimisation for when bulk loading a group.
Definition at line 286 of file OgreResourceGroupManager.h. |
|
Definition at line 195 of file OgreResourceGroupManager.h. |
|
Definition at line 240 of file OgreResourceGroupManager.h. |
|
Definition at line 188 of file OgreResourceGroupManager.h. |
|
Definition at line 54 of file OgreSingleton.h. |
|
Definition at line 192 of file OgreResourceGroupManager.h. |
|
Group name for world resources.
Definition at line 243 of file OgreResourceGroupManager.h. |
|
The number of reference counts held per resource by the resource system.
Definition at line 174 of file OgreResourceGroupManager.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:42:42 2006