#include <OgreResourceGroupManager.h>
Public Types | |
typedef std::list < ResourceDeclaration > | ResourceDeclarationList |
List of resource declarations. | |
typedef std::map< String, ResourceManager * > | ResourceManagerMap |
typedef MapIterator < ResourceManagerMap > | ResourceManagerIterator |
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 | prepareResourceGroup (const String &name, bool prepareMainResources=true, bool prepareWorldGeom=true) |
Prepares a resource group. | |
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. | |
bool | isResourceGroupInitialised (const String &name) |
Checks the status of a resource group. | |
bool | isResourceGroupLoaded (const String &name) |
Checks the status of a resource group. | |
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, bool dirs=false) |
List all file or directory names in a resource group. | |
FileInfoListPtr | listResourceFileInfo (const String &groupName, bool dirs=false) |
List all files in a resource group with accompanying information. | |
StringVectorPtr | findResourceNames (const String &groupName, const String &pattern, bool dirs=false) |
Find all file or directory 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, bool dirs=false) |
Find all files or directories matching a given pattern in a group and get some detailed information about them. | |
time_t | resourceModifiedTime (const String &group, const String &filename) |
Retrieve the modification time of a given file. | |
time_t | resourceModifiedTime (ResourceGroup *group, const String &filename) |
Retrieve the modification time of a given file. | |
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 |
Gets 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. | |
ResourceManagerIterator | getResourceManagerIterator () |
Get an iterator over the registered resource managers. | |
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) |
Internal 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. | |
void | setLoadingListener (ResourceLoadingListener *listener) |
Sets a new loading listener. | |
ResourceLoadingListener * | getLoadingListener () |
Returns the current loading listener. | |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info | |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *ptr) |
placement operator new | |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info | |
void * | operator new[] (size_t sz) |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
Static Public Member Functions | |
static ResourceGroupManager & | getSingleton (void) |
Override standard Singleton retrieval. | |
static ResourceGroupManager * | getSingletonPtr (void) |
Override standard Singleton retrieval. | |
Static Public Attributes | |
static OGRE_AUTO_MUTEX String | DEFAULT_RESOURCE_GROUP_NAME |
Default resource group name. | |
static String | INTERNAL_RESOURCE_GROUP_NAME |
Internal resource group name (should be used by OGRE internal only). | |
static String | BOOTSTRAP_RESOURCE_GROUP_NAME |
Bootstrap resource group name (min OGRE resources). | |
static 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. | |
static size_t | RESOURCE_SYSTEM_NUM_REFERENCE_COUNTS |
The number of reference counts held per resource by the resource system. | |
Protected Types | |
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, bool &skipScript) |
Internal event firing method. | |
void | fireScriptEnded (const String &scriptName, bool skipped) |
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 | fireResourceLoadStarted (const ResourcePtr &resource) |
Internal event firing method. | |
void | fireResourceLoadEnded (void) |
Internal event firing method. | |
void | fireResourceGroupLoadEnded (const String &groupName) |
Internal event firing method. | |
void | fireResourceGroupPrepareStarted (const String &groupName, size_t resourceCount) |
Internal event firing method. | |
void | fireResourcePrepareStarted (const ResourcePtr &resource) |
Internal event firing method. | |
void | fireResourcePrepareEnded (void) |
Internal event firing method. | |
void | fireResourceGroupPrepareEnded (const String &groupName) |
Internal event firing method. | |
Protected Attributes | |
ResourceManagerMap | mResourceManagerMap |
Map of resource types (strings) to ResourceManagers, used to notify them to load / unload group contents. | |
ScriptLoaderOrderMap | mScriptLoaderOrderMap |
ResourceGroupListenerList | mResourceGroupListenerList |
ResourceLoadingListener * | mLoadingListener |
ResourceGroupMap | mResourceGroupMap |
String | mWorldGroupName |
Group name for world resources. | |
ResourceGroup * | mCurrentGroup |
Stored current group - optimisation for when bulk loading a group. | |
Static Protected Attributes | |
static T * | ms_Singleton |
Classes | |
struct | ResourceDeclaration |
Nested struct defining a resource declaration. More... | |
struct | ResourceGroup |
Resource group entry. More... | |
struct | ResourceLocation |
Resource location entry. More... |
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 240 of file OgreResourceGroupManager.h.
typedef std::list<ResourceDeclaration> Ogre::ResourceGroupManager::ResourceDeclarationList |
typedef std::map<String, ResourceManager*> Ogre::ResourceGroupManager::ResourceManagerMap |
Definition at line 264 of file OgreResourceGroupManager.h.
Definition at line 265 of file OgreResourceGroupManager.h.
typedef std::multimap<Real, ScriptLoader*> Ogre::ResourceGroupManager::ScriptLoaderOrderMap [protected] |
Map of loading order (Real) to ScriptLoader, used to order script parsing.
Definition at line 271 of file OgreResourceGroupManager.h.
typedef std::vector<ResourceGroupListener*> Ogre::ResourceGroupManager::ResourceGroupListenerList [protected] |
Definition at line 274 of file OgreResourceGroupManager.h.
typedef std::map<String, Archive*> Ogre::ResourceGroupManager::ResourceLocationIndex [protected] |
Resource index entry, resourcename->location.
Definition at line 280 of file OgreResourceGroupManager.h.
typedef std::list<ResourceLocation*> Ogre::ResourceGroupManager::LocationList [protected] |
typedef std::list<ResourcePtr> Ogre::ResourceGroupManager::LoadUnloadResourceList [protected] |
List of resources which can be loaded / unloaded.
Definition at line 293 of file OgreResourceGroupManager.h.
typedef std::map<String, ResourceGroup*> Ogre::ResourceGroupManager::ResourceGroupMap [protected] |
Ogre::ResourceGroupManager::ResourceGroupManager | ( | ) |
virtual Ogre::ResourceGroupManager::~ResourceGroupManager | ( | ) | [virtual] |
void Ogre::ResourceGroupManager::parseResourceGroupScripts | ( | ResourceGroup * | grp | ) | [protected] |
Parses all the available scripts found in the resource locations for the given group, for all ResourceManagers.
void Ogre::ResourceGroupManager::createDeclaredResources | ( | ResourceGroup * | grp | ) | [protected] |
Create all the pre-declared resources.
void Ogre::ResourceGroupManager::addCreatedResource | ( | ResourcePtr & | res, | |
ResourceGroup & | group | |||
) | [protected] |
Adds a created resource to a group.
ResourceGroup* Ogre::ResourceGroupManager::getResourceGroup | ( | const String & | name | ) | [protected] |
Get resource group.
void Ogre::ResourceGroupManager::dropGroupContents | ( | ResourceGroup * | grp | ) | [protected] |
Drops contents of a group, leave group there, notify ResourceManagers.
void Ogre::ResourceGroupManager::deleteGroup | ( | ResourceGroup * | grp | ) | [protected] |
Delete a group for shutdown - don't notify ResourceManagers.
ResourceGroup* Ogre::ResourceGroupManager::findGroupContainingResourceImpl | ( | const String & | filename | ) | [protected] |
Internal find method for auto groups.
void Ogre::ResourceGroupManager::fireResourceGroupScriptingStarted | ( | const String & | groupName, | |
size_t | scriptCount | |||
) | [protected] |
Internal event firing method.
void Ogre::ResourceGroupManager::fireScriptStarted | ( | const String & | scriptName, | |
bool & | skipScript | |||
) | [protected] |
Internal event firing method.
void Ogre::ResourceGroupManager::fireScriptEnded | ( | const String & | scriptName, | |
bool | skipped | |||
) | [protected] |
Internal event firing method.
void Ogre::ResourceGroupManager::fireResourceGroupScriptingEnded | ( | const String & | groupName | ) | [protected] |
Internal event firing method.
void Ogre::ResourceGroupManager::fireResourceGroupLoadStarted | ( | const String & | groupName, | |
size_t | resourceCount | |||
) | [protected] |
Internal event firing method.
void Ogre::ResourceGroupManager::fireResourceLoadStarted | ( | const ResourcePtr & | resource | ) | [protected] |
Internal event firing method.
void Ogre::ResourceGroupManager::fireResourceLoadEnded | ( | void | ) | [protected] |
Internal event firing method.
void Ogre::ResourceGroupManager::fireResourceGroupLoadEnded | ( | const String & | groupName | ) | [protected] |
Internal event firing method.
void Ogre::ResourceGroupManager::fireResourceGroupPrepareStarted | ( | const String & | groupName, | |
size_t | resourceCount | |||
) | [protected] |
Internal event firing method.
void Ogre::ResourceGroupManager::fireResourcePrepareStarted | ( | const ResourcePtr & | resource | ) | [protected] |
Internal event firing method.
void Ogre::ResourceGroupManager::fireResourcePrepareEnded | ( | void | ) | [protected] |
Internal event firing method.
void Ogre::ResourceGroupManager::fireResourceGroupPrepareEnded | ( | const String & | groupName | ) | [protected] |
Internal event firing method.
void Ogre::ResourceGroupManager::createResourceGroup | ( | const String & | name | ) |
Create a resource group.
name | The name to give the resource group. |
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, | |
bool | prepareMainResources = true , |
|||
bool | prepareWorldGeom = true | |||
) |
Prepares a resource group.
name | The name of the resource group to prepare. | |
prepareMainResources | If true, prepares normal resources associated with the group (you might want to set this to false if you wanted to just prepare world geometry in bulk) | |
prepareWorldGeom | If true, prepares any linked world geometry |
void Ogre::ResourceGroupManager::loadResourceGroup | ( | const String & | name, | |
bool | loadMainResources = true , |
|||
bool | loadWorldGeom = true | |||
) |
Loads a resource group.
name | The name of the resource group to load. | |
loadMainResources | If true, loads normal resources associated with the group (you might want to set this to false if you wanted to just load world geometry in bulk) | |
loadWorldGeom | If true, loads any linked world geometry |
void Ogre::ResourceGroupManager::unloadResourceGroup | ( | const String & | name, | |
bool | reloadableOnly = true | |||
) |
Unloads a resource group.
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.
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 | ) |
Checks the status of a resource group.
name | The name to of the resource group to access. |
bool Ogre::ResourceGroupManager::isResourceGroupLoaded | ( | const String & | name | ) |
Checks the status of a resource group.
name | The name to of the resource group to access. |
void Ogre::ResourceGroupManager::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.
name | The name of the resource location; probably a directory, zip file, URL etc. | |
locType | The codename for the resource type, which must correspond to the Archive factory which is providing the implementation. | |
resGroup | The name of the resource group for which this location is to apply. ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME is the default group which always exists, and can be used for resources which are unlikely to be unloaded until application shutdown. Otherwise it must be the name of a group; if it has not already been created with createResourceGroup then it is created automatically. | |
recursive | Whether subdirectories will be searched for files when using a pattern match (such as *.material), and whether subdirectories will be indexed. This can slow down initial loading of the archive and searches. When opening a resource you still need to use the fully qualified name, this allows duplicate names in alternate paths. |
void Ogre::ResourceGroupManager::removeResourceLocation | ( | const String & | name, | |
const String & | resGroup = DEFAULT_RESOURCE_GROUP_NAME | |||
) |
Removes a resource location from the search path.
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. | |
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. |
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::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. |
DataStreamPtr Ogre::ResourceGroupManager::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.
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. | |
searchGroupsIfNotFound | If true, if the resource is not found in the group specified, other groups will be searched. If you're loading a real Resource using this option, 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 |
DataStreamListPtr Ogre::ResourceGroupManager::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.
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 | |||
) |
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 | |||
) |
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 | |||
) |
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 |
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::resourceExists | ( | ResourceGroup * | group, | |
const String & | filename | |||
) |
Find out if the named file exists in a group.
group | Pointer to the resource group | |
filename | Fully qualified name of the file to test for |
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 | |||
) |
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 | |||
) |
Retrieve the modification time of a given file.
time_t Ogre::ResourceGroupManager::resourceModifiedTime | ( | ResourceGroup * | group, | |
const String & | filename | |||
) |
Retrieve the modification time of a given file.
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.
void Ogre::ResourceGroupManager::setWorldResourceGroupName | ( | const String & | groupName | ) |
Sets the resource group that 'world' resources will use.
Definition at line 818 of file OgreResourceGroupManager.h.
const String& Ogre::ResourceGroupManager::getWorldResourceGroupName | ( | void | ) | const |
Gets the resource group that 'world' resources will use.
Definition at line 821 of file OgreResourceGroupManager.h.
void Ogre::ResourceGroupManager::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.
group | The name of the resource group | |
worldGeometry | The parameter which should be passed to setWorldGeometry | |
sceneManager | The SceneManager which should be called |
void Ogre::ResourceGroupManager::unlinkWorldGeometryFromResourceGroup | ( | const String & | group | ) |
Clear any link to world geometry from a resource group.
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. |
ResourceManagerIterator Ogre::ResourceGroupManager::getResourceManagerIterator | ( | ) |
Get an iterator over the registered resource managers.
Definition at line 870 of file OgreResourceGroupManager.h.
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. |
ResourceManager* Ogre::ResourceGroupManager::_getResourceManager | ( | const String & | resourceType | ) |
Internal method for getting a registered ResourceManager.
resourceType | String identifying the resource type. |
void Ogre::ResourceGroupManager::_notifyResourceCreated | ( | ResourcePtr & | res | ) |
Internal method called by ResourceManager when a resource is created.
res | Weak reference to resource |
void Ogre::ResourceGroupManager::_notifyResourceRemoved | ( | ResourcePtr & | res | ) |
Internal method called by ResourceManager when a resource is removed.
res | Weak reference to resource |
void Ogre::ResourceGroupManager::_notifyResourceGroupChanged | ( | const String & | oldGroup, | |
Resource * | res | |||
) |
Internal method to notify the group manager that a resource has changed group (only applicable for autodetect group).
void Ogre::ResourceGroupManager::_notifyAllResourcesRemoved | ( | ResourceManager * | manager | ) |
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::_notifyWorldGeometryStageStarted | ( | const String & | description | ) |
Notify this manager that one stage of world geometry loading has been started.
void Ogre::ResourceGroupManager::_notifyWorldGeometryStageEnded | ( | void | ) |
Notify this manager that one stage of world geometry loading has been completed.
StringVector Ogre::ResourceGroupManager::getResourceGroups | ( | void | ) |
Get a list of the currently defined resource groups.
ResourceDeclarationList Ogre::ResourceGroupManager::getResourceDeclarationList | ( | const String & | groupName | ) |
Get the list of resource declarations 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 | ( | ) |
Returns the current loading listener.
static ResourceGroupManager& Ogre::ResourceGroupManager::getSingleton | ( | void | ) | [static] |
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< T >.
static ResourceGroupManager* Ogre::ResourceGroupManager::getSingletonPtr | ( | void | ) | [static] |
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< T >.
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, | |
const char * | file, | |||
int | line, | |||
const char * | func | |||
) | [inherited] |
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) | [inherited] |
Definition at line 67 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, | |
void * | ptr | |||
) | [inherited] |
void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz, | |
const char * | file, | |||
int | line, | |||
const char * | func | |||
) | [inherited] |
void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) | [inherited] |
Definition at line 84 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) | [inherited] |
Definition at line 89 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, | |
void * | ||||
) | [inherited] |
Definition at line 95 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, | |
const char * | , | |||
int | , | |||
const char * | ||||
) | [inherited] |
Definition at line 101 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) | [inherited] |
Definition at line 106 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr, | |
const char * | , | |||
int | , | |||
const char * | ||||
) | [inherited] |
Definition at line 112 of file OgreMemoryAllocatedObject.h.
OGRE_AUTO_MUTEX String Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME [static] |
Internal resource group name (should be used by OGRE internal only).
Definition at line 247 of file OgreResourceGroupManager.h.
Bootstrap resource group name (min OGRE resources).
Definition at line 249 of file OgreResourceGroupManager.h.
Special resource group name which causes resource group to be automatically determined based on searching for the resource in all groups.
Definition at line 251 of file OgreResourceGroupManager.h.
size_t Ogre::ResourceGroupManager::RESOURCE_SYSTEM_NUM_REFERENCE_COUNTS [static] |
The number of reference counts held per resource by the resource system.
Definition at line 253 of file OgreResourceGroupManager.h.
Map of resource types (strings) to ResourceManagers, used to notify them to load / unload group contents.
Definition at line 268 of file OgreResourceGroupManager.h.
Definition at line 272 of file OgreResourceGroupManager.h.
Definition at line 275 of file OgreResourceGroupManager.h.
Definition at line 277 of file OgreResourceGroupManager.h.
Definition at line 333 of file OgreResourceGroupManager.h.
String Ogre::ResourceGroupManager::mWorldGroupName [protected] |
ResourceGroup* Ogre::ResourceGroupManager::mCurrentGroup [protected] |
Stored current group - optimisation for when bulk loading a group.
Definition at line 385 of file OgreResourceGroupManager.h.
T* Ogre::Singleton< T >::ms_Singleton [static, protected, inherited] |
Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Sep 27 22:05:52 2009