MapLibre Native Core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
assertion.hpp
Go to the documentation of this file.
1 #pragma once
2 
6 
7 #include <memory>
8 #include <vector>
9 
10 namespace mbgl {
11 namespace style {
12 namespace expression {
13 
14 class Assertion : public Expression {
15 public:
16  Assertion(type::Type type_, std::vector<std::unique_ptr<Expression>> inputs_);
17 
19 
20  EvaluationResult evaluate(const EvaluationContext& params) const override;
21  void eachChild(const std::function<void(const Expression&)>& visit) const override;
22 
23  bool operator==(const Expression& e) const override;
24 
25  std::vector<std::optional<Value>> possibleOutputs() const override;
26 
27  mbgl::Value serialize() const override;
28  std::string getOperator() const override;
29 
30 private:
31  std::vector<std::unique_ptr<Expression>> inputs;
32 };
33 
34 } // namespace expression
35 } // namespace style
36 } // namespace mbgl
Assertion(type::Type type_, std::vector< std::unique_ptr< Expression >> inputs_)
bool operator==(const Expression &e) const override
std::string getOperator() const override
void eachChild(const std::function< void(const Expression &)> &visit) const override
std::vector< std::optional< Value > > possibleOutputs() const override
static ParseResult parse(const mbgl::style::conversion::Convertible &value, ParsingContext &ctx)
mbgl::Value serialize() const override
EvaluationResult evaluate(const EvaluationContext &params) const override
std::unique_ptr< Expression > string(std::unique_ptr< Expression >, std::unique_ptr< Expression > def=nullptr)
variant< NullType, NumberType, BooleanType, StringType, ColorType, ObjectType, ValueType, mapbox::util::recursive_wrapper< Array >, CollatorType, FormattedType, ErrorType, ImageType > Type
Definition: type.hpp:108
std::optional< std::unique_ptr< Expression > > ParseResult
Definition: actor.hpp:15
mapbox::base::Value Value
Definition: feature.hpp:11