This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
Add expression conversion, getters, tests - #11352
Merged
Merged
Conversation
tobrun
force-pushed
the
tvn-expressions-continued
branch
from
March 1, 2018 13:38
147093e to
b98f2cc
Compare
tobrun
force-pushed
the
tvn-expressions-continued
branch
from
March 2, 2018 15:55
b98f2cc to
09ee6e3
Compare
tobrun
force-pushed
the
tvn-expressions-continued
branch
4 times, most recently
from
March 5, 2018 12:05
619a7e4 to
21f8838
Compare
ivovandongen
approved these changes
Mar 8, 2018
ivovandongen
left a comment
Contributor
There was a problem hiding this comment.
Looks good. Two general remarks (maybe a follow-up):
- Let's make all new jni bindings use the high-level abstractions as much as possible (eg, the new templates and evaluator)
- There are some classes in
platform/android/src/gsonthat are a good place to add much of the conversion now inline in the evaluator.
| return object; | ||
| } | ||
|
|
||
| jni::jobject*operator()(const std::vector<mapbox::geometry::value> values) const { |
| return jarray; | ||
| } | ||
|
|
||
| jni::jobject*operator()(const std::unordered_map<std::string, mapbox::geometry::value> value) const { |
| Result<jni::jobject*> operator()(jni::JNIEnv& env, const mapbox::geometry::value& value) const { | ||
| JsonEvaluator evaluator { env } ; | ||
| jni::jobject* converted = mapbox::geometry::value::visit(value, evaluator); | ||
| return {converted}; |
Contributor
There was a problem hiding this comment.
spaces around converted
|
|
||
| jni::jobject* operator()(const mbgl::style::CompositeFunction<T> &value) const { | ||
| return *convert<jni::jobject*, mbgl::style::CompositeFunction<T>>(env, value); | ||
| return *convert<jni::jobject*, mbgl::style::CompositeFunction<T>>(env, value); |
Member
Author
There was a problem hiding this comment.
this one was intentional 😄there was a space missing, see https://github.com/mapbox/mapbox-gl-native/blob/master/platform/android/src/style/conversion/property_value.hpp#L41
| #include "../../conversion/constant.hpp" | ||
| #include "types.hpp" | ||
| #include "function.hpp" | ||
| #include "json.hpp" |
Contributor
There was a problem hiding this comment.
Should we name this gson.hpp?
tobrun
force-pushed
the
tvn-expressions-continued
branch
from
March 8, 2018 14:34
21f8838 to
87fa4de
Compare
This was referenced Mar 8, 2018
This was referenced Mar 14, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #10721, #10722, #11247, #10868
This PR adds accessors for expressions and removes the old API for doing DDS.