OGRE  1.7
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ogre::ResourceGroupListener Class Referenceabstract

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

#include <OgreResourceGroupManager.h>

Public Member Functions

virtual ~ResourceGroupListener ()
 
virtual void resourceGroupLoadEnded (const String &groupName)=0
 This event is fired when a resource group finished loading. More...
 
virtual void resourceGroupLoadStarted (const String &groupName, size_t resourceCount)=0
 This event is fired when a resource group begins loading. More...
 
virtual void resourceGroupPrepareEnded (const String &groupName)
 This event is fired when a resource group finished preparing. More...
 
virtual void resourceGroupPrepareStarted (const String &groupName, size_t resourceCount)
 This event is fired when a resource group begins preparing. More...
 
virtual void resourceGroupScriptingEnded (const String &groupName)=0
 This event is fired when a resource group finished parsing scripts. More...
 
virtual void resourceGroupScriptingStarted (const String &groupName, size_t scriptCount)=0
 This event is fired when a resource group begins parsing scripts. More...
 
virtual void resourceLoadEnded (void)=0
 This event is fired when the resource has been loaded. More...
 
virtual void resourceLoadStarted (const ResourcePtr &resource)=0
 This event is fired when a declared resource is about to be loaded. More...
 
virtual void resourcePrepareEnded (void)
 This event is fired when the resource has been prepared. More...
 
virtual void resourcePrepareStarted (const ResourcePtr &resource)
 This event is fired when a declared resource is about to be prepared. More...
 
virtual void scriptParseEnded (const String &scriptName, bool skipped)=0
 This event is fired when the script has been fully parsed. More...
 
virtual void scriptParseStarted (const String &scriptName, bool &skipThisScript)=0
 This event is fired when a script is about to be parsed. More...
 
virtual void worldGeometryPrepareStageEnded (void)
 This event is fired when a stage of preparing linked world geometry has been completed. More...
 
virtual void worldGeometryPrepareStageStarted (const String &description)
 This event is fired when a stage of preparing linked world geometry is about to start. More...
 
virtual void worldGeometryStageEnded (void)=0
 This event is fired when a stage of loading linked world geometry has been completed. More...
 
virtual void worldGeometryStageStarted (const String &description)=0
 This event is fired when a stage of loading linked world geometry is about to start. More...
 

Detailed Description

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

Remarks
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 (*)
  • worldGeometryStageStarted (*)
  • worldGeometryStageEnded (*)
  • resourceGroupLoadEnded
  • resourceGroupPrepareStarted
  • resourcePrepareStarted (*)
  • resourcePrepareEnded (*)
  • resourceGroupPrepareEnded
Note
If OGRE_THREAD_SUPPORT is 1, this class is thread-safe.

Definition at line 85 of file OgreResourceGroupManager.h.

Constructor & Destructor Documentation

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

Definition at line 88 of file OgreResourceGroupManager.h.

Member Function Documentation

virtual void Ogre::ResourceGroupListener::resourceGroupLoadEnded ( const String groupName)
pure virtual

This event is fired when a resource group finished loading.

virtual void Ogre::ResourceGroupListener::resourceGroupLoadStarted ( const String groupName,
size_t  resourceCount 
)
pure virtual

This event is fired when a resource group begins loading.

Parameters
groupNameThe name of the group being loaded
resourceCountThe number of resources which will be loaded, including a number of stages required to load any linked world geometry
virtual void Ogre::ResourceGroupListener::resourceGroupPrepareEnded ( const String groupName)
inlinevirtual

This event is fired when a resource group finished preparing.

Definition at line 147 of file OgreResourceGroupManager.h.

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

This event is fired when a resource group begins preparing.

Parameters
groupNameThe name of the group being prepared
resourceCountThe number of resources which will be prepared, including a number of stages required to prepare any linked world geometry

Definition at line 120 of file OgreResourceGroupManager.h.

virtual void Ogre::ResourceGroupListener::resourceGroupScriptingEnded ( const String groupName)
pure virtual

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

virtual void Ogre::ResourceGroupListener::resourceGroupScriptingStarted ( const String groupName,
size_t  scriptCount 
)
pure virtual

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
groupNameThe name of the group
scriptCountThe number of scripts which will be parsed
virtual void Ogre::ResourceGroupListener::resourceLoadEnded ( void  )
pure virtual

This event is fired when the resource has been loaded.

virtual void Ogre::ResourceGroupListener::resourceLoadStarted ( const ResourcePtr resource)
pure virtual

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

Parameters
resourceWeak reference to the resource loaded.
virtual void Ogre::ResourceGroupListener::resourcePrepareEnded ( void  )
inlinevirtual

This event is fired when the resource has been prepared.

Definition at line 131 of file OgreResourceGroupManager.h.

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

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

Parameters
resourceWeak reference to the resource prepared.

Definition at line 126 of file OgreResourceGroupManager.h.

virtual void Ogre::ResourceGroupListener::scriptParseEnded ( const String scriptName,
bool  skipped 
)
pure virtual

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

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

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

Parameters
scriptNameName of the to be parsed
skipThisScriptA 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.
virtual void Ogre::ResourceGroupListener::worldGeometryPrepareStageEnded ( void  )
inlinevirtual

This event is fired when a stage of preparing linked world geometry has been completed.

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

Parameters
descriptionText description of what was just prepared

Definition at line 145 of file OgreResourceGroupManager.h.

virtual void Ogre::ResourceGroupListener::worldGeometryPrepareStageStarted ( const String description)
inlinevirtual

This event is fired when a stage of preparing linked world geometry is about to start.

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

Parameters
descriptionText description of what was just prepared

Definition at line 137 of file OgreResourceGroupManager.h.

virtual void Ogre::ResourceGroupListener::worldGeometryStageEnded ( void  )
pure virtual

This event is fired when a stage of loading linked world geometry has been completed.

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

Parameters
descriptionText description of what was just loaded
virtual void Ogre::ResourceGroupListener::worldGeometryStageStarted ( const String description)
pure virtual

This event is fired when a stage of loading linked world geometry is about to start.

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

Parameters
descriptionText description of what was just loaded

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