潘志宝
2024-11-13 a13dc8843bbf54dacca27254000865a539a87231
提交 | 用户 | 时间
449017 1 \#include "pch.h"
D 2 \#include"cstring"
3 \#include <iostream>  
4 \#include "framework.h"
5 \#include <fstream>
6 \#include <stdio.h>
7 \#include <stdlib.h>
8 \#include <string.h>
9 \#include"${pyName}Jni.h"
10
11 #{foreach} ($entity in $modelMethods)
12 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)
13 {
14     jclass class_hashmap = env->FindClass("java/util/HashMap");
15     jmethodID hashmap_construct_method = env->GetMethodID(class_hashmap, "<init>", "()V");
16     jobject obj_hashmap = env->NewObject(class_hashmap, hashmap_construct_method, "");
17     env->DeleteLocalRef(class_hashmap);
18
19     obj_hashmap = ${pyName}_${entity.methodName}(env, #{foreach} ($column in [1..$entity.dataLength])data${column}, #{end}#{if}($entity.model==1)model_path_, #{end}settings);
20     return  obj_hashmap;
21 }
22 #{end}