libosmscout
0.1
|
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 | AddRouteLineStyle (const StyleFilter &filter, LinePartialStyle &style) |
void | AddRoutePathTextStyle (const StyleFilter &filter, PathTextPartialStyle &style) |
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 | GetAreaBorderStyles (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection, std::vector< BorderStyleRef > &borderStyles) const |
PathSymbolStyleRef | GetAreaBorderSymbolStyle (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection) const |
PathTextStyleRef | GetAreaBorderTextStyle (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection) const |
FillStyleRef | GetAreaFillStyle (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection) const |
void | GetAreaFillStyleSelectors (size_t level, const TypeInfoRef &type, std::list< FillStyleSelector > &selectors) const |
IconStyleRef | GetAreaIconStyle (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection) const |
size_t | GetAreaTextStyleCount (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection) const |
void | GetAreaTextStyles (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection, std::vector< TextStyleRef > &textStyles) const |
void | GetAreaTextStyleSelectors (size_t level, const TypeInfoRef &type, std::list< TextStyleSelector > &selectors) const |
void | GetAreaTypesWithMaxMag (const Magnification &maxMag, TypeInfoSet &types) const |
FillStyleRef | GetCoastFillStyle (const Projection &projection) const |
LineStyleRef | GetCoastlineLineStyle (const Projection &projection) const |
StyleConstantRef | GetConstantByName (const std::string &name) const |
const std::list< StyleError > & | GetErrors () const |
size_t | GetFeatureFilterIndex (const Feature &feature) const |
bool | GetFlagByName (const std::string &name) const |
Returns the value of the given flag identified by the name of the flag. More... | |
std::unordered_map< std::string, bool > | GetFlags () const |
LabelProviderRef | GetLabelProvider (const std::string &name) const |
FillStyleRef | GetLandFillStyle (const Projection &projection) const |
IconStyleRef | GetNodeIconStyle (const FeatureValueBuffer &buffer, const Projection &projection) const |
size_t | GetNodeTextStyleCount (const FeatureValueBuffer &buffer, const Projection &projection) const |
void | GetNodeTextStyles (const FeatureValueBuffer &buffer, const Projection &projection, std::vector< TextStyleRef > &textStyles) 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 | GetNodeTypesWithMaxMag (const Magnification &maxMag, TypeInfoSet &types) const |
LineStyleRef | GetOSMSubTileBorderLineStyle (const Projection &projection) const |
LineStyleRef | GetOSMTileBorderLineStyle (const Projection &projection) const |
void | GetRouteLineStyles (const FeatureValueBuffer &buffer, const Projection &projection, std::vector< LineStyleRef > &lineStyles) const |
PathTextStyleRef | GetRoutePathTextStyle (const FeatureValueBuffer &buffer, const Projection &projection) const |
void | GetRouteTypesWithMaxMag (const Magnification &maxMag, TypeInfoSet &types) const |
FillStyleRef | GetSeaFillStyle (const Projection &projection) const |
const SymbolRef & | GetSymbol (const std::string &name) const |
TypeConfigRef | GetTypeConfig () const |
FillStyleRef | GetUnknownFillStyle (const Projection &projection) const |
const std::list< StyleError > & | GetWarnings () const |
void | GetWayLineStyles (const FeatureValueBuffer &buffer, const Projection &projection, std::vector< LineStyleRef > &lineStyles) const |
PathShieldStyleRef | GetWayPathShieldStyle (const FeatureValueBuffer &buffer, const Projection &projection) const |
void | GetWayPathSymbolStyle (const FeatureValueBuffer &buffer, const Projection &projection, std::vector< PathSymbolStyleRef > &symbolStyles) const |
PathTextStyleRef | GetWayPathTextStyle (const FeatureValueBuffer &buffer, const Projection &projection) const |
size_t | GetWayPrio (const TypeInfoRef &type) const |
void | GetWayTypesWithMaxMag (const Magnification &mag, TypeInfoSet &types) const |
bool | HasAreaTextStyles (const TypeInfoRef &type, const Magnification &magnification) const |
bool | HasFlag (const std::string &name) const |
Returns 'true', if the given flag exists, else 'false'. More... | |
bool | HasNodeTextStyles (const TypeInfoRef &type, const Magnification &magnification) const |
Methods for retrieval of styles for a given object. More... | |
bool | HasWayPathShieldStyle (const Projection &projection) const |
bool | HasWayPathTextStyle (const Projection &projection) const |
bool | Load (const std::string &styleFile, ColorPostprocessor colorPostprocessor=nullptr, bool submodule=false, Log &log=osmscout::log) |
Load the given *.oss file into the current style config object. More... | |
bool | LoadContent (const std::string &filename, const std::string &content, ColorPostprocessor colorPostprocessor=nullptr, bool submodule=false, Log &log=osmscout::log) |
Methods for loading a concrete OSS style sheet. More... | |
void | Postprocess () |
bool | RegisterLabelProviderFactory (const std::string &name, const LabelProviderFactoryRef &factory) |
Methods for registering LabelProvider-factories and and retrieving label providers. More... | |
bool | RegisterSymbol (const SymbolRef &symbol) |
StyleConfig & | SetWayPrio (const TypeInfoRef &type, size_t prio) |
StyleConfig (const TypeConfigRef &typeConfig) | |
virtual | ~StyleConfig () |
Public Attributes | |
std::vector< TypeInfoSet > | areaTypeSets |
std::vector< TypeInfoSet > | nodeTypeSets |
std::vector< TypeInfoSet > | routeTypeSets |
TypeConfigRef | typeConfig |
Reference to the type configuration. More... | |
std::vector< TypeInfoSet > | wayTypeSets |
way types with defined style by magnification level More... | |
Index selectors by type and level.
A complete style definition
Internals:
|
explicit |
|
virtual |
References osmscout::Log::Debug(), and osmscout::log.
void osmscout::StyleConfig::AddAreaBorderStyle | ( | const StyleFilter & | filter, |
BorderPartialStyle & | style | ||
) |
Referenced by osmscout::oss::Parser::AREABORDERSTYLE().
void osmscout::StyleConfig::AddAreaBorderSymbolStyle | ( | const StyleFilter & | filter, |
PathSymbolPartialStyle & | style | ||
) |
Referenced by osmscout::oss::Parser::AREABORDERSYMBOLSTYLE().
void osmscout::StyleConfig::AddAreaBorderTextStyle | ( | const StyleFilter & | filter, |
PathTextPartialStyle & | style | ||
) |
Referenced by osmscout::oss::Parser::AREABORDERTEXTSTYLE().
void osmscout::StyleConfig::AddAreaFillStyle | ( | const StyleFilter & | filter, |
FillPartialStyle & | style | ||
) |
Referenced by osmscout::oss::Parser::AREASTYLE().
void osmscout::StyleConfig::AddAreaIconStyle | ( | const StyleFilter & | filter, |
IconPartialStyle & | style | ||
) |
Referenced by osmscout::oss::Parser::AREAICONSTYLE().
void osmscout::StyleConfig::AddAreaTextStyle | ( | const StyleFilter & | filter, |
TextPartialStyle & | style | ||
) |
Referenced by osmscout::oss::Parser::AREATEXTSTYLE().
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 | ||
) |
Referenced by osmscout::oss::Parser::NODEICONSTYLE().
void osmscout::StyleConfig::AddNodeTextStyle | ( | const StyleFilter & | filter, |
TextPartialStyle & | stype | ||
) |
Referenced by osmscout::oss::Parser::NODETEXTSTYLE().
void osmscout::StyleConfig::AddRouteLineStyle | ( | const StyleFilter & | filter, |
LinePartialStyle & | style | ||
) |
Referenced by osmscout::oss::Parser::ROUTESTYLE().
void osmscout::StyleConfig::AddRoutePathTextStyle | ( | const StyleFilter & | filter, |
PathTextPartialStyle & | style | ||
) |
Referenced by osmscout::oss::Parser::ROUTEPATHTEXTSTYLE().
void osmscout::StyleConfig::AddWayLineStyle | ( | const StyleFilter & | filter, |
LinePartialStyle & | style | ||
) |
Referenced by osmscout::oss::Parser::WAYSTYLE().
void osmscout::StyleConfig::AddWayPathShieldStyle | ( | const StyleFilter & | filter, |
PathShieldPartialStyle & | style | ||
) |
Referenced by osmscout::oss::Parser::WAYSHIELDSTYLE().
void osmscout::StyleConfig::AddWayPathSymbolStyle | ( | const StyleFilter & | filter, |
PathSymbolPartialStyle & | style | ||
) |
Referenced by osmscout::oss::Parser::WAYPATHSYMBOLSTYLE().
void osmscout::StyleConfig::AddWayPathTextStyle | ( | const StyleFilter & | filter, |
PathTextPartialStyle & | style | ||
) |
Referenced by osmscout::oss::Parser::WAYPATHTEXTSTYLE().
void osmscout::StyleConfig::GetAreaBorderStyles | ( | const TypeInfoRef & | type, |
const FeatureValueBuffer & | buffer, | ||
const Projection & | projection, | ||
std::vector< BorderStyleRef > & | borderStyles | ||
) | const |
References osmscout::GetFeatureStyle().
PathSymbolStyleRef osmscout::StyleConfig::GetAreaBorderSymbolStyle | ( | const TypeInfoRef & | type, |
const FeatureValueBuffer & | buffer, | ||
const Projection & | projection | ||
) | const |
References osmscout::GetFeatureStyle().
PathTextStyleRef osmscout::StyleConfig::GetAreaBorderTextStyle | ( | const TypeInfoRef & | type, |
const FeatureValueBuffer & | buffer, | ||
const Projection & | projection | ||
) | const |
References osmscout::GetFeatureStyle().
FillStyleRef osmscout::StyleConfig::GetAreaFillStyle | ( | const TypeInfoRef & | type, |
const FeatureValueBuffer & | buffer, | ||
const Projection & | projection | ||
) | const |
References osmscout::GetFeatureStyle().
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 |
References osmscout::GetFeatureStyle().
size_t osmscout::StyleConfig::GetAreaTextStyleCount | ( | const TypeInfoRef & | type, |
const FeatureValueBuffer & | buffer, | ||
const Projection & | projection | ||
) | const |
References osmscout::GetFeatureStyle().
void osmscout::StyleConfig::GetAreaTextStyles | ( | const TypeInfoRef & | type, |
const FeatureValueBuffer & | buffer, | ||
const Projection & | projection, | ||
std::vector< TextStyleRef > & | textStyles | ||
) | const |
References osmscout::GetFeatureStyle().
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 |
References areaTypeSets, and osmscout::Magnification::GetLevel().
FillStyleRef osmscout::StyleConfig::GetCoastFillStyle | ( | const Projection & | projection | ) | const |
References osmscout::GetFeatureStyle(), and osmscout::FeatureValueBuffer::GetType().
LineStyleRef osmscout::StyleConfig::GetCoastlineLineStyle | ( | const Projection & | projection | ) | const |
References osmscout::GetFeatureStyle(), and osmscout::FeatureValueBuffer::GetType().
StyleConstantRef osmscout::StyleConfig::GetConstantByName | ( | const std::string & | name | ) | const |
const std::list< StyleError > & osmscout::StyleConfig::GetErrors | ( | ) | const |
size_t osmscout::StyleConfig::GetFeatureFilterIndex | ( | const Feature & | feature | ) | const |
References osmscout::StyleResolveContext::GetFeatureReaderIndex().
Referenced by osmscout::oss::Parser::AddFeatureToFilter().
bool osmscout::StyleConfig::GetFlagByName | ( | const std::string & | name | ) | const |
Returns the value of the given flag identified by the name of the flag.
Asserts, if the flag name is unknown.
Referenced by osmscout::oss::Parser::IFCOND().
|
inline |
LabelProviderRef osmscout::StyleConfig::GetLabelProvider | ( | const std::string & | name | ) | const |
References typeConfig.
Referenced by osmscout::oss::Parser::ATTRIBUTEVALUE().
FillStyleRef osmscout::StyleConfig::GetLandFillStyle | ( | const Projection & | projection | ) | const |
References osmscout::GetFeatureStyle(), and osmscout::FeatureValueBuffer::GetType().
IconStyleRef osmscout::StyleConfig::GetNodeIconStyle | ( | const FeatureValueBuffer & | buffer, |
const Projection & | projection | ||
) | const |
References osmscout::GetFeatureStyle(), and osmscout::FeatureValueBuffer::GetType().
size_t osmscout::StyleConfig::GetNodeTextStyleCount | ( | const FeatureValueBuffer & | buffer, |
const Projection & | projection | ||
) | const |
References osmscout::GetFeatureStyle(), and osmscout::FeatureValueBuffer::GetType().
void osmscout::StyleConfig::GetNodeTextStyles | ( | const FeatureValueBuffer & | buffer, |
const Projection & | projection, | ||
std::vector< TextStyleRef > & | textStyles | ||
) | const |
References osmscout::GetFeatureStyle(), and osmscout::FeatureValueBuffer::GetType().
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 |
References osmscout::Magnification::GetLevel(), and nodeTypeSets.
LineStyleRef osmscout::StyleConfig::GetOSMSubTileBorderLineStyle | ( | const Projection & | projection | ) | const |
References osmscout::GetFeatureStyle(), and osmscout::FeatureValueBuffer::GetType().
LineStyleRef osmscout::StyleConfig::GetOSMTileBorderLineStyle | ( | const Projection & | projection | ) | const |
References osmscout::GetFeatureStyle(), and osmscout::FeatureValueBuffer::GetType().
void osmscout::StyleConfig::GetRouteLineStyles | ( | const FeatureValueBuffer & | buffer, |
const Projection & | projection, | ||
std::vector< LineStyleRef > & | lineStyles | ||
) | const |
References osmscout::base, osmscout::GetFeatureStyle(), and osmscout::FeatureValueBuffer::GetType().
PathTextStyleRef osmscout::StyleConfig::GetRoutePathTextStyle | ( | const FeatureValueBuffer & | buffer, |
const Projection & | projection | ||
) | const |
References osmscout::GetFeatureStyle(), and osmscout::FeatureValueBuffer::GetType().
void osmscout::StyleConfig::GetRouteTypesWithMaxMag | ( | const Magnification & | maxMag, |
TypeInfoSet & | types | ||
) | const |
References osmscout::Magnification::GetLevel(), and routeTypeSets.
FillStyleRef osmscout::StyleConfig::GetSeaFillStyle | ( | const Projection & | projection | ) | const |
References osmscout::GetFeatureStyle(), and osmscout::FeatureValueBuffer::GetType().
const SymbolRef & osmscout::StyleConfig::GetSymbol | ( | const std::string & | name | ) | const |
Referenced by osmscout::oss::Parser::ATTRIBUTEVALUE().
TypeConfigRef osmscout::StyleConfig::GetTypeConfig | ( | ) | const |
FillStyleRef osmscout::StyleConfig::GetUnknownFillStyle | ( | const Projection & | projection | ) | const |
References osmscout::GetFeatureStyle(), and osmscout::FeatureValueBuffer::GetType().
const std::list< StyleError > & osmscout::StyleConfig::GetWarnings | ( | ) | const |
void osmscout::StyleConfig::GetWayLineStyles | ( | const FeatureValueBuffer & | buffer, |
const Projection & | projection, | ||
std::vector< LineStyleRef > & | lineStyles | ||
) | const |
References osmscout::base, osmscout::GetFeatureStyle(), and osmscout::FeatureValueBuffer::GetType().
PathShieldStyleRef osmscout::StyleConfig::GetWayPathShieldStyle | ( | const FeatureValueBuffer & | buffer, |
const Projection & | projection | ||
) | const |
References osmscout::GetFeatureStyle(), and osmscout::FeatureValueBuffer::GetType().
void osmscout::StyleConfig::GetWayPathSymbolStyle | ( | const FeatureValueBuffer & | buffer, |
const Projection & | projection, | ||
std::vector< PathSymbolStyleRef > & | symbolStyles | ||
) | const |
References osmscout::GetFeatureStyle(), and osmscout::FeatureValueBuffer::GetType().
PathTextStyleRef osmscout::StyleConfig::GetWayPathTextStyle | ( | const FeatureValueBuffer & | buffer, |
const Projection & | projection | ||
) | const |
References osmscout::GetFeatureStyle(), and osmscout::FeatureValueBuffer::GetType().
|
inline |
void osmscout::StyleConfig::GetWayTypesWithMaxMag | ( | const Magnification & | mag, |
TypeInfoSet & | types | ||
) | const |
References osmscout::Magnification::GetLevel(), and wayTypeSets.
bool osmscout::StyleConfig::HasAreaTextStyles | ( | const TypeInfoRef & | type, |
const Magnification & | magnification | ||
) | const |
References osmscout::Magnification::GetLevel().
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::HasWayPathShieldStyle | ( | const Projection & | projection | ) | const |
projection |
References osmscout::Magnification::GetLevel(), and osmscout::Projection::GetMagnification().
bool osmscout::StyleConfig::HasWayPathTextStyle | ( | const Projection & | projection | ) | const |
projection |
References osmscout::Magnification::GetLevel(), and osmscout::Projection::GetMagnification().
bool osmscout::StyleConfig::Load | ( | const std::string & | styleFile, |
ColorPostprocessor | colorPostprocessor = nullptr , |
||
bool | submodule = false , |
||
Log & | log = osmscout::log |
||
) |
Load the given *.oss file into the current style config object.
styleFile | The file to load |
colorPostprocessor | Optional function to post process color values |
submodule | Before loading submodule, style config is not reset and post-process after. |
References osmscout::Log::Debug(), osmscout::Log::Error(), osmscout::IOException::GetDescription(), osmscout::GetFileSize(), LoadContent(), osmscout::log, osmscout::StopClock::ResultString(), and osmscout::StopClock::Stop().
Referenced by osmscout::oss::Parser::IMPORT().
bool osmscout::StyleConfig::LoadContent | ( | const std::string & | filename, |
const std::string & | content, | ||
ColorPostprocessor | colorPostprocessor = nullptr , |
||
bool | submodule = false , |
||
Log & | log = osmscout::log |
||
) |
Methods for loading a concrete OSS style sheet.
References osmscout::StyleError::Error, osmscout::oss::Errors::Err::Error, osmscout::oss::Errors::errors, osmscout::oss::Parser::errors, osmscout::StyleError::Exception, osmscout::oss::Errors::Err::Exception, osmscout::oss::Errors::hasErrors, osmscout::log, osmscout::oss::Parser::Parse(), Postprocess(), osmscout::StyleError::Symbol, osmscout::oss::Errors::Err::Symbol, osmscout::StyleError::Warning, and osmscout::oss::Errors::Err::Warning.
Referenced by Load().
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 | ) |
Referenced by osmscout::oss::Parser::SYMBOLSECTION().
StyleConfig & osmscout::StyleConfig::SetWayPrio | ( | const TypeInfoRef & | type, |
size_t | prio | ||
) |
Referenced by osmscout::oss::Parser::WAYGROUP().
std::vector<TypeInfoSet> osmscout::StyleConfig::areaTypeSets |
Referenced by GetAreaTypesWithMaxMag().
std::vector<TypeInfoSet> osmscout::StyleConfig::nodeTypeSets |
Referenced by GetNodeTypesWithMaxMag().
std::vector<TypeInfoSet> osmscout::StyleConfig::routeTypeSets |
Referenced by GetRouteTypesWithMaxMag().
TypeConfigRef osmscout::StyleConfig::typeConfig |
Reference to the type configuration.
Referenced by GetLabelProvider(), GetTypeConfig(), and StyleConfig().
std::vector<TypeInfoSet> osmscout::StyleConfig::wayTypeSets |
way types with defined style by magnification level
Referenced by GetWayTypesWithMaxMag().