Files
MapLibreParticleLab/include/mbgl/style/expression/within.hpp
Tim Sylvester 705bdfb3de add noexcepts (#2119)
Co-authored-by: Bart Louwers <bart@emeel.net>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bart Louwers <bart.louwers@gmail.com>
2024-04-08 15:39:18 +00:00

39 lines
982 B
C++

#pragma once
#include <mbgl/style/expression/expression.hpp>
#include <mbgl/util/geojson.hpp>
#include <optional>
namespace mbgl {
namespace style {
namespace expression {
class Within final : public Expression {
public:
explicit Within(GeoJSON geojson, Feature::geometry_type geometries_);
~Within() override;
EvaluationResult evaluate(const EvaluationContext&) const override;
static ParseResult parse(const mbgl::style::conversion::Convertible&, ParsingContext&);
void eachChild(const std::function<void(const Expression&)>&) const noexcept override {}
bool operator==(const Expression& e) const noexcept override;
std::vector<std::optional<Value>> possibleOutputs() const override;
mbgl::Value serialize() const override;
std::string getOperator() const override { return "within"; }
private:
GeoJSON geoJSONSource;
Feature::geometry_type geometries;
};
} // namespace expression
} // namespace style
} // namespace mbgl