alaCarte Maps
Renderer for OpenStreetMap tiles
childways_selector.cpp
Go to the documentation of this file.
1 
24 #include "server/rule.hpp"
25 #include "general/geodata.hpp"
26 #include "general/node.hpp"
27 #include "general/way.hpp"
28 #include "general/relation.hpp"
30 
31 ChildWaysSelector::ChildWaysSelector(const shared_ptr<Rule>& rule, const shared_ptr<Selector>& next)
32  : Selector(rule, next)
33 {
34 }
35 
36 void ChildWaysSelector::matchNode(NodeId nodeID, const shared_ptr<TileIdentifier>& ti, RenderAttributes* attributes) const {
37 }
38 
39 void ChildWaysSelector::matchWay(WayId wayID, const shared_ptr<TileIdentifier>& ti, RenderAttributes* attributes) const {
40 }
41 
42 void ChildWaysSelector::matchRelation(RelId relID, const shared_ptr<TileIdentifier>& ti, RenderAttributes* attributes) const {
43  for (WayId wayID : geodata->getRelation(relID)->getWayIDs()) {
44  next->matchWay(wayID, ti, attributes);
45  }
46 }
A RenderAttributes object contains mappings from NodeIDs and WayIDs to Style objects which define how...
virtual void matchNode(NodeId nodeID, const shared_ptr< TileIdentifier > &ti, RenderAttributes *attributes) const
const shared_ptr< Selector > next
Definition: selector.hpp:54
const shared_ptr< Geodata > geodata
Definition: selector.hpp:55
virtual void matchRelation(RelId relID, const shared_ptr< TileIdentifier > &ti, RenderAttributes *attributes) const
ChildWaysSelector(const shared_ptr< Rule > &rule, const shared_ptr< Selector > &next)
This file is part of alaCarte.
virtual void matchWay(WayId wayID, const shared_ptr< TileIdentifier > &ti, RenderAttributes *attributes) const