diff options
author | Yuri Gorshenin <y@maps.me> | 2015-03-20 18:59:02 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:41:33 +0300 |
commit | 725aab207201f4b55bb0b8529b8731d0adfcd5cc (patch) | |
tree | 92273e0d2160883871e3d8dff2158153dd8dfb6c /map/feature_vec_model.cpp | |
parent | efaeab8e7b3b8cc863f601f29f98d4ff860955ce (diff) |
Added Observers interface to Index.
Diffstat (limited to 'map/feature_vec_model.cpp')
-rw-r--r-- | map/feature_vec_model.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/map/feature_vec_model.cpp b/map/feature_vec_model.cpp index c4397282bd..5acb0699a3 100644 --- a/map/feature_vec_model.cpp +++ b/map/feature_vec_model.cpp @@ -32,14 +32,14 @@ void FeaturesFetcher::InitClassificator() } } -int FeaturesFetcher::AddMap(string const & file) +int FeaturesFetcher::RegisterMap(string const & file) { int version = -1; try { m2::RectD r; - version = m_multiIndex.AddMap(file, r); + version = m_multiIndex.RegisterMap(file, r); if (version != -1) m_rect.Add(r); @@ -54,10 +54,9 @@ int FeaturesFetcher::AddMap(string const & file) return version; } -void FeaturesFetcher::RemoveMap(string const & file) -{ - m_multiIndex.Remove(file); -} +void FeaturesFetcher::DeregisterMap(string const & file) { m_multiIndex.Deregister(file); } + +void FeaturesFetcher::DeregisterAllMaps() { m_multiIndex.DeregisterAll(); } bool FeaturesFetcher::DeleteMap(string const & file) { @@ -66,12 +65,7 @@ bool FeaturesFetcher::DeleteMap(string const & file) bool FeaturesFetcher::UpdateMap(string const & file, m2::RectD & rect) { - return (m_multiIndex.UpdateMap(file, rect) >= 0); -} - -void FeaturesFetcher::RemoveAll() -{ - m_multiIndex.RemoveAll(); + return m_multiIndex.UpdateMap(file, rect) >= 0; } //void FeaturesFetcher::Clean() |