OGRE: Ogre::ManualResourceLoader Class Reference - OGRE Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

# Ogre::ManualResourceLoader Class Reference

Interface describing a manual resource loader. More...

`#include <OgreResource.h>`

Inheritance diagram for Ogre::ManualResourceLoader:

[legend]
List of all members.

## Public Member Functions

| ManualResourceLoader ()
virtual | ~ManualResourceLoader ()
virtual void | loadResource (Resource *resource)=0
| Called when a resource wishes to load.

## Detailed Description

Interface describing a manual resource loader.

Remarks:
  Resources are usually loaded from files; however in some cases you want to be able to set the data up manually instead. This provides some problems, such as how to reload a Resource if it becomes unloaded for some reason, either because of memory constraints, or because a device fails and some or all of the data is lost.

  This interface should be implemented by all classes which wish to provide manual data to a resource. They provide a pointer to themselves when defining the resource (via the appropriate ResourceManager), and will be called when the Resource tries to load. They should implement the loadResource method such that the Resource is in the end set up exactly as if it had loaded from a file, although the implementations will likely differ between subclasses of Resource, which is why no generic algorithm can be stated here.

Note:
  The loader must remain valid for the entire life of the resource, so that if need be it can be called upon to re-load the resource at any time.

Definition at line 412 of file OgreResource.h.

## Constructor & Destructor Documentation

Ogre::ManualResourceLoader::ManualResourceLoader | ( |  | ) |

| Definition at line 415 of file OgreResource.h.

virtual Ogre::ManualResourceLoader::~ManualResourceLoader | ( |  | ) | `[virtual]`

| Definition at line 416 of file OgreResource.h.

## Member Function Documentation

virtual void Ogre::ManualResourceLoader::loadResource | ( | Resource * | resource | ) | `[pure virtual]`

Called when a resource wishes to load.

Parameters:

  | resource | The resource which wishes to load

Implemented in Ogre::Font, and Ogre::MeshManager.

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

- OgreResource.h

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Thu Mar 6 09:48:13 2008