Search for usage in LXR

KOSMIndoorMap::MapCSSStyle Class Reference

#include <mapcssstyle.h>

Public Member Functions

 MapCSSStyle ()
 MapCSSStyle (const MapCSSStyle &)=delete
 MapCSSStyle (MapCSSStyle &&) noexcept
ClassSelectorKey classKey (const char *className) const
void compile (const OSM::DataSet &dataSet)
void evaluate (MapCSSState &&state, MapCSSResult &result) const
void evaluateCanvas (const MapCSSState &state, MapCSSResult &result) const
bool isEmpty () const
LayerSelectorKey layerKey (const char *layerName) const
MapCSSStyleoperator= (const MapCSSStyle &)=delete
MapCSSStyleoperator= (MapCSSStyle &&) noexcept
void write (QIODevice *out) const

Detailed Description

A parsed MapCSS style sheet.

See also
MapCSSParser::parse for how to obtain a valid instance

Definition at line 32 of file mapcssstyle.h.

Constructor & Destructor Documentation

◆ MapCSSStyle()

MapCSSStyle::MapCSSStyle ( )

Creates an invalid/empty style.

Definition at line 20 of file mapcssstyle.cpp.

Member Function Documentation

◆ classKey()

ClassSelectorKey MapCSSStyle::classKey ( const char * className) const

Look up a class selector key for the given name, if it exists.

If no such key exists in the style sheet, an null key is returned. Use this for checking if a class is set on an evaluation result.

Definition at line 96 of file mapcssstyle.cpp.

◆ compile()

void MapCSSStyle::compile ( const OSM::DataSet & dataSet)

Optimizes style sheet rules for application against dataSet.

This does resolve tag keys and is therefore mandatory when changing the data set.

Definition at line 33 of file mapcssstyle.cpp.

◆ evaluate()

void MapCSSStyle::evaluate ( MapCSSState && state,
MapCSSResult & result ) const

Evaluates the style sheet for a given state state (OSM element, view state, element state, etc).

The result is not returned but added to result for reusing allocated memory between evaluations.

Definition at line 42 of file mapcssstyle.cpp.

◆ evaluateCanvas()

void MapCSSStyle::evaluateCanvas ( const MapCSSState & state,
MapCSSResult & result ) const

Evaluate canvas style rules.

Definition at line 81 of file mapcssstyle.cpp.

◆ isEmpty()

bool MapCSSStyle::isEmpty ( ) const

Returns true if this is a default-constructed or otherwise empty/invalud style.

Definition at line 28 of file mapcssstyle.cpp.

◆ layerKey()

LayerSelectorKey MapCSSStyle::layerKey ( const char * layerName) const

Look up a layer selector key for the given name, if it exists.

If no such key exists in the style sheet, an null key is returned. Use this for accessing specific result layers.

Definition at line 101 of file mapcssstyle.cpp.

◆ write()

void MapCSSStyle::write ( QIODevice * out) const

Write this style as MapCSS to out.

Mainly used for testing.

Definition at line 89 of file mapcssstyle.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:03 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.