diff options
author | Alex Zolotarev <alex@maps.me> | 2016-01-04 15:50:07 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:04:17 +0300 |
commit | 4ab632bc479dab5973327b9177a3a34a4d56ff01 (patch) | |
tree | 4eb26c51c88a88c3eacec65ada2339ee641d1bff | |
parent | 075913c187213e007722e3bd451f5cdcae454dbe (diff) |
Added FeatureType::ParseEverything().
-rw-r--r-- | indexer/feature.cpp | 9 | ||||
-rw-r--r-- | indexer/feature.hpp | 2 | ||||
-rw-r--r-- | map/framework.cpp | 6 |
3 files changed, 12 insertions, 5 deletions
diff --git a/indexer/feature.cpp b/indexer/feature.cpp index ce890fa570..000cabb778 100644 --- a/indexer/feature.cpp +++ b/indexer/feature.cpp @@ -181,6 +181,15 @@ void FeatureType::Deserialize(feature::LoaderBase * pLoader, TBuffer buffer) m_innerStats.MakeZero(); } +void FeatureType::ParseEverything() const +{ + // Also calls ParseCommon() and ParseTypes(). + ParseHeader2(); + ParseGeometry(FeatureType::BEST_GEOMETRY); + ParseTriangles(FeatureType::BEST_GEOMETRY); + ParseMetadata(); +} + void FeatureType::ParseHeader2() const { if (!m_bHeader2Parsed) diff --git a/indexer/feature.hpp b/indexer/feature.hpp index 5e5a479582..f475b752da 100644 --- a/indexer/feature.hpp +++ b/indexer/feature.hpp @@ -170,6 +170,8 @@ public: /// @name Parse functions. Do simple dispatching to m_pLoader. //@{ + /// Super-method to call all possible Parse* methods. + void ParseEverything() const; void ParseHeader2() const; void ResetGeometry() const; diff --git a/map/framework.cpp b/map/framework.cpp index 42f247c981..dfb72a393b 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -1662,11 +1662,7 @@ FeatureType Framework::GetPOIByID(FeatureID const & fid) const // Note: all parse methods should be called with guard alive. Index::FeaturesLoaderGuard guard(m_model.GetIndex(), fid.m_mwmId); guard.GetFeatureByIndex(fid.m_index, feature); - feature.ParseHeader2(); - feature.ParseGeometry(FeatureType::BEST_GEOMETRY); - feature.ParseTriangles(FeatureType::BEST_GEOMETRY); - feature.ParseMetadata(); - + feature.ParseEverything(); return feature; } |