MapLibre Native Core
|
#include <expression.hpp>
Public Member Functions | |
Expression (Kind kind_, type::Type type_) | |
virtual | ~Expression ()=default |
virtual EvaluationResult | evaluate (const EvaluationContext ¶ms) const =0 |
virtual void | eachChild (const std::function< void(const Expression &)> &) const =0 |
virtual bool | operator== (const Expression &) const =0 |
bool | operator!= (const Expression &rhs) const |
Kind | getKind () const |
type::Type | getType () const |
EvaluationResult | evaluate (std::optional< float > zoom, const Feature &feature, std::optional< double > colorRampParameter) const |
EvaluationResult | evaluate (std::optional< float > zoom, const Feature &feature, std::optional< double > colorRampParameter, const std::set< std::string > &availableImages) const |
EvaluationResult | evaluate (std::optional< float > zoom, const Feature &feature, std::optional< double > colorRampParameter, const std::set< std::string > &availableImages, const CanonicalTileID &canonical) const |
EvaluationResult | evaluate (std::optional< mbgl::Value > accumulated, const Feature &feature) const |
virtual std::vector< std::optional< Value > > | possibleOutputs () const =0 |
virtual mbgl::Value | serialize () const |
virtual std::string | getOperator () const =0 |
Static Protected Member Functions | |
template<typename T > | |
static bool | childrenEqual (const T &lhs, const T &rhs) |
static bool | childEqual (const std::unique_ptr< Expression > &lhs, const std::unique_ptr< Expression > &rhs) |
template<typename T > | |
static bool | childEqual (const std::pair< T, std::unique_ptr< Expression >> &lhs, const std::pair< T, std::unique_ptr< Expression >> &rhs) |
template<typename T > | |
static bool | childEqual (const std::pair< T, std::shared_ptr< Expression >> &lhs, const std::pair< T, std::shared_ptr< Expression >> &rhs) |
static bool | childEqual (const std::pair< std::unique_ptr< Expression >, std::unique_ptr< Expression >> &lhs, const std::pair< std::unique_ptr< Expression >, std::unique_ptr< Expression >> &rhs) |
Definition at line 179 of file expression.hpp.
|
inline |
Definition at line 181 of file expression.hpp.
|
virtualdefault |
|
inlinestaticprotected |
Definition at line 253 of file expression.hpp.
|
inlinestaticprotected |
Definition at line 248 of file expression.hpp.
|
inlinestaticprotected |
Definition at line 242 of file expression.hpp.
|
inlinestaticprotected |
Definition at line 237 of file expression.hpp.
|
inlinestaticprotected |
Definition at line 226 of file expression.hpp.
|
pure virtual |
Implemented in mbgl::style::expression::Step, mbgl::style::expression::NumberFormat, mbgl::style::expression::Match< T >, mbgl::style::expression::Length, mbgl::style::expression::Interpolate, mbgl::style::expression::CompoundExpression, mbgl::style::expression::CollatorComparison, mbgl::style::expression::BasicComparison, mbgl::style::expression::Coercion, mbgl::style::expression::Coalesce, mbgl::style::expression::Case, mbgl::style::expression::All, mbgl::style::expression::Any, mbgl::style::expression::Assertion, mbgl::style::expression::FormatSectionOverride< T >, mbgl::style::expression::Within, mbgl::style::expression::Literal, mbgl::style::expression::Var, mbgl::style::expression::Let, mbgl::style::expression::In, mbgl::style::expression::ImageExpression, mbgl::style::expression::FormatExpression, mbgl::style::expression::Error, mbgl::style::expression::Distance, mbgl::style::expression::CollatorExpression, and mbgl::style::expression::At.
|
pure virtual |
Implemented in mbgl::style::expression::Step, mbgl::style::expression::NumberFormat, mbgl::style::expression::Match< T >, mbgl::style::expression::Var, mbgl::style::expression::Let, mbgl::style::expression::Length, mbgl::style::expression::In, mbgl::style::expression::Coercion, mbgl::style::expression::Coalesce, mbgl::style::expression::Case, mbgl::style::expression::All, mbgl::style::expression::Any, mbgl::style::expression::At, mbgl::style::expression::Assertion, mbgl::style::expression::CompoundExpression, mbgl::style::expression::FormatSectionOverride< T >, mbgl::style::expression::Within, mbgl::style::expression::Literal, mbgl::style::expression::ImageExpression, mbgl::style::expression::FormatExpression, mbgl::style::expression::Error, mbgl::style::expression::Distance, mbgl::style::expression::CollatorComparison, mbgl::style::expression::BasicComparison, and mbgl::style::expression::CollatorExpression.
EvaluationResult mbgl::style::expression::Expression::evaluate | ( | std::optional< float > | zoom, |
const Feature & | feature, | ||
std::optional< double > | colorRampParameter | ||
) | const |
EvaluationResult mbgl::style::expression::Expression::evaluate | ( | std::optional< float > | zoom, |
const Feature & | feature, | ||
std::optional< double > | colorRampParameter, | ||
const std::set< std::string > & | availableImages | ||
) | const |
EvaluationResult mbgl::style::expression::Expression::evaluate | ( | std::optional< float > | zoom, |
const Feature & | feature, | ||
std::optional< double > | colorRampParameter, | ||
const std::set< std::string > & | availableImages, | ||
const CanonicalTileID & | canonical | ||
) | const |
EvaluationResult mbgl::style::expression::Expression::evaluate | ( | std::optional< mbgl::Value > | accumulated, |
const Feature & | feature | ||
) | const |
|
inline |
Definition at line 191 of file expression.hpp.
|
pure virtual |
Implemented in mbgl::style::expression::Within, mbgl::style::expression::Step, mbgl::style::expression::NumberFormat, mbgl::style::expression::Match< T >, mbgl::style::expression::Literal, mbgl::style::expression::Var, mbgl::style::expression::Let, mbgl::style::expression::Length, mbgl::style::expression::Interpolate, mbgl::style::expression::In, mbgl::style::expression::ImageExpression, mbgl::style::expression::FormatExpression, mbgl::style::expression::Error, mbgl::style::expression::Distance, mbgl::style::expression::CompoundExpression, mbgl::style::expression::CollatorComparison, mbgl::style::expression::BasicComparison, mbgl::style::expression::CollatorExpression, mbgl::style::expression::Coercion, mbgl::style::expression::Coalesce, mbgl::style::expression::Case, mbgl::style::expression::All, mbgl::style::expression::Any, mbgl::style::expression::At, mbgl::style::expression::Assertion, and mbgl::style::expression::FormatSectionOverride< T >.
|
inline |
Definition at line 192 of file expression.hpp.
|
inline |
Definition at line 187 of file expression.hpp.
|
pure virtual |
Implemented in mbgl::style::expression::Within, mbgl::style::expression::Step, mbgl::style::expression::NumberFormat, mbgl::style::expression::Match< T >, mbgl::style::expression::Literal, mbgl::style::expression::Var, mbgl::style::expression::Let, mbgl::style::expression::Length, mbgl::style::expression::Interpolate, mbgl::style::expression::In, mbgl::style::expression::ImageExpression, mbgl::style::expression::FormatExpression, mbgl::style::expression::Error, mbgl::style::expression::Distance, mbgl::style::expression::CompoundExpression, mbgl::style::expression::CollatorExpression, mbgl::style::expression::Coercion, mbgl::style::expression::Coalesce, mbgl::style::expression::Case, mbgl::style::expression::All, mbgl::style::expression::Any, mbgl::style::expression::At, mbgl::style::expression::Assertion, mbgl::style::expression::FormatSectionOverride< T >, mbgl::style::expression::CollatorComparison, and mbgl::style::expression::BasicComparison.
|
pure virtual |
Statically analyze the expression, attempting to enumerate possible outputs. Returns an array of values plus the sentinel null optional value, used to indicate that the complete set of outputs is statically undecidable.
Implemented in mbgl::style::expression::Within, mbgl::style::expression::Step, mbgl::style::expression::NumberFormat, mbgl::style::expression::Match< T >, mbgl::style::expression::Literal, mbgl::style::expression::Var, mbgl::style::expression::Let, mbgl::style::expression::Length, mbgl::style::expression::Interpolate, mbgl::style::expression::In, mbgl::style::expression::ImageExpression, mbgl::style::expression::FormatExpression, mbgl::style::expression::Error, mbgl::style::expression::Distance, mbgl::style::expression::CompoundExpression, mbgl::style::expression::CollatorComparison, mbgl::style::expression::BasicComparison, mbgl::style::expression::CollatorExpression, mbgl::style::expression::Coercion, mbgl::style::expression::Coalesce, mbgl::style::expression::Case, mbgl::style::expression::All, mbgl::style::expression::Any, mbgl::style::expression::At, mbgl::style::expression::Assertion, and mbgl::style::expression::FormatSectionOverride< T >.
|
inlinevirtual |
Reimplemented in mbgl::style::expression::Within, mbgl::style::expression::Step, mbgl::style::expression::NumberFormat, mbgl::style::expression::Match< T >, mbgl::style::expression::Literal, mbgl::style::expression::Var, mbgl::style::expression::Let, mbgl::style::expression::Interpolate, mbgl::style::expression::ImageExpression, mbgl::style::expression::FormatExpression, mbgl::style::expression::Distance, mbgl::style::expression::CollatorExpression, mbgl::style::expression::Coercion, and mbgl::style::expression::Assertion.
Definition at line 213 of file expression.hpp.