#include <OgreResource.h>
Inheritance diagram for Ogre::Resource:

Public Methods | |
| Resource () | |
| Basic constructor. More... | |
| virtual | ~Resource () |
| Virtual destructor. More... | |
| virtual void | load ()=0 |
| Loads the resource, if it is not already. More... | |
| virtual void | unload () |
| Unloads the resource, but retains data to recreate. More... | |
| virtual size_t | getSize (void) |
| Retrieves info about the size of the resource. More... | |
| void | touch (void) |
| 'Touches' the resource to indicate it has been used. More... | |
| time_t | getLastAccess (void) const |
| Gets the last time the resource was 'touched'. More... | |
| const String & | getName (void) const |
| Gets resource name. More... | |
| bool | isLoaded (void) const |
| Returns true if the Resource has been loaded, false otherwise. More... | |
| virtual void | destroy () |
| A method to make the resource delete itself. More... | |
Protected Attributes | |
| String | mName |
| bool | mIsLoaded |
| time_t | mLastAccess |
| size_t | mSize |
textures, sounds etc)
Subclasses must implement: 1. A constructor, with at least a mandatory name param. This constructor must set mName and optionally mSize. 2. The load() and unload() methods - mSize must be set after load() Each must check & update the mIsLoaded flag.
|
|
Basic constructor. @warn Subclasses must init mName and mSize! |
|
|
Virtual destructor. Shouldn't need to be overloaded, as the resource deallocation code should reside in unload()
|
|
|
A method to make the resource delete itself.
|
|
|
Gets the last time the resource was 'touched'.
|
|
|
Gets resource name.
Reimplemented in Ogre::Material. |
|
|
Retrieves info about the size of the resource.
|
|
|
Returns true if the Resource has been loaded, false otherwise.
|
|
|
Loads the resource, if it is not already.
Implemented in Ogre::ArchiveEx. |
|
|
'Touches' the resource to indicate it has been used.
|
|
|
Unloads the resource, but retains data to recreate.
Reimplemented in Ogre::ArchiveEx. |
|
|
|
|
|
|
|
|
|
|
|
|
Copyright © 2002 by The OGRE Team