22 #ifndef STYLESHEET_HPP 23 #define STYLESHEET_HPP 26 #include <boost/filesystem/path.hpp> 39 class Stylesheet :
public boost::enable_shared_from_this<Stylesheet>
52 static shared_ptr<Stylesheet>
Load(
const boost::filesystem::path&
path,
const shared_ptr<Geodata>&
geodata,
int timeout);
60 TESTABLE void match(
const shared_ptr<std::vector<NodeId> >& nodeIDs,
61 const shared_ptr<std::vector<WayId> >& wayIDs,
62 const shared_ptr<std::vector<RelId> >& relIDs,
63 const shared_ptr<TileIdentifier>& ti,
73 const std::vector<shared_ptr<Rule> >
rules;
75 boost::filesystem::path
path;
A StyleTemplate is the "raw" / "unevaluated" form of a Style specified by a single MapCSS rule...
Stylesheet(const shared_ptr< Geodata > &geodata, const std::vector< shared_ptr< Rule > > &rules, const shared_ptr< StyleTemplate > &canvasStyle)
This file is part of alaCarte.
A RenderAttributes object contains mappings from NodeIDs and WayIDs to Style objects which define how...
boost::filesystem::path path
A Stylesheet parses a given MapCSS Stylesheet file and stores the defined rules.
shared_ptr< Geodata > geodata
A TileIdentifier identifies a Tile.
const std::vector< shared_ptr< Rule > > rules
TESTABLE const boost::filesystem::path getPath() const
shared_ptr< StyleTemplate > canvasStyle
TESTABLE void match(const shared_ptr< std::vector< NodeId > > &nodeIDs, const shared_ptr< std::vector< WayId > > &wayIDs, const shared_ptr< std::vector< RelId > > &relIDs, const shared_ptr< TileIdentifier > &ti, RenderAttributes *styleMap) const
Returns a new RenderAttributes with a Style object for each given Node and Way.
static shared_ptr< Stylesheet > Load(const boost::filesystem::path &path, const shared_ptr< Geodata > &geodata, int timeout)
Parses the MapCSS Stylesheet at the given path and returns a new Stylesheet containing the defined ru...