/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 4.0.0 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ #ifndef SWIGJAVA #define SWIGJAVA #endif #ifdef __cplusplus /* SwigValueWrapper is described in swig.swg */ template class SwigValueWrapper { struct SwigMovePointer { T *ptr; SwigMovePointer(T *p) : ptr(p) { } ~SwigMovePointer() { delete ptr; } SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } } pointer; SwigValueWrapper& operator=(const SwigValueWrapper& rhs); SwigValueWrapper(const SwigValueWrapper& rhs); public: SwigValueWrapper() : pointer(0) { } SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } operator T&() const { return *pointer.ptr; } T *operator&() { return pointer.ptr; } }; template T SwigValueInit() { return T(); } #endif /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if defined(__GNUC__) # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 #endif /* Intel's compiler complains if a variable which was never initialised is * cast to void, which is a common idiom which we use to indicate that we * are aware a variable isn't used. So we just silence that warning. * See: https://github.com/swig/swig/issues/192 for more discussion. */ #ifdef __INTEL_COMPILER # pragma warning disable 592 #endif /* Fix for jlong on some versions of gcc on Windows */ #if defined(__GNUC__) && !defined(__INTEL_COMPILER) typedef long long __int64; #endif /* Fix for jlong on 64-bit x86 Solaris */ #if defined(__x86_64) # ifdef _LP64 # undef _LP64 # endif #endif #include #include #include /* Support for throwing Java exceptions */ typedef enum { SWIG_JavaOutOfMemoryError = 1, SWIG_JavaIOException, SWIG_JavaRuntimeException, SWIG_JavaIndexOutOfBoundsException, SWIG_JavaArithmeticException, SWIG_JavaIllegalArgumentException, SWIG_JavaNullPointerException, SWIG_JavaDirectorPureVirtual, SWIG_JavaUnknownError } SWIG_JavaExceptionCodes; typedef struct { SWIG_JavaExceptionCodes code; const char *java_exception; } SWIG_JavaExceptions_t; static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg) { jclass excep; static const SWIG_JavaExceptions_t java_exceptions[] = { { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" }, { SWIG_JavaIOException, "java/io/IOException" }, { SWIG_JavaRuntimeException, "java/lang/RuntimeException" }, { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" }, { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" }, { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" }, { SWIG_JavaNullPointerException, "java/lang/NullPointerException" }, { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" }, { SWIG_JavaUnknownError, "java/lang/UnknownError" }, { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" } }; const SWIG_JavaExceptions_t *except_ptr = java_exceptions; while (except_ptr->code != code && except_ptr->code) except_ptr++; jenv->ExceptionClear(); excep = jenv->FindClass(except_ptr->java_exception); if (excep) jenv->ThrowNew(excep, msg); } /* Contract support */ #define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else #include #include #include #include #include "mcl_impl.hpp" #ifdef __cplusplus extern "C" { #endif SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_SystemInit(JNIEnv *jenv, jclass jcls, jint jarg1) { int arg1 ; (void)jenv; (void)jcls; arg1 = (int)jarg1; try { SystemInit(arg1); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_neg_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { Fr *arg1 = 0 ; Fr *arg2 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; arg1 = *(Fr **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fr & reference is null"); return ; } arg2 = *(Fr **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fr const & reference is null"); return ; } neg(*arg1,(Fr const &)*arg2); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_add_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { Fr *arg1 = 0 ; Fr *arg2 = 0 ; Fr *arg3 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; arg1 = *(Fr **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fr & reference is null"); return ; } arg2 = *(Fr **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fr const & reference is null"); return ; } arg3 = *(Fr **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fr const & reference is null"); return ; } add(*arg1,(Fr const &)*arg2,(Fr const &)*arg3); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_sub_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { Fr *arg1 = 0 ; Fr *arg2 = 0 ; Fr *arg3 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; arg1 = *(Fr **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fr & reference is null"); return ; } arg2 = *(Fr **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fr const & reference is null"); return ; } arg3 = *(Fr **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fr const & reference is null"); return ; } sub(*arg1,(Fr const &)*arg2,(Fr const &)*arg3); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_mul_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { Fr *arg1 = 0 ; Fr *arg2 = 0 ; Fr *arg3 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; arg1 = *(Fr **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fr & reference is null"); return ; } arg2 = *(Fr **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fr const & reference is null"); return ; } arg3 = *(Fr **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fr const & reference is null"); return ; } mul(*arg1,(Fr const &)*arg2,(Fr const &)*arg3); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_mul_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { G1 *arg1 = 0 ; G1 *arg2 = 0 ; Fr *arg3 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; arg1 = *(G1 **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G1 & reference is null"); return ; } arg2 = *(G1 **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G1 const & reference is null"); return ; } arg3 = *(Fr **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fr const & reference is null"); return ; } mul(*arg1,(G1 const &)*arg2,(Fr const &)*arg3); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_mul_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { G2 *arg1 = 0 ; G2 *arg2 = 0 ; Fr *arg3 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; arg1 = *(G2 **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G2 & reference is null"); return ; } arg2 = *(G2 **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G2 const & reference is null"); return ; } arg3 = *(Fr **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fr const & reference is null"); return ; } mul(*arg1,(G2 const &)*arg2,(Fr const &)*arg3); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_div_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { Fr *arg1 = 0 ; Fr *arg2 = 0 ; Fr *arg3 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; arg1 = *(Fr **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fr & reference is null"); return ; } arg2 = *(Fr **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fr const & reference is null"); return ; } arg3 = *(Fr **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fr const & reference is null"); return ; } div(*arg1,(Fr const &)*arg2,(Fr const &)*arg3); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_pow(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { GT *arg1 = 0 ; GT *arg2 = 0 ; Fr *arg3 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; arg1 = *(GT **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "GT & reference is null"); return ; } arg2 = *(GT **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "GT const & reference is null"); return ; } arg3 = *(Fr **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fr const & reference is null"); return ; } pow(*arg1,(GT const &)*arg2,(Fr const &)*arg3); } SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1Fr_1_1SWIG_10(JNIEnv *jenv, jclass jcls) { jlong jresult = 0 ; Fr *result = 0 ; (void)jenv; (void)jcls; result = (Fr *)new Fr(); *(Fr **)&jresult = result; return jresult; } SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1Fr_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jlong jresult = 0 ; Fr *arg1 = 0 ; Fr *result = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(Fr **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fr const & reference is null"); return 0; } result = (Fr *)new Fr((Fr const &)*arg1); *(Fr **)&jresult = result; return jresult; } SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1Fr_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jint jarg1) { jlong jresult = 0 ; int arg1 ; Fr *result = 0 ; (void)jenv; (void)jcls; arg1 = (int)jarg1; result = (Fr *)new Fr(arg1); *(Fr **)&jresult = result; return jresult; } SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1Fr_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2) { jlong jresult = 0 ; std::string *arg1 = 0 ; int arg2 ; Fr *result = 0 ; (void)jenv; (void)jcls; if(!jarg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string"); return 0; } const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0); if (!arg1_pstr) return 0; std::string arg1_str(arg1_pstr); arg1 = &arg1_str; jenv->ReleaseStringUTFChars(jarg1, arg1_pstr); arg2 = (int)jarg2; try { result = (Fr *)new Fr((std::string const &)*arg1,arg2); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } *(Fr **)&jresult = result; return jresult; } SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1Fr_1_1SWIG_14(JNIEnv *jenv, jclass jcls, jstring jarg1) { jlong jresult = 0 ; std::string *arg1 = 0 ; Fr *result = 0 ; (void)jenv; (void)jcls; if(!jarg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string"); return 0; } const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0); if (!arg1_pstr) return 0; std::string arg1_str(arg1_pstr); arg1 = &arg1_str; jenv->ReleaseStringUTFChars(jarg1, arg1_pstr); try { result = (Fr *)new Fr((std::string const &)*arg1); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } *(Fr **)&jresult = result; return jresult; } SWIGEXPORT jboolean JNICALL Java_com_herumi_mcl_MclJNI_Fr_1equals(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { jboolean jresult = 0 ; Fr *arg1 = (Fr *) 0 ; Fr *arg2 = 0 ; bool result; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; arg1 = *(Fr **)&jarg1; arg2 = *(Fr **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fr const & reference is null"); return 0; } result = (bool)((Fr const *)arg1)->equals((Fr const &)*arg2); jresult = (jboolean)result; return jresult; } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_Fr_1setStr_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) { Fr *arg1 = (Fr *) 0 ; std::string *arg2 = 0 ; int arg3 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(Fr **)&jarg1; if(!jarg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string"); return ; } const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); if (!arg2_pstr) return ; std::string arg2_str(arg2_pstr); arg2 = &arg2_str; jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); arg3 = (int)jarg3; try { (arg1)->setStr((std::string const &)*arg2,arg3); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_Fr_1setStr_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { Fr *arg1 = (Fr *) 0 ; std::string *arg2 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(Fr **)&jarg1; if(!jarg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string"); return ; } const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); if (!arg2_pstr) return ; std::string arg2_str(arg2_pstr); arg2 = &arg2_str; jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); try { (arg1)->setStr((std::string const &)*arg2); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_Fr_1setInt(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { Fr *arg1 = (Fr *) 0 ; int arg2 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(Fr **)&jarg1; arg2 = (int)jarg2; (arg1)->setInt(arg2); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_Fr_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { Fr *arg1 = (Fr *) 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(Fr **)&jarg1; (arg1)->clear(); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_Fr_1setByCSPRNG(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { Fr *arg1 = (Fr *) 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(Fr **)&jarg1; (arg1)->setByCSPRNG(); } SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_Fr_1toString_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { jstring jresult = 0 ; Fr *arg1 = (Fr *) 0 ; int arg2 ; std::string result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(Fr **)&jarg1; arg2 = (int)jarg2; try { result = ((Fr const *)arg1)->toString(arg2); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; } SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_Fr_1toString_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jstring jresult = 0 ; Fr *arg1 = (Fr *) 0 ; std::string result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(Fr **)&jarg1; try { result = ((Fr const *)arg1)->toString(); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_Fr_1deserialize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) { Fr *arg1 = (Fr *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(Fr **)&jarg1; { if (jarg2) { arg2 = (char *) jenv->GetByteArrayElements(jarg2, 0); arg3 = (size_t) jenv->GetArrayLength(jarg2); } else { arg2 = 0; arg3 = 0; } } try { (arg1)->deserialize((char const *)arg2,arg3); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } { if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0); } } SWIGEXPORT jbyteArray JNICALL Java_com_herumi_mcl_MclJNI_Fr_1serialize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jbyteArray jresult = 0 ; Fr *arg1 = (Fr *) 0 ; std::string *arg2 = 0 ; std::string buf2 ; (void)jenv; (void)jcls; arg2=&buf2; (void)jarg1_; arg1 = *(Fr **)&jarg1; try { ((Fr const *)arg1)->serialize(*arg2); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } { jresult = jenv->NewByteArray(arg2->size()); jenv->SetByteArrayRegion(jresult, 0, arg2->size(), (const jbyte*)arg2->c_str()); } return jresult; } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_delete_1Fr(JNIEnv *jenv, jclass jcls, jlong jarg1) { Fr *arg1 = (Fr *) 0 ; (void)jenv; (void)jcls; arg1 = *(Fr **)&jarg1; delete arg1; } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_neg_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { Fp *arg1 = 0 ; Fp *arg2 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; arg1 = *(Fp **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp & reference is null"); return ; } arg2 = *(Fp **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return ; } neg(*arg1,(Fp const &)*arg2); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_add_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { Fp *arg1 = 0 ; Fp *arg2 = 0 ; Fp *arg3 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; arg1 = *(Fp **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp & reference is null"); return ; } arg2 = *(Fp **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return ; } arg3 = *(Fp **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return ; } add(*arg1,(Fp const &)*arg2,(Fp const &)*arg3); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_sub_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { Fp *arg1 = 0 ; Fp *arg2 = 0 ; Fp *arg3 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; arg1 = *(Fp **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp & reference is null"); return ; } arg2 = *(Fp **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return ; } arg3 = *(Fp **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return ; } sub(*arg1,(Fp const &)*arg2,(Fp const &)*arg3); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_mul_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { Fp *arg1 = 0 ; Fp *arg2 = 0 ; Fp *arg3 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; arg1 = *(Fp **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp & reference is null"); return ; } arg2 = *(Fp **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return ; } arg3 = *(Fp **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return ; } mul(*arg1,(Fp const &)*arg2,(Fp const &)*arg3); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_div_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { Fp *arg1 = 0 ; Fp *arg2 = 0 ; Fp *arg3 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; arg1 = *(Fp **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp & reference is null"); return ; } arg2 = *(Fp **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return ; } arg3 = *(Fp **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return ; } div(*arg1,(Fp const &)*arg2,(Fp const &)*arg3); } SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1Fp_1_1SWIG_10(JNIEnv *jenv, jclass jcls) { jlong jresult = 0 ; Fp *result = 0 ; (void)jenv; (void)jcls; result = (Fp *)new Fp(); *(Fp **)&jresult = result; return jresult; } SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1Fp_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jlong jresult = 0 ; Fp *arg1 = 0 ; Fp *result = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(Fp **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return 0; } result = (Fp *)new Fp((Fp const &)*arg1); *(Fp **)&jresult = result; return jresult; } SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1Fp_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jint jarg1) { jlong jresult = 0 ; int arg1 ; Fp *result = 0 ; (void)jenv; (void)jcls; arg1 = (int)jarg1; result = (Fp *)new Fp(arg1); *(Fp **)&jresult = result; return jresult; } SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1Fp_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2) { jlong jresult = 0 ; std::string *arg1 = 0 ; int arg2 ; Fp *result = 0 ; (void)jenv; (void)jcls; if(!jarg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string"); return 0; } const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0); if (!arg1_pstr) return 0; std::string arg1_str(arg1_pstr); arg1 = &arg1_str; jenv->ReleaseStringUTFChars(jarg1, arg1_pstr); arg2 = (int)jarg2; try { result = (Fp *)new Fp((std::string const &)*arg1,arg2); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } *(Fp **)&jresult = result; return jresult; } SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1Fp_1_1SWIG_14(JNIEnv *jenv, jclass jcls, jstring jarg1) { jlong jresult = 0 ; std::string *arg1 = 0 ; Fp *result = 0 ; (void)jenv; (void)jcls; if(!jarg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string"); return 0; } const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0); if (!arg1_pstr) return 0; std::string arg1_str(arg1_pstr); arg1 = &arg1_str; jenv->ReleaseStringUTFChars(jarg1, arg1_pstr); try { result = (Fp *)new Fp((std::string const &)*arg1); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } *(Fp **)&jresult = result; return jresult; } SWIGEXPORT jboolean JNICALL Java_com_herumi_mcl_MclJNI_Fp_1equals(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { jboolean jresult = 0 ; Fp *arg1 = (Fp *) 0 ; Fp *arg2 = 0 ; bool result; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; arg1 = *(Fp **)&jarg1; arg2 = *(Fp **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return 0; } result = (bool)((Fp const *)arg1)->equals((Fp const &)*arg2); jresult = (jboolean)result; return jresult; } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_Fp_1setStr_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) { Fp *arg1 = (Fp *) 0 ; std::string *arg2 = 0 ; int arg3 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(Fp **)&jarg1; if(!jarg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string"); return ; } const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); if (!arg2_pstr) return ; std::string arg2_str(arg2_pstr); arg2 = &arg2_str; jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); arg3 = (int)jarg3; try { (arg1)->setStr((std::string const &)*arg2,arg3); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_Fp_1setStr_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { Fp *arg1 = (Fp *) 0 ; std::string *arg2 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(Fp **)&jarg1; if(!jarg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string"); return ; } const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); if (!arg2_pstr) return ; std::string arg2_str(arg2_pstr); arg2 = &arg2_str; jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); try { (arg1)->setStr((std::string const &)*arg2); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_Fp_1setInt(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { Fp *arg1 = (Fp *) 0 ; int arg2 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(Fp **)&jarg1; arg2 = (int)jarg2; (arg1)->setInt(arg2); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_Fp_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { Fp *arg1 = (Fp *) 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(Fp **)&jarg1; (arg1)->clear(); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_Fp_1setByCSPRNG(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { Fp *arg1 = (Fp *) 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(Fp **)&jarg1; (arg1)->setByCSPRNG(); } SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_Fp_1toString_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { jstring jresult = 0 ; Fp *arg1 = (Fp *) 0 ; int arg2 ; std::string result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(Fp **)&jarg1; arg2 = (int)jarg2; try { result = ((Fp const *)arg1)->toString(arg2); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; } SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_Fp_1toString_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jstring jresult = 0 ; Fp *arg1 = (Fp *) 0 ; std::string result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(Fp **)&jarg1; try { result = ((Fp const *)arg1)->toString(); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_Fp_1deserialize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) { Fp *arg1 = (Fp *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(Fp **)&jarg1; { if (jarg2) { arg2 = (char *) jenv->GetByteArrayElements(jarg2, 0); arg3 = (size_t) jenv->GetArrayLength(jarg2); } else { arg2 = 0; arg3 = 0; } } try { (arg1)->deserialize((char const *)arg2,arg3); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } { if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0); } } SWIGEXPORT jbyteArray JNICALL Java_com_herumi_mcl_MclJNI_Fp_1serialize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jbyteArray jresult = 0 ; Fp *arg1 = (Fp *) 0 ; std::string *arg2 = 0 ; std::string buf2 ; (void)jenv; (void)jcls; arg2=&buf2; (void)jarg1_; arg1 = *(Fp **)&jarg1; try { ((Fp const *)arg1)->serialize(*arg2); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } { jresult = jenv->NewByteArray(arg2->size()); jenv->SetByteArrayRegion(jresult, 0, arg2->size(), (const jbyte*)arg2->c_str()); } return jresult; } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_delete_1Fp(JNIEnv *jenv, jclass jcls, jlong jarg1) { Fp *arg1 = (Fp *) 0 ; (void)jenv; (void)jcls; arg1 = *(Fp **)&jarg1; delete arg1; } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_neg_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { G1 *arg1 = 0 ; G1 *arg2 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; arg1 = *(G1 **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G1 & reference is null"); return ; } arg2 = *(G1 **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G1 const & reference is null"); return ; } neg(*arg1,(G1 const &)*arg2); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_dbl_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { G1 *arg1 = 0 ; G1 *arg2 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; arg1 = *(G1 **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G1 & reference is null"); return ; } arg2 = *(G1 **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G1 const & reference is null"); return ; } dbl(*arg1,(G1 const &)*arg2); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_add_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { G1 *arg1 = 0 ; G1 *arg2 = 0 ; G1 *arg3 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; arg1 = *(G1 **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G1 & reference is null"); return ; } arg2 = *(G1 **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G1 const & reference is null"); return ; } arg3 = *(G1 **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G1 const & reference is null"); return ; } add(*arg1,(G1 const &)*arg2,(G1 const &)*arg3); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_sub_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { G1 *arg1 = 0 ; G1 *arg2 = 0 ; G1 *arg3 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; arg1 = *(G1 **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G1 & reference is null"); return ; } arg2 = *(G1 **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G1 const & reference is null"); return ; } arg3 = *(G1 **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G1 const & reference is null"); return ; } sub(*arg1,(G1 const &)*arg2,(G1 const &)*arg3); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_pairing(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { GT *arg1 = 0 ; G1 *arg2 = 0 ; G2 *arg3 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; arg1 = *(GT **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "GT & reference is null"); return ; } arg2 = *(G1 **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G1 const & reference is null"); return ; } arg3 = *(G2 **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G2 const & reference is null"); return ; } pairing(*arg1,(G1 const &)*arg2,(G2 const &)*arg3); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_hashAndMapToG1(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) { G1 *arg1 = 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(G1 **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G1 & reference is null"); return ; } { if (jarg2) { arg2 = (char *) jenv->GetByteArrayElements(jarg2, 0); arg3 = (size_t) jenv->GetArrayLength(jarg2); } else { arg2 = 0; arg3 = 0; } } try { hashAndMapToG1(*arg1,(char const *)arg2,arg3); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } { if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0); } } SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1G1_1_1SWIG_10(JNIEnv *jenv, jclass jcls) { jlong jresult = 0 ; G1 *result = 0 ; (void)jenv; (void)jcls; result = (G1 *)new G1(); *(G1 **)&jresult = result; return jresult; } SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1G1_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jlong jresult = 0 ; G1 *arg1 = 0 ; G1 *result = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(G1 **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G1 const & reference is null"); return 0; } result = (G1 *)new G1((G1 const &)*arg1); *(G1 **)&jresult = result; return jresult; } SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1G1_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { jlong jresult = 0 ; Fp *arg1 = 0 ; Fp *arg2 = 0 ; G1 *result = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; arg1 = *(Fp **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return 0; } arg2 = *(Fp **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return 0; } try { result = (G1 *)new G1((Fp const &)*arg1,(Fp const &)*arg2); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } *(G1 **)&jresult = result; return jresult; } SWIGEXPORT jboolean JNICALL Java_com_herumi_mcl_MclJNI_G1_1equals(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { jboolean jresult = 0 ; G1 *arg1 = (G1 *) 0 ; G1 *arg2 = 0 ; bool result; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; arg1 = *(G1 **)&jarg1; arg2 = *(G1 **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G1 const & reference is null"); return 0; } result = (bool)((G1 const *)arg1)->equals((G1 const &)*arg2); jresult = (jboolean)result; return jresult; } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_G1_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { G1 *arg1 = (G1 *) 0 ; Fp *arg2 = 0 ; Fp *arg3 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; arg1 = *(G1 **)&jarg1; arg2 = *(Fp **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return ; } arg3 = *(Fp **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return ; } try { (arg1)->set((Fp const &)*arg2,(Fp const &)*arg3); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_G1_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { G1 *arg1 = (G1 *) 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(G1 **)&jarg1; (arg1)->clear(); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_G1_1setStr_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) { G1 *arg1 = (G1 *) 0 ; std::string *arg2 = 0 ; int arg3 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(G1 **)&jarg1; if(!jarg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string"); return ; } const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); if (!arg2_pstr) return ; std::string arg2_str(arg2_pstr); arg2 = &arg2_str; jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); arg3 = (int)jarg3; try { (arg1)->setStr((std::string const &)*arg2,arg3); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_G1_1setStr_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { G1 *arg1 = (G1 *) 0 ; std::string *arg2 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(G1 **)&jarg1; if(!jarg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string"); return ; } const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); if (!arg2_pstr) return ; std::string arg2_str(arg2_pstr); arg2 = &arg2_str; jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); try { (arg1)->setStr((std::string const &)*arg2); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } } SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_G1_1toString_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { jstring jresult = 0 ; G1 *arg1 = (G1 *) 0 ; int arg2 ; std::string result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(G1 **)&jarg1; arg2 = (int)jarg2; try { result = ((G1 const *)arg1)->toString(arg2); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; } SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_G1_1toString_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jstring jresult = 0 ; G1 *arg1 = (G1 *) 0 ; std::string result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(G1 **)&jarg1; try { result = ((G1 const *)arg1)->toString(); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_G1_1deserialize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) { G1 *arg1 = (G1 *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(G1 **)&jarg1; { if (jarg2) { arg2 = (char *) jenv->GetByteArrayElements(jarg2, 0); arg3 = (size_t) jenv->GetArrayLength(jarg2); } else { arg2 = 0; arg3 = 0; } } try { (arg1)->deserialize((char const *)arg2,arg3); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } { if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0); } } SWIGEXPORT jbyteArray JNICALL Java_com_herumi_mcl_MclJNI_G1_1serialize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jbyteArray jresult = 0 ; G1 *arg1 = (G1 *) 0 ; std::string *arg2 = 0 ; std::string buf2 ; (void)jenv; (void)jcls; arg2=&buf2; (void)jarg1_; arg1 = *(G1 **)&jarg1; try { ((G1 const *)arg1)->serialize(*arg2); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } { jresult = jenv->NewByteArray(arg2->size()); jenv->SetByteArrayRegion(jresult, 0, arg2->size(), (const jbyte*)arg2->c_str()); } return jresult; } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_delete_1G1(JNIEnv *jenv, jclass jcls, jlong jarg1) { G1 *arg1 = (G1 *) 0 ; (void)jenv; (void)jcls; arg1 = *(G1 **)&jarg1; delete arg1; } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_neg_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { G2 *arg1 = 0 ; G2 *arg2 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; arg1 = *(G2 **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G2 & reference is null"); return ; } arg2 = *(G2 **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G2 const & reference is null"); return ; } neg(*arg1,(G2 const &)*arg2); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_dbl_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { G2 *arg1 = 0 ; G2 *arg2 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; arg1 = *(G2 **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G2 & reference is null"); return ; } arg2 = *(G2 **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G2 const & reference is null"); return ; } dbl(*arg1,(G2 const &)*arg2); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_add_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { G2 *arg1 = 0 ; G2 *arg2 = 0 ; G2 *arg3 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; arg1 = *(G2 **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G2 & reference is null"); return ; } arg2 = *(G2 **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G2 const & reference is null"); return ; } arg3 = *(G2 **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G2 const & reference is null"); return ; } add(*arg1,(G2 const &)*arg2,(G2 const &)*arg3); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_sub_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { G2 *arg1 = 0 ; G2 *arg2 = 0 ; G2 *arg3 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; arg1 = *(G2 **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G2 & reference is null"); return ; } arg2 = *(G2 **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G2 const & reference is null"); return ; } arg3 = *(G2 **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G2 const & reference is null"); return ; } sub(*arg1,(G2 const &)*arg2,(G2 const &)*arg3); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_hashAndMapToG2(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) { G2 *arg1 = 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(G2 **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G2 & reference is null"); return ; } { if (jarg2) { arg2 = (char *) jenv->GetByteArrayElements(jarg2, 0); arg3 = (size_t) jenv->GetArrayLength(jarg2); } else { arg2 = 0; arg3 = 0; } } try { hashAndMapToG2(*arg1,(char const *)arg2,arg3); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } { if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0); } } SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1G2_1_1SWIG_10(JNIEnv *jenv, jclass jcls) { jlong jresult = 0 ; G2 *result = 0 ; (void)jenv; (void)jcls; result = (G2 *)new G2(); *(G2 **)&jresult = result; return jresult; } SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1G2_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jlong jresult = 0 ; G2 *arg1 = 0 ; G2 *result = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(G2 **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G2 const & reference is null"); return 0; } result = (G2 *)new G2((G2 const &)*arg1); *(G2 **)&jresult = result; return jresult; } SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1G2_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jlong jarg4, jobject jarg4_) { jlong jresult = 0 ; Fp *arg1 = 0 ; Fp *arg2 = 0 ; Fp *arg3 = 0 ; Fp *arg4 = 0 ; G2 *result = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; (void)jarg4_; arg1 = *(Fp **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return 0; } arg2 = *(Fp **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return 0; } arg3 = *(Fp **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return 0; } arg4 = *(Fp **)&jarg4; if (!arg4) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return 0; } try { result = (G2 *)new G2((Fp const &)*arg1,(Fp const &)*arg2,(Fp const &)*arg3,(Fp const &)*arg4); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } *(G2 **)&jresult = result; return jresult; } SWIGEXPORT jboolean JNICALL Java_com_herumi_mcl_MclJNI_G2_1equals(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { jboolean jresult = 0 ; G2 *arg1 = (G2 *) 0 ; G2 *arg2 = 0 ; bool result; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; arg1 = *(G2 **)&jarg1; arg2 = *(G2 **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "G2 const & reference is null"); return 0; } result = (bool)((G2 const *)arg1)->equals((G2 const &)*arg2); jresult = (jboolean)result; return jresult; } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_G2_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jlong jarg4, jobject jarg4_, jlong jarg5, jobject jarg5_) { G2 *arg1 = (G2 *) 0 ; Fp *arg2 = 0 ; Fp *arg3 = 0 ; Fp *arg4 = 0 ; Fp *arg5 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; (void)jarg4_; (void)jarg5_; arg1 = *(G2 **)&jarg1; arg2 = *(Fp **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return ; } arg3 = *(Fp **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return ; } arg4 = *(Fp **)&jarg4; if (!arg4) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return ; } arg5 = *(Fp **)&jarg5; if (!arg5) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Fp const & reference is null"); return ; } try { (arg1)->set((Fp const &)*arg2,(Fp const &)*arg3,(Fp const &)*arg4,(Fp const &)*arg5); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_G2_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { G2 *arg1 = (G2 *) 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(G2 **)&jarg1; (arg1)->clear(); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_G2_1setStr_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) { G2 *arg1 = (G2 *) 0 ; std::string *arg2 = 0 ; int arg3 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(G2 **)&jarg1; if(!jarg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string"); return ; } const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); if (!arg2_pstr) return ; std::string arg2_str(arg2_pstr); arg2 = &arg2_str; jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); arg3 = (int)jarg3; try { (arg1)->setStr((std::string const &)*arg2,arg3); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_G2_1setStr_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { G2 *arg1 = (G2 *) 0 ; std::string *arg2 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(G2 **)&jarg1; if(!jarg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string"); return ; } const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); if (!arg2_pstr) return ; std::string arg2_str(arg2_pstr); arg2 = &arg2_str; jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); try { (arg1)->setStr((std::string const &)*arg2); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } } SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_G2_1toString_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { jstring jresult = 0 ; G2 *arg1 = (G2 *) 0 ; int arg2 ; std::string result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(G2 **)&jarg1; arg2 = (int)jarg2; try { result = ((G2 const *)arg1)->toString(arg2); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; } SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_G2_1toString_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jstring jresult = 0 ; G2 *arg1 = (G2 *) 0 ; std::string result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(G2 **)&jarg1; try { result = ((G2 const *)arg1)->toString(); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_G2_1deserialize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) { G2 *arg1 = (G2 *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(G2 **)&jarg1; { if (jarg2) { arg2 = (char *) jenv->GetByteArrayElements(jarg2, 0); arg3 = (size_t) jenv->GetArrayLength(jarg2); } else { arg2 = 0; arg3 = 0; } } try { (arg1)->deserialize((char const *)arg2,arg3); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } { if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0); } } SWIGEXPORT jbyteArray JNICALL Java_com_herumi_mcl_MclJNI_G2_1serialize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jbyteArray jresult = 0 ; G2 *arg1 = (G2 *) 0 ; std::string *arg2 = 0 ; std::string buf2 ; (void)jenv; (void)jcls; arg2=&buf2; (void)jarg1_; arg1 = *(G2 **)&jarg1; try { ((G2 const *)arg1)->serialize(*arg2); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } { jresult = jenv->NewByteArray(arg2->size()); jenv->SetByteArrayRegion(jresult, 0, arg2->size(), (const jbyte*)arg2->c_str()); } return jresult; } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_delete_1G2(JNIEnv *jenv, jclass jcls, jlong jarg1) { G2 *arg1 = (G2 *) 0 ; (void)jenv; (void)jcls; arg1 = *(G2 **)&jarg1; delete arg1; } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_mul_1_1SWIG_14(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { GT *arg1 = 0 ; GT *arg2 = 0 ; GT *arg3 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; (void)jarg3_; arg1 = *(GT **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "GT & reference is null"); return ; } arg2 = *(GT **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "GT const & reference is null"); return ; } arg3 = *(GT **)&jarg3; if (!arg3) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "GT const & reference is null"); return ; } mul(*arg1,(GT const &)*arg2,(GT const &)*arg3); } SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1GT_1_1SWIG_10(JNIEnv *jenv, jclass jcls) { jlong jresult = 0 ; GT *result = 0 ; (void)jenv; (void)jcls; result = (GT *)new GT(); *(GT **)&jresult = result; return jresult; } SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1GT_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jlong jresult = 0 ; GT *arg1 = 0 ; GT *result = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(GT **)&jarg1; if (!arg1) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "GT const & reference is null"); return 0; } result = (GT *)new GT((GT const &)*arg1); *(GT **)&jresult = result; return jresult; } SWIGEXPORT jboolean JNICALL Java_com_herumi_mcl_MclJNI_GT_1equals(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { jboolean jresult = 0 ; GT *arg1 = (GT *) 0 ; GT *arg2 = 0 ; bool result; (void)jenv; (void)jcls; (void)jarg1_; (void)jarg2_; arg1 = *(GT **)&jarg1; arg2 = *(GT **)&jarg2; if (!arg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "GT const & reference is null"); return 0; } result = (bool)((GT const *)arg1)->equals((GT const &)*arg2); jresult = (jboolean)result; return jresult; } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_GT_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { GT *arg1 = (GT *) 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(GT **)&jarg1; (arg1)->clear(); } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_GT_1setStr_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) { GT *arg1 = (GT *) 0 ; std::string *arg2 = 0 ; int arg3 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(GT **)&jarg1; if(!jarg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string"); return ; } const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); if (!arg2_pstr) return ; std::string arg2_str(arg2_pstr); arg2 = &arg2_str; jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); arg3 = (int)jarg3; try { (arg1)->setStr((std::string const &)*arg2,arg3); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_GT_1setStr_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { GT *arg1 = (GT *) 0 ; std::string *arg2 = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(GT **)&jarg1; if(!jarg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string"); return ; } const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); if (!arg2_pstr) return ; std::string arg2_str(arg2_pstr); arg2 = &arg2_str; jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); try { (arg1)->setStr((std::string const &)*arg2); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } } SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_GT_1toString_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { jstring jresult = 0 ; GT *arg1 = (GT *) 0 ; int arg2 ; std::string result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(GT **)&jarg1; arg2 = (int)jarg2; try { result = ((GT const *)arg1)->toString(arg2); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; } SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_GT_1toString_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jstring jresult = 0 ; GT *arg1 = (GT *) 0 ; std::string result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(GT **)&jarg1; try { result = ((GT const *)arg1)->toString(); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_GT_1deserialize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) { GT *arg1 = (GT *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(GT **)&jarg1; { if (jarg2) { arg2 = (char *) jenv->GetByteArrayElements(jarg2, 0); arg3 = (size_t) jenv->GetArrayLength(jarg2); } else { arg2 = 0; arg3 = 0; } } try { (arg1)->deserialize((char const *)arg2,arg3); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return ; } { if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0); } } SWIGEXPORT jbyteArray JNICALL Java_com_herumi_mcl_MclJNI_GT_1serialize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jbyteArray jresult = 0 ; GT *arg1 = (GT *) 0 ; std::string *arg2 = 0 ; std::string buf2 ; (void)jenv; (void)jcls; arg2=&buf2; (void)jarg1_; arg1 = *(GT **)&jarg1; try { ((GT const *)arg1)->serialize(*arg2); } catch(std::exception &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); return 0; } { jresult = jenv->NewByteArray(arg2->size()); jenv->SetByteArrayRegion(jresult, 0, arg2->size(), (const jbyte*)arg2->c_str()); } return jresult; } SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_delete_1GT(JNIEnv *jenv, jclass jcls, jlong jarg1) { GT *arg1 = (GT *) 0 ; (void)jenv; (void)jcls; arg1 = *(GT **)&jarg1; delete arg1; } #ifdef __cplusplus } #endif