/* * Class: hdf_hdf5lib_H5 * Method: H5Aget_info_by_name * Signature: (JLjava/lang/String;Ljava/lang/String;J)Lhdf/hdf5lib/structs/H5A_info_t; */ JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Aget_1info_1by_1name (JNIEnv *env, jclass clss, jlong loc_id, jstring obj_name, jstring attr_name, jlong lapl_id) { const char *aName; const char *attrName; herr_t status; H5A_info_t ainfo; jvalue args[4]; jobject ret_obj = NULL; PIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName); if (aName != NULL && attrName != NULL) { status = H5Aget_info_by_name((hid_t)loc_id, aName, attrName, &ainfo, (hid_t)lapl_id); UNPIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName); if (status < 0) { h5libraryError(env); } /* end if */ else { args[0].z = ainfo.corder_valid; args[1].j = ainfo.corder; args[2].i = ainfo.cset; args[3].j = (jlong)ainfo.data_size; CALL_CONSTRUCTOR("hdf/hdf5lib/structs/H5A_info_t", "(ZJIJ)V", args); } /* end else */ } return ret_obj; } /* end Java_hdf_hdf5lib_H5_H5Aget_1info_1by_1name */
/* * Class: hdf_hdf5lib_H5 * Method: H5Ocopy * Signature: (JLjava/lang/String;JLjava/lang/String;JJ)V */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Ocopy (JNIEnv *env, jclass clss, jlong cur_loc_id, jstring cur_name, jlong dst_loc_id, jstring dst_name, jlong create_id, jlong access_id) { herr_t status = -1; const char *lCurName; const char *lDstName; PIN_JAVA_STRING_TWO(cur_name, lCurName, dst_name, lDstName); if (lCurName != NULL && lDstName != NULL) { status = H5Ocopy((hid_t)cur_loc_id, lCurName, (hid_t)dst_loc_id, lDstName, (hid_t)create_id, (hid_t)access_id); UNPIN_JAVA_STRING_TWO(cur_name, lCurName, dst_name, lDstName); if (status < 0) h5libraryError(env); } } /* end Java_hdf_hdf5lib_H5_H5Ocopy */
/* * Class: hdf_hdf5lib_H5 * Method: H5Adelete_by_name * Signature: (JLjava/lang/String;Ljava/lang/String;J)I */ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Adelete_1by_1name (JNIEnv *env, jclass clss, jlong loc_id, jstring obj_name, jstring attr_name, jlong lapl_id) { herr_t retVal = -1; const char *aName; const char *attrName; PIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName); if (aName != NULL && attrName != NULL) { retVal = H5Adelete_by_name((hid_t)loc_id, aName, attrName, (hid_t)lapl_id); UNPIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName); if (retVal < 0) h5libraryError(env); } return (jint)retVal; } /* end Java_hdf_hdf5lib_H5_H5Adelete_1by_1name */
/* * Class: hdf_hdf5lib_H5 * Method: H5Arename * Signature: (JLjava/lang/String;Ljava/lang/String)I */ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Arename (JNIEnv *env, jclass clss, jlong loc_id, jstring old_attr_name, jstring new_attr_name) { herr_t retVal = -1; const char *oName; const char *nName; PIN_JAVA_STRING_TWO(old_attr_name, oName, new_attr_name, nName); if (oName != NULL && nName != NULL) { retVal = H5Arename((hid_t)loc_id, oName, nName); UNPIN_JAVA_STRING_TWO(old_attr_name, oName, new_attr_name, nName); if (retVal < 0) h5libraryError(env); } return (jint)retVal; } /* end Java_hdf_hdf5lib_H5_H5Arename */
/* * Class: hdf_hdf5lib_H5 * Method: _H5Aopen_by_name * Signature: (JLjava/lang/String;Ljava/lang/String;JJ)J */ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Aopen_1by_1name (JNIEnv *env, jclass clss, jlong loc_id, jstring obj_name, jstring attr_name, jlong aapl_id, jlong lapl_id) { hid_t status = -1; const char *aName; const char *oName; PIN_JAVA_STRING_TWO(obj_name, oName, attr_name, aName); if (oName != NULL && aName != NULL) { status = H5Aopen_by_name((hid_t)loc_id, oName, aName, (hid_t)aapl_id, (hid_t)lapl_id); UNPIN_JAVA_STRING_TWO(obj_name, oName, attr_name, aName); if (status < 0) h5libraryError(env); } return (jlong)status; } /* end Java_hdf_hdf5lib_H5__1H5Aopen_1by_1name */
/* * Class: hdf_hdf5lib_H5 * Method: _H5Acreate_by_name * Signature: (JLjava/lang/String;Ljava/lang/String;JJJJJ)J */ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Acreate_1by_1name (JNIEnv *env, jclass clss, jlong loc_id, jstring obj_name, jstring attr_name, jlong type_id, jlong space_id, jlong acpl_id, jlong aapl_id, jlong lapl_id) { hid_t retVal = -1; const char *aName; const char *attrName; PIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName); if (aName != NULL && attrName != NULL) { retVal = H5Acreate_by_name((hid_t)loc_id, aName, attrName, (hid_t)type_id, (hid_t)space_id, (hid_t)acpl_id, (hid_t)aapl_id, (hid_t)lapl_id); UNPIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName); if (retVal < 0) h5libraryError(env); } return (jlong)retVal; } /* end Java_hdf_hdf5lib_H5__1H5Acreate_1by_1name */
/* * Class: hdf_hdf5lib_H5 * Method: H5Aexists_by_name * Signature: (JLjava/lang/String;Ljava/lang/String;J)Z */ JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5Aexists_1by_1name (JNIEnv *env, jclass clss, jlong loc_id, jstring obj_name, jstring attr_name, jlong lapl_id) { htri_t bval = JNI_FALSE; const char *aName; const char *attrName; PIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName); if (aName != NULL && attrName != NULL) { bval = H5Aexists_by_name((hid_t)loc_id, aName, attrName, (hid_t)lapl_id); UNPIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName); if (bval > 0) bval = JNI_TRUE; else if (bval < 0) h5libraryError(env); } return (jboolean)bval; } /* end Java_hdf_hdf5lib_H5_H5Aexists_1by_1name */
JNIEXPORT jboolean JNICALL Java_hdf_hdflib_HDFLibrary_Vsetattr__JLjava_lang_String_2JILjava_lang_String_2 (JNIEnv *env, jclass clss, jlong gr_id, jstring attr_name, jlong data_type, jint count, jstring values) { intn rval; const char *str; const char *val; PIN_JAVA_STRING_TWO(attr_name, str, values, val); if (str != NULL && val != NULL) { rval = Vsetattr((int32) gr_id, (char *)str, (int32) data_type, (int32) count, (VOIDP) val); if (rval == FAIL) CALL_ERROR_CHECK(); UNPIN_JAVA_STRING_TWO(attr_name, str, values, val); } return JNI_TRUE; }