-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add java part of daa integration for topographia
- Loading branch information
Showing
6 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
src/main/java/uk/ac/ncl/cascade/daa/join/topographia_daa_join.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* ---------------------------------------------------------------------------- | ||
* This file was automatically generated by SWIG (http://www.swig.org). | ||
* Version 4.0.1 | ||
* | ||
* Do not make changes to this file unless you know what you are doing--modify | ||
* the SWIG interface file instead. | ||
* ----------------------------------------------------------------------------- */ | ||
|
||
package uk.ac.ncl.cascade.daa.join; | ||
|
||
public class topographia_daa_join { | ||
public static String getNG() { | ||
return topographia_daa_joinJNI.getNG(); | ||
} | ||
|
||
public static void setNG(String newNG) { | ||
topographia_daa_joinJNI.setNG(newNG); | ||
} | ||
|
||
public static int tp_daa_join(String[] argc) { | ||
return topographia_daa_joinJNI.tp_daa_join(argc); | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/uk/ac/ncl/cascade/daa/join/topographia_daa_joinJNI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* ---------------------------------------------------------------------------- | ||
* This file was automatically generated by SWIG (http://www.swig.org). | ||
* Version 4.0.1 | ||
* | ||
* Do not make changes to this file unless you know what you are doing--modify | ||
* the SWIG interface file instead. | ||
* ----------------------------------------------------------------------------- */ | ||
|
||
package uk.ac.ncl.cascade.daa.join; | ||
|
||
public class topographia_daa_joinJNI { | ||
public final static native String getNG(); | ||
public final static native void setNG(String jarg1); | ||
public final static native int tp_daa_join(String[] jarg1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package uk.ac.ncl.cascade.daa; | ||
|
||
import uk.ac.ncl.cascade.daa.join.*; | ||
import java.math.BigInteger; | ||
|
||
public class main { | ||
|
||
public static void main(String argv[]) { | ||
try { | ||
System.loadLibrary("topographia_daa_join"); | ||
String[] str = {" "}; | ||
topographia_daa_join.tp_daa_join(str); | ||
BigInteger bi = new BigInteger(topographia_daa_join.getNG(), 16); | ||
System.out.println("bi biginteger: " + bi); | ||
System.out.println("bi hex: " + bi.toString(16)); | ||
|
||
} catch (UnsatisfiedLinkError e) { | ||
System.err.println("Native code library failed to load.\n" + e); | ||
System.exit(1); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package uk.ac.ncl.cascade.daa; | ||
|
||
import uk.ac.ncl.cascade.daa.sign.*; | ||
import java.math.BigInteger; | ||
|
||
public class main_sign { | ||
|
||
public static void main(String argv[]) { | ||
try { | ||
System.loadLibrary("topographia_daa_sign"); | ||
String[] str = {" "}; | ||
topographia_daa_sign.tp_daa_sign(str); | ||
String res = topographia_daa_sign.getSignResult(); | ||
System.out.println("res : " + res); | ||
|
||
} catch (UnsatisfiedLinkError e) { | ||
System.err.println("Native code library failed to load.\n" + e); | ||
System.exit(1); | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/uk/ac/ncl/cascade/daa/sign/topographia_daa_sign.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* ---------------------------------------------------------------------------- | ||
* This file was automatically generated by SWIG (http://www.swig.org). | ||
* Version 4.0.1 | ||
* | ||
* Do not make changes to this file unless you know what you are doing--modify | ||
* the SWIG interface file instead. | ||
* ----------------------------------------------------------------------------- */ | ||
|
||
package uk.ac.ncl.cascade.daa.sign; | ||
|
||
public class topographia_daa_sign { | ||
public static String getSignResult() { | ||
return topographia_daa_signJNI.getSignResult(); | ||
} | ||
|
||
public static void setSignResult(String result) { | ||
topographia_daa_signJNI.setSignResult(result); | ||
} | ||
|
||
public static int tp_daa_sign(String[] argc) { | ||
return topographia_daa_signJNI.tp_daa_sign(argc); | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/uk/ac/ncl/cascade/daa/sign/topographia_daa_signJNI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* ---------------------------------------------------------------------------- | ||
* This file was automatically generated by SWIG (http://www.swig.org). | ||
* Version 4.0.1 | ||
* | ||
* Do not make changes to this file unless you know what you are doing--modify | ||
* the SWIG interface file instead. | ||
* ----------------------------------------------------------------------------- */ | ||
|
||
package uk.ac.ncl.cascade.daa.sign; | ||
|
||
public class topographia_daa_signJNI { | ||
public final static native String getSignResult(); | ||
public final static native void setSignResult(String jarg1); | ||
public final static native int tp_daa_sign(String[] jarg1); | ||
} |