VR-Forces 4.10 Class Documentation
 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. More...

Classes

struct  TextureFileNameOperation
 

Public Member Functions

 DtPossibleFileNamesCache (DtDe &de)
 constructor More...
 
virtual ~DtPossibleFileNamesCache ()
 destructor More...
 
virtual bool hasUnderScoreInPossibleFileNames (void) const
 whether the map has any names with '_' More...
 
virtual bool keyExists (const std::string &key) const
 does this key exist? More...
 
virtual void updateCache (const std::string &texturePath)
 Update the possible effect texture names, given this texture path. More...
 
virtual void transform (TextureFileNameOperation *op) const
 Do an operation on all keys. More...
 

Static Public Member Functions

static void clear ()
 Clear out maps of directories and file names used for speeding up loading. More...
 

Protected Types

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

Protected Member Functions

std::string getPrefix (const std::string &texPath)
 utility function for getting the prefix of a texture. More...
 

Protected Attributes

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

Static Protected Attributes

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

Detailed Description

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.

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
boost::unordered_map<std::string, boost::unordered_map<std::string, std::string> > makVrv::DtPossibleFileNamesCache::theDirRegToLowerCaseFileMap
staticprotected
boost::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 Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)