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
 
void GetNodeIconStyle (const FeatureValueBuffer &buffer, const Projection &projection, IconStyleRef &iconStyle) const
 
void GetWayLineStyles (const FeatureValueBuffer &buffer, const Projection &projection, std::vector< LineStyleRef > &lineStyles) const
 
void GetWayPathTextStyle (const FeatureValueBuffer &buffer, const Projection &projection, PathTextStyleRef &pathTextStyle) const
 
void GetWayPathSymbolStyle (const FeatureValueBuffer &buffer, const Projection &projection, PathSymbolStyleRef &pathSymbolStyle) const
 
void GetWayPathShieldStyle (const FeatureValueBuffer &buffer, const Projection &projection, PathShieldStyleRef &pathShieldStyle) const
 
void GetAreaFillStyle (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection, FillStyleRef &fillStyle) 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
 
void GetAreaIconStyle (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection, IconStyleRef &iconStyle) const
 
void GetAreaBorderTextStyle (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection, PathTextStyleRef &pathTextStyle) const
 
void GetAreaBorderSymbolStyle (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection, PathSymbolStyleRef &pathSymbolStyle) const
 
void GetLandFillStyle (const Projection &projection, FillStyleRef &fillStyle) const
 
void GetSeaFillStyle (const Projection &projection, FillStyleRef &fillStyle) const
 
void GetCoastFillStyle (const Projection &projection, FillStyleRef &fillStyle) const
 
void GetUnknownFillStyle (const Projection &projection, FillStyleRef &fillStyle) const
 
void GetCoastlineLineStyle (const Projection &projection, LineStyleRef &lineStyle) const
 
void GetOSMTileBorderLineStyle (const Projection &projection, LineStyleRef &lineStyle) const
 
void GetOSMSubTileBorderLineStyle (const Projection &projection, LineStyleRef &lineStyle) 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 Load (const std::string &styleFile)
 Methods for loading a concrete OSS style sheet. More...
 
const std::list< std::string > & GetErrors ()
 

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)
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
void osmscout::StyleConfig::GetAreaBorderSymbolStyle ( const TypeInfoRef type,
const FeatureValueBuffer &  buffer,
const Projection projection,
PathSymbolStyleRef pathSymbolStyle 
) const
void osmscout::StyleConfig::GetAreaBorderTextStyle ( const TypeInfoRef type,
const FeatureValueBuffer &  buffer,
const Projection projection,
PathTextStyleRef pathTextStyle 
) const
void osmscout::StyleConfig::GetAreaFillStyle ( const TypeInfoRef type,
const FeatureValueBuffer &  buffer,
const Projection projection,
FillStyleRef fillStyle 
) const
void osmscout::StyleConfig::GetAreaFillStyleSelectors ( size_t  level,
const TypeInfoRef type,
std::list< FillStyleSelector > &  selectors 
) const
void osmscout::StyleConfig::GetAreaIconStyle ( const TypeInfoRef type,
const FeatureValueBuffer &  buffer,
const Projection projection,
IconStyleRef iconStyle 
) 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
void osmscout::StyleConfig::GetCoastFillStyle ( const Projection projection,
FillStyleRef fillStyle 
) const
void osmscout::StyleConfig::GetCoastlineLineStyle ( const Projection projection,
LineStyleRef lineStyle 
) 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
void osmscout::StyleConfig::GetLandFillStyle ( const Projection projection,
FillStyleRef fillStyle 
) const
void osmscout::StyleConfig::GetNodeIconStyle ( const FeatureValueBuffer &  buffer,
const Projection projection,
IconStyleRef iconStyle 
) 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
void osmscout::StyleConfig::GetOSMSubTileBorderLineStyle ( const Projection projection,
LineStyleRef lineStyle 
) const
void osmscout::StyleConfig::GetOSMTileBorderLineStyle ( const Projection projection,
LineStyleRef lineStyle 
) const
void osmscout::StyleConfig::GetSeaFillStyle ( const Projection projection,
FillStyleRef fillStyle 
) const
const SymbolRef & osmscout::StyleConfig::GetSymbol ( const std::string &  name) const
void osmscout::StyleConfig::GetUnknownFillStyle ( const Projection projection,
FillStyleRef fillStyle 
) const
void osmscout::StyleConfig::GetWayLineStyles ( const FeatureValueBuffer &  buffer,
const Projection projection,
std::vector< LineStyleRef > &  lineStyles 
) const
void osmscout::StyleConfig::GetWayPathShieldStyle ( const FeatureValueBuffer &  buffer,
const Projection projection,
PathShieldStyleRef pathShieldStyle 
) const
void osmscout::StyleConfig::GetWayPathSymbolStyle ( const FeatureValueBuffer &  buffer,
const Projection projection,
PathSymbolStyleRef pathSymbolStyle 
) const
void osmscout::StyleConfig::GetWayPathTextStyle ( const FeatureValueBuffer &  buffer,
const Projection projection,
PathTextStyleRef pathTextStyle 
) 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().

void osmscout::StyleConfig::Postprocess ( )

Referenced by Load().

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: