![]() |
VR-Forces 4.10 Class Documentation
|
class to hold a hashed map of strings to equivalent virtual programs to avoid repeated, duplicate creation of a virtual programs More...
Public Member Functions | |
| virtual | ~DtVirtualProgramCache () |
| DTOR. More... | |
| virtual bool | findAndSetOn (const std::string &strHash, osg::StateSet *stateSet) |
| Find a vp with a hash and set it on the state set, if found. More... | |
| virtual void | cache (const std::string &strHash, osgEarth::VirtualProgram *virtualProgram) |
| cache a virtual program with the given hash More... | |
| virtual void | clear () |
| clear internal cache More... | |
| virtual void | addRef (void) |
| increase ref More... | |
| virtual void | removeRef (void) |
| decrease ref More... | |
| virtual int | refCount (void) const |
| get the ref count More... | |
Public Attributes | |
| friend | DtVirtualProgramCacheCreator |
| so that creator can access constructor More... | |
Protected Types | |
| typedef osg::ref_ptr < osgEarth::VirtualProgram > | VirtualProgramRef |
| typedef std::map< std::string, VirtualProgramRef > | StringVpMap |
Protected Member Functions | |
| DtVirtualProgramCache (DtDe &de) | |
| protected. only creator can create More... | |
Protected Attributes | |
| StringVpMap | myMapHashesToVirtualPrograms |
| DtDe & | myDe |
| tbb::atomic< int > | myRefCount |
| tbb::mutex | myMapMutex |
Private Member Functions | |
| DtVirtualProgramCache ()=delete | |
| not allowed More... | |
| DtVirtualProgramCache (const DtVirtualProgramCache &rhs)=delete | |
| not allowed More... | |
| DtVirtualProgramCache & | operator= (const DtVirtualProgramCache &rhs)=delete |
| not allowed More... | |
class to hold a hashed map of strings to equivalent virtual programs to avoid repeated, duplicate creation of a virtual programs
|
protected |
|
protected |
|
virtual |
DTOR.
|
protected |
protected. only creator can create
|
privatedelete |
not allowed
|
privatedelete |
not allowed
|
privatedelete |
not allowed
|
virtual |
Find a vp with a hash and set it on the state set, if found.
This was just a find returning a raw VP and that can get deleted from underneath/multi-threaded (was happening in cdb). The internal lock prevents this from happening.
|
virtual |
cache a virtual program with the given hash
|
virtual |
clear internal cache
|
virtual |
increase ref
|
virtual |
decrease ref
|
virtual |
get the ref count
| friend makVrv::DtVirtualProgramCache::DtVirtualProgramCacheCreator |
so that creator can access constructor
|
protected |
|
protected |
|
protected |
|
mutableprotected |