diff options
author | vng <viktor.govako@gmail.com> | 2011-06-30 10:52:22 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:20:14 +0300 |
commit | 233683d1670e89076c82401e2693315046c7244e (patch) | |
tree | 3b0a9b71d53e853e663da18c362f6ba267b1bc85 /map/feature_vec_model.cpp | |
parent | f0587a9105b5519903f4f2c3dada1ee3572e7ce1 (diff) |
[Refactoring] Use Reader interface everywhere, when possible. Platform class now is a Reader factory.
Diffstat (limited to 'map/feature_vec_model.cpp')
-rw-r--r-- | map/feature_vec_model.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/map/feature_vec_model.cpp b/map/feature_vec_model.cpp index 8d2b93ac13..616ce07958 100644 --- a/map/feature_vec_model.cpp +++ b/map/feature_vec_model.cpp @@ -20,16 +20,24 @@ namespace model void FeaturesFetcher::InitClassificator() { Platform & p = GetPlatform(); - classificator::Read(p.ReadPathForFile("drawing_rules.bin"), - p.ReadPathForFile("classificator.txt"), - p.ReadPathForFile("visibility.txt")); + + try + { + classificator::Read(p.GetReader("drawing_rules.bin"), + p.GetReader("classificator.txt"), + p.GetReader("visibility.txt")); + } + catch (FileAbsentException const & e) + { + LOG(LERROR, ("Classificator not found ", e.what())); + } } -void FeaturesFetcher::AddMap(string const & fName) +void FeaturesFetcher::AddMap(ReaderT const & file) { try { - m_multiIndex.Add(fName); + m_multiIndex.Add(file); } catch (Reader::OpenException const & e) { |