17 #ifndef OPENMW_COMPONENTS_RESOURCE_OBJECTCACHE
18 #define OPENMW_COMPONENTS_RESOURCE_OBJECTCACHE
20 #include <osg/Referenced>
21 #include <osg/ref_ptr>
74 void accept(osg::NodeVisitor& nv);
77 template <
class Functor>
82 f(it->second.first.get());
void removeFromObjectCache(const std::string &fileName)
Definition: objectcache.cpp:114
void call(Functor &f)
Definition: objectcache.hpp:78
std::pair< osg::ref_ptr< osg::Object >, double > ObjectTimeStampPair
Definition: objectcache.hpp:92
std::map< std::string, ObjectTimeStampPair > ObjectCacheMap
Definition: objectcache.hpp:93
ObjectCacheMap _objectCache
Definition: objectcache.hpp:95
void addEntryToObjectCache(const std::string &filename, osg::Object *object, double timestamp=0.0)
Definition: objectcache.cpp:35
void accept(osg::NodeVisitor &nv)
Definition: objectcache.cpp:140
unsigned int getCacheSize() const
Definition: objectcache.cpp:158
ObjectCache()
Definition: objectcache.cpp:26
Definition: objectcache.hpp:35
void updateTimeStampOfObjectsInCacheWithExternalReferences(double referenceTime)
Definition: objectcache.cpp:69
virtual ~ObjectCache()
Definition: objectcache.cpp:31
State
Definition: state.hpp:6
void releaseGLObjects(osg::State *state)
Definition: objectcache.cpp:127
void clear()
Definition: objectcache.cpp:121
OpenThreads::Mutex _objectCacheMutex
Definition: objectcache.hpp:96
bool checkInObjectCache(const std::string &fileName, double timeStamp)
Definition: objectcache.cpp:57
void removeExpiredObjectsInCache(double expiryTime)
Definition: objectcache.cpp:87
osg::ref_ptr< osg::Object > getRefFromObjectCache(const std::string &fileName)
Definition: objectcache.cpp:46