diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2016-07-26 17:02:52 -0400 |
---|---|---|
committer | Ivo van Dongen <info@ivovandongen.nl> | 2016-08-02 16:58:03 -0400 |
commit | 10b2cc60a7b274f71b46976b1e9e89031b9e44ca (patch) | |
tree | 8f3cccee03e5a4205c4754f7eb723ec73d19c8b5 /platform/android/src/style/layers/layer.hpp.ejs | |
parent | ed821c06d96e414b43db6fd1505389803cb022d4 (diff) | |
download | qtlocation-mapboxgl-10b2cc60a7b274f71b46976b1e9e89031b9e44ca.tar.gz |
[android] #5610 - Runtime style api - part 2
Diffstat (limited to 'platform/android/src/style/layers/layer.hpp.ejs')
-rw-r--r-- | platform/android/src/style/layers/layer.hpp.ejs | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/platform/android/src/style/layers/layer.hpp.ejs b/platform/android/src/style/layers/layer.hpp.ejs new file mode 100644 index 0000000000..826e133fca --- /dev/null +++ b/platform/android/src/style/layers/layer.hpp.ejs @@ -0,0 +1,45 @@ +<% + const type = locals.type; + const properties = locals.properties; +-%> +// This file is generated. Edit android/platform/scripts/generate-style-code.js, then run `make style-code-android`. + +#pragma once + +#include "layer.hpp" +#include <mbgl/style/layers/<%- type %>_layer.hpp> +#include <jni/jni.hpp> + +namespace mbgl { +namespace android { + +class <%- camelize(type) %>Layer : public Layer { +public: + + static constexpr auto Name() { return "com/mapbox/mapboxsdk/style/layers/<%- camelize(type) %>Layer"; }; + + static jni::Class<<%- camelize(type) %>Layer> javaClass; + + static void registerNative(jni::JNIEnv&); + +<% if (type === 'background') { -%> + <%- camelize(type) %>Layer(jni::JNIEnv&, jni::String); +<% } else { -%> + <%- camelize(type) %>Layer(jni::JNIEnv&, jni::String, jni::String); +<% } -%> + + <%- camelize(type) %>Layer(mbgl::Map&, mbgl::style::<%- camelize(type) %>Layer&); + + ~<%- camelize(type) %>Layer(); + + // Property getters +<% for (const property of properties) { -%> + jni::Object<jni::ObjectTag> get<%- camelize(property.name) %>(jni::JNIEnv&); + +<% } -%> + jni::jobject* createJavaPeer(jni::JNIEnv&); + +}; // class <%- camelize(type) %>Layer + +} // namespace android +} // namespace mbgl |