![]() |
VR-Forces 4.3 Class Documentation
|
A thread safe collection, used by the mult-threaded cache, of OSG referenced objects. More...

Classes | |
| struct | FindReference |
Public Types | |
| typedef boost::unordered_map < std::string, osg::ref_ptr < OsgObject > > | InstanceMap |
| typedef std::vector< std::pair < std::string, OsgObject * > > | ReferenceList |
Public Member Functions | |
| DtOsgReferencedCollection (unsigned int initialCapacity) | |
| Constructor. | |
| void | lock () |
| Lock the collection. | |
| ReferenceList & | getUnsafeList () |
| Get the unsafe list, to make this safe you MUST lock the collection first. | |
| InstanceMap & | getUnsafeMap () |
| Get the unsafe map, to make this safe you MUST lock the collection first. | |
| void | unlock () |
| Unlock the collection. | |
| bool | find (const std::string &name, osg::ref_ptr< OsgObject > &object) |
| Find an object with a given name or save the name as pending. | |
| void | insert (const std::string &name, const osg::ref_ptr< OsgObject > &obj) |
| Insert an instance into the cache. | |
| void | releaseGLObjects (osg::State *state) |
| Release GL objects on all objects in the cache. | |
| void | clear () |
| Clears all of the instances. | |
| osg::ref_ptr< OsgObject > | find (const std::string &filename) |
| Look for an object and return a value (null or not). | |
| osg::ref_ptr< osg::Texture > | findOrAddTexture (const std::string &filename, osg::Texture::FilterMode minFilter, osg::Texture::FilterMode magFilter, osg::Texture::WrapMode s, osg::Texture::WrapMode t) |
| Find or add a texture for the given image name. | |
| unsigned int | flush () |
| Do a partial flush of items. | |
| unsigned int | partialFlush (unsigned int maxToCheck, unsigned int maxToFlush) |
| Do a partial flush of items. | |
| unsigned int | partialFlushTextures (unsigned int maxToCheck, unsigned int maxToFlush) |
| Do a partial flush of items. | |
Protected Types | |
| typedef boost::unordered_set < std::string > | PendingSet |
Protected Attributes | |
| boost::mutex | myMutex |
| InstanceMap | myInstanceMap |
| ReferenceList | myRefInstanceList |
| PendingSet | myPendingInstances |
| unsigned int | myPartialFlushIndex |
A thread safe collection, used by the mult-threaded cache, of OSG referenced objects.
| typedef boost::unordered_map<std::string,osg::ref_ptr<OsgObject> > makVrv::DtOsgReferencedCollection< OsgObject >::InstanceMap |
| typedef std::vector<std::pair<std::string,OsgObject*> > makVrv::DtOsgReferencedCollection< OsgObject >::ReferenceList |
|
protected |
| makVrv::DtOsgReferencedCollection< OsgObject >::DtOsgReferencedCollection | ( | unsigned int | initialCapacity | ) |
Constructor.
|
inline |
Lock the collection.
|
inline |
Get the unsafe list, to make this safe you MUST lock the collection first.
|
inline |
Get the unsafe map, to make this safe you MUST lock the collection first.
|
inline |
Unlock the collection.
| bool makVrv::DtOsgReferencedCollection< OsgObject >::find | ( | const std::string & | name, |
| osg::ref_ptr< OsgObject > & | object | ||
| ) |
Find an object with a given name or save the name as pending.
This function will block if the object name was already pending.
| void makVrv::DtOsgReferencedCollection< OsgObject >::insert | ( | const std::string & | name, |
| const osg::ref_ptr< OsgObject > & | obj | ||
| ) |
Insert an instance into the cache.
| void makVrv::DtOsgReferencedCollection< OsgObject >::releaseGLObjects | ( | osg::State * | state | ) |
Release GL objects on all objects in the cache.
| void makVrv::DtOsgReferencedCollection< OsgObject >::clear | ( | ) |
Clears all of the instances.
| osg::ref_ptr<OsgObject> makVrv::DtOsgReferencedCollection< OsgObject >::find | ( | const std::string & | filename | ) |
Look for an object and return a value (null or not).
| osg::ref_ptr<osg::Texture> makVrv::DtOsgReferencedCollection< OsgObject >::findOrAddTexture | ( | const std::string & | filename, |
| osg::Texture::FilterMode | minFilter, | ||
| osg::Texture::FilterMode | magFilter, | ||
| osg::Texture::WrapMode | s, | ||
| osg::Texture::WrapMode | t | ||
| ) |
Find or add a texture for the given image name.
| unsigned int makVrv::DtOsgReferencedCollection< OsgObject >::flush | ( | ) |
Do a partial flush of items.
| unsigned int makVrv::DtOsgReferencedCollection< OsgObject >::partialFlush | ( | unsigned int | maxToCheck, |
| unsigned int | maxToFlush | ||
| ) |
Do a partial flush of items.
| unsigned int makVrv::DtOsgReferencedCollection< OsgObject >::partialFlushTextures | ( | unsigned int | maxToCheck, |
| unsigned int | maxToFlush | ||
| ) |
Do a partial flush of items.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |