本文整理汇总了C++中Way::getTags方法的典型用法代码示例。如果您正苦于以下问题:C++ Way::getTags方法的具体用法?C++ Way::getTags怎么用?C++ Way::getTags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Way
的用法示例。
在下文中一共展示了Way::getTags方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: matchWay
void TagEqualsSelector::matchWay(WayId wayID, const shared_ptr<TileIdentifier>& ti, RenderAttributes* attributes) const {
Way* way = geodata->getWay(wayID);
auto entry = way->getTags().find(tag);
if (entry != way->getTags().end() && entry->second == value) {
next->matchWay(wayID, ti, attributes);
}
}
示例2: matchWay
void HasNotTagSelector::matchWay(WayId wayID, const shared_ptr<TileIdentifier>& ti, RenderAttributes* attributes) const {
Way* way = geodata->getWay(wayID);
auto entry = way->getTags().find(tag);
if (entry == way->getTags().end() || entry->second == precached_no || entry->second == precached_false) {
next->matchWay(wayID, ti, attributes);
}
}
示例3: matchWay
void TagMatchesSelector::matchWay(WayId wayID, const shared_ptr<TileIdentifier>& ti, RenderAttributes* attributes) const {
Way* way = geodata->getWay(wayID);
auto entry = way->getTags().find(tag);
if (entry != way->getTags().end()) {
if (boost::regex_match(entry->second.str(), expression)) {
next->matchWay(wayID, ti, attributes);
}
}
}
示例4: matchWay
void LineSelector::matchWay(WayId wayID, const shared_ptr<TileIdentifier>& ti, RenderAttributes* attributes) const {
Way* way = geodata->getWay(wayID);
auto& nodes = way->getNodeIDs();
// (area is open) or (area is set and area == no)
if (nodes.front() != nodes.back()) {
next->matchWay(wayID, ti, attributes);
} else {
auto entry = way->getTags().find(precached_area);
if (entry != way->getTags().end() && entry->second == precached_no) {
next->matchWay(wayID, ti, attributes);
}
}
}
示例5: matchWay
void HasTagSelector::matchWay(WayId wayID, const shared_ptr<TileIdentifier>& ti, RenderAttributes* attributes) const {
Way* way = geodata->getWay(wayID);
auto& map = way->getTags();
if (map.find(tag) != map.end()) {
next->matchWay(wayID, ti, attributes);
}
}
示例6: styleWays
void styleWays(const shared_ptr<std::vector<WayId> >& ids, RenderAttributes& attr) const
{
for (auto id : *ids)
{
Way* w = data->getWay(id);
auto& tags = w->getTags();
auto name = tags.find(CachedString("name"));
if (name != tags.end())
{
auto style = styles.find(name->second);
if (style != styles.end()) {
Style* s = attr.getNewStyle(id);
*s = style->second;
}
}
}
}