1#pragma once
2
3#include <mbgl/style/expression/expression.hpp>
4
5#include <string>
6
7namespace mbgl {
8namespace style {
9namespace expression {
10
11class Error : public Expression {
12public:
13 Error(std::string message_)
14 : Expression(Kind::Error, type::Error),
15 message(std::move(message_)) {}
16
17 void eachChild(const std::function<void(const Expression&)>&) const override {}
18
19 bool operator==(const Expression& e) const override {
20 return e.getKind() == Kind::Error;
21 }
22
23 EvaluationResult evaluate(const EvaluationContext&) const override {
24 return EvaluationError{.message: message};
25 }
26
27 std::vector<optional<Value>> possibleOutputs() const override {
28 return {};
29 }
30
31 std::string getOperator() const override { return "error"; }
32
33private:
34 std::string message;
35};
36
37} // namespace expression
38} // namespace style
39} // namespace mbgl
40

source code of qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/style/expression/error.hpp