diff options
author | ExMix <rahuba.youri@mapswithme.com> | 2014-11-18 10:46:58 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:32:45 +0300 |
commit | 455b076ef46d44fbe9680a278d16fabe69b47d4b (patch) | |
tree | 0211ab1557e4e746ed4032845c7db221f76884fd /drape_frontend/map_data_provider.hpp | |
parent | f5fa9dc8b2a5c1e427a240c11152db6a04cb63d4 (diff) |
[drape] replace FeatureFetcher by abstract data source
Diffstat (limited to 'drape_frontend/map_data_provider.hpp')
-rw-r--r-- | drape_frontend/map_data_provider.hpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drape_frontend/map_data_provider.hpp b/drape_frontend/map_data_provider.hpp new file mode 100644 index 0000000000..c9d8844ceb --- /dev/null +++ b/drape_frontend/map_data_provider.hpp @@ -0,0 +1,30 @@ +#pragma once + +#include "../indexer/feature.hpp" + +#include "../geometry/rect2d.hpp" + +#include "../std/function.hpp" + +namespace df +{ + +class MapDataProvider +{ +public: + typedef function<void (FeatureID const &)> TReadIdCallback; + typedef function<void (FeatureType const &)> TReadFeatureCallback; + typedef function<void (TReadFeatureCallback const & , vector<FeatureID> const &)> TReadFeaturesFn; + typedef function<void (TReadIdCallback const & , m2::RectD const &, int)> TReadIDsFn; + + MapDataProvider(TReadIDsFn const & idsReader, TReadFeaturesFn const & featureReader); + + void ReadFeaturesID(TReadIdCallback const & fn, m2::RectD const & r, int scale) const; + void ReadFeatures(TReadFeatureCallback const & fn, vector<FeatureID> const & ids) const; + +private: + TReadFeaturesFn m_featureReader; + TReadIDsFn m_idsReader; +}; + +} |