alaCarte Maps
Renderer for OpenStreetMap tiles
RenderAttributes Class Reference

A RenderAttributes object contains mappings from NodeIDs and WayIDs to Style objects which define how the Node or Way has to be rendered. More...

#include <render_attributes.hpp>

Public Member Functions

TESTABLE const boost::unordered_map< WayId, Style * > & getWayMap () const
 
TESTABLE const boost::unordered_map< NodeId, Style * > & getNodeMap () const
 
TESTABLE const boost::unordered_map< RelId, Style * > & getRelationMap () const
 
TESTABLE StylegetCanvasStyle ()
 
TESTABLE StylegetNewStyle (NodeId id)
 
TESTABLE StylegetNewStyle (WayId id)
 
TESTABLE StylegetNewStyle (RelId id)
 

Static Public Attributes

static const unsigned int ChunkSize = 1024
 

Private Member Functions

template<typename IdType >
StylenewStyle (IdType id, boost::unordered_map< IdType, Style * > &map)
 

Private Attributes

boost::unordered_map< NodeId, Style * > nodeStyles
 
boost::unordered_map< WayId, Style * > wayStyles
 
boost::unordered_map< RelId, Style * > relationStyles
 
boost::object_pool< StylestylePool
 
Style canvasStyle
 

Detailed Description

A RenderAttributes object contains mappings from NodeIDs and WayIDs to Style objects which define how the Node or Way has to be rendered.

The exception of the rule that only nodes and ways are rendered are relations of type multipolygon, therefore we still need a relationStyles map.

Definition at line 36 of file render_attributes.hpp.

Member Function Documentation

TESTABLE Style* RenderAttributes::getCanvasStyle ( )
inline

Definition at line 53 of file render_attributes.hpp.

TESTABLE Style* RenderAttributes::getNewStyle ( NodeId  id)
inline

Definition at line 58 of file render_attributes.hpp.

TESTABLE Style* RenderAttributes::getNewStyle ( WayId  id)
inline

Definition at line 59 of file render_attributes.hpp.

TESTABLE Style* RenderAttributes::getNewStyle ( RelId  id)
inline

Definition at line 60 of file render_attributes.hpp.

TESTABLE const boost::unordered_map<NodeId, Style*>& RenderAttributes::getNodeMap ( ) const
inline

Definition at line 45 of file render_attributes.hpp.

TESTABLE const boost::unordered_map<RelId, Style*>& RenderAttributes::getRelationMap ( ) const
inline

Definition at line 49 of file render_attributes.hpp.

TESTABLE const boost::unordered_map<WayId, Style*>& RenderAttributes::getWayMap ( ) const
inline

Definition at line 41 of file render_attributes.hpp.

template<typename IdType >
Style* RenderAttributes::newStyle ( IdType  id,
boost::unordered_map< IdType, Style * > &  map 
)
inlineprivate

Definition at line 64 of file render_attributes.hpp.

Member Data Documentation

Style RenderAttributes::canvasStyle
private

Definition at line 77 of file render_attributes.hpp.

const unsigned int RenderAttributes::ChunkSize = 1024
static

Definition at line 39 of file render_attributes.hpp.

boost::unordered_map<NodeId, Style*> RenderAttributes::nodeStyles
private

Definition at line 71 of file render_attributes.hpp.

boost::unordered_map<RelId, Style*> RenderAttributes::relationStyles
private

Definition at line 73 of file render_attributes.hpp.

boost::object_pool<Style> RenderAttributes::stylePool
private

Definition at line 75 of file render_attributes.hpp.

boost::unordered_map<WayId, Style*> RenderAttributes::wayStyles
private

Definition at line 72 of file render_attributes.hpp.


The documentation for this class was generated from the following file: