Files
upm/build/src/apa102/CMakeFiles/javaupm_apa102.dir/apa102JAVA_wrap.cxx

1643 lines
48 KiB
C++

/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.4.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
#define SWIG_VERSION 0x040401
#define SWIGJAVA
/* -----------------------------------------------------------------------------
* 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
#if defined(__cplusplus) && __cplusplus >=201103L
# define SWIG_NOEXCEPT noexcept
#else
# define SWIG_NOEXCEPT throw()
#endif
/* -----------------------------------------------------------------------------
* swigcompat.swg
*
* Macros to provide support compatibility with older C and C++ standards.
*
* Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard.
* MSVC users are urged to check and examine the /Zc:__cplusplus compiler option.
* See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus.
* ----------------------------------------------------------------------------- */
/* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF
* if you're missing it.
*/
#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \
(defined __cplusplus && __cplusplus >= 201103L) || \
defined SWIG_HAVE_SNPRINTF) && \
!defined SWIG_NO_SNPRINTF
# define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A)
# define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B)
#else
/* Fallback versions ignore the buffer size, but most of our uses either have a
* fixed maximum possible size or dynamically allocate a buffer that's large
* enough.
*/
# define SWIG_snprintf(O,S,F,A) sprintf(O,F,A)
# define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B)
#endif
#include <jni.h>
#include <stdlib.h>
#include <string.h>
/* 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_JavaIllegalStateException,
} 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_JavaIllegalStateException, "java/lang/IllegalStateException" },
{ (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) do { if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } } while (0)
/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
#define SWIG_UnknownError -1
#define SWIG_IOError -2
#define SWIG_RuntimeError -3
#define SWIG_IndexError -4
#define SWIG_TypeError -5
#define SWIG_DivisionByZero -6
#define SWIG_OverflowError -7
#define SWIG_SyntaxError -8
#define SWIG_ValueError -9
#define SWIG_SystemError -10
#define SWIG_AttributeError -11
#define SWIG_MemoryError -12
#define SWIG_NullReferenceError -13
#ifdef __cplusplus
#include <utility>
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
struct SwigSmartPointer {
T *ptr;
SwigSmartPointer(T *p) : ptr(p) { }
~SwigSmartPointer() { delete ptr; }
SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
void reset(T *p) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = p; }
} pointer;
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
SwigValueWrapper(const SwigValueWrapper<T>& rhs);
public:
SwigValueWrapper() : pointer(0) { }
SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; }
#if __cplusplus >=201103L
SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; }
operator T&&() const { return std::move(*pointer.ptr); }
#else
operator T&() const { return *pointer.ptr; }
#endif
T *operator&() const { return pointer.ptr; }
static void reset(SwigValueWrapper& t, T *p) { t.pointer.reset(p); }
};
/*
* SwigValueInit() is a generic initialisation solution as the following approach:
*
* T c_result = T();
*
* doesn't compile for all types for example:
*
* unsigned int c_result = unsigned int();
*/
template <typename T> T SwigValueInit() {
return T();
}
#if __cplusplus >=201103L
# define SWIG_STD_MOVE(OBJ) std::move(OBJ)
#else
# define SWIG_STD_MOVE(OBJ) OBJ
#endif
#endif
#if defined(__cplusplus) && (__cplusplus >=201103L)
# define SWIG_OVERRIDE override
#else
# define SWIG_OVERRIDE
#endif
#include <string>
#include <stdint.h> // Use the C99 official header
#include <stdexcept>
SWIGINTERN void SWIG_JavaException(JNIEnv *jenv, int code, const char *msg) {
SWIG_JavaExceptionCodes exception_code = SWIG_JavaUnknownError;
switch(code) {
case SWIG_MemoryError:
exception_code = SWIG_JavaOutOfMemoryError;
break;
case SWIG_IOError:
exception_code = SWIG_JavaIOException;
break;
case SWIG_SystemError:
case SWIG_RuntimeError:
exception_code = SWIG_JavaRuntimeException;
break;
case SWIG_OverflowError:
case SWIG_IndexError:
exception_code = SWIG_JavaIndexOutOfBoundsException;
break;
case SWIG_DivisionByZero:
exception_code = SWIG_JavaArithmeticException;
break;
case SWIG_SyntaxError:
case SWIG_ValueError:
case SWIG_TypeError:
exception_code = SWIG_JavaIllegalArgumentException;
break;
case SWIG_NullReferenceError:
exception_code = SWIG_JavaNullPointerException;
break;
case SWIG_UnknownError:
default:
exception_code = SWIG_JavaUnknownError;
break;
}
SWIG_JavaThrowException(jenv, exception_code, msg);
}
#include <typeinfo>
#include <stdexcept>
#include "version.hpp"
#include "apa102.hpp"
#ifdef __cplusplus
extern "C" {
#endif
SWIGEXPORT jstring JNICALL Java_upm_1apa102_javaupm_1apa102JNI_getVersion(JNIEnv *jenv, jclass jcls) {
jstring jresult = 0 ;
std::string result;
(void)jenv;
(void)jcls;
{
try {
result = getVersion();
} catch (std::invalid_argument& e) {
std::string s1("UPM Invalid Argument: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0;
};
} catch (std::domain_error& e) {
std::string s1("UPM Domain Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0;
};
} catch (std::overflow_error& e) {
std::string s1("UPM Overflow Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0;
};
} catch (std::out_of_range& e) {
std::string s1("UPM Out of Range: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0;
};
} catch (std::length_error& e) {
std::string s1("UPM Length Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0;
};
} catch (std::logic_error& e) {
std::string s1("UPM Logic Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0;
};
} catch (std::bad_alloc& e) {
/* for an allocation exception, don't try to create a string... */
{
SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0;
};
} catch (std::runtime_error& e) {
/* catch other std::runtime_error exceptions here */
std::string s1("UPM Runtime Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0;
};
} catch (std::exception& e) {
/* catch other std::exceptions here */
std::string s1("UPM Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0;
};
} catch (...) {
/* catch everything else */
{
SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0;
};
}
}
jresult = jenv->NewStringUTF((&result)->c_str());
return jresult;
}
SWIGEXPORT jint JNICALL Java_upm_1apa102_javaupm_1apa102JNI_HIGH_1get(JNIEnv *jenv, jclass jcls) {
jint jresult = 0 ;
int result;
(void)jenv;
(void)jcls;
result = (int)(1);
jresult = (jint)result;
return jresult;
}
SWIGEXPORT jint JNICALL Java_upm_1apa102_javaupm_1apa102JNI_LOW_1get(JNIEnv *jenv, jclass jcls) {
jint jresult = 0 ;
int result;
(void)jenv;
(void)jcls;
result = (int)(0);
jresult = (jint)result;
return jresult;
}
SWIGEXPORT jlong JNICALL Java_upm_1apa102_javaupm_1apa102JNI_new_1APA102_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jint jarg1, jshort jarg2, jboolean jarg3, jbyte jarg4) {
jlong jresult = 0 ;
uint16_t arg1 ;
uint8_t arg2 ;
bool arg3 ;
int8_t arg4 ;
upm::APA102 *result = 0 ;
(void)jenv;
(void)jcls;
arg1 = (uint16_t)jarg1;
arg2 = (uint8_t)jarg2;
arg3 = jarg3 ? true : false;
arg4 = (int8_t)jarg4;
{
try {
result = (upm::APA102 *)new upm::APA102(arg1,arg2,arg3,arg4);
} catch (std::invalid_argument& e) {
std::string s1("UPM Invalid Argument: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0;
};
} catch (std::domain_error& e) {
std::string s1("UPM Domain Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0;
};
} catch (std::overflow_error& e) {
std::string s1("UPM Overflow Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0;
};
} catch (std::out_of_range& e) {
std::string s1("UPM Out of Range: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0;
};
} catch (std::length_error& e) {
std::string s1("UPM Length Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0;
};
} catch (std::logic_error& e) {
std::string s1("UPM Logic Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0;
};
} catch (std::bad_alloc& e) {
/* for an allocation exception, don't try to create a string... */
{
SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0;
};
} catch (std::runtime_error& e) {
/* catch other std::runtime_error exceptions here */
std::string s1("UPM Runtime Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0;
};
} catch (std::exception& e) {
/* catch other std::exceptions here */
std::string s1("UPM Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0;
};
} catch (...) {
/* catch everything else */
{
SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0;
};
}
}
*(upm::APA102 **)&jresult = result;
return jresult;
}
SWIGEXPORT jlong JNICALL Java_upm_1apa102_javaupm_1apa102JNI_new_1APA102_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jint jarg1, jshort jarg2, jboolean jarg3) {
jlong jresult = 0 ;
uint16_t arg1 ;
uint8_t arg2 ;
bool arg3 ;
upm::APA102 *result = 0 ;
(void)jenv;
(void)jcls;
arg1 = (uint16_t)jarg1;
arg2 = (uint8_t)jarg2;
arg3 = jarg3 ? true : false;
{
try {
result = (upm::APA102 *)new upm::APA102(arg1,arg2,arg3);
} catch (std::invalid_argument& e) {
std::string s1("UPM Invalid Argument: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0;
};
} catch (std::domain_error& e) {
std::string s1("UPM Domain Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0;
};
} catch (std::overflow_error& e) {
std::string s1("UPM Overflow Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0;
};
} catch (std::out_of_range& e) {
std::string s1("UPM Out of Range: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0;
};
} catch (std::length_error& e) {
std::string s1("UPM Length Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0;
};
} catch (std::logic_error& e) {
std::string s1("UPM Logic Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0;
};
} catch (std::bad_alloc& e) {
/* for an allocation exception, don't try to create a string... */
{
SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0;
};
} catch (std::runtime_error& e) {
/* catch other std::runtime_error exceptions here */
std::string s1("UPM Runtime Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0;
};
} catch (std::exception& e) {
/* catch other std::exceptions here */
std::string s1("UPM Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0;
};
} catch (...) {
/* catch everything else */
{
SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0;
};
}
}
*(upm::APA102 **)&jresult = result;
return jresult;
}
SWIGEXPORT jlong JNICALL Java_upm_1apa102_javaupm_1apa102JNI_new_1APA102_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jint jarg1, jshort jarg2) {
jlong jresult = 0 ;
uint16_t arg1 ;
uint8_t arg2 ;
upm::APA102 *result = 0 ;
(void)jenv;
(void)jcls;
arg1 = (uint16_t)jarg1;
arg2 = (uint8_t)jarg2;
{
try {
result = (upm::APA102 *)new upm::APA102(arg1,arg2);
} catch (std::invalid_argument& e) {
std::string s1("UPM Invalid Argument: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0;
};
} catch (std::domain_error& e) {
std::string s1("UPM Domain Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0;
};
} catch (std::overflow_error& e) {
std::string s1("UPM Overflow Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0;
};
} catch (std::out_of_range& e) {
std::string s1("UPM Out of Range: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0;
};
} catch (std::length_error& e) {
std::string s1("UPM Length Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0;
};
} catch (std::logic_error& e) {
std::string s1("UPM Logic Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0;
};
} catch (std::bad_alloc& e) {
/* for an allocation exception, don't try to create a string... */
{
SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0;
};
} catch (std::runtime_error& e) {
/* catch other std::runtime_error exceptions here */
std::string s1("UPM Runtime Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0;
};
} catch (std::exception& e) {
/* catch other std::exceptions here */
std::string s1("UPM Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0;
};
} catch (...) {
/* catch everything else */
{
SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0;
};
}
}
*(upm::APA102 **)&jresult = result;
return jresult;
}
SWIGEXPORT jlong JNICALL Java_upm_1apa102_javaupm_1apa102JNI_new_1APA102_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jstring jarg1) {
jlong jresult = 0 ;
std::string arg1 ;
upm::APA102 *result = 0 ;
(void)jenv;
(void)jcls;
if(!jarg1) {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
return 0;
}
const char *arg1_pstr = jenv->GetStringUTFChars(jarg1, 0);
if (!arg1_pstr) return 0;
(&arg1)->assign(arg1_pstr);
jenv->ReleaseStringUTFChars(jarg1, arg1_pstr);
{
try {
result = (upm::APA102 *)new upm::APA102(SWIG_STD_MOVE(arg1));
} catch (std::invalid_argument& e) {
std::string s1("UPM Invalid Argument: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0;
};
} catch (std::domain_error& e) {
std::string s1("UPM Domain Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return 0;
};
} catch (std::overflow_error& e) {
std::string s1("UPM Overflow Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return 0;
};
} catch (std::out_of_range& e) {
std::string s1("UPM Out of Range: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0;
};
} catch (std::length_error& e) {
std::string s1("UPM Length Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return 0;
};
} catch (std::logic_error& e) {
std::string s1("UPM Logic Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0;
};
} catch (std::bad_alloc& e) {
/* for an allocation exception, don't try to create a string... */
{
SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return 0;
};
} catch (std::runtime_error& e) {
/* catch other std::runtime_error exceptions here */
std::string s1("UPM Runtime Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return 0;
};
} catch (std::exception& e) {
/* catch other std::exceptions here */
std::string s1("UPM Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return 0;
};
} catch (...) {
/* catch everything else */
{
SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return 0;
};
}
}
*(upm::APA102 **)&jresult = result;
return jresult;
}
SWIGEXPORT void JNICALL Java_upm_1apa102_javaupm_1apa102JNI_delete_1APA102(JNIEnv *jenv, jclass jcls, jlong jarg1) {
upm::APA102 *arg1 = 0 ;
(void)jenv;
(void)jcls;
arg1 = *(upm::APA102 **)&jarg1;
{
try {
delete arg1;
} catch (std::invalid_argument& e) {
std::string s1("UPM Invalid Argument: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ;
};
} catch (std::domain_error& e) {
std::string s1("UPM Domain Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ;
};
} catch (std::overflow_error& e) {
std::string s1("UPM Overflow Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ;
};
} catch (std::out_of_range& e) {
std::string s1("UPM Out of Range: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ;
};
} catch (std::length_error& e) {
std::string s1("UPM Length Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ;
};
} catch (std::logic_error& e) {
std::string s1("UPM Logic Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ;
};
} catch (std::bad_alloc& e) {
/* for an allocation exception, don't try to create a string... */
{
SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ;
};
} catch (std::runtime_error& e) {
/* catch other std::runtime_error exceptions here */
std::string s1("UPM Runtime Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ;
};
} catch (std::exception& e) {
/* catch other std::exceptions here */
std::string s1("UPM Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ;
};
} catch (...) {
/* catch everything else */
{
SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ;
};
}
}
}
SWIGEXPORT void JNICALL Java_upm_1apa102_javaupm_1apa102JNI_APA102_1setLed(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jshort jarg3, jshort jarg4, jshort jarg5, jshort jarg6) {
upm::APA102 *arg1 = 0 ;
uint16_t arg2 ;
uint8_t arg3 ;
uint8_t arg4 ;
uint8_t arg5 ;
uint8_t arg6 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(upm::APA102 **)&jarg1;
arg2 = (uint16_t)jarg2;
arg3 = (uint8_t)jarg3;
arg4 = (uint8_t)jarg4;
arg5 = (uint8_t)jarg5;
arg6 = (uint8_t)jarg6;
{
try {
(arg1)->setLed(arg2,arg3,arg4,arg5,arg6);
} catch (std::invalid_argument& e) {
std::string s1("UPM Invalid Argument: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ;
};
} catch (std::domain_error& e) {
std::string s1("UPM Domain Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ;
};
} catch (std::overflow_error& e) {
std::string s1("UPM Overflow Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ;
};
} catch (std::out_of_range& e) {
std::string s1("UPM Out of Range: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ;
};
} catch (std::length_error& e) {
std::string s1("UPM Length Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ;
};
} catch (std::logic_error& e) {
std::string s1("UPM Logic Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ;
};
} catch (std::bad_alloc& e) {
/* for an allocation exception, don't try to create a string... */
{
SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ;
};
} catch (std::runtime_error& e) {
/* catch other std::runtime_error exceptions here */
std::string s1("UPM Runtime Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ;
};
} catch (std::exception& e) {
/* catch other std::exceptions here */
std::string s1("UPM Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ;
};
} catch (...) {
/* catch everything else */
{
SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ;
};
}
}
}
SWIGEXPORT void JNICALL Java_upm_1apa102_javaupm_1apa102JNI_APA102_1setLedBrightness(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jshort jarg3) {
upm::APA102 *arg1 = 0 ;
uint16_t arg2 ;
uint8_t arg3 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(upm::APA102 **)&jarg1;
arg2 = (uint16_t)jarg2;
arg3 = (uint8_t)jarg3;
{
try {
(arg1)->setLedBrightness(arg2,arg3);
} catch (std::invalid_argument& e) {
std::string s1("UPM Invalid Argument: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ;
};
} catch (std::domain_error& e) {
std::string s1("UPM Domain Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ;
};
} catch (std::overflow_error& e) {
std::string s1("UPM Overflow Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ;
};
} catch (std::out_of_range& e) {
std::string s1("UPM Out of Range: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ;
};
} catch (std::length_error& e) {
std::string s1("UPM Length Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ;
};
} catch (std::logic_error& e) {
std::string s1("UPM Logic Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ;
};
} catch (std::bad_alloc& e) {
/* for an allocation exception, don't try to create a string... */
{
SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ;
};
} catch (std::runtime_error& e) {
/* catch other std::runtime_error exceptions here */
std::string s1("UPM Runtime Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ;
};
} catch (std::exception& e) {
/* catch other std::exceptions here */
std::string s1("UPM Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ;
};
} catch (...) {
/* catch everything else */
{
SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ;
};
}
}
}
SWIGEXPORT void JNICALL Java_upm_1apa102_javaupm_1apa102JNI_APA102_1setAllLeds(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jshort jarg2, jshort jarg3, jshort jarg4, jshort jarg5) {
upm::APA102 *arg1 = 0 ;
uint8_t arg2 ;
uint8_t arg3 ;
uint8_t arg4 ;
uint8_t arg5 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(upm::APA102 **)&jarg1;
arg2 = (uint8_t)jarg2;
arg3 = (uint8_t)jarg3;
arg4 = (uint8_t)jarg4;
arg5 = (uint8_t)jarg5;
{
try {
(arg1)->setAllLeds(arg2,arg3,arg4,arg5);
} catch (std::invalid_argument& e) {
std::string s1("UPM Invalid Argument: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ;
};
} catch (std::domain_error& e) {
std::string s1("UPM Domain Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ;
};
} catch (std::overflow_error& e) {
std::string s1("UPM Overflow Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ;
};
} catch (std::out_of_range& e) {
std::string s1("UPM Out of Range: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ;
};
} catch (std::length_error& e) {
std::string s1("UPM Length Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ;
};
} catch (std::logic_error& e) {
std::string s1("UPM Logic Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ;
};
} catch (std::bad_alloc& e) {
/* for an allocation exception, don't try to create a string... */
{
SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ;
};
} catch (std::runtime_error& e) {
/* catch other std::runtime_error exceptions here */
std::string s1("UPM Runtime Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ;
};
} catch (std::exception& e) {
/* catch other std::exceptions here */
std::string s1("UPM Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ;
};
} catch (...) {
/* catch everything else */
{
SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ;
};
}
}
}
SWIGEXPORT void JNICALL Java_upm_1apa102_javaupm_1apa102JNI_APA102_1setLeds_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jshort jarg4, jshort jarg5, jshort jarg6, jshort jarg7) {
upm::APA102 *arg1 = 0 ;
uint16_t arg2 ;
uint16_t arg3 ;
uint8_t arg4 ;
uint8_t arg5 ;
uint8_t arg6 ;
uint8_t arg7 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(upm::APA102 **)&jarg1;
arg2 = (uint16_t)jarg2;
arg3 = (uint16_t)jarg3;
arg4 = (uint8_t)jarg4;
arg5 = (uint8_t)jarg5;
arg6 = (uint8_t)jarg6;
arg7 = (uint8_t)jarg7;
{
try {
(arg1)->setLeds(arg2,arg3,arg4,arg5,arg6,arg7);
} catch (std::invalid_argument& e) {
std::string s1("UPM Invalid Argument: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ;
};
} catch (std::domain_error& e) {
std::string s1("UPM Domain Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ;
};
} catch (std::overflow_error& e) {
std::string s1("UPM Overflow Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ;
};
} catch (std::out_of_range& e) {
std::string s1("UPM Out of Range: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ;
};
} catch (std::length_error& e) {
std::string s1("UPM Length Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ;
};
} catch (std::logic_error& e) {
std::string s1("UPM Logic Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ;
};
} catch (std::bad_alloc& e) {
/* for an allocation exception, don't try to create a string... */
{
SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ;
};
} catch (std::runtime_error& e) {
/* catch other std::runtime_error exceptions here */
std::string s1("UPM Runtime Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ;
};
} catch (std::exception& e) {
/* catch other std::exceptions here */
std::string s1("UPM Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ;
};
} catch (...) {
/* catch everything else */
{
SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ;
};
}
}
}
SWIGEXPORT void JNICALL Java_upm_1apa102_javaupm_1apa102JNI_APA102_1setLedsBrightness(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jshort jarg4) {
upm::APA102 *arg1 = 0 ;
uint16_t arg2 ;
uint16_t arg3 ;
uint8_t arg4 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(upm::APA102 **)&jarg1;
arg2 = (uint16_t)jarg2;
arg3 = (uint16_t)jarg3;
arg4 = (uint8_t)jarg4;
{
try {
(arg1)->setLedsBrightness(arg2,arg3,arg4);
} catch (std::invalid_argument& e) {
std::string s1("UPM Invalid Argument: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ;
};
} catch (std::domain_error& e) {
std::string s1("UPM Domain Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ;
};
} catch (std::overflow_error& e) {
std::string s1("UPM Overflow Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ;
};
} catch (std::out_of_range& e) {
std::string s1("UPM Out of Range: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ;
};
} catch (std::length_error& e) {
std::string s1("UPM Length Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ;
};
} catch (std::logic_error& e) {
std::string s1("UPM Logic Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ;
};
} catch (std::bad_alloc& e) {
/* for an allocation exception, don't try to create a string... */
{
SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ;
};
} catch (std::runtime_error& e) {
/* catch other std::runtime_error exceptions here */
std::string s1("UPM Runtime Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ;
};
} catch (std::exception& e) {
/* catch other std::exceptions here */
std::string s1("UPM Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ;
};
} catch (...) {
/* catch everything else */
{
SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ;
};
}
}
}
SWIGEXPORT void JNICALL Java_upm_1apa102_javaupm_1apa102JNI_APA102_1setLeds_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jbyteArray jarg4) {
upm::APA102 *arg1 = 0 ;
uint16_t arg2 ;
uint16_t arg3 ;
uint8_t *arg4 = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(upm::APA102 **)&jarg1;
arg2 = (uint16_t)jarg2;
arg3 = (uint16_t)jarg3;
{
arg4 = (uint8_t*)jenv->GetByteArrayElements(jarg4, NULL);
}
{
try {
(arg1)->setLeds(arg2,arg3,arg4);
} catch (std::invalid_argument& e) {
std::string s1("UPM Invalid Argument: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ;
};
} catch (std::domain_error& e) {
std::string s1("UPM Domain Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ;
};
} catch (std::overflow_error& e) {
std::string s1("UPM Overflow Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ;
};
} catch (std::out_of_range& e) {
std::string s1("UPM Out of Range: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ;
};
} catch (std::length_error& e) {
std::string s1("UPM Length Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ;
};
} catch (std::logic_error& e) {
std::string s1("UPM Logic Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ;
};
} catch (std::bad_alloc& e) {
/* for an allocation exception, don't try to create a string... */
{
SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ;
};
} catch (std::runtime_error& e) {
/* catch other std::runtime_error exceptions here */
std::string s1("UPM Runtime Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ;
};
} catch (std::exception& e) {
/* catch other std::exceptions here */
std::string s1("UPM Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ;
};
} catch (...) {
/* catch everything else */
{
SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ;
};
}
}
}
SWIGEXPORT void JNICALL Java_upm_1apa102_javaupm_1apa102JNI_APA102_1setBusSpeed(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
upm::APA102 *arg1 = 0 ;
int arg2 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(upm::APA102 **)&jarg1;
arg2 = (int)jarg2;
{
try {
(arg1)->setBusSpeed(arg2);
} catch (std::invalid_argument& e) {
std::string s1("UPM Invalid Argument: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ;
};
} catch (std::domain_error& e) {
std::string s1("UPM Domain Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ;
};
} catch (std::overflow_error& e) {
std::string s1("UPM Overflow Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ;
};
} catch (std::out_of_range& e) {
std::string s1("UPM Out of Range: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ;
};
} catch (std::length_error& e) {
std::string s1("UPM Length Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ;
};
} catch (std::logic_error& e) {
std::string s1("UPM Logic Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ;
};
} catch (std::bad_alloc& e) {
/* for an allocation exception, don't try to create a string... */
{
SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ;
};
} catch (std::runtime_error& e) {
/* catch other std::runtime_error exceptions here */
std::string s1("UPM Runtime Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ;
};
} catch (std::exception& e) {
/* catch other std::exceptions here */
std::string s1("UPM Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ;
};
} catch (...) {
/* catch everything else */
{
SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ;
};
}
}
}
SWIGEXPORT void JNICALL Java_upm_1apa102_javaupm_1apa102JNI_APA102_1pushState(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
upm::APA102 *arg1 = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(upm::APA102 **)&jarg1;
{
try {
(arg1)->pushState();
} catch (std::invalid_argument& e) {
std::string s1("UPM Invalid Argument: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ;
};
} catch (std::domain_error& e) {
std::string s1("UPM Domain Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_ValueError, s1.c_str()); return ;
};
} catch (std::overflow_error& e) {
std::string s1("UPM Overflow Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_OverflowError, s1.c_str()); return ;
};
} catch (std::out_of_range& e) {
std::string s1("UPM Out of Range: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ;
};
} catch (std::length_error& e) {
std::string s1("UPM Length Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_IndexError, s1.c_str()); return ;
};
} catch (std::logic_error& e) {
std::string s1("UPM Logic Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ;
};
} catch (std::bad_alloc& e) {
/* for an allocation exception, don't try to create a string... */
{
SWIG_JavaException(jenv, SWIG_MemoryError, e.what()); return ;
};
} catch (std::runtime_error& e) {
/* catch other std::runtime_error exceptions here */
std::string s1("UPM Runtime Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_RuntimeError, s1.c_str()); return ;
};
} catch (std::exception& e) {
/* catch other std::exceptions here */
std::string s1("UPM Error: "), s2(e.what());
s1 = s1 + s2;
{
SWIG_JavaException(jenv, SWIG_SystemError, s1.c_str()); return ;
};
} catch (...) {
/* catch everything else */
{
SWIG_JavaException(jenv, SWIG_UnknownError, "UPM Unknown exception"); return ;
};
}
}
}
#ifdef __cplusplus
}
#endif