diff options
author | Chris Loer <chris.loer@gmail.com> | 2018-02-08 15:23:29 -0800 |
---|---|---|
committer | Chris Loer <chris.loer@mapbox.com> | 2018-02-16 14:07:33 -0800 |
commit | 8635dab4c38fcd67962819224093d0be95f5ed43 (patch) | |
tree | ac9d769aabbce2c01b4dc932ec9686b8647fd0c7 /include/mbgl/style/expression/let.hpp | |
parent | 341eb7645f98fb1835607dbe68b2bd74b0f6ec8a (diff) | |
download | qtlocation-mapboxgl-8635dab4c38fcd67962819224093d0be95f5ed43.tar.gz |
[core] Implement Expression::serialize()
Issue #10714
- Each expression stores its operator as a string, and default serialization is [operator, serialize(child1), ...]
- Custom implementations of `serialize` for Expression types that don't follow the pattern
- expression::Value -> mbgl::Value converter
- node_expression bindings to expose `serialize`
Diffstat (limited to 'include/mbgl/style/expression/let.hpp')
-rw-r--r-- | include/mbgl/style/expression/let.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mbgl/style/expression/let.hpp b/include/mbgl/style/expression/let.hpp index 6829ded9b8..75d2adda62 100644 --- a/include/mbgl/style/expression/let.hpp +++ b/include/mbgl/style/expression/let.hpp @@ -39,6 +39,8 @@ public: return result.get(); } + mbgl::Value serialize() const override; + std::string getOperator() const override { return "let"; } private: Bindings bindings; std::unique_ptr<Expression> result; @@ -66,6 +68,8 @@ public: std::vector<optional<Value>> possibleOutputs() const override; + mbgl::Value serialize() const override; + std::string getOperator() const override { return "var"; } private: std::string name; std::shared_ptr<Expression> value; |