1 #ifndef SKY_MODEL_CACHE_H_
2 #define SKY_MODEL_CACHE_H_
21 throw std::runtime_error(
22 "Sky models in the 'source db' format are no longer supported by "
23 "DP3. Models need to be provided in the textual format and do not "
24 "require conversion using the 'makesourcedb' tool. If you do not "
25 "have the original text model file, the 'showsourcedb' tool can be "
26 "used to convert a sourcedb back to text format.");
28 auto iterator = cache_.find(filename);
29 if (iterator == cache_.end()) {
33 return iterator->second;
38 void Clear() { cache_.clear(); }
41 std::map<std::string, SourceDBWrapper> cache_;
Definition: SkyModelCache.h:12
SourceDBWrapper GetSkyModel(const std::string &filename)
Definition: SkyModelCache.h:19
void Clear()
Definition: SkyModelCache.h:38
static SkyModelCache & GetInstance()
Definition: SkyModelCache.h:14
Definition: SourceDBUtil.h:104
bool HasSkymodelExtension(const std::string &source_db_name)
Definition: SourceDBUtil.h:26