00001 00030 #ifndef LL_REGIONNAMECACHE_H 00031 #define LL_REGIONNAMECACHE_H 00032 00033 #include <map> 00034 00035 class LLRegionNameCacheEntry 00036 { 00037 public: 00038 LLRegionNameCacheEntry(const LLString &name = "", bool is_static = false) : regionName(name), isStatic(is_static) {} 00039 00040 LLString regionName; 00041 bool isStatic; 00042 }; 00043 00044 class LLRegionNameCache 00045 { 00046 public: 00047 LLRegionNameCache() {} 00048 00049 void put(const LLUUID ®ion, const LLString &name); 00050 LLString get(const LLUUID ®ion); 00051 00052 void exportFile(const LLString &filename); 00053 void importFile(const LLString &filename, bool is_static); 00054 private: 00055 std::map<LLUUID,LLRegionNameCacheEntry> mCache; 00056 }; 00057 00058 00059 extern LLRegionNameCache *gRegionNameCache; 00060 00061 #endif 00062