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

Cache for "non reusable" objects. More...

#include <multiobjectcache.hpp>

Inheritance diagram for Resource::MultiObjectCache:
Collaboration diagram for Resource::MultiObjectCache:

Public Member Functions

 MultiObjectCache ()
 
 ~MultiObjectCache ()
 
void removeUnreferencedObjectsInCache ()
 
void addEntryToObjectCache (const std::string &filename, osg::Object *object)
 
osg::ref_ptr< osg::Object > takeFromObjectCache (const std::string &fileName)
 
void releaseGLObjects (osg::State *state)
 

Protected Types

typedef std::multimap
< std::string, osg::ref_ptr
< osg::Object > > 
ObjectCacheMap
 

Protected Attributes

ObjectCacheMap _objectCache
 
OpenThreads::Mutex _objectCacheMutex
 

Detailed Description

Cache for "non reusable" objects.

Member Typedef Documentation

typedef std::multimap<std::string, osg::ref_ptr<osg::Object> > Resource::MultiObjectCache::ObjectCacheMap
protected

Constructor & Destructor Documentation

Resource::MultiObjectCache::MultiObjectCache ( )
Resource::MultiObjectCache::~MultiObjectCache ( )

Member Function Documentation

void Resource::MultiObjectCache::addEntryToObjectCache ( const std::string &  filename,
osg::Object *  object 
)
void Resource::MultiObjectCache::releaseGLObjects ( osg::State *  state)

call releaseGLObjects on all objects attached to the object cache.

void Resource::MultiObjectCache::removeUnreferencedObjectsInCache ( )
osg::ref_ptr< osg::Object > Resource::MultiObjectCache::takeFromObjectCache ( const std::string &  fileName)

Take an Object from cache. Return NULL if no object found.

Member Data Documentation

ObjectCacheMap Resource::MultiObjectCache::_objectCache
protected
OpenThreads::Mutex Resource::MultiObjectCache::_objectCacheMutex
protected

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