OGRE: Ogre::ResourceGroupListener Class Reference

| OGRE 14.5 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::ResourceGroupListener Class Reference
Core » Resources

This class defines an interface which is called back during resource group loading to indicate the progress of the load. More...

`#include <OgreResourceGroupManager.h>`

Inheritance diagram for Ogre::ResourceGroupListener:
[legend]

## Public Member Functions
virtual | ~ResourceGroupListener ()
virtual void | customStageEnded (void)
| This event is fired when a custom loading stage has been completed.
virtual void | customStageStarted (const String &description)
| This event is fired when a custom loading stage is about to start.
virtual void | resourceCreated (const ResourcePtr &resource)
| This event is fired when a resource was just created.
virtual void | resourceGroupLoadEnded (const String &groupName)
| This event is fired when a resource group finished loading.
virtual void | resourceGroupLoadStarted (const String &groupName, size_t resourceCount)
| This event is fired when a resource group begins loading.
virtual void | resourceGroupPrepareEnded (const String &groupName)
| This event is fired when a resource group finished preparing.
virtual void | resourceGroupPrepareStarted (const String &groupName, size_t resourceCount)
| This event is fired when a resource group begins preparing.
virtual void | resourceGroupScriptingEnded (const String &groupName)
| This event is fired when a resource group finished parsing scripts.
virtual void | resourceGroupScriptingStarted (const String &groupName, size_t scriptCount)
| This event is fired when a resource group begins parsing scripts.
virtual void | resourceLoadEnded (void)
| This event is fired when the resource has been loaded.
virtual void | resourceLoadStarted (const ResourcePtr &resource)
| This event is fired when a declared resource is about to be loaded.
virtual void | resourcePrepareEnded (void)
| This event is fired when the resource has been prepared.
virtual void | resourcePrepareStarted (const ResourcePtr &resource)
| This event is fired when a declared resource is about to be prepared.
virtual void | resourceRemove (const ResourcePtr &resource)
| This event is fired when a resource is about to be removed.
virtual void | scriptParseEnded (const String &scriptName, bool skipped)
| This event is fired when the script has been fully parsed.
virtual void | scriptParseStarted (const String &scriptName, bool &skipThisScript)
| This event is fired when a script is about to be parsed.

## Detailed Description

This class defines an interface which is called back during resource group loading to indicate the progress of the load.

Resource group loading is in 2 phases - creating resources from declarations (which includes parsing scripts), and loading resources. Note that you don't necessarily have to have both; it is quite possible to just parse all the scripts for a group (see ResourceGroupManager::initialiseResourceGroup, but not to load the resource group. The sequence of events is (* signifies a repeating item):

- resourceGroupScriptingStarted
- scriptParseStarted (*)
- scriptParseEnded (*)
- resourceGroupScriptingEnded
- resourceGroupLoadStarted
- resourceLoadStarted (*)
- resourceLoadEnded (*)
- customStageStarted (*)
- customStageEnded (*)
- resourceGroupLoadEnded
- resourceGroupPrepareStarted
- resourcePrepareStarted (*)
- resourcePrepareEnded (*)
- resourceGroupPrepareEnded

Note
  If OGRE_THREAD_SUPPORT is 1, this class is thread-safe.

## Constructor & Destructor Documentation

## ◆ ~ResourceGroupListener()

virtual Ogre::ResourceGroupListener::~ResourceGroupListener | ( |  | ) |
| inlinevirtual

## Member Function Documentation

## ◆ resourceGroupScriptingStarted()

virtual void Ogre::ResourceGroupListener::resourceGroupScriptingStarted | ( | const String & | groupName,
|  | size_t | scriptCount )
| inlinevirtual

This event is fired when a resource group begins parsing scripts.

Note
  Remember that if you are loading resources through ResourceBackgroundQueue, these callbacks will occur in the background thread, so you should not perform any thread-unsafe actions in this callback if that's the case (check the group name / script name).

Parameters

  groupName | The name of the group
  scriptCount | The number of scripts which will be parsed

Reimplemented in OgreBites::TrayManager.

## ◆ scriptParseStarted()

virtual void Ogre::ResourceGroupListener::scriptParseStarted | ( | const String & | scriptName,
|  | bool & | skipThisScript )
| inlinevirtual

This event is fired when a script is about to be parsed.

