From 3ba3c59a7d2731d9207d3492ebcdaef3a249b46b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 24 Jan 2019 15:57:05 -0600 Subject: Java html fix and cmake update --- config/cmake_ext_mod/HDFMacros.cmake | 6 +- java/src/hdf/hdf5lib/H5.java | 131 +++++++++++++++++++---------------- java/src/hdf/overview.html | 3 +- 3 files changed, 74 insertions(+), 66 deletions(-) diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 147ae2f..77980c0 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -170,7 +170,7 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion) if (${importtype} MATCHES "IMPORT") set (importprefix "${CMAKE_STATIC_LIBRARY_PREFIX}") endif () - if (${CMAKE_BUILD_TYPE} MATCHES "Debug") + if (${HDF_CFG_NAME} MATCHES "Debug") set (IMPORT_LIB_NAME ${LIB_DEBUG_NAME}) else () set (IMPORT_LIB_NAME ${LIB_RELEASE_NAME}) @@ -273,7 +273,7 @@ macro (HDF_README_PROPERTIES target_fortran) set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2015") else () set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2017") - endif () + endif () else () set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}") endif () @@ -397,7 +397,7 @@ macro (HDF_DIR_PATHS package_prefix) ) get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_BUILD_TYPE}) set (CMAKE_PDB_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." ) diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 40a6358..03266e6 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -57,21 +57,21 @@ import hdf.hdf5lib.structs.H5O_info_t; /** * This class is the Java interface for the HDF5 library. *

- * This code is the called by Java programs to access the entry points of the HDF5 library. Each routine wraps a single - * HDF5 entry point, generally with the arguments and return codes analogous to the C interface. + * This code is the called by Java programs to access the entry points of the HDF5 library. Each + * routine wraps a single HDF5 entry point, generally with the arguments and return codes analogous + * to the C interface. *

- * For details of the HDF5 library, see the HDF5 Documentation at: http://hdfgroup.org/HDF5/ + * For details of the HDF5 library, see the HDF5 Documentation at: + * http://hdfgroup.org/HDF5/ *


*

* Mapping of arguments for Java * *

- * In general, arguments to the HDF Java API are straightforward translations from the 'C' API described in the HDF - * Reference Manual. + * In general, arguments to the HDF Java API are straightforward translations from the 'C' API + * described in the HDF Reference Manual. * - *

- * + *
* * * @@ -107,20 +107,21 @@ import hdf.hdf5lib.structs.H5O_info_t; * * *
HDF-5 C types to Java types
HDF-5Special -- see HDFArray
- *
- *
General Rules for Passing Arguments and Results
+ * General Rules for Passing Arguments and Results *

- * In general, arguments passed IN to Java are the analogous basic types, as above. The exception is for arrays, - * which are discussed below. + * In general, arguments passed IN to Java are the analogous basic types, as above. The + * exception is for arrays, which are discussed below. *

- * The return value of Java methods is also the analogous type, as above. A major exception to that rule is that - * all HDF functions that return SUCCEED/FAIL are declared boolean in the Java version, rather than int as - * in the C. Functions that return a value or else FAIL are declared the equivalent to the C function. However, in most - * cases the Java method will raise an exception instead of returning an error code. See Errors and - * Exceptions below. + * The return value of Java methods is also the analogous type, as above. A major exception + * to that rule is that all HDF functions that return SUCCEED/FAIL are declared boolean in + * the Java version, rather than int as in the C. Functions that return a value or else FAIL + * are declared the equivalent to the C function. However, in most cases the Java method will raise + * an exception instead of returning an error code. See Errors and Exceptions + * below. *

- * Java does not support pass by reference of arguments, so arguments that are returned through OUT parameters - * must be wrapped in an object or array. The Java API for HDF consistently wraps arguments in arrays. + * Java does not support pass by reference of arguments, so arguments that are returned through + * OUT parameters must be wrapped in an object or array. The Java API for HDF consistently + * wraps arguments in arrays. *

* For instance, a function that returns two integers is declared: * @@ -141,12 +142,14 @@ import hdf.hdf5lib.structs.H5O_info_t; * * *

- * All the routines where this convention is used will have specific documentation of the details, given below. + * All the routines where this convention is used will have specific documentation of the details, + * given below. *

- * Arrays + * Arrays *

- * HDF5 needs to read and write multi-dimensional arrays of any number type (and records). The HDF5 API describes the - * layout of the source and destination, and the data for the array passed as a block of bytes, for instance, + * HDF5 needs to read and write multi-dimensional arrays of any number type (and records). The HDF5 + * API describes the layout of the source and destination, and the data for the array passed as a + * block of bytes, for instance, * *

  *      herr_t H5Dread(long fid, long filetype, long memtype, long memspace,
@@ -154,40 +157,45 @@ import hdf.hdf5lib.structs.H5O_info_t;
  * 
* *

- * where ``void *'' means that the data may be any valid numeric type, and is a contiguous block of bytes that is the - * data for a multi-dimensional array. The other parameters describe the dimensions, rank, and datatype of the array on - * disk (source) and in memory (destination). + * where ``void *'' means that the data may be any valid numeric type, and is a contiguous block of + * bytes that is the data for a multi-dimensional array. The other parameters describe the + * dimensions, rank, and datatype of the array on disk (source) and in memory (destination). *

- * For Java, this ``ANY'' is a problem, as the type of data must always be declared. Furthermore, multidimensional - * arrays are definitely not layed out contiguously in memory. It would be infeasible to declare a separate - * routine for every combination of number type and dimensionality. For that reason, the HDFArray class is used to discover the type, shape, and size of the - * data array at run time, and to convert to and from a contiguous array of bytes in synchronized static native C order. + * For Java, this ``ANY'' is a problem, as the type of data must always be declared. Furthermore, + * multidimensional arrays are definitely not layed out contiguously in memory. It would be + * infeasible to declare a separate routine for every combination of number type and dimensionality. + * For that reason, the HDFArray class is used to + * discover the type, shape, and size of the data array at run time, and to convert to and from a + * contiguous array of bytes in synchronized static native C order. *

- * The upshot is that any Java array of numbers (either primitive or sub-classes of type Number) can be passed as - * an ``Object'', and the Java API will translate to and from the appropriate packed array of bytes needed by the C - * library. So the function above would be declared: + * The upshot is that any Java array of numbers (either primitive or sub-classes of type + * Number) can be passed as an ``Object'', and the Java API will translate to and from the + * appropriate packed array of bytes needed by the C library. So the function above would be + * declared: * *

  * public synchronized static native int H5Dread(long fid, long filetype, long memtype, long memspace, Object data);
  * 
- * OPEN_IDS.addElement(id); - - * and the parameter data can be any multi-dimensional array of numbers, such as float[][], or int[][][], or - * Double[][]. + * + * OPEN_IDS.addElement(id); + * + * and the parameter data can be any multi-dimensional array of numbers, such as float[][], + * or int[][][], or Double[][]. *

- * HDF-5 Constants + * HDF-5 Constants *

- * The HDF-5 API defines a set of constants and enumerated values. Most of these values are available to Java programs - * via the class HDF5Constants. For example, the parameters for - * the h5open() call include two numeric values, HDFConstants.H5F_ACC_RDWR and - * HDF5Constants.H5P_DEFAULT. As would be expected, these numbers correspond to the C constants - * H5F_ACC_RDWR and H5P_DEFAULT. + * The HDF-5 API defines a set of constants and enumerated values. Most of these values are + * available to Java programs via the class + * HDF5Constants. For example, the parameters for the h5open() call include two numeric + * values, HDFConstants.H5F_ACC_RDWR and HDF5Constants.H5P_DEFAULT. As + * would be expected, these numbers correspond to the C constants H5F_ACC_RDWR and + * H5P_DEFAULT. *

- * The HDF-5 API defines a set of values that describe number types and sizes, such as "H5T_NATIVE_INT" and "hsize_t". - * These values are determined at run time by the HDF-5 C library. To support these parameters, the Java class HDF5CDataTypes looks up the values when initiated. The values - * can be accessed as public variables of the Java class, such as: + * The HDF-5 API defines a set of values that describe number types and sizes, such as + * "H5T_NATIVE_INT" and "hsize_t". These values are determined at run time by the HDF-5 C library. + * To support these parameters, the Java class + * HDF5CDataTypes looks up the values when initiated. The values can be accessed as + * public variables of the Java class, such as: * *

  * long data_type = HDF5CDataTypes.JH5T_NATIVE_INT;
@@ -196,22 +204,23 @@ import hdf.hdf5lib.structs.H5O_info_t;
  * The Java application uses both types of constants the same way, the only difference is that the
  * HDF5CDataTypes may have different values on different platforms.
  * 

- * Error handling and Exceptions + * Error handling and Exceptions *

- * The HDF5 error API (H5E) manages the behavior of the error stack in the HDF-5 library. This API is omitted from the - * JHI5. Errors are converted into Java exceptions. This is totally different from the C interface, but is very natural - * for Java programming. + * The HDF5 error API (H5E) manages the behavior of the error stack in the HDF-5 library. This API + * is omitted from the JHI5. Errors are converted into Java exceptions. This is totally different + * from the C interface, but is very natural for Java programming. *

- * The exceptions of the JHI5 are organized as sub-classes of the class HDF5Exception. There are two subclasses of - * HDF5Exception, HDF5LibraryException - * and HDF5JavaException. The sub-classes of the - * former represent errors from the HDF-5 C library, while sub-classes of the latter represent errors in the JHI5 - * wrapper and support code. + * The exceptions of the JHI5 are organized as sub-classes of the class + * HDF5Exception. There are two + * subclasses of HDF5Exception, + * HDF5LibraryException and + * HDF5JavaException. The sub-classes of the former represent errors from the HDF-5 C + * library, while sub-classes of the latter represent errors in the JHI5 wrapper and support code. *

- * The super-class HDF5LibraryException implements the method 'printStackTrace()', which - * prints out the HDF-5 error stack, as described in the HDF-5 C API H5Eprint(). This may be used by Java - * exception handlers to print out the HDF-5 error stack. + * The super-class HDF5LibraryException implements the method + * 'printStackTrace()', which prints out the HDF-5 error stack, as described in the + * HDF-5 C API H5Eprint(). This may be used by Java exception handlers to print out + * the HDF-5 error stack. *


* * @version HDF5 1.10.5
diff --git a/java/src/hdf/overview.html b/java/src/hdf/overview.html index edb1b76..e3a032b 100644 --- a/java/src/hdf/overview.html +++ b/java/src/hdf/overview.html @@ -90,8 +90,7 @@ like this: The H5 class automatically loads the native method implementations and the HDF5 library. -

-To Obtain

+

To Obtain

The JHI5 is included with the HDF5 library. -- cgit v0.12