OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
Resource::ResourceManager Class Reference

Base class for managers that require a virtual file system and object cache. More...

#include <resourcemanager.hpp>

Inheritance diagram for Resource::ResourceManager:
Collaboration diagram for Resource::ResourceManager:

Public Member Functions

 ResourceManager (const VFS::Manager *vfs)
 
virtual ~ResourceManager ()
 
virtual void updateCache (double referenceTime)
 Clear cache entries that have not been referenced for longer than expiryDelay. More...
 
virtual void clearCache ()
 Clear all cache entries. More...
 
void setExpiryDelay (double expiryDelay)
 How long to keep objects in cache after no longer being referenced. More...
 
const VFS::ManagergetVFS () const
 
virtual void reportStats (unsigned int frameNumber, osg::Stats *stats) const
 
virtual void releaseGLObjects (osg::State *state)
 

Protected Attributes

const VFS::ManagermVFS
 
osg::ref_ptr
< Resource::ObjectCache
mCache
 
double mExpiryDelay
 

Detailed Description

Base class for managers that require a virtual file system and object cache.

This base class implements clearing of the cache, but populating it and what it's used for is up to the individual sub classes.

Constructor & Destructor Documentation

Resource::ResourceManager::ResourceManager ( const VFS::Manager vfs)
Resource::ResourceManager::~ResourceManager ( )
virtual

Member Function Documentation

void Resource::ResourceManager::clearCache ( )
virtual

Clear all cache entries.

Reimplemented in Resource::SceneManager, Resource::BulletShapeManager, and Terrain::ChunkManager.

Here is the caller graph for this function:

const VFS::Manager * Resource::ResourceManager::getVFS ( ) const

Here is the caller graph for this function:

void Resource::ResourceManager::releaseGLObjects ( osg::State *  state)
virtual
virtual void Resource::ResourceManager::reportStats ( unsigned int  frameNumber,
osg::Stats *  stats 
) const
inlinevirtual
void Resource::ResourceManager::setExpiryDelay ( double  expiryDelay)

How long to keep objects in cache after no longer being referenced.

void Resource::ResourceManager::updateCache ( double  referenceTime)
virtual

Clear cache entries that have not been referenced for longer than expiryDelay.

Reimplemented in Resource::SceneManager, and Resource::BulletShapeManager.

Here is the caller graph for this function:

Member Data Documentation

osg::ref_ptr<Resource::ObjectCache> Resource::ResourceManager::mCache
protected
double Resource::ResourceManager::mExpiryDelay
protected
const VFS::Manager* Resource::ResourceManager::mVFS
protected

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