forked from organicmaps/organicmaps
Added FeatureType::ParseEverything().
This commit is contained in:
parent
075913c187
commit
4ab632bc47
3 changed files with 12 additions and 5 deletions
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue