1#pragma once
2
3#include <mbgl/style/expression/expression.hpp>
4#include <mbgl/style/conversion.hpp>
5#include <mbgl/style/expression/parsing_context.hpp>
6
7#include <memory>
8#include <vector>
9
10namespace mbgl {
11namespace style {
12namespace expression {
13
14class Length : public Expression {
15public:
16 Length(std::unique_ptr<Expression> input);
17
18 static ParseResult parse(const mbgl::style::conversion::Convertible& value, ParsingContext& ctx);
19
20 EvaluationResult evaluate(const EvaluationContext& params) const override;
21 void eachChild(const std::function<void(const Expression&)>& visit) const override;
22 bool operator==(const Expression& e) const override;
23 std::vector<optional<Value>> possibleOutputs() const override;
24 std::string getOperator() const override { return "length"; }
25
26private:
27 std::unique_ptr<Expression> input;
28};
29
30} // namespace expression
31} // namespace style
32} // namespace mbgl
33

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