diff options
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 |