Changeset 22:5f7083ce4cf1 in rrlib_jni


Ignore:
Timestamp:
14.12.2013 01:10:16 (6 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
default
Phase:
public
Message:

Adapted to moving jni functions to rrlib_jni-java

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java_native_utility_functions_jni.cpp

    r20 r22  
    7272extern "C" 
    7373{ 
    74   JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_deleteJNIWrappable(JNIEnv* env, jclass class_, jlong pointer) 
     74  JNIEXPORT void JNICALL Java_org_rrlib_jni_JNICalls_deleteJNIWrappable(JNIEnv* env, jclass class_, jlong pointer) 
    7575  { 
    7676    rrlib::jni::tJNIWrappable* obj = (rrlib::jni::tJNIWrappable*)pointer; 
     
    7878    delete obj; 
    7979  } 
    80   JNIEXPORT jlong JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getBufferPointer(JNIEnv* env, jclass class_, jobject buf) 
     80  JNIEXPORT jlong JNICALL Java_org_rrlib_jni_JNICalls_getBufferPointer(JNIEnv* env, jclass class_, jobject buf) 
    8181  { 
    8282    return (jlong)env->GetDirectBufferAddress(buf); 
    8383  } 
    84   JNIEXPORT jbyte JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getByte(JNIEnv* env, jclass class_, jlong ptr) 
     84  JNIEXPORT jbyte JNICALL Java_org_rrlib_jni_JNICalls_getByte(JNIEnv* env, jclass class_, jlong ptr) 
    8585  { 
    8686    return *((jbyte*)ptr); 
    8787  } 
    88   JNIEXPORT jobject JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getCByteBuffer(JNIEnv* env, jclass class_, jlong ptr, jint size) 
     88  JNIEXPORT jobject JNICALL Java_org_rrlib_jni_JNICalls_getCByteBuffer(JNIEnv* env, jclass class_, jlong ptr, jint size) 
    8989  { 
    9090    jobject result; 
     
    9292    return result; 
    9393  } 
    94   JNIEXPORT jdouble JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getDouble(JNIEnv* env, jclass class_, jlong ptr) 
     94  JNIEXPORT jdouble JNICALL Java_org_rrlib_jni_JNICalls_getDouble(JNIEnv* env, jclass class_, jlong ptr) 
    9595  { 
    9696    return *((jdouble*)ptr); 
    9797  } 
    98   JNIEXPORT jfloat JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getFloat(JNIEnv* env, jclass class_, jlong ptr) 
     98  JNIEXPORT jfloat JNICALL Java_org_rrlib_jni_JNICalls_getFloat(JNIEnv* env, jclass class_, jlong ptr) 
    9999  { 
    100100    return *((jfloat*)ptr); 
    101101  } 
    102   JNIEXPORT jint JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getInt(JNIEnv* env, jclass class_, jlong ptr) 
     102  JNIEXPORT jint JNICALL Java_org_rrlib_jni_JNICalls_getInt(JNIEnv* env, jclass class_, jlong ptr) 
    103103  { 
    104104    return *((jint*)ptr); 
    105105  } 
    106   JNIEXPORT jlong JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getJavaVM(JNIEnv* env, jclass class_) 
     106  JNIEXPORT jlong JNICALL Java_org_rrlib_jni_JNICalls_getJavaVM(JNIEnv* env, jclass class_) 
    107107  { 
    108108    JavaVM* jvm = rrlib::jni::GetJavaVM(); 
     
    116116    return (jlong)jvm; 
    117117  } 
    118   JNIEXPORT jlong JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getLong(JNIEnv* env, jclass class_, jlong ptr) 
     118  JNIEXPORT jlong JNICALL Java_org_rrlib_jni_JNICalls_getLong(JNIEnv* env, jclass class_, jlong ptr) 
    119119  { 
    120120    return *((jlong*)ptr); 
    121121  } 
    122   JNIEXPORT jlong JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getPointer(JNIEnv* env, jclass class_, jlong address, jint index) 
     122  JNIEXPORT jlong JNICALL Java_org_rrlib_jni_JNICalls_getPointer(JNIEnv* env, jclass class_, jlong address, jint index) 
    123123  { 
    124124    void** array = (void**)address; 
    125125    return (jlong)array[index]; 
    126126  } 
    127   JNIEXPORT jshort JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getShort(JNIEnv* env, jclass class_, jlong ptr) 
     127  JNIEXPORT jshort JNICALL Java_org_rrlib_jni_JNICalls_getShort(JNIEnv* env, jclass class_, jlong ptr) 
    128128  { 
    129129    return *((jshort*)ptr); 
    130130  } 
    131   JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_memcpy(JNIEnv* env, jclass class_, jlong dest, jlong src, jint length) 
     131  JNIEXPORT void JNICALL Java_org_rrlib_jni_JNICalls_memcpy(JNIEnv* env, jclass class_, jlong dest, jlong src, jint length) 
    132132  { 
    133133    memcpy((void*)src, (void*)dest, (int)length); 
    134134  } 
    135   JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_setByte(JNIEnv* env, jclass class_, jlong ptr, jbyte val) 
     135  JNIEXPORT void JNICALL Java_org_rrlib_jni_JNICalls_setByte(JNIEnv* env, jclass class_, jlong ptr, jbyte val) 
    136136  { 
    137137    *((jbyte*)ptr) = val; 
    138138  } 
    139   JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_setDouble(JNIEnv* env, jclass class_, jlong ptr, jdouble val) 
     139  JNIEXPORT void JNICALL Java_org_rrlib_jni_JNICalls_setDouble(JNIEnv* env, jclass class_, jlong ptr, jdouble val) 
    140140  { 
    141141    *((jdouble*)ptr) = val; 
    142142  } 
    143   JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_setFloat(JNIEnv* env, jclass class_, jlong ptr, jfloat val) 
     143  JNIEXPORT void JNICALL Java_org_rrlib_jni_JNICalls_setFloat(JNIEnv* env, jclass class_, jlong ptr, jfloat val) 
    144144  { 
    145145    *((jfloat*)ptr) = val; 
    146146  } 
    147   JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_setInt(JNIEnv* env, jclass class_, jlong ptr, jint val) 
     147  JNIEXPORT void JNICALL Java_org_rrlib_jni_JNICalls_setInt(JNIEnv* env, jclass class_, jlong ptr, jint val) 
    148148  { 
    149149    *((jint*)ptr) = val; 
    150150  } 
    151   JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_setJavaObject(JNIEnv* env, jclass class_, jlong pointer, jobject object, jboolean java_responsible) 
     151  JNIEXPORT void JNICALL Java_org_rrlib_jni_JNICalls_setJavaObject(JNIEnv* env, jclass class_, jlong pointer, jobject object, jboolean java_responsible) 
    152152  { 
    153153    rrlib::jni::tJNIWrappable* obj = (rrlib::jni::tJNIWrappable*)pointer; 
    154154    obj->SetJavaWrapper(object, !java_responsible); 
    155155  } 
    156   JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_setLong(JNIEnv* env, jclass class_, jlong ptr, jlong val) 
     156  JNIEXPORT void JNICALL Java_org_rrlib_jni_JNICalls_setLong(JNIEnv* env, jclass class_, jlong ptr, jlong val) 
    157157  { 
    158158    *((jlong*)ptr) = val; 
    159159  } 
    160   JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_setPointer(JNIEnv* env, jclass class_, jlong arraypointer, jint index, jlong pointer) 
     160  JNIEXPORT void JNICALL Java_org_rrlib_jni_JNICalls_setPointer(JNIEnv* env, jclass class_, jlong arraypointer, jint index, jlong pointer) 
    161161  { 
    162162    void** array = (void**)arraypointer; 
    163163    array[index] = (void*)pointer; 
    164164  } 
    165   JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_setShort(JNIEnv* env, jclass class_, jlong ptr, jshort val) 
     165  JNIEXPORT void JNICALL Java_org_rrlib_jni_JNICalls_setShort(JNIEnv* env, jclass class_, jlong ptr, jshort val) 
    166166  { 
    167167    *((jshort*)ptr) = val; 
    168168  } 
    169   JNIEXPORT jint JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_sizeOfPointer(JNIEnv* env, jclass class_) 
     169  JNIEXPORT jint JNICALL Java_org_rrlib_jni_JNICalls_sizeOfPointer(JNIEnv* env, jclass class_) 
    170170  { 
    171171    return sizeof(void*); 
    172172  } 
    173   JNIEXPORT jint JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_strlen(JNIEnv* env, jclass class_, jlong ptr) 
     173  JNIEXPORT jint JNICALL Java_org_rrlib_jni_JNICalls_strlen(JNIEnv* env, jclass class_, jlong ptr) 
    174174  { 
    175175    return strlen((char*)ptr); 
    176176  } 
    177   JNIEXPORT jstring JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_toString(JNIEnv* env, jclass class_, jlong pointer) 
     177  JNIEXPORT jstring JNICALL Java_org_rrlib_jni_JNICalls_toString(JNIEnv* env, jclass class_, jlong pointer) 
    178178  { 
    179179    jstring result; 
Note: See TracChangeset for help on using the changeset viewer.