Skip to content

Commit 4fa78ed

Browse files
committed
add java part of daa integration for topographia
1 parent 5a8ee3b commit 4fa78ed

File tree

6 files changed

+121
-0
lines changed

6 files changed

+121
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* ----------------------------------------------------------------------------
2+
* This file was automatically generated by SWIG (http://www.swig.org).
3+
* Version 4.0.1
4+
*
5+
* Do not make changes to this file unless you know what you are doing--modify
6+
* the SWIG interface file instead.
7+
* ----------------------------------------------------------------------------- */
8+
9+
package uk.ac.ncl.cascade.daa.join;
10+
11+
public class topographia_daa_join {
12+
public static String getNG() {
13+
return topographia_daa_joinJNI.getNG();
14+
}
15+
16+
public static void setNG(String newNG) {
17+
topographia_daa_joinJNI.setNG(newNG);
18+
}
19+
20+
public static int tp_daa_join(String[] argc) {
21+
return topographia_daa_joinJNI.tp_daa_join(argc);
22+
}
23+
24+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* ----------------------------------------------------------------------------
2+
* This file was automatically generated by SWIG (http://www.swig.org).
3+
* Version 4.0.1
4+
*
5+
* Do not make changes to this file unless you know what you are doing--modify
6+
* the SWIG interface file instead.
7+
* ----------------------------------------------------------------------------- */
8+
9+
package uk.ac.ncl.cascade.daa.join;
10+
11+
public class topographia_daa_joinJNI {
12+
public final static native String getNG();
13+
public final static native void setNG(String jarg1);
14+
public final static native int tp_daa_join(String[] jarg1);
15+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package uk.ac.ncl.cascade.daa;
2+
3+
import uk.ac.ncl.cascade.daa.join.*;
4+
import java.math.BigInteger;
5+
6+
public class main {
7+
8+
public static void main(String argv[]) {
9+
try {
10+
System.loadLibrary("topographia_daa_join");
11+
String[] str = {" "};
12+
topographia_daa_join.tp_daa_join(str);
13+
BigInteger bi = new BigInteger(topographia_daa_join.getNG(), 16);
14+
System.out.println("bi biginteger: " + bi);
15+
System.out.println("bi hex: " + bi.toString(16));
16+
17+
} catch (UnsatisfiedLinkError e) {
18+
System.err.println("Native code library failed to load.\n" + e);
19+
System.exit(1);
20+
}
21+
}
22+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package uk.ac.ncl.cascade.daa;
2+
3+
import uk.ac.ncl.cascade.daa.sign.*;
4+
import java.math.BigInteger;
5+
6+
public class main_sign {
7+
8+
public static void main(String argv[]) {
9+
try {
10+
System.loadLibrary("topographia_daa_sign");
11+
String[] str = {" "};
12+
topographia_daa_sign.tp_daa_sign(str);
13+
String res = topographia_daa_sign.getSignResult();
14+
System.out.println("res : " + res);
15+
16+
} catch (UnsatisfiedLinkError e) {
17+
System.err.println("Native code library failed to load.\n" + e);
18+
System.exit(1);
19+
}
20+
}
21+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* ----------------------------------------------------------------------------
2+
* This file was automatically generated by SWIG (http://www.swig.org).
3+
* Version 4.0.1
4+
*
5+
* Do not make changes to this file unless you know what you are doing--modify
6+
* the SWIG interface file instead.
7+
* ----------------------------------------------------------------------------- */
8+
9+
package uk.ac.ncl.cascade.daa.sign;
10+
11+
public class topographia_daa_sign {
12+
public static String getSignResult() {
13+
return topographia_daa_signJNI.getSignResult();
14+
}
15+
16+
public static void setSignResult(String result) {
17+
topographia_daa_signJNI.setSignResult(result);
18+
}
19+
20+
public static int tp_daa_sign(String[] argc) {
21+
return topographia_daa_signJNI.tp_daa_sign(argc);
22+
}
23+
24+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* ----------------------------------------------------------------------------
2+
* This file was automatically generated by SWIG (http://www.swig.org).
3+
* Version 4.0.1
4+
*
5+
* Do not make changes to this file unless you know what you are doing--modify
6+
* the SWIG interface file instead.
7+
* ----------------------------------------------------------------------------- */
8+
9+
package uk.ac.ncl.cascade.daa.sign;
10+
11+
public class topographia_daa_signJNI {
12+
public final static native String getSignResult();
13+
public final static native void setSignResult(String jarg1);
14+
public final static native int tp_daa_sign(String[] jarg1);
15+
}

0 commit comments

Comments
 (0)