alaCarte Maps
Renderer for OpenStreetMap tiles
Rule Class Reference

#include <rule.hpp>

Public Types

enum  AcceptableTypes { Accept_Node = 0x1, Accept_Way = 0x2, Accept_Relation = 0x4, Accept_Any = Accept_Node | Accept_Way | Accept_Relation }
 

Public Member Functions

 Rule (const shared_ptr< Geodata > &geodata)
 This file is part of alaCarte. More...
 
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 *renderAttributes) const
 
TESTABLE const shared_ptr< Geodata > & getGeodata () const
 
TESTABLE const shared_ptr< StyleTemplate > & getStyleTemplate () const
 
TESTABLE void setStyleTemplate (const shared_ptr< StyleTemplate > &styleTemplate)
 sets the StyleTemplate representation of the attributes specified in the MapCSS file for this rule. More...
 
TESTABLE void setFirstSelector (const shared_ptr< Selector > &first)
 what is the first selector in the selector chain for this rule? More...
 
TESTABLE void setZoomBounds (int bottom, int top)
 from which to which zoom level does this rule apply? More...
 
TESTABLE void setAcceptableType (AcceptableTypes type)
 what types of GeoObjects does this rule accept in the first selector? More...
 

Private Attributes

const shared_ptr< Geodatageodata
 
shared_ptr< Selectorfirst
 
shared_ptr< StyleTemplatestyleTemplate
 
int zoombottom
 
int zoomtop
 
AcceptableTypes accepableType
 

Friends

struct MapCssParser
 

Detailed Description

Definition at line 34 of file rule.hpp.

Member Enumeration Documentation

Enumerator
Accept_Node 
Accept_Way 
Accept_Relation 
Accept_Any 

Definition at line 38 of file rule.hpp.

Constructor & Destructor Documentation

Rule::Rule ( const shared_ptr< Geodata > &  geodata)

This file is part of alaCarte.

alaCarte is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

alaCarte is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with alaCarte. If not, see http://www.gnu.org/licenses/.

Copyright alaCarte 2012-2013 Simon Dreher, Florian Jacob, Tobias Kahlert, Patrick Niklaus, Bernhard Scheirle, Lisa Winter Maintainer: Florian Jacob

Definition at line 33 of file rule.cpp.

Member Function Documentation

const shared_ptr< Geodata > & Rule::getGeodata ( ) const

Definition at line 69 of file rule.cpp.

const shared_ptr< StyleTemplate > & Rule::getStyleTemplate ( ) const
Returns
the StyleTemplate representation of the attributes specified in the MapCSS file for this rule.

Definition at line 73 of file rule.cpp.

void Rule::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 renderAttributes 
) const

Definition at line 41 of file rule.cpp.

void Rule::setAcceptableType ( AcceptableTypes  type)

what types of GeoObjects does this rule accept in the first selector?

Definition at line 90 of file rule.cpp.

void Rule::setFirstSelector ( const shared_ptr< Selector > &  first)

what is the first selector in the selector chain for this rule?

Definition at line 81 of file rule.cpp.

void Rule::setStyleTemplate ( const shared_ptr< StyleTemplate > &  styleTemplate)

sets the StyleTemplate representation of the attributes specified in the MapCSS file for this rule.

Definition at line 77 of file rule.cpp.

void Rule::setZoomBounds ( int  bottom,
int  top 
)

from which to which zoom level does this rule apply?

Definition at line 85 of file rule.cpp.

Friends And Related Function Documentation

friend struct MapCssParser
friend

Definition at line 35 of file rule.hpp.

Member Data Documentation

AcceptableTypes Rule::accepableType
private

Definition at line 51 of file rule.hpp.

shared_ptr<Selector> Rule::first
private

Definition at line 48 of file rule.hpp.

const shared_ptr<Geodata> Rule::geodata
private

Definition at line 47 of file rule.hpp.

shared_ptr<StyleTemplate> Rule::styleTemplate
private

Definition at line 49 of file rule.hpp.

int Rule::zoombottom
private

Definition at line 50 of file rule.hpp.

int Rule::zoomtop
private

Definition at line 50 of file rule.hpp.


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