alaCarte Maps
Renderer for OpenStreetMap tiles
mapcss_def.hpp
Go to the documentation of this file.
1 
21 #pragma once
22 #ifndef MAPCSS_DEF_HPP
23 #define MAPCSS_DEF_HPP
24 #include "settings.hpp"
25 
26 #include <boost/fusion/include/adapt_struct.hpp>
27 #include <boost/fusion/include/vector.hpp>
28 #include <boost/variant/variant.hpp>
29 #include <boost/spirit/include/qi.hpp>
30 #include <boost/spirit/include/qi_grammar.hpp>
31 #include <boost/spirit/include/qi_real.hpp>
32 #include <boost/spirit/include/qi_symbols.hpp>
33 #include <boost/spirit/include/qi_stream.hpp>
34 #include <boost/spirit/include/qi_uint.hpp>
35 #include <boost/spirit/include/classic_position_iterator.hpp>
36 
37 namespace fsio = boost::fusion;
38 namespace spirit = boost::spirit;
39 namespace classic = boost::spirit::classic;
40 namespace qi = spirit::qi;
41 namespace chs = spirit::standard;
42 
43 
44 class StyleTemplate;
45 
46 namespace obj
47 {
50  {
51  Node,
52  Way,
54  Area,
55  Line,
56  Any
57  };
58 };
59 
60 
61 namespace op
62 {
65  {
73  };
74 
77  {
79  Not,
81  };
82 };
83 
84 
85 
86 namespace unit
87 {
90  {
94  };
95 };
96 
97 
98 
99 
100 namespace attr
101 {
104  {
118  };
119 };
120 
121 
122 class Stylesheet;
123 class Rule;
124 class Selector;
125 class ApplySelector;
126 class Style;
127 
129 typedef shared_ptr<Stylesheet> StylesheetPtr;
130 
132 typedef shared_ptr<Rule> RulePtr;
133 
135 typedef shared_ptr<Selector> SelectorPtr;
136 
138 typedef shared_ptr<ApplySelector> ApplySelectorPtr;
139 
141 typedef shared_ptr<StyleTemplate> StylePtr;
142 
143 
144 
146 typedef std::string::const_iterator StringIterator;
148 typedef classic::position_iterator2<StringIterator> GrammarIterator;
149 
150 
151 
152 #include "parse_info.hpp"
153 
154 #endif
Checks if a value is recognised by a regex.
Definition: mapcss_def.hpp:68
Specifies the z index.
Definition: mapcss_def.hpp:106
Checks if two values are equal.
Definition: mapcss_def.hpp:66
Checks if a value is greater then another.
Definition: mapcss_def.hpp:70
A StyleTemplate is the "raw" / "unevaluated" form of a Style specified by a single MapCSS rule...
Checks if a value is lesser than another.
Definition: mapcss_def.hpp:69
shared_ptr< Selector > SelectorPtr
Shortcut for a shared pointer to the base of all selectors.
Definition: mapcss_def.hpp:135
Specifies the casing width.
Definition: mapcss_def.hpp:109
Definition: rule.hpp:34
Specifies the width.
Definition: mapcss_def.hpp:107
Selects nodes.
Definition: mapcss_def.hpp:51
Checks if a geoobject has a certain tag.
Definition: mapcss_def.hpp:78
shared_ptr< ApplySelector > ApplySelectorPtr
Shortcut for a shared pointer to thr apply selector.
Definition: mapcss_def.hpp:138
A Stylesheet parses a given MapCSS Stylesheet file and stores the defined rules.
Definition: stylesheet.hpp:39
Selects relations.
Definition: mapcss_def.hpp:53
Selects ways.
Definition: mapcss_def.hpp:52
AttributeTypesEnum
Contains all the attributes, which can be specified in a styleset.
Definition: mapcss_def.hpp:103
BinaryTypesEnum
Enum with binary operators used in selectors.
Definition: mapcss_def.hpp:64
shared_ptr< Rule > RulePtr
Shortcut for a shared pointer to rule.
Definition: mapcss_def.hpp:132
classic::position_iterator2< StringIterator > GrammarIterator
Iterator wrapping the file iterator and to be used in all grammars.
Definition: mapcss_def.hpp:148
shared_ptr< StyleTemplate > StylePtr
Shortcut for a shared pointer to style.
Definition: mapcss_def.hpp:141
Specifies the casing color.
Definition: mapcss_def.hpp:110
specifies the font size
Definition: mapcss_def.hpp:111
A Style stores the MapCSS properties for a single Node or Way, or a Relation of type multipolygon...
Definition: style.hpp:35
UnitTypesEnum
Contains all the units available for numeric values.
Definition: mapcss_def.hpp:89
Checks if a geoobject does not have a certain tag.
Definition: mapcss_def.hpp:79
Selects lines (unclosed ways)
Definition: mapcss_def.hpp:55
ObjectTypeEnum
Enum with object selectors.
Definition: mapcss_def.hpp:49
Specifies the text to be used.
Definition: mapcss_def.hpp:114
Checks if two values are not equal.
Definition: mapcss_def.hpp:67
Checks if a value is lesser or equal to another.
Definition: mapcss_def.hpp:71
Specifies the color.
Definition: mapcss_def.hpp:108
Selects areas (closed ways)
Definition: mapcss_def.hpp:54
Checks if a value is greater or equal to another.
Definition: mapcss_def.hpp:72
std::string::const_iterator StringIterator
Iterator to iterate over a file.
Definition: mapcss_def.hpp:146
shared_ptr< Stylesheet > StylesheetPtr
Shortcut for a shared pointer to stylesheet.
Definition: mapcss_def.hpp:126
UnaryTypesEnum
Enum with unary operators used in selectors.
Definition: mapcss_def.hpp:76
Specifies the text color.
Definition: mapcss_def.hpp:112
Selects everything.
Definition: mapcss_def.hpp:56
Specifies the text poisition.
Definition: mapcss_def.hpp:113
Specifies a fillcolor.
Definition: mapcss_def.hpp:105