OGRE-Next: Ogre::ResourceLoadingListener Class Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Ogre::ResourceLoadingListener Class Referenceabstract
Core » Resources

`#include <OgreResourceGroupManager.h>`

## Public Member Functions
virtual | ~ResourceLoadingListener ()
virtual bool | grouplessResourceExists (const String &name)=0
| Gets called when a groupless manager (like TextureGpuManager) wants to check if there's a resource with that name provided by this listener.
virtual DataStreamPtr | grouplessResourceLoading (const String &name)=0
| Gets called when a groupless manager (like TextureGpuManager) loads a resource.
virtual DataStreamPtr | grouplessResourceOpened (const String &name, Archive *archive, DataStreamPtr &dataStream)=0
| Similar to resourceStreamOpened, gets called when a groupless manager has already opened a resource and you may want to modify the stream.
virtual bool | resourceCollision (Resource *resource, ResourceManager *resourceManager)=0
| This event is called when a resource collides with another existing one in a resource manager.
virtual DataStreamPtr | resourceLoading (const String &name, const String &group, Resource *resource)=0
| This event is called when a resource beings loading.
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.

## Detailed Description

Remarks
  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 | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ grouplessResourceExists()

virtual bool Ogre::ResourceLoadingListener::grouplessResourceExists | ( | const String & | name | ) |
| pure virtual

Gets called when a groupless manager (like TextureGpuManager) wants to check if there's a resource with that name provided by this listener.

This function is called from main thread.

## ◆ grouplessResourceLoading()

virtual DataStreamPtr Ogre::ResourceLoadingListener::grouplessResourceLoading | ( | const String & | name | ) |
| pure virtual

Gets called when a groupless manager (like TextureGpuManager) loads a resource.

WARNING: This function is likely going to be called from a worker thread.

## ◆ grouplessResourceOpened()

virtual DataStreamPtr Ogre::ResourceLoadingListener::grouplessResourceOpened | ( | const String & | name,
|  | Archive * | archive,
|  | DataStreamPtr & | dataStream )
| pure virtual

Similar to resourceStreamOpened, gets called when a groupless manager has already opened a resource and you may want to modify the stream.

If grouplessResourceLoading has been called, then this function won't. WARNING: This function is likely going to be called from a worker thread.

## ◆ 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.

## ◆ 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.

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

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

- OgreResourceGroupManager.h