summaryrefslogtreecommitdiff
path: root/include/mbgl/style/expression/image_expression.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/style/expression/image_expression.hpp')
-rw-r--r--include/mbgl/style/expression/image_expression.hpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/mbgl/style/expression/image_expression.hpp b/include/mbgl/style/expression/image_expression.hpp
new file mode 100644
index 0000000000..cd3d375284
--- /dev/null
+++ b/include/mbgl/style/expression/image_expression.hpp
@@ -0,0 +1,33 @@
+#pragma once
+
+#include <mbgl/style/expression/expression.hpp>
+
+namespace mbgl {
+namespace style {
+namespace expression {
+
+class ParsingContext;
+
+class ImageExpression final : public Expression {
+public:
+ explicit ImageExpression(std::unique_ptr<Expression> imageID);
+
+ EvaluationResult evaluate(const EvaluationContext&) const override;
+ static ParseResult parse(const mbgl::style::conversion::Convertible&, ParsingContext&);
+
+ void eachChild(const std::function<void(const Expression&)>&) const override;
+
+ bool operator==(const Expression& e) const override;
+
+ std::vector<optional<Value>> possibleOutputs() const override { return {nullopt}; }
+
+ mbgl::Value serialize() const override;
+ std::string getOperator() const override { return "image"; }
+
+private:
+ std::shared_ptr<Expression> imageID;
+};
+
+} // namespace expression
+} // namespace style
+} // namespace mbgl