libosmscout  0.1
osmscout::oss::Parser Class Reference

#include <Parser.h>

Public Types

enum  ValueType {
  ValueType::NO_VALUE, ValueType::IDENT, ValueType::STRING, ValueType::COLOR,
  ValueType::NUMBER, ValueType::CONSTANT
}
 

Public Member Functions

void AddFeatureToFilter (StyleFilter &filter, const std::string &featureName, const std::string &flagName, TypeInfoSet &resultTypes)
 
void AREABORDERSTYLE (StyleFilter filter, bool state)
 
void AREABORDERSYMBOLSTYLE (StyleFilter filter, bool state)
 
void AREABORDERSYMSTYLE (BorderPartialStyle &borderStyle)
 
void AREABORDERTEXTSTYLE (StyleFilter filter, bool state)
 
void AREAFILLSYMSTYLE (FillPartialStyle &fillStyle)
 
void AREAICONSTYLE (StyleFilter filter, bool state)
 
void AREASTYLE (StyleFilter filter, bool state)
 
void AREASTYLEDEF (StyleFilter filter, bool state)
 
void AREASYMBOLSTYLE (FillPartialStyle &fillStyle, BorderPartialStyle &borderStyle)
 
void AREATEXTSTYLE (StyleFilter filter, bool state)
 
void ATTRIBUTE (PartialStyleBase &style, const StyleDescriptor &descriptor)
 
void ATTRIBUTEVALUE (PartialStyleBase &style, const StyleAttributeDescriptor &descriptor)
 
void BOOL (bool &value)
 
void BORDERSTYLEATTR (BorderPartialStyle &style)
 
void CIRCLE (Symbol &symbol)
 
void COLOR (Color &color)
 
void COLOR_VALUE (Color &color)
 
void COLORCONSTDEF ()
 
void CONSTANT (StyleConstantRef &constant)
 
void CONSTBLOCK (bool state)
 
void CONSTCONDBLOCK (bool state)
 
void CONSTDEF ()
 
void CONSTSECTION ()
 
void COORD (Vertex2D &coord)
 
std::string Destring (const char *str)
 
void DOUBLE (double &value)
 
void FILLSTYLEATTR (FillPartialStyle &style)
 
void FLAGBLOCK (bool state)
 
void FLAGCONDBLOCK (bool state)
 
void FLAGDEF ()
 
void FLAGSECTION ()
 
size_t GetHexDigitValue (char c)
 
void ICONSTYLEATTR (IconPartialStyle &style)
 
void IDENT (std::string &value)
 
void IFCOND (bool &state)
 
void IMPORT ()
 
void IMPORTS ()
 
void LINESTYLEATTR (LinePartialStyle &style)
 
void MAG (Magnification &magnification)
 
void MAGCONSTDEF ()
 
void NODEICONSTYLE (StyleFilter filter, bool state)
 
void NODESTYLEDEF (StyleFilter filter, bool state)
 
void NODETEXTSTYLE (StyleFilter filter, bool state)
 
void OSS ()
 
void Parse ()
 
 Parser (Scanner *scanner, const std::string &filename, StyleConfig &config, osmscout::ColorPostprocessor colorPostprocessor=nullptr, const Log &log=osmscout::log)
 
void PATHSHIELDSTYLEATTR (PathShieldPartialStyle &style)
 
void PATHSYMBOLSTYLEATTR (PathSymbolPartialStyle &style)
 
void PATHTEXTSTYLEATTR (PathTextPartialStyle &style)
 
void POLYGON (Symbol &symbol)
 
void RECTANGLE (Symbol &symbol)
 
void ROUTEPATHTEXTSTYLE (StyleFilter filter, bool state)
 
void ROUTESTYLE (StyleFilter filter, bool state)
 
void ROUTESTYLEDEF (StyleFilter filter, bool state)
 
void SemErr (const char *msg)
 
void SemWarning (const char *msg)
 
void SIZECONDITION (SizeConditionRef &condition)
 
void STRING (std::string &value)
 
bool StringToDouble (const char *string, double &value)
 
void STYLE (StyleFilter filter, bool state)
 
void STYLEBLOCK (StyleFilter filter, bool state)
 
void STYLECONDBLOCK (StyleFilter filter, bool state)
 
void STYLEDEF (StyleFilter filter, bool state)
 
void STYLEFILTER (StyleFilter &filter)
 
void STYLEFILTER_FEATURE (StyleFilter &filter)
 
void STYLEFILTER_FEATURE_ENTRY (StyleFilter &filter, TypeInfoSet &types)
 
void STYLEFILTER_GROUP (StyleFilter &filter)
 
void STYLEFILTER_MAG (StyleFilter &filter)
 
void STYLEFILTER_ONEWAY (StyleFilter &filter)
 
void STYLEFILTER_PATH (StyleFilter &filter)
 
void STYLEFILTER_SIZE (StyleFilter &filter)
 
void STYLEFILTER_TYPE (StyleFilter &filter)
 
void STYLESECTION ()
 
void SYMBOLSECTION ()
 
void TEXTSTYLEATTR (TextPartialStyle &style)
 
void UDOUBLE (double &value)
 
void UINT (size_t &value)
 
void UINTCONSTDEF ()
 
void UMAP (double &width)
 
void WAYGROUP (size_t priority)
 
void WAYORDER ()
 
void WAYPATHSYMBOLSTYLE (StyleFilter filter, bool state)
 
void WAYPATHTEXTSTYLE (StyleFilter filter, bool state)
 
void WAYSHIELDSTYLE (StyleFilter filter, bool state)
 
void WAYSTYLE (StyleFilter filter, bool state)
 
void WAYSTYLEDEF (StyleFilter filter, bool state)
 
void WIDTHCONSTDEF ()
 
 ~Parser ()
 

Public Attributes

StyleConfigconfig
 
Errorserrors
 
std::string filename
 
MagnificationConverter magnificationConverter
 
bool state
 

Member Enumeration Documentation

◆ ValueType

Enumerator
NO_VALUE 
IDENT 
STRING 
COLOR 
NUMBER 
CONSTANT 

Constructor & Destructor Documentation

◆ Parser()

osmscout::oss::Parser::Parser ( Scanner scanner,
const std::string &  filename,
StyleConfig config,
osmscout::ColorPostprocessor  colorPostprocessor = nullptr,
const Log log = osmscout::log 
)

References errors, and osmscout::log.

◆ ~Parser()

osmscout::oss::Parser::~Parser ( )

References errors.

Member Function Documentation

◆ AddFeatureToFilter()

void osmscout::oss::Parser::AddFeatureToFilter ( StyleFilter filter,
const std::string &  featureName,
const std::string &  flagName,
TypeInfoSet resultTypes 
)
inline

◆ AREABORDERSTYLE()

void osmscout::oss::Parser::AREABORDERSTYLE ( StyleFilter  filter,
bool  state 
)

◆ AREABORDERSYMBOLSTYLE()

void osmscout::oss::Parser::AREABORDERSYMBOLSTYLE ( StyleFilter  filter,
bool  state 
)

◆ AREABORDERSYMSTYLE()

void osmscout::oss::Parser::AREABORDERSYMSTYLE ( BorderPartialStyle borderStyle)

References BORDERSTYLEATTR().

Referenced by AREASYMBOLSTYLE().

◆ AREABORDERTEXTSTYLE()

void osmscout::oss::Parser::AREABORDERTEXTSTYLE ( StyleFilter  filter,
bool  state 
)

◆ AREAFILLSYMSTYLE()

void osmscout::oss::Parser::AREAFILLSYMSTYLE ( FillPartialStyle fillStyle)

References FILLSTYLEATTR().

Referenced by AREASYMBOLSTYLE().

◆ AREAICONSTYLE()

void osmscout::oss::Parser::AREAICONSTYLE ( StyleFilter  filter,
bool  state 
)

◆ AREASTYLE()

void osmscout::oss::Parser::AREASTYLE ( StyleFilter  filter,
bool  state 
)

◆ AREASTYLEDEF()

void osmscout::oss::Parser::AREASTYLEDEF ( StyleFilter  filter,
bool  state 
)

◆ AREASYMBOLSTYLE()

void osmscout::oss::Parser::AREASYMBOLSTYLE ( FillPartialStyle fillStyle,
BorderPartialStyle borderStyle 
)

References AREABORDERSYMSTYLE(), and AREAFILLSYMSTYLE().

Referenced by CIRCLE(), POLYGON(), and RECTANGLE().

◆ AREATEXTSTYLE()

void osmscout::oss::Parser::AREATEXTSTYLE ( StyleFilter  filter,
bool  state 
)

◆ ATTRIBUTE()

◆ ATTRIBUTEVALUE()

void osmscout::oss::Parser::ATTRIBUTEVALUE ( PartialStyleBase style,
const StyleAttributeDescriptor descriptor 
)

References osmscout::Color::Alpha(), COLOR, COLOR_VALUE(), config, CONSTANT(), osmscout::MagnificationConverter::Convert(), osmscout::Color::Darken(), errors, osmscout::StyleAttributeDescriptor::GetAttribute(), osmscout::StyleConstantColor::GetColor(), osmscout::StyleEnumAttributeDescriptor::GetEnumValue(), osmscout::StyleConfig::GetLabelProvider(), osmscout::StyleConstantMag::GetMag(), osmscout::StyleAttributeDescriptor::GetName(), osmscout::StyleConfig::GetSymbol(), osmscout::StyleAttributeDescriptor::GetType(), osmscout::StyleConfig::GetTypeConfig(), osmscout::StyleConstantUInt::GetUInt(), osmscout::StyleConstantWidth::GetUnit(), osmscout::StyleConstantWidth::GetWidth(), osmscout::oss::Errors::hasErrors, IDENT(), osmscout::Color::Lighten(), osmscout::StyleConstantWidth::m, magnificationConverter, NO_VALUE, NUMBER, SemErr(), osmscout::PartialStyleBase::SetBoolValue(), osmscout::PartialStyleBase::SetColorValue(), osmscout::PartialStyleBase::SetDoubleArrayValue(), osmscout::PartialStyleBase::SetDoubleValue(), osmscout::PartialStyleBase::SetIntValue(), osmscout::PartialStyleBase::SetLabelValue(), osmscout::Magnification::SetLevel(), osmscout::PartialStyleBase::SetMagnificationValue(), osmscout::PartialStyleBase::SetStringValue(), osmscout::PartialStyleBase::SetSymbolValue(), osmscout::PartialStyleBase::SetUIntValue(), STRING(), osmscout::StringToNumber(), osmscout::TYPE_BOOL, osmscout::TYPE_COLOR, osmscout::TYPE_DISPLAY_SIZE, osmscout::TYPE_DOUBLE, osmscout::TYPE_ENUM, osmscout::TYPE_INT, osmscout::TYPE_LABEL, osmscout::TYPE_MAGNIFICATION, osmscout::TYPE_MAP_SIZE, osmscout::TYPE_STRING, osmscout::TYPE_SYMBOL, osmscout::TYPE_UDISPLAY_SIZE, osmscout::TYPE_UDOUBLE, osmscout::TYPE_UDOUBLE_ARRAY, osmscout::TYPE_UINT, osmscout::TYPE_UMAP_SIZE, and UDOUBLE().

Referenced by ATTRIBUTE().

◆ BOOL()

void osmscout::oss::Parser::BOOL ( bool &  value)

References SemErr().

Referenced by FLAGDEF().

◆ BORDERSTYLEATTR()

void osmscout::oss::Parser::BORDERSTYLEATTR ( BorderPartialStyle style)

◆ CIRCLE()

void osmscout::oss::Parser::CIRCLE ( Symbol symbol)

◆ COLOR()

◆ COLOR_VALUE()

void osmscout::oss::Parser::COLOR_VALUE ( Color color)

◆ COLORCONSTDEF()

◆ CONSTANT()

void osmscout::oss::Parser::CONSTANT ( StyleConstantRef constant)

◆ CONSTBLOCK()

void osmscout::oss::Parser::CONSTBLOCK ( bool  state)

References CONSTCONDBLOCK(), CONSTDEF(), and state.

Referenced by CONSTCONDBLOCK(), and CONSTSECTION().

◆ CONSTCONDBLOCK()

void osmscout::oss::Parser::CONSTCONDBLOCK ( bool  state)

References CONSTBLOCK(), IFCOND(), and state.

Referenced by CONSTBLOCK().

◆ CONSTDEF()

void osmscout::oss::Parser::CONSTDEF ( )

◆ CONSTSECTION()

void osmscout::oss::Parser::CONSTSECTION ( )

References CONSTBLOCK().

Referenced by OSS().

◆ COORD()

void osmscout::oss::Parser::COORD ( Vertex2D coord)

References DOUBLE().

Referenced by CIRCLE(), POLYGON(), and RECTANGLE().

◆ Destring()

std::string osmscout::oss::Parser::Destring ( const char *  str)
inline

Referenced by STRING().

◆ DOUBLE()

void osmscout::oss::Parser::DOUBLE ( double &  value)

References SemErr(), and StringToDouble().

Referenced by COORD(), and WIDTHCONSTDEF().

◆ FILLSTYLEATTR()

void osmscout::oss::Parser::FILLSTYLEATTR ( FillPartialStyle style)

◆ FLAGBLOCK()

void osmscout::oss::Parser::FLAGBLOCK ( bool  state)

References FLAGCONDBLOCK(), FLAGDEF(), and state.

Referenced by FLAGCONDBLOCK(), and FLAGSECTION().

◆ FLAGCONDBLOCK()

void osmscout::oss::Parser::FLAGCONDBLOCK ( bool  state)

References FLAGBLOCK(), IFCOND(), and state.

Referenced by FLAGBLOCK().

◆ FLAGDEF()

void osmscout::oss::Parser::FLAGDEF ( )

◆ FLAGSECTION()

void osmscout::oss::Parser::FLAGSECTION ( )

References FLAGBLOCK().

Referenced by OSS().

◆ GetHexDigitValue()

size_t osmscout::oss::Parser::GetHexDigitValue ( char  c)
inline

◆ ICONSTYLEATTR()

void osmscout::oss::Parser::ICONSTYLEATTR ( IconPartialStyle style)

◆ IDENT()

◆ IFCOND()

void osmscout::oss::Parser::IFCOND ( bool &  state)

◆ IMPORT()

◆ IMPORTS()

void osmscout::oss::Parser::IMPORTS ( )

References IMPORT().

Referenced by OSS().

◆ LINESTYLEATTR()

void osmscout::oss::Parser::LINESTYLEATTR ( LinePartialStyle style)

◆ MAG()

◆ MAGCONSTDEF()

◆ NODEICONSTYLE()

void osmscout::oss::Parser::NODEICONSTYLE ( StyleFilter  filter,
bool  state 
)

◆ NODESTYLEDEF()

void osmscout::oss::Parser::NODESTYLEDEF ( StyleFilter  filter,
bool  state 
)

References NODEICONSTYLE(), NODETEXTSTYLE(), and state.

Referenced by STYLEDEF().

◆ NODETEXTSTYLE()

void osmscout::oss::Parser::NODETEXTSTYLE ( StyleFilter  filter,
bool  state 
)

◆ OSS()

void osmscout::oss::Parser::OSS ( )

◆ Parse()

void osmscout::oss::Parser::Parse ( )

◆ PATHSHIELDSTYLEATTR()

void osmscout::oss::Parser::PATHSHIELDSTYLEATTR ( PathShieldPartialStyle style)

◆ PATHSYMBOLSTYLEATTR()

void osmscout::oss::Parser::PATHSYMBOLSTYLEATTR ( PathSymbolPartialStyle style)

◆ PATHTEXTSTYLEATTR()

void osmscout::oss::Parser::PATHTEXTSTYLEATTR ( PathTextPartialStyle style)

◆ POLYGON()

void osmscout::oss::Parser::POLYGON ( Symbol symbol)

◆ RECTANGLE()

void osmscout::oss::Parser::RECTANGLE ( Symbol symbol)

◆ ROUTEPATHTEXTSTYLE()

void osmscout::oss::Parser::ROUTEPATHTEXTSTYLE ( StyleFilter  filter,
bool  state 
)

◆ ROUTESTYLE()

void osmscout::oss::Parser::ROUTESTYLE ( StyleFilter  filter,
bool  state 
)

◆ ROUTESTYLEDEF()

void osmscout::oss::Parser::ROUTESTYLEDEF ( StyleFilter  filter,
bool  state 
)

References ROUTEPATHTEXTSTYLE(), ROUTESTYLE(), and state.

Referenced by STYLEDEF().

◆ SemErr()

◆ SemWarning()

void osmscout::oss::Parser::SemWarning ( const char *  msg)

◆ SIZECONDITION()

void osmscout::oss::Parser::SIZECONDITION ( SizeConditionRef condition)

References UDOUBLE(), and UMAP().

Referenced by STYLEFILTER_SIZE().

◆ STRING()

void osmscout::oss::Parser::STRING ( std::string &  value)

References Destring().

Referenced by ATTRIBUTEVALUE(), and IMPORT().

◆ StringToDouble()

bool osmscout::oss::Parser::StringToDouble ( const char *  string,
double &  value 
)
inline

Referenced by DOUBLE(), and UDOUBLE().

◆ STYLE()

void osmscout::oss::Parser::STYLE ( StyleFilter  filter,
bool  state 
)

References state, STYLEBLOCK(), STYLEDEF(), and STYLEFILTER().

Referenced by STYLEBLOCK().

◆ STYLEBLOCK()

void osmscout::oss::Parser::STYLEBLOCK ( StyleFilter  filter,
bool  state 
)

References state, STYLE(), and STYLECONDBLOCK().

Referenced by STYLE(), STYLECONDBLOCK(), and STYLESECTION().

◆ STYLECONDBLOCK()

void osmscout::oss::Parser::STYLECONDBLOCK ( StyleFilter  filter,
bool  state 
)

References IFCOND(), state, and STYLEBLOCK().

Referenced by STYLEBLOCK().

◆ STYLEDEF()

void osmscout::oss::Parser::STYLEDEF ( StyleFilter  filter,
bool  state 
)

◆ STYLEFILTER()

void osmscout::oss::Parser::STYLEFILTER ( StyleFilter filter)

◆ STYLEFILTER_FEATURE()

void osmscout::oss::Parser::STYLEFILTER_FEATURE ( StyleFilter filter)

◆ STYLEFILTER_FEATURE_ENTRY()

void osmscout::oss::Parser::STYLEFILTER_FEATURE_ENTRY ( StyleFilter filter,
TypeInfoSet types 
)

References AddFeatureToFilter(), and IDENT().

Referenced by STYLEFILTER_FEATURE().

◆ STYLEFILTER_GROUP()

◆ STYLEFILTER_MAG()

◆ STYLEFILTER_ONEWAY()

void osmscout::oss::Parser::STYLEFILTER_ONEWAY ( StyleFilter filter)

◆ STYLEFILTER_PATH()

◆ STYLEFILTER_SIZE()

void osmscout::oss::Parser::STYLEFILTER_SIZE ( StyleFilter filter)

◆ STYLEFILTER_TYPE()

◆ STYLESECTION()

void osmscout::oss::Parser::STYLESECTION ( )

References STYLEBLOCK().

Referenced by OSS().

◆ SYMBOLSECTION()

void osmscout::oss::Parser::SYMBOLSECTION ( )

◆ TEXTSTYLEATTR()

void osmscout::oss::Parser::TEXTSTYLEATTR ( TextPartialStyle style)

◆ UDOUBLE()

void osmscout::oss::Parser::UDOUBLE ( double &  value)

◆ UINT()

◆ UINTCONSTDEF()

◆ UMAP()

◆ WAYGROUP()

void osmscout::oss::Parser::WAYGROUP ( size_t  priority)

◆ WAYORDER()

void osmscout::oss::Parser::WAYORDER ( )

References WAYGROUP().

Referenced by OSS().

◆ WAYPATHSYMBOLSTYLE()

void osmscout::oss::Parser::WAYPATHSYMBOLSTYLE ( StyleFilter  filter,
bool  state 
)

◆ WAYPATHTEXTSTYLE()

void osmscout::oss::Parser::WAYPATHTEXTSTYLE ( StyleFilter  filter,
bool  state 
)

◆ WAYSHIELDSTYLE()

void osmscout::oss::Parser::WAYSHIELDSTYLE ( StyleFilter  filter,
bool  state 
)

◆ WAYSTYLE()

void osmscout::oss::Parser::WAYSTYLE ( StyleFilter  filter,
bool  state 
)

◆ WAYSTYLEDEF()

void osmscout::oss::Parser::WAYSTYLEDEF ( StyleFilter  filter,
bool  state 
)

◆ WIDTHCONSTDEF()

Member Data Documentation

◆ config

◆ errors

◆ filename

std::string osmscout::oss::Parser::filename

Referenced by IMPORT().

◆ magnificationConverter

MagnificationConverter osmscout::oss::Parser::magnificationConverter

Referenced by ATTRIBUTEVALUE(), and MAG().

◆ state


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