Parameters

  scriptName | Name of the to be parsed
  skipThisScript | A boolean passed by reference which is by default set to false. If the event sets this to true, the script will be skipped and not parsed. Note that in this case the scriptParseEnded event will not be raised for this script.

Reimplemented in OgreBites::TrayManager.

## ◆ scriptParseEnded()

virtual void Ogre::ResourceGroupListener::scriptParseEnded | ( | const String & | scriptName,
|  | bool | skipped )
| inlinevirtual

This event is fired when the script has been fully parsed.

Reimplemented in OgreBites::TrayManager.

## ◆ resourceGroupScriptingEnded()

virtual void Ogre::ResourceGroupListener::resourceGroupScriptingEnded | ( | const String & | groupName | ) |
| inlinevirtual

This event is fired when a resource group finished parsing scripts.

## ◆ resourceGroupPrepareStarted()

virtual void Ogre::ResourceGroupListener::resourceGroupPrepareStarted | ( | const String & | groupName,
|  | size_t | resourceCount )
| inlinevirtual

This event is fired when a resource group begins preparing.

Parameters

  groupName | The name of the group being prepared
  resourceCount | The number of resources which will be prepared, including a number of stages required to prepare any linked world geometry

## ◆ resourcePrepareStarted()

virtual void Ogre::ResourceGroupListener::resourcePrepareStarted | ( | const ResourcePtr & | resource | ) |
| inlinevirtual

This event is fired when a declared resource is about to be prepared.

Parameters

  resource | Weak reference to the resource prepared.

## ◆ resourcePrepareEnded()

virtual void Ogre::ResourceGroupListener::resourcePrepareEnded | ( | void |  | ) |
| inlinevirtual

This event is fired when the resource has been prepared.

## ◆ resourceGroupPrepareEnded()

virtual void Ogre::ResourceGroupListener::resourceGroupPrepareEnded | ( | const String & | groupName | ) |
| inlinevirtual

This event is fired when a resource group finished preparing.

## ◆ resourceGroupLoadStarted()

virtual void Ogre::ResourceGroupListener::resourceGroupLoadStarted | ( | const String & | groupName,
|  | size_t | resourceCount )
| inlinevirtual

This event is fired when a resource group begins loading.

Parameters

  groupName | The name of the group being loaded
  resourceCount | The number of resources which will be loaded, including a number of custom stages required to load anything else

Reimplemented in OgreBites::TrayManager.

## ◆ resourceLoadStarted()

virtual void Ogre::ResourceGroupListener::resourceLoadStarted | ( | const ResourcePtr & | resource | ) |
| inlinevirtual

This event is fired when a declared resource is about to be loaded.

Parameters

  resource | Weak reference to the resource loaded.

Reimplemented in OgreBites::TrayManager.

## ◆ resourceLoadEnded()

virtual void Ogre::ResourceGroupListener::resourceLoadEnded | ( | void |  | ) |
| inlinevirtual

This event is fired when the resource has been loaded.

Reimplemented in OgreBites::TrayManager.

## ◆ customStageStarted()

virtual void Ogre::ResourceGroupListener::customStageStarted | ( | const String & | description | ) |
| inlinevirtual

This event is fired when a custom loading stage is about to start.

The number of stages required will have been included in the resourceCount passed in resourceGroupLoadStarted.

Parameters

  description | Text description of what is about to be done

Reimplemented in OgreBites::TrayManager.

## ◆ customStageEnded()

virtual void Ogre::ResourceGroupListener::customStageEnded | ( | void |  | ) |
| inlinevirtual

This event is fired when a custom loading stage has been completed.

The number of stages required will have been included in the resourceCount passed in resourceGroupLoadStarted.

Reimplemented in OgreBites::TrayManager.

## ◆ resourceGroupLoadEnded()

virtual void Ogre::ResourceGroupListener::resourceGroupLoadEnded | ( | const String & | groupName | ) |
| inlinevirtual

This event is fired when a resource group finished loading.

## ◆ resourceCreated()

virtual void Ogre::ResourceGroupListener::resourceCreated | ( | const ResourcePtr & | resource | ) |
| inlinevirtual

This event is fired when a resource was just created.

Parameters

  resource | Weak reference to the resource created.

## ◆ resourceRemove()

virtual void Ogre::ResourceGroupListener::resourceRemove | ( | const ResourcePtr & | resource | ) |
| inlinevirtual

This event is fired when a resource is about to be removed.

Parameters

  resource | Weak reference to the resource removed.

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

- OgreResourceGroupManager.h