Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2011-06-30 10:52:22 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:20:14 +0300
commit233683d1670e89076c82401e2693315046c7244e (patch)
tree3b0a9b71d53e853e663da18c362f6ba267b1bc85 /map/feature_vec_model.cpp
parentf0587a9105b5519903f4f2c3dada1ee3572e7ce1 (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.cpp18
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)
{