alaCarte Maps
Renderer for OpenStreetMap tiles
ColorGrammar Struct Reference

A grammar to parse a mapcss color. More...

#include <color_grammar.hpp>

Inheritance diagram for ColorGrammar:

Public Types

typedef StringIterator ItType
 Iterator type for this grammar. More...
 
typedef chs::space_type Skipper
 Skipper type used in this grammar. More...
 

Public Member Functions

 ColorGrammar ()
 Creates all rules for the color grammar. More...
 

Public Attributes

qi::uint_parser< uint8, 10, 1, 3 > number
 Rule to parse a number with up to 3 digits. More...
 
qi::uint_parser< uint8, 16, 1, 1 > hexdigit
 Rule to parse a hex digit. More...
 
ColorSymbols colorSymbol_
 Symbol parser for colors. More...
 
qi::rule< ItType, uint8(), qi::locals< uint8, uint8 > > rule_hexvalue
 Rule to parse the hex color code. More...
 
qi::rule< ItType, Color(), qi::locals< uint8, uint8, uint8, uint8 > > rule_hexcolor
 Rule for #COLORCODE. More...
 
qi::rule< ItType, Color(), qi::locals< float, float >, Skipperrule_rgb
 Rule for rgb(...) More...
 
qi::rule< ItType, Color(), qi::locals< float, float, float >, Skipperrule_rgba
 Rule for rgba(...) More...
 
qi::rule< ItType, Color(), Skipperrule_color
 Mainrule. More...
 

Detailed Description

A grammar to parse a mapcss color.

Supports:

  • rgb(red, green, blue)
  • rgba(red, green, blue, alpha)
  • #COLORCODE
Note
Color names are parsed in another way!

Definition at line 58 of file color_grammar.hpp.

Member Typedef Documentation

Iterator type for this grammar.

Definition at line 61 of file color_grammar.hpp.

typedef chs::space_type ColorGrammar::Skipper

Skipper type used in this grammar.

Definition at line 63 of file color_grammar.hpp.

Constructor & Destructor Documentation

ColorGrammar::ColorGrammar ( )

Creates all rules for the color grammar.

Definition at line 51 of file color_grammar.cpp.

Member Data Documentation

ColorSymbols ColorGrammar::colorSymbol_

Symbol parser for colors.

Definition at line 71 of file color_grammar.hpp.

qi::uint_parser<uint8, 16, 1, 1> ColorGrammar::hexdigit

Rule to parse a hex digit.

Definition at line 69 of file color_grammar.hpp.

qi::uint_parser<uint8, 10, 1, 3> ColorGrammar::number

Rule to parse a number with up to 3 digits.

Definition at line 67 of file color_grammar.hpp.

qi::rule<ItType, Color(), Skipper> ColorGrammar::rule_color

Mainrule.

Definition at line 84 of file color_grammar.hpp.

qi::rule<ItType, Color(), qi::locals<uint8, uint8, uint8, uint8> > ColorGrammar::rule_hexcolor

Rule for #COLORCODE.

Definition at line 78 of file color_grammar.hpp.

qi::rule<ItType, uint8(), qi::locals<uint8, uint8> > ColorGrammar::rule_hexvalue

Rule to parse the hex color code.

Definition at line 76 of file color_grammar.hpp.

qi::rule<ItType, Color(), qi::locals<float, float>, Skipper> ColorGrammar::rule_rgb

Rule for rgb(...)

Definition at line 80 of file color_grammar.hpp.

qi::rule<ItType, Color(), qi::locals<float, float, float>, Skipper> ColorGrammar::rule_rgba

Rule for rgba(...)

Definition at line 82 of file color_grammar.hpp.


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