#include <objectcache.hpp>
Resource::ObjectCache::ObjectCache |
( |
| ) |
|
Resource::ObjectCache::~ObjectCache |
( |
| ) |
|
|
protectedvirtual |
void Resource::ObjectCache::accept |
( |
osg::NodeVisitor & |
nv | ) |
|
call node->accept(nv); for all nodes in the objectCache.
void Resource::ObjectCache::addEntryToObjectCache |
( |
const std::string & |
filename, |
|
|
osg::Object * |
object, |
|
|
double |
timestamp = 0.0 |
|
) |
| |
Add a filename,object,timestamp triple to the Registry::ObjectCache.
void Resource::ObjectCache::clear |
( |
| ) |
|
Remove all objects in the cache regardless of having external references or expiry times.
osg::ref_ptr< osg::Object > Resource::ObjectCache::getRefFromObjectCache |
( |
const std::string & |
fileName | ) |
|
Get an ref_ptr<Object> from the object cache
void Resource::ObjectCache::releaseGLObjects |
( |
osg::State * |
state | ) |
|
call releaseGLObjects on all objects attached to the object cache.
void Resource::ObjectCache::removeExpiredObjectsInCache |
( |
double |
expiryTime | ) |
|
Removed object in the cache which have a time stamp at or before the specified expiry time. This would typically be called once per frame by applications which are doing database paging, and need to prune objects that are no longer required, and called after the a called after the call to updateTimeStampOfObjectsInCacheWithExternalReferences(expirtyTime).
void Resource::ObjectCache::removeFromObjectCache |
( |
const std::string & |
fileName | ) |
|
Remove Object from cache.
void Resource::ObjectCache::updateTimeStampOfObjectsInCacheWithExternalReferences |
( |
double |
referenceTime | ) |
|
For each object in the cache which has an reference count greater than 1 (and therefore referenced by elsewhere in the application) set the time stamp for that object in the cache to specified time. This would typically be called once per frame by applications which are doing database paging, and need to prune objects that are no longer required. The time used should be taken from the FrameStamp::getReferenceTime().
OpenThreads::Mutex Resource::ObjectCache::_objectCacheMutex |
|
protected |
The documentation for this class was generated from the following files: