libosmscout  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
osmscout::StyleConfig Class Reference

Index selectors by type and level. More...

#include <StyleConfig.h>

Public Member Functions

void AddAreaBorderStyle (const StyleFilter &filter, BorderPartialStyle &style)
 
void AddAreaBorderSymbolStyle (const StyleFilter &filter, PathSymbolPartialStyle &style)
 
void AddAreaBorderTextStyle (const StyleFilter &filter, PathTextPartialStyle &style)
 
void AddAreaFillStyle (const StyleFilter &filter, FillPartialStyle &style)
 
void AddAreaIconStyle (const StyleFilter &filter, IconPartialStyle &style)
 
void AddAreaTextStyle (const StyleFilter &filter, TextPartialStyle &style)
 
void AddConstant (const std::string &name, const StyleConstantRef &variable)
 
void AddFlag (const std::string &name, bool value)
 Add the flag with the given value. More...
 
void AddNodeIconStyle (const StyleFilter &filter, IconPartialStyle &style)
 
void AddNodeTextStyle (const StyleFilter &filter, TextPartialStyle &stype)
 
void AddWayLineStyle (const StyleFilter &filter, LinePartialStyle &style)
 
void AddWayPathShieldStyle (const StyleFilter &filter, PathShieldPartialStyle &style)
 
void AddWayPathSymbolStyle (const StyleFilter &filter, PathSymbolPartialStyle &style)
 
void AddWayPathTextStyle (const StyleFilter &filter, PathTextPartialStyle &style)
 
void GetAreaTypesWithMaxMag (const Magnification &maxMag, TypeInfoSet &types) const
 
StyleConstantRef GetConstantByName (const std::string &name) const
 
size_t GetFeatureFilterIndex (const Feature &feature) const
 
bool GetFlagByName (const std::string &name) const
 Returns thevalue of the given flag identified by the name of the flag. More...
 
const std::unordered_map
< std::string, bool > 
GetFlags () const
 
void GetNodeTypesWithMaxMag (const Magnification &maxMag, TypeInfoSet &types) const
 
const SymbolRefGetSymbol (const std::string &name) const
 
TypeConfigRef GetTypeConfig () const
 
size_t GetWayPrio (const TypeInfoRef &type) const
 
void GetWayTypesWithMaxMag (const Magnification &mag, TypeInfoSet &types) const
 
bool HasFlag (const std::string &name) const
 Returns 'true', if the given flag exists, else 'false'. More...
 
void Postprocess ()
 
bool RegisterSymbol (const SymbolRef &symbol)
 
StyleConfigSetWayPrio (const TypeInfoRef &type, size_t prio)
 
 StyleConfig (const TypeConfigRef &typeConfig)
 
virtual ~StyleConfig ()
 
bool RegisterLabelProviderFactory (const std::string &name, const LabelProviderFactoryRef &factory)
 Methods for registering LabelProvider-factories and and retrieving label providers. More...
 
LabelProviderRef GetLabelProvider (const std::string &name) const
 
bool HasNodeTextStyles (const TypeInfoRef &type, const Magnification &magnification) const
 Methods for retrieval of styles for a given object. More...
 
void GetNodeTextStyles (const FeatureValueBuffer &buffer, const Projection &projection, std::vector< TextStyleRef > &textStyles) const
 
IconStyleRef GetNodeIconStyle (const FeatureValueBuffer &buffer, const Projection &projection) const
 
void GetWayLineStyles (const FeatureValueBuffer &buffer, const Projection &projection, std::vector< LineStyleRef > &lineStyles) const
 
PathTextStyleRef GetWayPathTextStyle (const FeatureValueBuffer &buffer, const Projection &projection) const
 
PathSymbolStyleRef GetWayPathSymbolStyle (const FeatureValueBuffer &buffer, const Projection &projection) const
 
PathShieldStyleRef GetWayPathShieldStyle (const FeatureValueBuffer &buffer, const Projection &projection) const
 
FillStyleRef GetAreaFillStyle (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection) const
 
void GetAreaBorderStyles (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection, std::vector< BorderStyleRef > &borderStyles) const
 
bool HasAreaTextStyles (const TypeInfoRef &type, const Magnification &magnification) const
 
void GetAreaTextStyles (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection, std::vector< TextStyleRef > &textStyles) const
 
IconStyleRef GetAreaIconStyle (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection) const
 
PathTextStyleRef GetAreaBorderTextStyle (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection) const
 
PathSymbolStyleRef GetAreaBorderSymbolStyle (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection) const
 
FillStyleRef GetLandFillStyle (const Projection &projection) const
 
FillStyleRef GetSeaFillStyle (const Projection &projection) const
 
FillStyleRef GetCoastFillStyle (const Projection &projection) const
 
FillStyleRef GetUnknownFillStyle (const Projection &projection) const
 
LineStyleRef GetCoastlineLineStyle (const Projection &projection) const
 
LineStyleRef GetOSMTileBorderLineStyle (const Projection &projection) const
 
LineStyleRef GetOSMSubTileBorderLineStyle (const Projection &projection) const
 
void GetNodeTextStyleSelectors (size_t level, const TypeInfoRef &type, std::list< TextStyleSelector > &selectors) const
 Methods for low level debugging access to the style sheet internals. More...
 
void GetAreaFillStyleSelectors (size_t level, const TypeInfoRef &type, std::list< FillStyleSelector > &selectors) const
 
void GetAreaTextStyleSelectors (size_t level, const TypeInfoRef &type, std::list< TextStyleSelector > &selectors) const
 
bool LoadContent (const std::string &content, ColorPostprocessor colorPostprocessor=nullptr)
 Methods for loading a concrete OSS style sheet. More...
 
bool Load (const std::string &styleFile, ColorPostprocessor colorPostprocessor=nullptr)
 
const std::list< std::string > & GetErrors ()
 
const std::list< std::string > & GetWarnings ()
 

Detailed Description

Index selectors by type and level.

A complete style definition

Internals:

  • Fastpath: Fastpath means, that we can directly return the style definition from the style sheet. This is normally the case, if there is excactly one match in the style sheet. If there are multiple matches a new style has to be allocated and composed from all matches.

Constructor & Destructor Documentation

osmscout::StyleConfig::StyleConfig ( const TypeConfigRef typeConfig)
explicit
osmscout::StyleConfig::~StyleConfig ( )
virtual

Member Function Documentation

void osmscout::StyleConfig::AddAreaBorderStyle ( const StyleFilter filter,
BorderPartialStyle style 
)
void osmscout::StyleConfig::AddAreaBorderSymbolStyle ( const StyleFilter filter,
PathSymbolPartialStyle style 
)
void osmscout::StyleConfig::AddAreaBorderTextStyle ( const StyleFilter filter,
PathTextPartialStyle style 
)
void osmscout::StyleConfig::AddAreaFillStyle ( const StyleFilter filter,
FillPartialStyle style 
)
void osmscout::StyleConfig::AddAreaIconStyle ( const StyleFilter filter,
IconPartialStyle style 
)
void osmscout::StyleConfig::AddAreaTextStyle ( const StyleFilter filter,
TextPartialStyle style 
)
void osmscout::StyleConfig::AddConstant ( const std::string &  name,
const StyleConstantRef variable 
)
void osmscout::StyleConfig::AddFlag ( const std::string &  name,
bool  value 
)

Add the flag with the given value.

If the flag already exists, its value gets overwritten.

Referenced by osmscout::oss::Parser::FLAGDEF().

void osmscout::StyleConfig::AddNodeIconStyle ( const StyleFilter filter,
IconPartialStyle style 
)
void osmscout::StyleConfig::AddNodeTextStyle ( const StyleFilter filter,
TextPartialStyle stype 
)
void osmscout::StyleConfig::AddWayLineStyle ( const StyleFilter filter,
LinePartialStyle style 
)
void osmscout::StyleConfig::AddWayPathShieldStyle ( const StyleFilter filter,
PathShieldPartialStyle style 
)
void osmscout::StyleConfig::AddWayPathSymbolStyle ( const StyleFilter filter,
PathSymbolPartialStyle style 
)
void osmscout::StyleConfig::AddWayPathTextStyle ( const StyleFilter filter,
PathTextPartialStyle style 
)
void osmscout::StyleConfig::GetAreaBorderStyles ( const TypeInfoRef type,
const FeatureValueBuffer buffer,
const Projection projection,
std::vector< BorderStyleRef > &  borderStyles 
) const
PathSymbolStyleRef osmscout::StyleConfig::GetAreaBorderSymbolStyle ( const TypeInfoRef type,
const FeatureValueBuffer buffer,
const Projection projection 
) const
PathTextStyleRef osmscout::StyleConfig::GetAreaBorderTextStyle ( const TypeInfoRef type,
const FeatureValueBuffer buffer,
const Projection projection 
) const
FillStyleRef osmscout::StyleConfig::GetAreaFillStyle ( const TypeInfoRef type,
const FeatureValueBuffer buffer,
const Projection projection 
) const
void osmscout::StyleConfig::GetAreaFillStyleSelectors ( size_t  level,
const TypeInfoRef type,
std::list< FillStyleSelector > &  selectors 
) const
IconStyleRef osmscout::StyleConfig::GetAreaIconStyle ( const TypeInfoRef type,
const FeatureValueBuffer buffer,
const Projection projection 
) const
void osmscout::StyleConfig::GetAreaTextStyles ( const TypeInfoRef type,
const FeatureValueBuffer buffer,
const Projection projection,
std::vector< TextStyleRef > &  textStyles 
) const
void osmscout::StyleConfig::GetAreaTextStyleSelectors ( size_t  level,
const TypeInfoRef type,
std::list< TextStyleSelector > &  selectors 
) const
void osmscout::StyleConfig::GetAreaTypesWithMaxMag ( const Magnification maxMag,
TypeInfoSet types 
) const
FillStyleRef osmscout::StyleConfig::GetCoastFillStyle ( const Projection projection) const
LineStyleRef osmscout::StyleConfig::GetCoastlineLineStyle ( const Projection projection) const
const std::list< std::string > & osmscout::StyleConfig::GetErrors ( )
size_t osmscout::StyleConfig::GetFeatureFilterIndex ( const Feature feature) const
bool osmscout::StyleConfig::GetFlagByName ( const std::string &  name) const

Returns thevalue of the given flag identified by the name of the flag.

Asserts, if the flag name is unnown.

Referenced by osmscout::oss::Parser::IFCOND().

const std::unordered_map<std::string,bool> osmscout::StyleConfig::GetFlags ( ) const
inline
LabelProviderRef osmscout::StyleConfig::GetLabelProvider ( const std::string &  name) const
FillStyleRef osmscout::StyleConfig::GetLandFillStyle ( const Projection projection) const
IconStyleRef osmscout::StyleConfig::GetNodeIconStyle ( const FeatureValueBuffer buffer,
const Projection projection 
) const
void osmscout::StyleConfig::GetNodeTextStyles ( const FeatureValueBuffer buffer,
const Projection projection,
std::vector< TextStyleRef > &  textStyles 
) const
void osmscout::StyleConfig::GetNodeTextStyleSelectors ( size_t  level,
const TypeInfoRef type,
std::list< TextStyleSelector > &  selectors 
) const

Methods for low level debugging access to the style sheet internals.

void osmscout::StyleConfig::GetNodeTypesWithMaxMag ( const Magnification maxMag,
TypeInfoSet types 
) const
LineStyleRef osmscout::StyleConfig::GetOSMSubTileBorderLineStyle ( const Projection projection) const
LineStyleRef osmscout::StyleConfig::GetOSMTileBorderLineStyle ( const Projection projection) const
FillStyleRef osmscout::StyleConfig::GetSeaFillStyle ( const Projection projection) const
const SymbolRef & osmscout::StyleConfig::GetSymbol ( const std::string &  name) const
FillStyleRef osmscout::StyleConfig::GetUnknownFillStyle ( const Projection projection) const
const std::list< std::string > & osmscout::StyleConfig::GetWarnings ( )
void osmscout::StyleConfig::GetWayLineStyles ( const FeatureValueBuffer buffer,
const Projection projection,
std::vector< LineStyleRef > &  lineStyles 
) const
PathShieldStyleRef osmscout::StyleConfig::GetWayPathShieldStyle ( const FeatureValueBuffer buffer,
const Projection projection 
) const
PathSymbolStyleRef osmscout::StyleConfig::GetWayPathSymbolStyle ( const FeatureValueBuffer buffer,
const Projection projection 
) const
PathTextStyleRef osmscout::StyleConfig::GetWayPathTextStyle ( const FeatureValueBuffer buffer,
const Projection projection 
) const
size_t osmscout::StyleConfig::GetWayPrio ( const TypeInfoRef type) const
inline
void osmscout::StyleConfig::GetWayTypesWithMaxMag ( const Magnification mag,
TypeInfoSet types 
) const
bool osmscout::StyleConfig::HasAreaTextStyles ( const TypeInfoRef type,
const Magnification magnification 
) const
bool osmscout::StyleConfig::HasFlag ( const std::string &  name) const

Returns 'true', if the given flag exists, else 'false'.

Referenced by osmscout::oss::Parser::FLAGDEF(), and osmscout::oss::Parser::IFCOND().

bool osmscout::StyleConfig::HasNodeTextStyles ( const TypeInfoRef type,
const Magnification magnification 
) const

Methods for retrieval of styles for a given object.

References osmscout::Magnification::GetLevel().

bool osmscout::StyleConfig::LoadContent ( const std::string &  content,
ColorPostprocessor  colorPostprocessor = nullptr 
)
void osmscout::StyleConfig::Postprocess ( )

Referenced by LoadContent().

bool osmscout::StyleConfig::RegisterLabelProviderFactory ( const std::string &  name,
const LabelProviderFactoryRef factory 
)

Methods for registering LabelProvider-factories and and retrieving label providers.

Referenced by StyleConfig().

bool osmscout::StyleConfig::RegisterSymbol ( const SymbolRef symbol)
StyleConfig & osmscout::StyleConfig::SetWayPrio ( const TypeInfoRef type,
size_t  prio 
)

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