VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes
makVrv::DtPossibleFileNamesCache Class Reference

A thread safe cache containing a list of possible file names for effect textures, based on the current path All methods on this are thread safe.

Classes

struct  TextureFileNameOperation
 

Public Member Functions

 DtPossibleFileNamesCache (DtDe &de)
 
virtual ~DtPossibleFileNamesCache ()
 
virtual bool hasUnderScoreInPossibleFileNames (void) const
 
virtual bool keyExists (const std::string &key) const
 
virtual void updateCache (const std::string &texturePath)
 
virtual void transform (TextureFileNameOperation *op) const
 

Static Public Member Functions

static void clear ()
 

Protected Types

typedef std::map< std::string,
std::string > 
FileNameMap
 

Protected Member Functions

std::string getPrefix (const std::string &texPath)
 

Protected Attributes

FileNameMap myPossibleFileNames
 
std::string myTexturePath
 
boost::mutex myMutex
 
DtDemyDe
 

Static Protected Attributes

static tbb::spin_rw_mutex theMapMutex
 
static std::unordered_map
< std::string,
std::unordered_map
< std::string, std::string > > 
theDirRegToLowerCaseFileMap
 
static std::unordered_map
< std::string, std::set
< std::string > > 
theDirLowerCaseFileSet
 

Member Typedef Documentation

typedef std::map<std::string, std::string> makVrv::DtPossibleFileNamesCache::FileNameMap
protected

Constructor & Destructor Documentation

makVrv::DtPossibleFileNamesCache::DtPossibleFileNamesCache ( DtDe de)

constructor

virtual makVrv::DtPossibleFileNamesCache::~DtPossibleFileNamesCache ( )
virtual

destructor

Member Function Documentation

virtual bool makVrv::DtPossibleFileNamesCache::hasUnderScoreInPossibleFileNames ( void  ) const
virtual

whether the map has any names with '_'

virtual bool makVrv::DtPossibleFileNamesCache::keyExists ( const std::string &  key) const
virtual

does this key exist?

virtual void makVrv::DtPossibleFileNamesCache::updateCache ( const std::string &  texturePath)
virtual

Update the possible effect texture names, given this texture path.

virtual void makVrv::DtPossibleFileNamesCache::transform ( TextureFileNameOperation op) const
virtual

Do an operation on all keys. thread safe, until doContinue is true Operations will inherit from TextureFileNameOperation and override doOperation, doContinue This can be useful for say, iterating over all file names, and checking until a criteria is met (e.g. file names containing an '_')

static void makVrv::DtPossibleFileNamesCache::clear ( )
static

Clear out maps of directories and file names used for speeding up loading.

std::string makVrv::DtPossibleFileNamesCache::getPrefix ( const std::string &  texPath)
protected

utility function for getting the prefix of a texture.

Member Data Documentation

FileNameMap makVrv::DtPossibleFileNamesCache::myPossibleFileNames
protected
std::string makVrv::DtPossibleFileNamesCache::myTexturePath
protected
boost::mutex makVrv::DtPossibleFileNamesCache::myMutex
mutableprotected
tbb::spin_rw_mutex makVrv::DtPossibleFileNamesCache::theMapMutex
staticprotected
std::unordered_map<std::string, std::unordered_map<std::string, std::string> > makVrv::DtPossibleFileNamesCache::theDirRegToLowerCaseFileMap
staticprotected
std::unordered_map<std::string, std::set<std::string> > makVrv::DtPossibleFileNamesCache::theDirLowerCaseFileSet
staticprotected
DtDe& makVrv::DtPossibleFileNamesCache::myDe
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)