alaCarte Maps
Renderer for OpenStreetMap tiles
selector.hpp
Go to the documentation of this file.
1 
21 #pragma once
22 #ifndef SELECTOR_HPP
23 #define SELECTOR_HPP
24 /*
25  * =====================================================================================
26  *
27  * Filename: selector.hpp
28  *
29  * Description:
30  *
31  * =====================================================================================
32  */
33 
34 #include "settings.hpp"
35 
36 class RenderAttributes;
37 class Node;
38 class Way;
39 class Relation;
40 class Rule;
41 class Geodata;
42 class TileIdentifier;
43 
44 class Selector {
45 public:
46  Selector(const shared_ptr<Rule>& rule, const shared_ptr<Selector>& next);
47 
48  virtual void matchNode(NodeId nodeID, const shared_ptr<TileIdentifier>& ti, RenderAttributes* attributes) const = 0;
49  virtual void matchWay(WayId wayID, const shared_ptr<TileIdentifier>& ti, RenderAttributes* attributes) const = 0;
50  virtual void matchRelation(RelId relID, const shared_ptr<TileIdentifier>& ti, RenderAttributes* attributes) const = 0;
51 
52 protected:
53  const weak_ptr<Rule> rule;
54  const shared_ptr<Selector> next;
55  const shared_ptr<Geodata> geodata;
56 };
57 
58 #endif
Definition: node.hpp:28
virtual void matchWay(WayId wayID, const shared_ptr< TileIdentifier > &ti, RenderAttributes *attributes) const =0
Selector(const shared_ptr< Rule > &rule, const shared_ptr< Selector > &next)
This file is part of alaCarte.
Definition: selector.cpp:26
A RenderAttributes object contains mappings from NodeIDs and WayIDs to Style objects which define how...
Definition: rule.hpp:34
virtual void matchNode(NodeId nodeID, const shared_ptr< TileIdentifier > &ti, RenderAttributes *attributes) const =0
A TileIdentifier identifies a Tile.
const weak_ptr< Rule > rule
Definition: selector.hpp:53
const shared_ptr< Selector > next
Definition: selector.hpp:54
virtual void matchRelation(RelId relID, const shared_ptr< TileIdentifier > &ti, RenderAttributes *attributes) const =0
const shared_ptr< Geodata > geodata
Definition: selector.hpp:55
Definition: way.hpp:31