alaCarte Maps
Renderer for OpenStreetMap tiles
tagmatches_selector.hpp
Go to the documentation of this file.
1 
21 #pragma once
22 #ifndef TAGMATCHES_SELECTOR_HPP
23 #define TAGMATCHES_SELECTOR_HPP
24 /*
25  * =====================================================================================
26  *
27  * Filename: tagmatches_selector.hpp
28  *
29  * Description: selectors of type [tag=~/value/] where value is a regular expression
30  *
31  * =====================================================================================
32  */
33 
34 #include "settings.hpp"
35 
37 #include <boost/regex.hpp>
38 
39 class TagMatchesSelector : public Selector {
40 public:
41  TagMatchesSelector(const shared_ptr<Rule>& rule, const shared_ptr<Selector>& next, const string& tag, const string& value);
42  virtual void matchNode(NodeId nodeID, const shared_ptr<TileIdentifier>& ti, RenderAttributes* attributes) const;
43  virtual void matchWay(WayId wayID, const shared_ptr<TileIdentifier>& ti, RenderAttributes* attributes) const;
44  virtual void matchRelation(RelId relID, const shared_ptr<TileIdentifier>& ti, RenderAttributes* attributes) const;
45 
46 private:
48  const boost::regex expression;
49 };
50 
51 #endif
A RenderAttributes object contains mappings from NodeIDs and WayIDs to Style objects which define how...
const CachedString tag
virtual void matchWay(WayId wayID, const shared_ptr< TileIdentifier > &ti, RenderAttributes *attributes) const
const weak_ptr< Rule > rule
Definition: selector.hpp:53
const boost::regex expression
const shared_ptr< Selector > next
Definition: selector.hpp:54
virtual void matchNode(NodeId nodeID, const shared_ptr< TileIdentifier > &ti, RenderAttributes *attributes) const
TagMatchesSelector(const shared_ptr< Rule > &rule, const shared_ptr< Selector > &next, const string &tag, const string &value)
This file is part of alaCarte.
Represents a string which is cached into an internal cache.
virtual void matchRelation(RelId relID, const shared_ptr< TileIdentifier > &ti, RenderAttributes *attributes) const