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

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