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 | |
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 | |
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 | |
23 | bool operator==(const Expression& e) const override; |
24 | |
25 | std::vector<optional<Value>> possibleOutputs() const override; |
26 | |
27 | std::string getOperator() const override; |
28 | |
29 | private: |
30 | std::vector<std::unique_ptr<Expression>> inputs; |
31 | }; |
32 | |
33 | } // namespace expression |
34 | } // namespace style |
35 | } // namespace mbgl |
36 |