MapLibre Native Core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
within.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 #include <mbgl/util/geojson.hpp>
5 
6 #include <optional>
7 
8 namespace mbgl {
9 namespace style {
10 namespace expression {
11 
12 class Within final : public Expression {
13 public:
14  explicit Within(GeoJSON geojson, Feature::geometry_type geometries_);
15 
16  ~Within() override;
17 
19 
21 
22  void eachChild(const std::function<void(const Expression&)>&) const override {}
23 
24  bool operator==(const Expression& e) const override;
25 
26  std::vector<std::optional<Value>> possibleOutputs() const override;
27 
28  mbgl::Value serialize() const override;
29  std::string getOperator() const override;
30 
31 private:
32  GeoJSON geoJSONSource;
33  Feature::geometry_type geometries;
34 };
35 
36 } // namespace expression
37 } // namespace style
38 } // namespace mbgl
EvaluationResult evaluate(const EvaluationContext &) const override
void eachChild(const std::function< void(const Expression &)> &) const override
Definition: within.hpp:22
std::vector< std::optional< Value > > possibleOutputs() const override
Within(GeoJSON geojson, Feature::geometry_type geometries_)
static ParseResult parse(const mbgl::style::conversion::Convertible &, ParsingContext &)
bool operator==(const Expression &e) const override
std::string getOperator() const override
mbgl::Value serialize() const override
std::unique_ptr< Expression > string(std::unique_ptr< Expression >, std::unique_ptr< Expression > def=nullptr)
std::optional< std::unique_ptr< Expression > > ParseResult
Definition: actor.hpp:15
mapbox::base::Value Value
Definition: feature.hpp:11
mapbox::geojson::geojson GeoJSON
Definition: geojson.hpp:8