Added FeatureType::HasInternet function.

This commit is contained in:
vng 2015-02-27 18:38:48 +03:00 committed by Alex Zolotarev
parent c5a0a17f10
commit 6b3699d927
2 changed files with 20 additions and 0 deletions

View file

@ -351,6 +351,24 @@ string FeatureType::GetRoadNumber() const
return m_params.ref;
}
bool FeatureType::HasInternet() const
{
bool res = false;
ForEachType([&res](uint32_t type)
{
if (!res)
{
static const uint32_t t1 = classif().GetTypeByPath({"internet_access"});
ftype::TruncValue(type, 1);
res = (type == t1);
}
});
return res;
}
namespace
{
class DoCalcDistance

View file

@ -261,6 +261,8 @@ public:
uint8_t GetRank() const;
uint32_t GetPopulation() const;
string GetRoadNumber() const;
bool HasInternet() const;
inline feature::FeatureMetadata const & GetMetadata() const { return m_metadata; }
inline feature::FeatureMetadata & GetMetadata() { return m_metadata; }