VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtPossibleFileNamesCache.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
14 #include <map>
15 
16 #include <boost/thread.hpp>
17 
18 #include <boost/unordered_map.hpp>
19 
20 #include <set>
21 
22 namespace makVrv
23 {
27  {
28  public:
31 
33  virtual ~DtPossibleFileNamesCache();
34 
36  virtual bool hasUnderScoreInPossibleFileNames(void) const;
37 
39  virtual bool keyExists(const std::string& key) const;
40 
42  virtual void updateCache(const std::string& texturePath);
43 
45  {
46  public:
47  virtual void doOperation(const std::string& possibleFileName) = 0;
48  virtual bool doContinue() const = 0;
49  };
50 
55  virtual void transform(TextureFileNameOperation* op) const;
56 
57  protected:
58  typedef std::map<std::string, std::string> FileNameMap;
60  std::string myTexturePath;
61 
62  mutable boost::mutex myMutex;
63 
64  // for a directory, map lowercase to their original RegularCase names
65  boost::unordered_map<std::string, boost::unordered_map<std::string, std::string> > myDirRegToLowerCaseFileMap;
66  // for a directory, keep an ordered set of lowercase file names
67  // (to help when we look for prefix matches based on incoming files)
68  boost::unordered_map<std::string, std::set<std::string> > myDirLowerCaseFileSet;
69  };
70 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)