1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| \#include "pch.h"
| \#include"cstring"
| \#include <iostream>
| \#include "framework.h"
| \#include <fstream>
| \#include <stdio.h>
| \#include <stdlib.h>
| \#include <string.h>
| \#include"${pyName}Jni.h"
|
| #{foreach} ($entity in $modelMethods)
| JNIEXPORT jobject JNICALL Java_${pkgName.replace('.','_')}_impl_${pyName}Impl_${pyName}${entity.methodName}(JNIEnv* env, jobject object1, #{foreach} ($column in [1..$entity.dataLength])jobjectArray data${column}, #{end}#{if}($entity.model==1)jobject model_path_, #{end}jobject settings)
| {
| jclass class_hashmap = env->FindClass("java/util/HashMap");
| jmethodID hashmap_construct_method = env->GetMethodID(class_hashmap, "<init>", "()V");
| jobject obj_hashmap = env->NewObject(class_hashmap, hashmap_construct_method, "");
| env->DeleteLocalRef(class_hashmap);
|
| obj_hashmap = ${pyName}_${entity.methodName}(env, #{foreach} ($column in [1..$entity.dataLength])data${column}, #{end}#{if}($entity.model==1)model_path_, #{end}settings);
| return obj_hashmap;
| }
| #{end}
|
|