|
OpenMW
|
Cache for "non reusable" objects. More...
#include <multiobjectcache.hpp>
Public Member Functions | |
| MultiObjectCache () | |
| ~MultiObjectCache () | |
| void | removeUnreferencedObjectsInCache () |
| void | clear () |
| void | addEntryToObjectCache (const std::string &filename, osg::Object *object) |
| osg::ref_ptr< osg::Object > | takeFromObjectCache (const std::string &fileName) |
| void | releaseGLObjects (osg::State *state) |
| unsigned int | getCacheSize () const |
Protected Types | |
| typedef std::multimap < std::string, osg::ref_ptr < osg::Object > > | ObjectCacheMap |
Protected Attributes | |
| ObjectCacheMap | _objectCache |
| OpenThreads::Mutex | _objectCacheMutex |
Cache for "non reusable" objects.
|
protected |
| Resource::MultiObjectCache::MultiObjectCache | ( | ) |
| Resource::MultiObjectCache::~MultiObjectCache | ( | ) |
| void Resource::MultiObjectCache::addEntryToObjectCache | ( | const std::string & | filename, |
| osg::Object * | object | ||
| ) |
| void Resource::MultiObjectCache::clear | ( | ) |
Remove all objects from the cache.
| unsigned int Resource::MultiObjectCache::getCacheSize | ( | ) | const |
| 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.
|
protected |
|
mutableprotected |
1.8.6