Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::StringResource Class Reference

Wraps a String as a Resource for generic handling. More...

#include <OgreStringResource.h>

Inheritance diagram for Ogre::StringResource:

Ogre::Resource List of all members.

Public Methods

 StringResource (const String &name)
virtual void load ()
 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

Detailed Description

Wraps a String as a Resource for generic handling.


Constructor & Destructor Documentation

Ogre::StringResource::StringResource (  const String &    name )  [inline]
 


Member Function Documentation

virtual void Ogre::Resource::destroy (  void    )  [inline, virtual, inherited]
 

A method to make the resource delete itself.

Note:
This exists because Resource objects could be created in other processes, and they need to be destroyed in the process that created them.

time_t Ogre::Resource::getLastAccess (  void    )  const [inline, inherited]
 

Gets the last time the resource was 'touched'.

const String& Ogre::Resource::getName (  void    )  const [inline, inherited]
 

Gets resource name.

Reimplemented in Ogre::Material.

virtual size_t Ogre::Resource::getSize (  void    )  [inline, virtual, inherited]
 

Retrieves info about the size of the resource.

bool Ogre::Resource::isLoaded (  void    )  const [inline, inherited]
 

Returns true if the Resource has been loaded, false otherwise.

virtual void Ogre::StringResource::load (    )  [inline, virtual]
 

Loads the resource, if it is not already.

Implements Ogre::Resource.

void Ogre::Resource::touch (  void    )  [inline, inherited]
 

'Touches' the resource to indicate it has been used.

virtual void Ogre::Resource::unload (  void    )  [inline, virtual, inherited]
 

Unloads the resource, but retains data to recreate.

Reimplemented in Ogre::ArchiveEx.


Member Data Documentation

bool Ogre::Resource::mIsLoaded [protected, inherited]
 

time_t Ogre::Resource::mLastAccess [protected, inherited]
 

String Ogre::Resource::mName [protected, inherited]
 

size_t Ogre::Resource::mSize [protected, inherited]
 

Copyright © 2002 by The OGRE Team