1#pragma once
2
3#include <mbgl/style/expression/expression.hpp>
4#include <mbgl/style/conversion.hpp>
5
6#include <memory>
7
8namespace mbgl {
9namespace style {
10namespace expression {
11
12class Any : public Expression {
13public:
14 Any(std::vector<std::unique_ptr<Expression>> inputs_) :
15 Expression(Kind::Any, type::Boolean),
16 inputs(std::move(inputs_))
17 {}
18
19 static ParseResult parse(const mbgl::style::conversion::Convertible& value, ParsingContext& ctx);
20
21 EvaluationResult evaluate(const EvaluationContext& params) const override;
22 void eachChild(const std::function<void(const Expression&)>& visit) const override;
23 bool operator==(const Expression& e) const override;
24 std::vector<optional<Value>> possibleOutputs() const override;
25
26 std::string getOperator() const override { return "any"; }
27private:
28 std::vector<std::unique_ptr<Expression>> inputs;
29};
30
31class All : public Expression {
32public:
33 All(std::vector<std::unique_ptr<Expression>> inputs_) :
34 Expression(Kind::All, type::Boolean),
35 inputs(std::move(inputs_))
36 {}
37
38 static ParseResult parse(const mbgl::style::conversion::Convertible& value, ParsingContext& ctx);
39
40 EvaluationResult evaluate(const EvaluationContext& params) const override;
41 void eachChild(const std::function<void(const Expression&)>& visit) const override;
42 bool operator==(const Expression& e) const override;
43 std::vector<optional<Value>> possibleOutputs() const override;
44
45 std::string getOperator() const override { return "all"; }
46private:
47 std::vector<std::unique_ptr<Expression>> inputs;
48};
49
50} // namespace expression
51} // namespace style
52} // namespace mbgl
53

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