OGRE  1.12.4
Object-Oriented Graphics Rendering Engine
Ogre::ResourceLoadingListener Class Referenceabstract

This class allows users to override resource loading behavior. More...

#include <OgreResourceGroupManager.h>

Public Member Functions

virtual ~ResourceLoadingListener ()
 
virtual bool resourceCollision (Resource *resource, ResourceManager *resourceManager)=0
 This event is called when a resource collides with another existing one in a resource manager. More...
 
virtual DataStreamPtr resourceLoading (const String &name, const String &group, Resource *resource)=0
 This event is called when a resource beings loading. More...
 
virtual void resourceStreamOpened (const String &name, const String &group, Resource *resource, DataStreamPtr &dataStream)=0
 This event is called when a resource stream has been opened, but not processed yet. More...
 

Detailed Description

This class allows users to override resource loading behavior.

By overriding this class' methods, you can change how resources are loaded and the behavior for resource name collisions.

Constructor & Destructor Documentation

◆ ~ResourceLoadingListener()

virtual Ogre::ResourceLoadingListener::~ResourceLoadingListener ( )
inlinevirtual

Member Function Documentation

◆ resourceLoading()

virtual DataStreamPtr Ogre::ResourceLoadingListener::resourceLoading ( const String name,
const String group,
Resource resource 
)
pure virtual

This event is called when a resource beings loading.

◆ resourceStreamOpened()

virtual void Ogre::ResourceLoadingListener::resourceStreamOpened ( const String name,
const String group,
Resource resource,
DataStreamPtr dataStream 
)
pure virtual

This event is called when a resource stream has been opened, but not processed yet.

You may alter the stream if you wish or alter the incoming pointer to point at another stream if you wish.

◆ resourceCollision()

virtual bool Ogre::ResourceLoadingListener::resourceCollision ( Resource resource,
ResourceManager resourceManager 
)
pure virtual

This event is called when a resource collides with another existing one in a resource manager.

Parameters
resourcethe new resource that conflicts with an existing one
resourceManagerthe according resource manager
Returns
false to skip registration of the conflicting resource and continue using the previous instance.

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