diff --git a/Modules/ThirdParty/HDF5/.gitattributes b/Modules/ThirdParty/HDF5/.gitattributes index ee7e2c5c2fc..284abde7244 100644 --- a/Modules/ThirdParty/HDF5/.gitattributes +++ b/Modules/ThirdParty/HDF5/.gitattributes @@ -2,3 +2,7 @@ src/itkhdf5/src/H5C.c hooks-max-size=500000 src/itkhdf5/src/H5Dchunk.c hooks-max-size=500000 src/itkhdf5/src/H5Shyper.c hooks-max-size=600000 src/itkhdf5/src/H5Tconv.c hooks-max-size=500000 +src/itkhdf5/src/H5Ppublic.h hooks-max-size=500000 +src/H5Odtype.c no-lf-at-eof + +src/itkhdf5/src/itk_hdf5_mangle.h.in hooks-max-size=500000 diff --git a/Modules/ThirdParty/HDF5/CMakeLists.txt b/Modules/ThirdParty/HDF5/CMakeLists.txt index dcaa2fa646c..1f118aa3701 100644 --- a/Modules/ThirdParty/HDF5/CMakeLists.txt +++ b/Modules/ThirdParty/HDF5/CMakeLists.txt @@ -7,17 +7,6 @@ set(ITKHDF5_THIRD_PARTY 1) # modified before reaching this point) set(BUILD_SHARED_LIBS ${ITK_BUILD_SHARED_LIBS}) -if (BUILD_SHARED_LIBS) - add_definitions(-DH5_BUILT_AS_DYNAMIC_LIB=1) - set(ONLY_SHARED_LIBS ON CACHE INTERNAL "Only build shared") -else() - set(ONLY_SHARED_LIBS OFF CACHE INTERNAL "Only build static") -endif() -if(CMAKE_LINKER MATCHES "link.exe$") - # Suppress undefined public symbols warning - set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /IGNORE:4221") -endif() - if(ITK_USE_SYSTEM_HDF5) if(HDF5_DIR) diff --git a/Modules/ThirdParty/HDF5/UpdateFromUpstream.sh b/Modules/ThirdParty/HDF5/UpdateFromUpstream.sh index 6cd2c9f4b5f..e8589b30685 100755 --- a/Modules/ThirdParty/HDF5/UpdateFromUpstream.sh +++ b/Modules/ThirdParty/HDF5/UpdateFromUpstream.sh @@ -8,20 +8,21 @@ readonly name="HDF5" readonly ownership="HDF5 Maintainers " readonly subtree="Modules/ThirdParty/HDF5/src/itkhdf5" readonly repo="https://github.com/HDFGroup/hdf5.git" -readonly tag="hdf5-1_12_1" +readonly tag="hdf5_1.14.5" readonly shortlog=false readonly paths=" ACKNOWLEDGMENTS CTestConfig.cmake - README.txt + README.md config/cmake - config/cmake_ext_mod config/clang-warnings config/gnu-warnings config/intel-warnings CMakeLists.txt CMakeInstallation.cmake CMakeFilters.cmake + CMakeVOL.cmake + CMakeTests.cmake COPYING src c++/CMakeLists.txt @@ -40,7 +41,7 @@ extract_source () { sed -i.bak -e '1 s| /bin/sh|/bin/sh|' c++/src/h5c++.in config/cmake/libh5cc.in rm c++/src/h5c++.in.bak config/cmake/libh5cc.in.bak chmod a+x c++/src/h5c++.in config/cmake/libh5cc.in - chmod a-x README.txt + chmod a-x README.md chmod a-x config/cmake/CTestScript.cmake chmod a-x config/cmake/HDF5_Examples_options.cmake chmod a-x config/cmake/libhdf5.pc.in @@ -62,6 +63,7 @@ extract_source () { find . -name Makefile.am -delete find . -name Makefile.in -delete find . -name "*.lnt" -delete + find . -name "*.icns" -delete echo "* -whitespace" > .gitattributes popd } diff --git a/Modules/ThirdParty/HDF5/src/CMakeLists.txt b/Modules/ThirdParty/HDF5/src/CMakeLists.txt index d8096039af8..a9b6300545f 100644 --- a/Modules/ThirdParty/HDF5/src/CMakeLists.txt +++ b/Modules/ThirdParty/HDF5/src/CMakeLists.txt @@ -5,7 +5,6 @@ set(HDF5_EXTERNALLY_CONFIGURED ON) # can not be skipped for installation. Use the install COMPONENTS # features instead. set(HDF5_INSTALL_NO_DEVELOPMENT FALSE) -set(HDF5_EXTERNAL_LIB_PREFIX "itk") set(HDF5_EXPORTED_TARGETS ${ITKHDF5-targets}) set(HDF5_INSTALL_LIB_DIR ${ITKHDF5_INSTALL_LIBRARY_DIR}) set(HDF5_INSTALL_BIN_DIR ${ITKHDF5_INSTALL_RUNTIME_DIR}) @@ -16,29 +15,17 @@ set(HDF5_ALLOW_EXTERNAL_SUPPORT OFF CACHE INTERNAL "Allow External Library Build set(HDF5_BUILD_CPP_LIB ON CACHE INTERNAL "Build HDF5 C++ Library") set(HDF5_BUILD_HL_LIB ON CACHE INTERNAL "Build High Level HDF5 Library") set(HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE INTERNAL "Disable HDF5 warnings") -set(HDF5_ENABLE_CODESTACK OFF CACHE INTERNAL "Enable the function stack tracing (for developer debugging).") set(HDF5_ENABLE_COVERAGE OFF CACHE INTERNAL "Enable code coverage for Libraries and Programs") set(HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE INTERNAL "Enable deprecated public API symbols") -set(HDF5_ENABLE_GPFS OFF CACHE INTERNAL "Enable GPFS hints for the MPI/POSIX file driver") -set(HDF5_ENABLE_HSIZET ON CACHE INTERNAL "Enable datasets larger than memory") -set(HDF5_ENABLE_LARGE_FILE ON CACHE INTERNAL "Enable support for large (64-bit) files on Linux.") set(HDF5_ENABLE_PARALLEL OFF CACHE INTERNAL "Enable parallel build (requires MPI)") set(HDF5_ENABLE_SZIP_SUPPORT OFF CACHE INTERNAL "Use SZip Filter") -set(HDF5_ENABLE_THREADSAFE ON CACHE INTERNAL "Enable Threadsafety") +set(HDF5_ENABLE_THREADSAFE OFF CACHE INTERNAL "Enable Threadsafety") set(HDF5_ENABLE_TRACE OFF CACHE INTERNAL "Enable API tracing capability") set(HDF5_ENABLE_USING_MEMCHECKER OFF CACHE INTERNAL "Indicate that a memory checker is used") set(HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE INTERNAL "Enable HDF5 Zlib Filters") -set(HDF5_Enable_Clear_File_Buffers ON CACHE INTERNAL "Securely clear file buffers before writing to file") set(HDF5_Enable_Instrument OFF CACHE INTERNAL "Instrument The library") -set(HDF5_METADATA_TRACE_FILE OFF CACHE INTERNAL "Enable metadata trace file collection") set(HDF5_PACKAGE_EXTLIBS OFF CACHE INTERNAL "CPACK - include external libraries") set(HDF5_STRICT_FORMAT_CHECKS OFF CACHE INTERNAL "Whether to perform strict file format checks") -set(HDF5_USE_16_API_DEFAULT OFF CACHE INTERNAL "Use the HDF5 1.6.x API by default") -set(HDF5_USE_FILTER_FLETCHER32 ON CACHE INTERNAL "Use the FLETCHER32 Filter") -set(HDF5_USE_FILTER_NBIT ON CACHE INTERNAL "Use the NBIT Filter") -set(HDF5_USE_FILTER_SCALEOFFSET ON CACHE INTERNAL "Use the SCALEOFFSET Filter") -set(HDF5_USE_FILTER_SHUFFLE ON CACHE INTERNAL "Use the SHUFFLE Filter") -set(HDF5_USE_H5DUMP_PACKED_BITS ON CACHE INTERNAL "Use the PACKED BITS feature in h5dump") set(HDF5_WANT_DATA_ACCURACY ON CACHE INTERNAL "IF data accuracy is guaranteed during data conversions") set(HDF5_WANT_DCONV_EXCEPTION ON CACHE INTERNAL "exception handling functions is checked during data conversions") set(HDF_LEGACY_NAMING ON CACHE INTERNAL "Use Legacy Names for Libraries and Programs") @@ -46,15 +33,8 @@ set(HDF5_BUILD_FRAMEWORKS OFF CACHE INTERNAL "TRUE to build as frameworks librar set(HDF5_BUILD_WITH_INSTALL_NAME OFF CACHE INTERNAL "Build with library install_name set to the installation path") set(HDF5_ENABLE_ALL_WARNINGS OFF CACHE INTERNAL "Enable all warnings") set(HDF5_ENABLE_DEBUG_APIS OFF CACHE INTERNAL "Turn on debugging in all packages") -set(HDF5_ENABLE_DIRECT_VFD ON CACHE INTERNAL "Build the Direct I/O Virtual File Driver") +set(HDF5_ENABLE_DIRECT_VFD OFF CACHE INTERNAL "Build the Direct I/O Virtual File Driver") set(HDF5_ENABLE_EMBEDDED_LIBINFO ON CACHE INTERNAL "embed library info into executables") -set(HDF5_ENABLE_GROUPFIVE_WARNINGS OFF CACHE INTERNAL "Enable group five warnings") -set(HDF5_ENABLE_GROUPFOUR_WARNINGS OFF CACHE INTERNAL "Enable group four warnings") -set(HDF5_ENABLE_GROUPONE_WARNINGS OFF CACHE INTERNAL "Enable group one warnings") -set(HDF5_ENABLE_GROUPSIX_WARNINGS OFF CACHE INTERNAL "Enable group six warnings") -set(HDF5_ENABLE_GROUPTHREE_WARNINGS OFF CACHE INTERNAL "Enable group three warnings") -set(HDF5_ENABLE_GROUPTWO_WARNINGS OFF CACHE INTERNAL "Enable group two warnings") -set(HDF5_ENABLE_GROUPZERO_WARNINGS OFF CACHE INTERNAL "Enable group zero warnings") set(HDF5_GENERATE_HEADERS OFF CACHE INTERNAL "Rebuild Generated Files") set(HDF5_PACK_EXAMPLES OFF CACHE INTERNAL "Package the HDF5 Library Examples Compressed File") set(HDF5_NO_PACKAGES OFF CACHE INTERNAL "CPACK - Disable packaging") @@ -64,17 +44,46 @@ set(HDF_TEST_EXPRESS OFF CACHE INTERNAL "Control testing framework (0-3)") set(BUILD_STATIC_EXECS OFF CACHE INTERNAL "Build Static Executables") set(BUILD_USER_DEFINED_LIBS OFF CACHE INTERNAL "Build user defined libs") +set (SZIP_USE_EXTERNAL OFF CACHE INTERNAL "Use External Library Building for SZIP" ) +set (ZLIB_USE_EXTERNAL OFF CACHE INTERNAL "Use External Library Building for ZLIB" ) +set (HDF5_DIMENSION_SCALES_NEW_REF OFF CACHE INTERNAL "Use new-style references with dimension scale APIs" ) +set (HDF5_EXTERNAL_LIB_PREFIX "itk" CACHE INTERNAL "Use prefix for custom library naming.") +set (HDF5_LIB_INFIX "" CACHE INTERNAL "Use infix for custom library naming.") +set (HDF5_USE_GNU_DIRS OFF CACHE INTERNAL "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings") +set (HDF5_TEST_SERIAL OFF CACHE INTERNAL "Execute non-parallel tests" ) + +set (HDF5_BUILD_DOC OFF CACHE INTERNAL "Build documentation") +set (HDF5_ENABLE_MAP_API OFF CACHE INTERNAL "Build the map API") +set (HDF5_ENABLE_WARNINGS_AS_ERRORS OFF CACHE INTERNAL "Interpret some warnings as errors") +set (HDF5_MINGW_STATIC_GCC_LIBS OFF CACHE INTERNAL "") +set (HDF5_MSVC_NAMING_CONVENTION OFF CACHE INTERNAL "Use MSVC Naming conventions for Shared Libraries") +set (HDF5_ENABLE_PLUGIN_SUPPORT OFF CACHE INTERNAL "Enable PLUGIN Filters") + +set (HDF5_BUILD_STATIC_TOOLS OFF CACHE INTERNAL "Build Static Tools NOT Shared Tools") +set (HDF5_ENABLE_MAP_API OFF CACHE INTERNAL "Build the map API") +set (HDF5_ENABLE_NONSTANDARD_FEATURES ON CACHE INTERNAL "Enable support for non-standard programming language features") +set (HDF5_ENABLE_SUBFILING_VFD OFF CACHE INTERNAL "Build Parallel HDF5 Subfiling VFD") +set (HDF5_USE_LIBAEC_STATIC OFF CACHE INTERNAL "Use static AEC library" ) +set (HDF5_USE_ZLIB_NG OFF CACHE INTERNAL "Use zlib-ng library as zlib library" ) +set (HDF5_USE_ZLIB_STATIC OFF CACHE INTERNAL "Find static zlib library" ) +set (ALLOW_UNSUPPORTED OFF CACHE INTERNAL "Allow unsupported combinations of configure options") + + +if (NOT BUILD_SHARED_LIBS) + set (BUILD_STATIC_LIBS ON CACHE INTERNAL "Build Static Libraries") +endif() + # Setup all necessary overrides for zlib so that HDF5 uses our # internally compiled zlib rather than any other version if(HDF5_ENABLE_Z_LIB_SUPPORT) # We must tell the main HDF5 library that it depends on our zlib - set(ZLIB_INCLUDE_DIRS "${ITKZLIB_INCLUDE_DIRS}") - set(ZLIB_LIBRARIES "${ITKZLIB_LIBRARIES}") - if(BUILD_SHARED_LIBS) - set(ZLIB_SHARED_LIBRARY ${ITKZLIB_LIBRARIES}) - endif() - set(ZLIB_STATIC_LIBRARY ${ITKZLIB_LIBRARIES}) + # see src/itkhdf5/CMakeLists.txt for detauls + set(H5_ZLIB_INCLUDE_DIRS "${ITKZLIB_INCLUDE_DIRS}") + set(H5_ZLIB_LIBRARIES "${ITKZLIB_LIBRARIES}") + set(HDF5_LIB_DEPENDENCIES ${ITKZLIB_LIBRARIES}) set(H5_ZLIB_HEADER "itk_zlib.h") + + set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${H5_ZLIB_LIBRARIES}) endif() add_subdirectory(itkhdf5) @@ -91,7 +100,6 @@ mark_as_advanced(HDF5_USE_18_API_DEFAULT) mark_as_advanced(HDF5_USE_FILE_LOCKING) mark_as_advanced(HDF5_USE_PREGEN) mark_as_advanced(USE_LIBAEC) -unset(ALLOW_UNSUPPORTED CACHE) if(BUILD_SHARED_LIBS) set(target_extension -shared) diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/.clang-format b/Modules/ThirdParty/HDF5/src/itkhdf5/.clang-format index 62dc6b584b2..59a9bd479ae 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/.clang-format +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/.clang-format @@ -1,7 +1,20 @@ --- -Language: Cpp BasedOnStyle: LLVM AlignConsecutiveAssignments: true +BraceWrapping: + AfterFunction: true + #llvm10-11: AfterControlStatement: false - Never + BeforeCatch: true + BeforeElse: true + #llvm11: BeforeLambdaBody: false + #llvm11: BeforeWhile: false +BreakBeforeBraces: Stroustrup +BreakAfterJavaFieldAnnotations: true +BreakStringLiterals: true +ColumnLimit: 110 +IndentWidth: 4 +--- +Language: Cpp #llvm11: AlignConsecutiveBitFields: false AlignConsecutiveDeclarations: true AlignConsecutiveMacros: true @@ -22,17 +35,6 @@ AlwaysBreakAfterReturnType: AllDefinitions # - H5_ATTR_CONST # - H5_ATTR_PURE # - H5_ATTR_FALLTHROUGH -BraceWrapping: - AfterFunction: true - #llvm10-11: AfterControlStatement: false - Never - BeforeCatch: true - BeforeElse: true - #llvm11: BeforeLambdaBody: false - #llvm11: BeforeWhile: false -BreakBeforeBraces: Stroustrup -BreakAfterJavaFieldAnnotations: true -BreakStringLiterals: true -ColumnLimit: 110 # Update $max_trace_macro_line_len in bin/trace also ForEachMacros: ['ALL_MEMBERS', 'UNIQUE_MEMBERS'] IncludeCategories: - Regex: '^"(llvm|llvm-c|clang|clang-c)/' @@ -55,7 +57,6 @@ IndentCaseLabels: true #llvm11: IndentCaseBlocks: false IndentGotoLabels: false #llvm11: IndentExternBlock: AfterExternBlock -IndentWidth: 4 #llvm11: InsertTrailingCommas: None MacroBlockBegin: "^BEGIN_FUNC" MacroBlockEnd: "^END_FUNC" @@ -64,33 +65,45 @@ ObjCBlockIndentWidth: 4 ReflowComments: true SortIncludes: false StatementMacros: + - CATCH + - END_MEMBERS - FUNC_ENTER_API - - FUNC_LEAVE_API + - FUNC_ENTER_API_NAMECHECK_ONLY + - FUNC_ENTER_NOAPI + - FUNC_ENTER_NOAPI_NOERR + - FUNC_ENTER_NOAPI_NOINIT - FUNC_ENTER_NOAPI_NOINIT_NOERR + - FUNC_ENTER_PACKAGE + - FUNC_LEAVE_API + - FUNC_LEAVE_API_NAMECHECK_ONLY - FUNC_LEAVE_NOAPI + - FUNC_LEAVE_NOAPI_NOFS + - H5E_END_TRY + - H5E_PRINTF + - H5E_THROW - H5_BEGIN_TAG - - HGOTO_DONE_TAG - H5_END_TAG - - HSYS_DONE_ERROR - - HSYS_GOTO_ERROR - - HDONE_ERROR - - HERROR + - H5_GCC_DIAG_OFF + - H5_GCC_DIAG_ON + - H5_CLANG_DIAG_OFF + - H5_CLANG_DIAG_ON + - H5_GCC_CLANG_DIAG_OFF + - H5_GCC_CLANG_DIAG_ON - H5_LEAVE - - H5E_PRINTF - - H5E_THROW - HGOTO_DONE - - HGOTO_ERROR - - HMPI_ERROR - HMPI_DONE_ERROR + - HMPI_ERROR - HMPI_GOTO_ERROR - - H5_GCC_DIAG_OFF - - H5_GCC_DIAG_ON - - CATCH + - HSYS_DONE_ERROR + - HSYS_GOTO_ERROR #llvm10: TypenameMacros: #llvm10: - STACK_OF #llvm10: - LIST #llvm11: WhitespaceSensitiveMacros: #llvm11: - STRINGIZE #llvm11: - PP_STRINGIZE +--- +Language: Java +BreakAfterJavaFieldAnnotations: true +JavaImportGroups: ['java', 'hdf', 'hdf.hdf5lib', 'org'] ... - diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeFilters.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeFilters.cmake index 06ec22c25cb..52d65e59e47 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeFilters.cmake +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeFilters.cmake @@ -9,166 +9,182 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # -if (FALSE) # XXX(kitware): avoid this showing up in VTK's cache file -option (USE_LIBAEC "Use AEC library as SZip Filter" OFF) +option (HDF5_USE_ZLIB_NG "Use zlib-ng library as zlib library" OFF) +option (HDF5_USE_ZLIB_STATIC "Find static zlib library" OFF) +option (HDF5_USE_LIBAEC_STATIC "Find static AEC library" OFF) +option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" OFF) +option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" OFF) + +if (NOT ZLIB_USE_LOCALCONTENT) + if (HDF5_USE_ZLIB_NG) + set (ZLIB_URL ${ZLIBNG_TGZ_ORIGPATH}/${ZLIBNG_TGZ_NAME}) + else () + set (ZLIB_URL ${ZLIB_TGZ_ORIGPATH}/${ZLIB_TGZ_NAME}) + endif () else () -set (USE_LIBAEC OFF) + if (HDF5_USE_ZLIB_NG) + set (ZLIB_URL ${TGZPATH}/${ZLIBNG_TGZ_NAME}) + else () + set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME}) + endif () endif () +message (VERBOSE "Filter ZLIB file is ${ZLIB_URL}") -if (FALSE) # XXX(kitware): Hardcode settings. -include (ExternalProject) -include (FetchContent) +if (NOT LIBAEC_USE_LOCALCONTENT) + set (SZIP_URL ${LIBAEC_TGZ_ORIGPATH}/${LIBAEC_TGZ_NAME}) +else () + set (SZIP_URL ${TGZPATH}/${LIBAEC_TGZ_NAME}) +endif () +message (VERBOSE "Filter SZIP file is ${SZIP_URL}") +include (ExternalProject) #option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO") set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)") set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ) -else () -set(HDF5_ALLOW_EXTERNAL_SUPPORT NO) -endif () if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1) - option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1) + set (ZLIB_USE_EXTERNAL ON CACHE BOOL "Use External Library Building for ZLIB else search" FORCE) + set (SZIP_USE_EXTERNAL ON CACHE BOOL "Use External Library Building for SZIP else search" FORCE) if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT") set (ZLIB_URL ${ZLIB_GIT_URL} CACHE STRING "Path to zlib git repository") set (ZLIB_BRANCH ${ZLIB_GIT_BRANCH}) - set (SZIP_URL ${SZIP_GIT_URL} CACHE STRING "Path to szip git repository") - set (SZIP_BRANCH ${SZIP_GIT_BRANCH}) + set (SZIP_URL ${LIBAEC_GIT_URL} CACHE STRING "Path to szip git repository") + set (SZIP_BRANCH ${LIBAEC_GIT_BRANCH}) elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") if (NOT TGZPATH) set (TGZPATH ${HDF5_SOURCE_DIR}) endif () - set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME}) - if (NOT EXISTS "${ZLIB_URL}") - set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE) - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + if (ZLIB_USE_LOCALCONTENT) + if (NOT EXISTS "${ZLIB_URL}") + set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE) message (VERBOSE "Filter ZLIB file ${ZLIB_URL} not found") endif () endif () - set (SZIP_URL ${TGZPATH}/${SZIP_TGZ_NAME}) - if (USE_LIBAEC) - set (SZIP_URL ${TGZPATH}/${SZAEC_TGZ_NAME}) - endif () - if (NOT EXISTS "${SZIP_URL}") - set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE) - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + if (LIBAEC_USE_LOCALCONTENT) + if (NOT EXISTS "${SZIP_URL}") + set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE) message (VERBOSE "Filter SZIP file ${SZIP_URL} not found") endif () endif () else () - set (ZLIB_USE_EXTERNAL 0) - set (SZIP_USE_EXTERNAL 0) + set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE) + set (ZLIB_USE_EXTERNAL OFF CACHE BOOL "Use External Library Building for ZLIB else search") + set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE) + set (SZIP_USE_EXTERNAL OFF CACHE BOOL "Use External Library Building for SZIP else search") endif () endif () #----------------------------------------------------------------------------- # Option for ZLib support #----------------------------------------------------------------------------- -if (FALSE) # XXX(kitware): Hardcode settings. -option (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF) -else () -set(HDF5_ENABLE_Z_LIB_SUPPORT ON) -endif () +set(H5_ZLIB_FOUND FALSE) +option (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" ON) if (HDF5_ENABLE_Z_LIB_SUPPORT) if (NOT H5_ZLIB_HEADER) if (NOT ZLIB_USE_EXTERNAL) - find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared) + if (HDF5_USE_ZLIB_NG) + set (PACKAGE_NAME ${ZLIBNG_PACKAGE_NAME}${HDF_PACKAGE_EXT}) + else () + set (PACKAGE_NAME ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT}) + endif () + set(ZLIB_FOUND FALSE) + if (HDF5_USE_ZLIB_STATIC) + set(ZLIB_SEACH_TYPE static) + else () + set(ZLIB_SEACH_TYPE shared) + endif () + find_package (ZLIB NAMES ${PACKAGE_NAME} COMPONENTS ${ZLIB_SEACH_TYPE}) if (NOT ZLIB_FOUND) + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") + set(ZLIB_USE_STATIC_LIBS ${HDF5_USE_ZLIB_STATIC}) + endif() find_package (ZLIB) # Legacy find - if (ZLIB_FOUND) - set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_LIBRARIES}) - endif () endif () - endif () - if (ZLIB_FOUND) - set (H5_HAVE_FILTER_DEFLATE 1) - set (H5_HAVE_ZLIB_H 1) - set (H5_HAVE_LIBZ 1) - set (H5_ZLIB_HEADER "zlib.h") - set (ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR}) - set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR}) + set(H5_ZLIB_FOUND ${ZLIB_FOUND}) + if (H5_ZLIB_FOUND) + set (H5_ZLIB_HEADER "zlib.h") + set (H5_ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR}) + set (H5_ZLIB_INCLUDE_DIRS ${H5_ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR}) + # The FindZLIB.cmake module does not set an OUTPUT_NAME + # on the target. The target returned is: ZLIB::ZLIB + get_filename_component (libname ${ZLIB_LIBRARIES} NAME_WLE) + string (REGEX REPLACE "^lib" "" libname ${libname}) + set_target_properties (ZLIB::ZLIB PROPERTIES OUTPUT_NAME zlib-static) + set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ZLIB::ZLIB) + endif () else () if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT}) - set (H5_HAVE_FILTER_DEFLATE 1) - set (H5_HAVE_ZLIB_H 1) - set (H5_HAVE_LIBZ 1) - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "Filter ZLIB is built") - endif () - else () - message (FATAL_ERROR " ZLib is Required for ZLib support in HDF5") + message (VERBOSE "Filter HDF5_ZLIB is built") + set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${H5_ZLIB_STATIC_LIBRARY}) endif () endif () else () # This project is being called from within another and ZLib is already configured + set(H5_ZLIB_FOUND TRUE) + endif () + if (H5_ZLIB_FOUND) set (H5_HAVE_FILTER_DEFLATE 1) set (H5_HAVE_ZLIB_H 1) set (H5_HAVE_LIBZ 1) - endif () - if (H5_HAVE_FILTER_DEFLATE) - set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE") - endif () - set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_STATIC_LIBRARY}) - INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS}) - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "Filter ZLIB is ON") + if (H5_HAVE_FILTER_DEFLATE) + set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE") + endif () + set (HDF5_COMP_INCLUDE_DIRECTORIES "${HDF5_COMP_INCLUDE_DIRECTORIES};${H5_ZLIB_INCLUDE_DIRS}") + message (VERBOSE "Filter HDF5_ZLIB is ON") + else () + set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE) + message (WARNING " ZLib support in HDF5 was enabled but not found") endif () endif () #----------------------------------------------------------------------------- # Option for SzLib support #----------------------------------------------------------------------------- -if (FALSE) # XXX(kitware): no need for szip support. -option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF) +set(H5_SZIP_FOUND FALSE) +option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" ON) if (HDF5_ENABLE_SZIP_SUPPORT) - option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF) + option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" ON) if (NOT SZIP_USE_EXTERNAL) - find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared) + if (HDF5_USE_LIBAEC_STATIC) + set(LIBAEC_SEACH_TYPE static) + else () + set(LIBAEC_SEACH_TYPE shared) + endif () + set(libaec_USE_STATIC_LIBS ${HDF5_USE_LIBAEC_STATIC}) + set(SZIP_FOUND FALSE) + find_package (SZIP NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS ${LIBAEC_SEACH_TYPE}) if (NOT SZIP_FOUND) find_package (SZIP) # Legacy find - if (SZIP_FOUND) - set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES}) - endif () endif () - endif () - if (SZIP_FOUND) - set (H5_HAVE_FILTER_SZIP 1) - set (H5_HAVE_SZLIB_H 1) - set (H5_HAVE_LIBSZ 1) - set (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR}) - set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR}) + set(H5_SZIP_FOUND ${SZIP_FOUND}) + if (H5_SZIP_FOUND) + set (H5_SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR}) + set (H5_SZIP_INCLUDE_DIRS ${H5_SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR}) + set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES}) + endif () else () if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${HDF5_ENABLE_SZIP_ENCODING}) - set (H5_HAVE_FILTER_SZIP 1) - set (H5_HAVE_SZLIB_H 1) - set (H5_HAVE_LIBSZ 1) - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "Filter SZIP is built") - endif () - if (USE_LIBAEC) - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "... with library AEC") - endif () - set (SZ_PACKAGE_NAME ${LIBAEC_PACKAGE_NAME}) - else () - set (SZ_PACKAGE_NAME ${SZIP_PACKAGE_NAME}) - endif () - else () - message (FATAL_ERROR "SZIP is Required for SZIP support in HDF5") + message (VERBOSE "Filter SZIP is built") + message (VERBOSE "... with library AEC") + set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${H5_SZIP_STATIC_LIBRARY}) endif () endif () - set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_STATIC_LIBRARY}) - INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS}) - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + if (H5_SZIP_FOUND) + set (H5_HAVE_FILTER_SZIP 1) + set (H5_HAVE_SZLIB_H 1) + set (H5_HAVE_LIBSZ 1) + set (HDF5_COMP_INCLUDE_DIRECTORIES "${HDF5_COMP_INCLUDE_DIRECTORIES};${H5_SZIP_INCLUDE_DIRS}") message (VERBOSE "Filter SZIP is ON") + if (H5_HAVE_FILTER_SZIP) + set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE") + endif () + if (HDF5_ENABLE_SZIP_ENCODING) + set (H5_HAVE_SZIP_ENCODER 1) + set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} ENCODE") + endif () + else () + set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE) + message (WARNING "SZIP support in HDF5 was enabled but not found") endif () - if (H5_HAVE_FILTER_SZIP) - set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE") - endif () - if (HDF5_ENABLE_SZIP_ENCODING) - set (H5_HAVE_SZIP_ENCODER 1) - set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} ENCODE") - endif () -endif () endif () diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeInstallation.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeInstallation.cmake index 1bf9f45b7f3..56dd50042e6 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeInstallation.cmake +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeInstallation.cmake @@ -34,7 +34,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED) if (HDF5_EXPORTED_TARGETS) install ( EXPORT ${HDF5_EXPORTED_TARGETS} - DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/hdf5 + DESTINATION ${HDF5_INSTALL_CMAKE_DIR} FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake NAMESPACE ${HDF_PACKAGE_NAMESPACE} COMPONENT configinstall @@ -55,17 +55,10 @@ endif () # Set includes needed for build #----------------------------------------------------------------------------- set (HDF5_INCLUDES_BUILD_TIME - ${HDF5_SRC_DIR} ${HDF5_CPP_SRC_DIR} ${HDF5_HL_SRC_DIR} + ${HDF5_SRC_INCLUDE_DIRS} ${HDF5_CPP_SRC_DIR} ${HDF5_HL_SRC_DIR} ${HDF5_TOOLS_SRC_DIR} ${HDF5_SRC_BINARY_DIR} ) -#----------------------------------------------------------------------------- -# Set variables needed for installation -#----------------------------------------------------------------------------- -set (HDF5_VERSION_STRING ${HDF5_PACKAGE_VERSION}) -set (HDF5_VERSION_MAJOR ${HDF5_PACKAGE_VERSION_MAJOR}) -set (HDF5_VERSION_MINOR ${HDF5_PACKAGE_VERSION_MINOR}) - #----------------------------------------------------------------------------- # Configure the hdf5-config.cmake file for the build directory #----------------------------------------------------------------------------- @@ -75,7 +68,7 @@ set (CURRENT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}" ) configure_package_config_file ( ${HDF_RESOURCES_DIR}/hdf5-config.cmake.in "${HDF5_BINARY_DIR}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake" - INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}/hdf5" + INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}" PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}" ) @@ -89,14 +82,14 @@ set (CURRENT_BUILD_DIR "${CMAKE_INSTALL_PREFIX}" ) configure_package_config_file ( ${HDF_RESOURCES_DIR}/hdf5-config.cmake.in "${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake" - INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}/hdf5" + INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}" PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR ) if (NOT HDF5_EXTERNALLY_CONFIGURED) install ( FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake - DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/hdf5 + DESTINATION ${HDF5_INSTALL_CMAKE_DIR} COMPONENT configinstall ) endif () @@ -110,9 +103,13 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED) VERSION ${HDF5_PACKAGE_VERSION} COMPATIBILITY SameMinorVersion ) + #configure_file ( + # ${HDF_RESOURCES_DIR}/hdf5-config-version.cmake.in + # ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY + #) install ( FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake - DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/hdf5 + DESTINATION ${HDF5_INSTALL_CMAKE_DIR} COMPONENT configinstall ) endif () @@ -129,7 +126,7 @@ else () set (BYTESEX little-endian) endif () configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.settings.cmake.in + ${HDF5_SOURCE_DIR}/src/libhdf5.settings.cmake.in ${HDF5_SRC_BINARY_DIR}/libhdf5.settings ESCAPE_QUOTES @ONLY ) install ( @@ -141,14 +138,14 @@ install ( #----------------------------------------------------------------------------- # Configure the HDF5_Examples.cmake file and the examples #----------------------------------------------------------------------------- -if (FALSE) # XXX(kitware): Hardcode settings. option (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF) -else () -set(HDF5_PACK_EXAMPLES OFF) -endif () if (HDF5_PACK_EXAMPLES) + if (DEFINED CMAKE_TOOLCHAIN_FILE) + get_filename_component(TOOLCHAIN ${CMAKE_TOOLCHAIN_FILE} NAME) + set(CTEST_TOOLCHAIN_FILE "\${CTEST_SOURCE_DIRECTORY}/config/toolchain/${TOOLCHAIN}") + endif () configure_file ( - ${HDF_RESOURCES_DIR}/HDF5_Examples.cmake.in + ${HDF_RESOURCES_DIR}/examples/HDF5_Examples.cmake.in ${HDF5_BINARY_DIR}/HDF5_Examples.cmake @ONLY ) install ( @@ -156,17 +153,13 @@ if (HDF5_PACK_EXAMPLES) DESTINATION ${HDF5_INSTALL_DATA_DIR} COMPONENT hdfdocuments ) - if (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}") - execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED} - ) - install ( - DIRECTORY ${HDF5_BINARY_DIR}/HDF5Examples - DESTINATION ${HDF5_INSTALL_DATA_DIR} - USE_SOURCE_PERMISSIONS - COMPONENT hdfdocuments - ) - endif () + + install ( + DIRECTORY ${HDF5_SOURCE_DIR}/HDF5Examples + DESTINATION ${HDF5_INSTALL_DATA_DIR} + USE_SOURCE_PERMISSIONS + COMPONENT hdfdocuments + ) install ( FILES ${HDF5_SOURCE_DIR}/release_docs/USING_CMake_Examples.txt @@ -175,24 +168,22 @@ if (HDF5_PACK_EXAMPLES) ) install ( FILES - ${HDF_RESOURCES_DIR}/CTestScript.cmake + ${HDF_RESOURCES_DIR}/examples/CTestScript.cmake DESTINATION ${HDF5_INSTALL_DATA_DIR} COMPONENT hdfdocuments ) install ( FILES - ${HDF_RESOURCES_DIR}/HDF5_Examples_options.cmake + ${HDF_RESOURCES_DIR}/examples/HDF5_Examples_options.cmake DESTINATION ${HDF5_INSTALL_DATA_DIR} COMPONENT hdfdocuments ) endif () #----------------------------------------------------------------------------- -# Configure the README.txt file for the binary package +# Configure the README.md file for the binary package #----------------------------------------------------------------------------- -if (FALSE) # XXX(kitware): skip unnecessary installation rules. HDF_README_PROPERTIES(HDF5_BUILD_FORTRAN) -endif () #----------------------------------------------------------------------------- # Configure the COPYING.txt file for the windows binary package @@ -250,7 +241,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED) endif () install ( FILES ${release_files} - DESTINATION ${HDF5_INSTALL_DATA_DIR} + DESTINATION ${HDF5_INSTALL_DOC_DIR} COMPONENT hdfdocuments ) endif () @@ -262,10 +253,10 @@ endif () if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) set (CPACK_PACKAGE_VENDOR "HDF_Group") set (CPACK_PACKAGE_NAME "${HDF5_PACKAGE_NAME}") - if (CDASH_LOCAL) - set (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}") - else () + if (NOT WIN32 OR HDF5_VERS_SUBRELEASE MATCHES "^[0-9]+$") set (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION_STRING}") + else () + set (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}") endif () set (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}") set (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}") @@ -281,15 +272,17 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) else () set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") endif () - set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.bmp") + set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_DIR}/hdf.bmp") + + set (CPACK_ORIG_SOURCE_DIR ${CMAKE_SOURCE_DIR}) + if ("$ENV{BINSIGN}" STREQUAL "exists") + set (CPACK_PRE_BUILD_SCRIPTS ${CMAKE_SOURCE_DIR}/config/cmake/SignPackageFiles.cmake) + endif () set (CPACK_GENERATOR "TGZ") if (WIN32) set (CPACK_GENERATOR "ZIP") - if (NSIS_EXECUTABLE) - list (APPEND CPACK_GENERATOR "NSIS") - endif () # Installers for 32- vs. 64-bit CMake: # - Root install directory (displayed to end user at installer-run time) # - "NSIS package/display name" (text used in the installer GUI) @@ -302,12 +295,12 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) set (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES") set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") endif () - # set the install/unistall icon used for the installer itself + # set the install/uninstall icon used for the installer itself # There is a bug in NSI that does not handle full unix paths properly. - set (CPACK_NSIS_MUI_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.ico") - set (CPACK_NSIS_MUI_UNIICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.ico") + set (CPACK_NSIS_MUI_ICON "${HDF_RESOURCES_DIR}\\\\hdf.ico") + set (CPACK_NSIS_MUI_UNIICON "${HDF_RESOURCES_DIR}\\\\hdf.ico") # set the package header icon for MUI - set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.bmp") + set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_DIR}\\\\hdf.bmp") set (CPACK_NSIS_DISPLAY_NAME "${CPACK_NSIS_PACKAGE_NAME}") if (OVERRIDE_INSTALL_VERSION) set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${OVERRIDE_INSTALL_VERSION}") @@ -337,7 +330,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) set (CPACK_RESOURCE_FILE_LICENSE "${HDF5_BINARY_DIR}/COPYING.txt") # .. variable:: CPACK_WIX_PRODUCT_ICON # The Icon shown next to the program name in Add/Remove programs. - set(CPACK_WIX_PRODUCT_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.ico") + set(CPACK_WIX_PRODUCT_ICON "${HDF_RESOURCES_DIR}\\\\hdf.ico") # # .. variable:: CPACK_WIX_UI_BANNER # @@ -361,21 +354,30 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) set(CPACK_WIX_PROPERTY_ARPURLINFOABOUT "${HDF5_PACKAGE_URL}") set(CPACK_WIX_PROPERTY_ARPHELPLINK "${HDF5_PACKAGE_BUGREPORT}") if (BUILD_SHARED_LIBS) - set(CPACK_WIX_PATCH_FILE "${HDF_RESOURCES_DIR}/patch.xml") + if (${HDF_CFG_NAME} MATCHES "Debug" OR ${HDF_CFG_NAME} MATCHES "Developer") + set (WIX_CMP_NAME "${HDF5_LIB_NAME}${CMAKE_DEBUG_POSTFIX}") + else () + set (WIX_CMP_NAME "${HDF5_LIB_NAME}") + endif () + configure_file (${HDF_RESOURCES_DIR}/patch.xml.in ${HDF5_BINARY_DIR}/patch.xml @ONLY) + set(CPACK_WIX_PATCH_FILE "${HDF5_BINARY_DIR}/patch.xml") endif () elseif (APPLE) list (APPEND CPACK_GENERATOR "STGZ") - list (APPEND CPACK_GENERATOR "DragNDrop") + option (HDF5_PACK_MACOSX_DMG "Package the HDF5 Library using DragNDrop" ON) + if (HDF5_PACK_MACOSX_DMG) + list (APPEND CPACK_GENERATOR "DragNDrop") + endif () set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}") - set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.icns") + set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_DIR}/hdf.icns") option (HDF5_PACK_MACOSX_FRAMEWORK "Package the HDF5 Library in a Frameworks" OFF) if (HDF5_PACK_MACOSX_FRAMEWORK AND HDF5_BUILD_FRAMEWORKS) set (CPACK_BUNDLE_NAME "${HDF5_PACKAGE_STRING}") set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/") - set (CPACK_BUNDLE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.icns") + set (CPACK_BUNDLE_ICON "${HDF_RESOURCES_DIR}/hdf.icns") set (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist") set (CPACK_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}") #----------------------------------------------------------------------------- @@ -390,7 +392,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) ${HDF5_BINARY_DIR}/CMakeFiles/PkgInfo @ONLY ) configure_file ( - ${HDF_RESOURCES_EXT_DIR}/version.plist.in + ${HDF_RESOURCES_DIR}/version.plist.in ${HDF5_BINARY_DIR}/CMakeFiles/version.plist @ONLY ) install ( @@ -403,18 +405,29 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}") set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) - set (CPACK_DEBIAN_PACKAGE_SECTION "Libraries") - set (CPACK_DEBIAN_PACKAGE_MAINTAINER "${HDF5_PACKAGE_BUGREPORT}") - -# list (APPEND CPACK_GENERATOR "RPM") - set (CPACK_RPM_PACKAGE_RELEASE "1") - set (CPACK_RPM_COMPONENT_INSTALL ON) - set (CPACK_RPM_PACKAGE_RELOCATABLE ON) - set (CPACK_RPM_PACKAGE_LICENSE "BSD-style") - set (CPACK_RPM_PACKAGE_GROUP "Development/Libraries") - set (CPACK_RPM_PACKAGE_URL "${HDF5_PACKAGE_URL}") - set (CPACK_RPM_PACKAGE_SUMMARY "HDF5 is a unique technology suite that makes possible the management of extremely large and complex data collections.") - set (CPACK_RPM_PACKAGE_DESCRIPTION + find_program (DPKGSHLIB_EXE dpkg-shlibdeps) + if (DPKGSHLIB_EXE) + list (APPEND CPACK_GENERATOR "DEB") + set (CPACK_DEBIAN_PACKAGE_SECTION "Libraries") + set (CPACK_DEBIAN_PACKAGE_MAINTAINER "${HDF5_PACKAGE_BUGREPORT}") + endif () + + find_program (RPMBUILD_EXE rpmbuild) + if (RPMBUILD_EXE) + list (APPEND CPACK_GENERATOR "RPM") + set (CPACK_RPM_PACKAGE_RELEASE "1") + set (CPACK_RPM_PACKAGE_RELEASE_DIST ON) + set (CPACK_RPM_COMPONENT_INSTALL ON) + set (CPACK_RPM_PACKAGE_RELOCATABLE ON) + set (CPACK_RPM_FILE_NAME "RPM-DEFAULT") + set (CPACK_RPM_PACKAGE_NAME "${CPACK_PACKAGE_NAME}") + set (CPACK_RPM_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}") + set (CPACK_RPM_PACKAGE_VENDOR "${CPACK_PACKAGE_VENDOR}") + set (CPACK_RPM_PACKAGE_LICENSE "BSD-style") + set (CPACK_RPM_PACKAGE_GROUP "Development/Libraries") + set (CPACK_RPM_PACKAGE_URL "${HDF5_PACKAGE_URL}") + set (CPACK_RPM_PACKAGE_SUMMARY "HDF5 is a unique technology suite that makes possible the management of extremely large and complex data collections.") + set (CPACK_RPM_PACKAGE_DESCRIPTION "The HDF5 technology suite includes: * A versatile data model that can represent very complex data objects and a wide variety of metadata. @@ -429,13 +442,14 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) The HDF5 data model, file format, API, library, and tools are open and distributed without charge. " - ) + ) - #----------------------------------------------------------------------------- - # Configure the spec file for the install RPM - #----------------------------------------------------------------------------- -# configure_file ("${HDF5_RESOURCES_DIR}/hdf5.spec.in" "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec" @ONLY IMMEDIATE) -# set (CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec") + #----------------------------------------------------------------------------- + # Configure the spec file for the install RPM + #----------------------------------------------------------------------------- +# configure_file ("${HDF5_RESOURCES_DIR}/hdf5.spec.in" "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec" @ONLY IMMEDIATE) +# set (CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec") + endif () endif () # By default, do not warn when built on machines using only VS Express: @@ -448,22 +462,20 @@ The HDF5 data model, file format, API, library, and tools are open and distribut if (HDF5_PACKAGE_EXTLIBS) if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL) + if (H5_ZLIB_FOUND AND ZLIB_USE_EXTERNAL) if (WIN32) - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;ALL;/") + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_ZLIB_INCLUDE_DIR_GEN};HDF5_ZLIB;ALL;/") else () - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;libraries;/") - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;headers;/") - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;configinstall;/") + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_ZLIB_INCLUDE_DIR_GEN};HDF5_ZLIB;libraries;/") + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_ZLIB_INCLUDE_DIR_GEN};HDF5_ZLIB;configinstall;/") endif () endif () - if (SZIP_FOUND AND SZIP_USE_EXTERNAL) + if (H5_SZIP_FOUND AND SZIP_USE_EXTERNAL) if (WIN32) - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;ALL;/") + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};SZIP;ALL;/") else () - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/") - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;headers;/") - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/") + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/") + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/") endif () endif () if (PLUGIN_FOUND AND PLUGIN_USE_EXTERNAL) diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeLists.txt b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeLists.txt index c010975ab3a..cf9729d099e 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeLists.txt +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeLists.txt @@ -1,23 +1,21 @@ -#[[ITK --start -cmake_minimum_required (VERSION 3.12) -# ITK --stop ]] +cmake_minimum_required (VERSION 3.18) project (HDF5 C) if (POLICY CMP0074) + # find_package() uses _ROOT variables. cmake_policy (SET CMP0074 NEW) endif () if (POLICY CMP0083) + # To control generation of Position Independent Executable (PIE) or not, + # some flags are required at link time. cmake_policy (SET CMP0083 NEW) endif () -# XXX(kitware): Set to avoid cmake complaining -if (POLICY CMP0007) - cmake_policy (SET CMP0007 NEW) -endif () - -# XXX(kitware): Hardcode settings. -set(DISABLE_PDB_FILES ON) +# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24: +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") + cmake_policy(SET CMP0135 NEW) +endif() #----------------------------------------------------------------------------- # Instructions for use : Normal Build @@ -46,16 +44,17 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR) ) endif () -# CMake version 3.14 added option --ignore-eol to compare files -# cmake -E compare_files --ignore-eol file1 file2 -set (CMAKE_IGNORE_EOL "--ignore-eol") -if (CMAKE_VERSION VERSION_LESS "3.14.0") - set (CMAKE_IGNORE_EOL "") - if (WIN32) - message (FATAL_ERROR "Windows builds require a minimum of CMake 3.14") +# Whether the most recently called project() command, in the current scope or above, +# was in the top level CMakeLists.txt file. +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.21.0") + if(NOT PROJECT_IS_TOP_LEVEL) + set (HDF5_EXTERNALLY_CONFIGURED 1) endif() -endif () - +else() + if (NOT CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) + set (HDF5_EXTERNALLY_CONFIGURED 1) + endif() +endif() #----------------------------------------------------------------------------- # Instructions for use : Sub-Project Build # @@ -75,9 +74,7 @@ endif () # dependencies to this variable so that external projects pick them up # #option (HDF5_EXTERNAL_LIB_PREFIX "Use prefix for custom library naming." "") -# ITK --start -set (HDF5_EXTERNAL_LIB_PREFIX "itk" CACHE STRING "Use prefix for custom library naming.") -# ITK --stop +set (HDF5_EXTERNAL_LIB_PREFIX "" CACHE STRING "Use prefix for custom library naming.") mark_as_advanced (HDF5_EXTERNAL_LIB_PREFIX) # HDF5_EXTERNAL_LIB_PREFIX : # If the parent project needs to install hdf libraries, but avoid @@ -90,6 +87,13 @@ mark_as_advanced (HDF5_LIB_INFIX) # e.g. the infix '_openmpi' results in the library name 'libhdf5_openmpi.so' # This name is used in packages on debian based systems. # (see https://packages.debian.org/jessie/amd64/libhdf5-openmpi-8/filelist) +#option (HDF5_EXTERNAL_LIB_SUFFIX "Use prefix for custom library naming." "") +set (HDF5_EXTERNAL_LIB_SUFFIX "" CACHE STRING "Use suffix for custom library naming.") +mark_as_advanced (HDF5_EXTERNAL_LIB_SUFFIX) +# HDF5_EXTERNAL_LIB_SUFFIX : +# If the parent project needs to install hdf libraries, but avoid +# name conflicts with system versions, then a suffix may be added +# to ensure that the correct versions configured are used. # # HDF5_INSTALL_BIN_DIR, HDF5_INSTALL_LIB_DIR, HDF5_INSTALL_INCLUDE_DIR, HDF5_INSTALL_DATA_DIR : # Customize the 'bin', 'lib', 'include', and 'share' installation directories. @@ -119,8 +123,8 @@ mark_as_advanced (HDF5_LIB_INFIX) # else () # set (H5_ZLIB_HEADER "vtk_zlib.h") # # Set vars that FindZlib would have set if used in sub project -# set (ZLIB_INCLUDE_DIRS "${VTK_ZLIB_INCLUDE_DIRS}") -# set (ZLIB_LIBRARIES vtkzlib) +# set (H5_ZLIB_INCLUDE_DIRS "${VTK_H5_ZLIB_INCLUDE_DIRS}") +# set (H5_ZLIB_LIBRARIES vtkzlib) # endif () # endif () # @@ -129,7 +133,6 @@ mark_as_advanced (HDF5_LIB_INFIX) #----------------------------------------------------------------------------- string (TIMESTAMP CONFIG_DATE "%Y-%m-%d") -if (FALSE) # XXX(kitware): Hardcode settings. #----------------------------------------------------------------------------- # Allow Visual Studio solution directories #----------------------------------------------------------------------------- @@ -146,51 +149,67 @@ option (HDF5_NO_PACKAGES "CPACK - Disable packaging" OFF) mark_as_advanced (HDF5_NO_PACKAGES) option (ALLOW_UNSUPPORTED "Allow unsupported combinations of configure options" OFF) mark_as_advanced (ALLOW_UNSUPPORTED) -else () -set(HDF5_USE_FOLDERS OFF) -set(HDF5_NO_PACKAGES ON) -set(ALLOW_UNSUPPORTED OFF) -endif () #----------------------------------------------------------------------------- -# Set the core names of all the libraries -#----------------------------------------------------------------------------- -set (HDF5_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}") -set (HDF5_TEST_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_test") -set (HDF5_CPP_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_cpp") -set (HDF5_HL_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl") -set (HDF5_HL_CPP_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl_cpp") -set (HDF5_TOOLS_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_tools") -set (HDF5_UTILS_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_utils") -set (HDF5_F90_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_fortran") -set (HDF5_F90_C_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_f90cstub") -set (HDF5_F90_TEST_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_test_fortran") -set (HDF5_F90_C_TEST_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_test_f90cstub") -set (HDF5_HL_F90_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl_fortran") -set (HDF5_HL_F90_C_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl_f90cstub") -set (HDF5_JAVA_JNI_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_java") +# Set the core names of all the libraries CORENAME is the base library name +# for targets, BASE_CORE +# filename are made of PREFIX_BASE_INFIX_CORE_SUFFIX +#----------------------------------------------------------------------------- +set (HDF5_LIB_BASE "hdf5") + +set (HDF5_LIB_CORE "") +set (HDF5_TEST_LIB_CORE "_test") +set (HDF5_CPP_LIB_CORE "_cpp") +set (HDF5_HL_LIB_CORE "_hl") +set (HDF5_HL_CPP_LIB_CORE "_hl_cpp") +set (HDF5_TOOLS_LIB_CORE "_tools") +set (HDF5_UTILS_LIB_CORE "_utils") +set (HDF5_F90_LIB_CORE "_fortran") +set (HDF5_F90_C_LIB_CORE "_f90cstub") +set (HDF5_F90_TEST_LIB_CORE "_test_fortran") +set (HDF5_F90_C_TEST_LIB_CORE "_test_f90cstub") +set (HDF5_HL_F90_LIB_CORE "_hl_fortran") +set (HDF5_HL_F90_C_LIB_CORE "_hl_f90cstub") +set (HDF5_JAVA_JNI_LIB_CORE "_java") + +set (HDF5_LIB_CORENAME "${HDF5_LIB_BASE}") +set (HDF5_TEST_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_TEST_LIB_CORE}") +set (HDF5_CPP_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_CPP_LIB_CORE}") +set (HDF5_HL_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_HL_LIB_CORE}") +set (HDF5_HL_CPP_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_HL_CPP_LIB_CORE}") +set (HDF5_TOOLS_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_TOOLS_LIB_CORE}") +set (HDF5_UTILS_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_UTILS_LIB_CORE}") +set (HDF5_F90_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_F90_LIB_CORE}") +set (HDF5_F90_C_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_F90_C_LIB_CORE}") +set (HDF5_F90_TEST_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_F90_TEST_LIB_CORE}") +set (HDF5_F90_C_TEST_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_F90_C_TEST_LIB_CORE}") +set (HDF5_HL_F90_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_HL_F90_LIB_CORE}") +set (HDF5_HL_F90_C_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_HL_F90_C_LIB_CORE}") +set (HDF5_JAVA_JNI_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_JAVA_JNI_LIB_CORE}") set (HDF5_JAVA_HDF5_LIB_CORENAME "jarhdf5") set (HDF5_JAVA_TEST_LIB_CORENAME "jartest5") #----------------------------------------------------------------------------- # Set the true names of all the libraries if customized by external project #----------------------------------------------------------------------------- -set (HDF5_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_CORENAME}") -set (HDF5_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_LIB_CORENAME}") -set (HDF5_CPP_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_CPP_LIB_CORENAME}") -set (HDF5_HL_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_LIB_CORENAME}") -set (HDF5_HL_CPP_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_CPP_LIB_CORENAME}") -set (HDF5_TOOLS_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOLS_LIB_CORENAME}") -set (HDF5_UTILS_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_UTILS_LIB_CORENAME}") -set (HDF5_F90_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_LIB_CORENAME}") -set (HDF5_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_C_LIB_CORENAME}") -set (HDF5_F90_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_TEST_LIB_CORENAME}") -set (HDF5_F90_C_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_C_TEST_LIB_CORENAME}") -set (HDF5_HL_F90_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_F90_LIB_CORENAME}") -set (HDF5_HL_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_F90_C_LIB_CORENAME}") -set (HDF5_JAVA_JNI_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_JAVA_JNI_LIB_CORENAME}") -set (HDF5_JAVA_HDF5_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_JAVA_HDF5_LIB_CORENAME}") -set (HDF5_JAVA_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_JAVA_TEST_LIB_CORENAME}") +set (HDF5_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}") +set (HDF5_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_TEST_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}") +set (HDF5_CPP_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_CPP_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}") +set (HDF5_HL_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_HL_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}") +set (HDF5_HL_CPP_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_HL_CPP_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}") +set (HDF5_TOOLS_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_TOOLS_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}") +set (HDF5_UTILS_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_UTILS_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}") +set (HDF5_F90_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_F90_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}") +set (HDF5_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_F90_C_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}") +set (HDF5_F90_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_F90_TEST_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}") +set (HDF5_F90_C_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_F90_C_TEST_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}") +set (HDF5_HL_F90_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_HL_F90_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}") +set (HDF5_HL_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_HL_F90_C_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}") +#Because the loading mechanism of the JNI library requires a fixed name, the name of the JNI library cannot be customized +#set (HDF5_JAVA_JNI_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_JAVA_JNI_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}") +set (HDF5_JAVA_JNI_LIB_NAME "${HDF5_LIB_BASE}${HDF5_JAVA_JNI_LIB_CORE}") +set (HDF5_JAVA_HDF5_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_JAVA_HDF5_LIB_CORENAME}${HDF5_LIB_INFIX}${HDF5_EXTERNAL_LIB_SUFFIX}") +set (HDF5_JAVA_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_JAVA_TEST_LIB_CORENAME}${HDF5_LIB_INFIX}${HDF5_EXTERNAL_LIB_SUFFIX}") #----------------------------------------------------------------------------- # Set the target names of all the libraries @@ -228,30 +247,35 @@ set (HDF5_HL_F90_C_LIBSH_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-shared") #----------------------------------------------------------------------------- # Define some CMake variables for use later in the project #----------------------------------------------------------------------------- -set (HDF_CONFIG_DIR ${HDF5_SOURCE_DIR}/config) -set (HDF_RESOURCES_DIR ${HDF5_SOURCE_DIR}/config/cmake) -set (HDF_RESOURCES_EXT_DIR ${HDF5_SOURCE_DIR}/config/cmake_ext_mod) -set (HDF5_SRC_DIR ${HDF5_SOURCE_DIR}/src) -set (HDF5_TEST_SRC_DIR ${HDF5_SOURCE_DIR}/test) -set (HDF5_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/c++) -set (HDF5_CPP_TST_DIR ${HDF5_SOURCE_DIR}/c++/test) -set (HDF5_HL_SRC_DIR ${HDF5_SOURCE_DIR}/hl) -set (HDF5_HL_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/hl/c++) -set (HDF5_HL_TOOLS_DIR ${HDF5_SOURCE_DIR}/hl/tools) -set (HDF5_TOOLS_DIR ${HDF5_SOURCE_DIR}/tools) -set (HDF5_TOOLS_SRC_DIR ${HDF5_SOURCE_DIR}/tools/src) -set (HDF5_PERFORM_SRC_DIR ${HDF5_SOURCE_DIR}/tools/src/perform) -set (HDF5_UTILS_DIR ${HDF5_SOURCE_DIR}/utils) -set (HDF5_F90_SRC_DIR ${HDF5_SOURCE_DIR}/fortran) +set (HDF_CONFIG_DIR ${HDF5_SOURCE_DIR}/config) +set (HDF_RESOURCES_DIR ${HDF5_SOURCE_DIR}/config/cmake) +set (HDF5_SRC_DIR ${HDF5_SOURCE_DIR}/src) +set (HDF5_TEST_SRC_DIR ${HDF5_SOURCE_DIR}/test) +set (HDF5_TEST_PAR_DIR ${HDF5_SOURCE_DIR}/testpar) +set (HDF5_TEST_API_SRC_DIR ${HDF5_SOURCE_DIR}/test/API) +set (HDF5_TEST_API_PAR_SRC_DIR ${HDF5_SOURCE_DIR}/testpar/API) +set (HDF5_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/c++) +set (HDF5_CPP_TST_DIR ${HDF5_SOURCE_DIR}/c++/test) +set (HDF5_HL_SRC_DIR ${HDF5_SOURCE_DIR}/hl) +set (HDF5_HL_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/hl/c++) +set (HDF5_HL_TOOLS_DIR ${HDF5_SOURCE_DIR}/hl/tools) +set (HDF5_TOOLS_ROOT_DIR ${HDF5_SOURCE_DIR}/tools) +set (HDF5_TOOLS_SRC_DIR ${HDF5_SOURCE_DIR}/tools/src) +set (HDF5_TOOLS_TST_DIR ${HDF5_SOURCE_DIR}/tools/test) +set (HDF5_PERFORM_SRC_DIR ${HDF5_SOURCE_DIR}/tools/src/perform) +set (HDF5_UTILS_DIR ${HDF5_SOURCE_DIR}/utils) +set (HDF5_F90_SRC_DIR ${HDF5_SOURCE_DIR}/fortran) set (HDF5_JAVA_JNI_SRC_DIR ${HDF5_SOURCE_DIR}/java/src/jni) set (HDF5_JAVA_HDF5_SRC_DIR ${HDF5_SOURCE_DIR}/java/src/hdf) set (HDF5_JAVA_TEST_SRC_DIR ${HDF5_SOURCE_DIR}/java/test) set (HDF5_JAVA_LIB_DIR ${HDF5_SOURCE_DIR}/java/lib) -set (HDF5_JAVA_LOGGING_JAR ${HDF5_SOURCE_DIR}/java/lib/slf4j-api-1.7.25.jar) -set (HDF5_JAVA_LOGGING_NOP_JAR ${HDF5_SOURCE_DIR}/java/lib/ext/slf4j-nop-1.7.25.jar) -set (HDF5_JAVA_LOGGING_SIMPLE_JAR ${HDF5_SOURCE_DIR}/java/lib/ext/slf4j-simple-1.7.25.jar) +set (HDF5_JAVA_LOGGING_JAR ${HDF5_SOURCE_DIR}/java/lib/slf4j-api-2.0.6.jar) +set (HDF5_JAVA_LOGGING_NOP_JAR ${HDF5_SOURCE_DIR}/java/lib/ext/slf4j-nop-2.0.6.jar) +set (HDF5_JAVA_LOGGING_SIMPLE_JAR ${HDF5_SOURCE_DIR}/java/lib/ext/slf4j-simple-2.0.6.jar) set (HDF5_DOXYGEN_DIR ${HDF5_SOURCE_DIR}/doxygen) +set (HDF5_SRC_INCLUDE_DIRS ${HDF5_SRC_DIR}) + #----------------------------------------------------------------------------- # parse the full version number from H5public.h and include in H5_VERS_INFO #----------------------------------------------------------------------------- @@ -264,9 +288,7 @@ string (REGEX REPLACE ".*#define[ \t]+H5_VERS_RELEASE[ \t]+([0-9]*).*$" "\\1" H5_VERS_RELEASE ${_h5public_h_contents}) string (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._-]*)\".*$" "\\1" H5_VERS_SUBRELEASE ${_h5public_h_contents}) -if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (TRACE "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}") -endif () +message (TRACE "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}") #----------------------------------------------------------------------------- # parse the full soversion number from config/lt_vers.am and include in H5_SOVERS_INFO @@ -279,11 +301,7 @@ string (REGEX REPLACE ".*LT_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$" string (REGEX REPLACE ".*LT_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_LIB_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_LIB_SOVERS_MAJOR ${H5_LIB_SOVERS_INTERFACE}-${H5_LIB_SOVERS_RELEASE}) -#[[ ITK --start -if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "SOVERSION: ${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}") -endif () -# ITK --stop ]] +message (VERBOSE "SOVERSION: ${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}") string (REGEX MATCH ".*LT_TOOLS_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_TOOLS_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_TOOLS_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_TOOLS_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" @@ -293,11 +311,7 @@ if (H5_TOOLS_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_TOOLS_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_TOOLS_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_TOOLS_SOVERS_MAJOR ${H5_TOOLS_SOVERS_INTERFACE}-${H5_TOOLS_SOVERS_RELEASE}) -#[[ ITK --start - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "SOVERSION_TOOLS: ${H5_TOOLS_SOVERS_MAJOR}.${H5_TOOLS_SOVERS_RELEASE}.${H5_TOOLS_SOVERS_MINOR}") - endif () -# ITK --stop ]] + message (VERBOSE "SOVERSION_TOOLS: ${H5_TOOLS_SOVERS_MAJOR}.${H5_TOOLS_SOVERS_RELEASE}.${H5_TOOLS_SOVERS_MINOR}") endif () string (REGEX MATCH ".*LT_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_CXX_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_CXX_SOVERS_EXISTS) @@ -308,14 +322,10 @@ if (H5_CXX_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_CXX_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_CXX_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_CXX_SOVERS_MAJOR ${H5_CXX_SOVERS_INTERFACE}-${H5_CXX_SOVERS_RELEASE}) -#[[ ITK --start - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "SOVERSION_CXX: ${H5_CXX_SOVERS_MAJOR}.${H5_CXX_SOVERS_RELEASE}.${H5_CXX_SOVERS_MINOR}") - endif () -# ITK --stop ]] + message (VERBOSE "SOVERSION_CXX: ${H5_CXX_SOVERS_MAJOR}.${H5_CXX_SOVERS_RELEASE}.${H5_CXX_SOVERS_MINOR}") endif () string (REGEX MATCH ".*LT_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_F_SOVERS_EXISTS ${_lt_vers_am_contents}) -if (H5_F_SOVERS_EXISTS AND FALSE) # XXX(kitware): VTK doesn't need Fortran support. +if (H5_F_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_F_SOVERS_INTERFACE ${_lt_vers_am_contents}) string (REGEX REPLACE ".*LT_F_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$" @@ -323,11 +333,7 @@ if (H5_F_SOVERS_EXISTS AND FALSE) # XXX(kitware): VTK doesn't need Fortran suppo string (REGEX REPLACE ".*LT_F_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_F_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_F_SOVERS_MAJOR ${H5_F_SOVERS_INTERFACE}-${H5_F_SOVERS_RELEASE}) -#[[ ITK --start - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "SOVERSION_F: ${H5_F_SOVERS_MAJOR}.${H5_F_SOVERS_RELEASE}.${H5_F_SOVERS_MINOR}") - endif () -# ITK --stop ]] + message (VERBOSE "SOVERSION_F: ${H5_F_SOVERS_MAJOR}.${H5_F_SOVERS_RELEASE}.${H5_F_SOVERS_MINOR}") endif () string (REGEX MATCH ".*LT_HL_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_HL_SOVERS_EXISTS) @@ -338,11 +344,7 @@ if (H5_HL_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_HL_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_HL_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_HL_SOVERS_MAJOR ${H5_HL_SOVERS_INTERFACE}-${H5_HL_SOVERS_RELEASE}) -#[[ ITK --start - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "SOVERSION_HL: ${H5_HL_SOVERS_MAJOR}.${H5_HL_SOVERS_RELEASE}.${H5_HL_SOVERS_MINOR}") - endif () -# ITK --stop ]] + message (VERBOSE "SOVERSION_HL: ${H5_HL_SOVERS_MAJOR}.${H5_HL_SOVERS_RELEASE}.${H5_HL_SOVERS_MINOR}") endif () string (REGEX MATCH ".*LT_HL_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_CXX_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_HL_CXX_SOVERS_EXISTS) @@ -353,14 +355,10 @@ if (H5_HL_CXX_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_HL_CXX_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_HL_CXX_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_HL_CXX_SOVERS_MAJOR ${H5_HL_CXX_SOVERS_INTERFACE}-${H5_HL_CXX_SOVERS_RELEASE}) -#[[ ITK --start - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "SOVERSION_HL_CXX: ${H5_HL_CXX_SOVERS_MAJOR}.${H5_HL_CXX_SOVERS_RELEASE}.${H5_HL_CXX_SOVERS_MINOR}") - endif () -# ITK --stop ]] + message (VERBOSE "SOVERSION_HL_CXX: ${H5_HL_CXX_SOVERS_MAJOR}.${H5_HL_CXX_SOVERS_RELEASE}.${H5_HL_CXX_SOVERS_MINOR}") endif () string (REGEX MATCH ".*LT_HL_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_F_SOVERS_EXISTS ${_lt_vers_am_contents}) -if (H5_HL_F_SOVERS_EXISTS AND FALSE) # XXX(kitware): VTK doesn't need Fortran support. +if (H5_HL_F_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_HL_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_HL_F_SOVERS_INTERFACE ${_lt_vers_am_contents}) string (REGEX REPLACE ".*LT_HL_F_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$" @@ -368,14 +366,10 @@ if (H5_HL_F_SOVERS_EXISTS AND FALSE) # XXX(kitware): VTK doesn't need Fortran su string (REGEX REPLACE ".*LT_HL_F_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_HL_F_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_HL_F_SOVERS_MAJOR ${H5_HL_F_SOVERS_INTERFACE}-${H5_HL_F_SOVERS_RELEASE}) -#[[ ITK --start - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "SOVERSION_HL_F: ${H5_HL_F_SOVERS_MAJOR}.${H5_HL_F_SOVERS_RELEASE}.${H5_HL_F_SOVERS_MINOR}") - endif () -# ITK --stop ]] + message (VERBOSE "SOVERSION_HL_F: ${H5_HL_F_SOVERS_MAJOR}.${H5_HL_F_SOVERS_RELEASE}.${H5_HL_F_SOVERS_MINOR}") endif () string (REGEX MATCH ".*LT_JAVA_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_JAVA_SOVERS_EXISTS ${_lt_vers_am_contents}) -if(H5_JAVA_SOVERS_EXISTS AND FALSE) # XXX(kitware): VTK doesn't need Java support. +if(H5_JAVA_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_JAVA_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_JAVA_SOVERS_INTERFACE ${_lt_vers_am_contents}) string (REGEX REPLACE ".*LT_JAVA_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$" @@ -383,11 +377,7 @@ if(H5_JAVA_SOVERS_EXISTS AND FALSE) # XXX(kitware): VTK doesn't need Java suppor string (REGEX REPLACE ".*LT_JAVA_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_JAVA_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_JAVA_SOVERS_MAJOR ${H5_JAVA_SOVERS_INTERFACE}-${H5_JAVA_SOVERS_RELEASE}) -#[[ ITK --start - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "SOVERSION_JAVA: ${H5_JAVA_SOVERS_MAJOR}.${H5_JAVA_SOVERS_RELEASE}.${H5_JAVA_SOVERS_MINOR}") - endif () -# ITK --stop ]] + message (VERBOSE "SOVERSION_JAVA: ${H5_JAVA_SOVERS_MAJOR}.${H5_JAVA_SOVERS_RELEASE}.${H5_JAVA_SOVERS_MINOR}") endif () #----------------------------------------------------------------------------- @@ -461,14 +451,22 @@ set (HDF5_PACKAGE_TARNAME "${HDF5_PACKAGE}${HDF_PACKAGE_EXT}") set (HDF5_PACKAGE_URL "http://www.hdfgroup.org") set (HDF5_PACKAGE_BUGREPORT "help@hdfgroup.org") +#----------------------------------------------------------------------------- +# Set variables needed for installation +#----------------------------------------------------------------------------- +set (HDF5_VERSION_STRING ${HDF5_PACKAGE_VERSION}) +set (HDF5_VERSION_MAJOR ${HDF5_PACKAGE_VERSION_MAJOR}) +set (HDF5_VERSION_MINOR ${HDF5_PACKAGE_VERSION_MINOR}) +set (H5_LIBVER_DIR ${H5_VERS_MAJOR}${H5_VERS_MINOR}) + #----------------------------------------------------------------------------- # Include some macros for reusable code #----------------------------------------------------------------------------- -include (${HDF_RESOURCES_EXT_DIR}/HDFMacros.cmake) +include (${HDF_RESOURCES_DIR}/HDFMacros.cmake) HDF_DIR_PATHS(${HDF5_PACKAGE_NAME}) -include (${HDF_RESOURCES_EXT_DIR}/HDFLibMacros.cmake) +include (${HDF_RESOURCES_DIR}/HDFLibMacros.cmake) include (${HDF_RESOURCES_DIR}/HDF5PluginMacros.cmake) include (${HDF_RESOURCES_DIR}/HDF5Macros.cmake) @@ -499,6 +497,13 @@ include (${HDF_RESOURCES_DIR}/ConfigureChecks.cmake) set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) +#----------------------------------------------------------------------------- +# Include directories in the source or build tree should come before other +# directories to prioritize headers in the sources over installed ones. +#----------------------------------------------------------------------------- +set (CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON) +set (HDF5_COMP_INCLUDE_DIRECTORIES) + #----------------------------------------------------------------------------- # Mac OS X Options #----------------------------------------------------------------------------- @@ -509,48 +514,51 @@ endif () #----------------------------------------------------------------------------- # Option to Build Shared and Static libs, default is both #----------------------------------------------------------------------------- +option (ONLY_SHARED_LIBS "Only Build Shared Libraries" OFF) +mark_as_advanced (ONLY_SHARED_LIBS) option (BUILD_STATIC_LIBS "Build Static Libraries" ON) set (H5_ENABLE_STATIC_LIB NO) option (BUILD_SHARED_LIBS "Build Shared Libraries" ON) set (H5_ENABLE_SHARED_LIB NO) -# ITK --start -option (ONLY_SHARED_LIBS "Only Build Shared Libraries" ${BUILD_SHARED_LIBS}) -# ITK --stop -mark_as_advanced (ONLY_SHARED_LIBS) -if (BUILD_STATIC_LIBS) - set (H5_ENABLE_STATIC_LIB YES) -endif () -if (BUILD_SHARED_LIBS) - set (H5_ENABLE_SHARED_LIB YES) -endif () +option (HDF5_BUILD_STATIC_TOOLS "Build Static Tools NOT Shared Tools" OFF) -# Force only shared libraries if all OFF -if (NOT BUILD_STATIC_LIBS AND NOT BUILD_SHARED_LIBS) +# only shared libraries/tools is true if user forces static OFF +if (NOT BUILD_STATIC_LIBS) set (ONLY_SHARED_LIBS ON CACHE BOOL "Only Build Shared Libraries" FORCE) endif () +# only shared libraries is set ON by user then force settings if (ONLY_SHARED_LIBS) set (H5_ENABLE_STATIC_LIB NO) - set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries") + set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries" FORCE) + set (BUILD_STATIC_LIBS OFF CACHE BOOL "Build Static Libraries" FORCE) + if (HDF5_BUILD_STATIC_TOOLS) + message (WARNING "Cannot build static tools without static libraries. Building shared tools.") + endif () + set (HDF5_BUILD_STATIC_TOOLS OFF CACHE BOOL "Build Static Tools NOT Shared Tools" FORCE) endif () -set (CMAKE_POSITION_INDEPENDENT_CODE ON) +if (NOT BUILD_SHARED_LIBS AND NOT HDF5_BUILD_STATIC_TOOLS) + message (VERBOSE "Cannot build shared tools without shared libraries. Building static tools.") + set (HDF5_BUILD_STATIC_TOOLS ON CACHE BOOL "Build Static Tools NOT Shared Tools" FORCE) +endif () -if (NOT BUILD_SHARED_LIBS) - set (tgt_file_ext "") -else () - set (tgt_file_ext "-shared") +if (BUILD_STATIC_LIBS) + set (H5_ENABLE_STATIC_LIB YES) endif () +if (BUILD_SHARED_LIBS) + set (H5_ENABLE_SHARED_LIB YES) +endif () + +set (CMAKE_POSITION_INDEPENDENT_CODE ON) #----------------------------------------------------------------------------- # perl is used in some optional src and tests, check availability -if (FALSE) # VTK doesn't expose where this is used anyways. find_package (Perl) if (PERL_FOUND) set (H5_PERL_FOUND YES) endif () -endif () #----------------------------------------------------------------------------- #----------------------------------------------------------------------------- @@ -563,7 +571,6 @@ if (BUILD_STATIC_EXECS) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static") endif () endif () -if (FALSE) # XXX(kitware): Hide settings VTK doesn't need. option (HDF5_ENABLE_ANALYZER_TOOLS "enable the use of Clang tools" OFF) mark_as_advanced (HDF5_ENABLE_ANALYZER_TOOLS) @@ -601,29 +608,6 @@ if (HDF5_ENABLE_COVERAGE) endif () endif () -#----------------------------------------------------------------------------- -# Option to indicate using dmalloc -#----------------------------------------------------------------------------- -# option (HDF5_ENABLE_USING_DMALLOC "Indicate that dmalloc is used" OFF) -# if (HDF5_ENABLE_USING_DMALLOC) -# find_package (DMALLOC) -# set (H5_HAVE_DMALLOC DMALLOC_FOUND) -# endif () - -#----------------------------------------------------------------------------- -# Option to build documentation -#----------------------------------------------------------------------------- -option (HDF5_BUILD_DOC "Build documentation" OFF) -if (HDF5_BUILD_DOC AND EXISTS "${HDF5_DOXYGEN_DIR}" AND IS_DIRECTORY "${HDF5_DOXYGEN_DIR}") -# check if Doxygen is installed - find_package(Doxygen) - if (DOXYGEN_FOUND) - message(STATUS "Doxygen version: ${DOXYGEN_VERSION}") - else () - message(STATUS "Doxygen needs to be installed to generate the doxygen documentation") - endif () -endif () - #----------------------------------------------------------------------------- # Option to indicate using a memory checker #----------------------------------------------------------------------------- @@ -632,14 +616,6 @@ if (HDF5_ENABLE_USING_MEMCHECKER) set (H5_USING_MEMCHECKER 1) endif () -#----------------------------------------------------------------------------- -# Option to indicate internal memory allocation sanity checks are enabled -#----------------------------------------------------------------------------- -option (HDF5_MEMORY_ALLOC_SANITY_CHECK "Indicate that internal memory allocation sanity checks are enabled" OFF) -if (HDF5_MEMORY_ALLOC_SANITY_CHECK) - set (H5_MEMORY_ALLOC_SANITY_CHECK 1) -endif () - #----------------------------------------------------------------------------- # Option to enable/disable using pread/pwrite for VFDs #----------------------------------------------------------------------------- @@ -658,13 +634,6 @@ if (HDF5_ENABLE_DEPRECATED_SYMBOLS) else () set (H5_NO_DEPRECATED_SYMBOLS 1) endif () -else () -set(HDF5_ENABLE_COVERAGE OFF) -set(HDF5_ENABLE_USING_MEMCHECKER OFF) -set(HDF5_MEMORY_ALLOC_SANITY_CHECK OFF) -set(HDF5_ENABLE_DEPRECATED_SYMBOLS OFF) -set(H5_NO_DEPRECATED_SYMBOLS 0) -endif () #----------------------------------------------------------------------------- # When building utility executables that generate other (source) files : @@ -675,19 +644,11 @@ endif () if (WIN32) add_compile_definitions (_CRT_SECURE_NO_WARNINGS) if (MSVC) - if (TRUE) # XXX(kitware): this is not what we want for VTK. - add_compile_definitions (_CRT_SECURE_NO_WARNINGS _CONSOLE) - else () - add_compile_definitions (_BIND_TO_CURRENT_VCLIBS_VERSION=1 _CONSOLE) - endif () + add_compile_definitions (_BIND_TO_CURRENT_VCLIBS_VERSION=1 _CONSOLE) endif () endif () -if (FALSE) # XXX(kitware): Hide settings VTK doesn't need. option (HDF5_MINGW_STATIC_GCC_LIBS "Statically link libgcc/libstdc++" OFF) -else () -set(HDF5_MINGW_STATIC_GCC_LIBS OFF) -endif () if (MSVC) set (CMAKE_MFC_FLAG 0) @@ -695,17 +656,6 @@ if (MSVC) set (WIN_LINK_FLAGS "") endif () -set (MAKE_SYSTEM) -if (CMAKE_MAKE_PROGRAM MATCHES "make") - set (MAKE_SYSTEM 1) -endif () - -set (CFG_INIT "/${CMAKE_CFG_INTDIR}") -if (MAKE_SYSTEM) - set (CFG_INIT "") -endif () - -if (FALSE) # XXX(kitware): Hide settings VTK doesn't need. # Do not generate test programs by default option (HDF5_BUILD_GENERATORS "Build Test Generators" OFF) @@ -714,17 +664,26 @@ option (HDF5_BUILD_GENERATORS "Build Test Generators" OFF) #----------------------------------------------------------------------------- option (HDF5_ENABLE_TRACE "Enable API tracing capability" OFF) mark_as_advanced (HDF5_ENABLE_TRACE) -if (${HDF_CFG_NAME} MATCHES "Debug") +if (${HDF_CFG_NAME} MATCHES "Debug" OR ${HDF_CFG_NAME} MATCHES "Developer") # Enable instrumenting of the library's internal operations option (HDF5_ENABLE_INSTRUMENT "Instrument The library" OFF) + + # Instrumenting is enabled by default for parallel debug builds + if (HDF5_ENABLE_PARALLEL) + set (HDF5_ENABLE_INSTRUMENT ON CACHE BOOL "Instrument The library" FORCE) + endif () + if (HDF5_ENABLE_INSTRUMENT) set (H5_HAVE_INSTRUMENTED_LIBRARY 1) endif () mark_as_advanced (HDF5_ENABLE_INSTRUMENT) endif () -else () -set(HDF5_BUILD_GENERATORS OFF) -set(HDF5_ENABLE_TRACE OFF) + +#----------------------------------------------------------------------------- +# Add some definitions for Developer Builds +#----------------------------------------------------------------------------- +if (${HDF_CFG_NAME} MATCHES "Developer") + include (${HDF_RESOURCES_DIR}/HDF5DeveloperBuild.cmake) endif () #----------------------------------------------------------------------------- @@ -733,27 +692,19 @@ endif () if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") set (H5_HAVE_EMBEDDED_LIBINFO 0) else () - if (FALSE) # XXX(kitware): Hardcode settings. - option (HDF5_ENABLE_EMBEDDED_LIBINFO "embed library info into executables" ON) + option (HDF5_ENABLE_EMBEDDED_LIBINFO "Embed library info into executables" ON) if (HDF5_ENABLE_EMBEDDED_LIBINFO) set (H5_HAVE_EMBEDDED_LIBINFO 1) endif () - else () - set(HDF5_ENABLE_EMBEDDED_LIBINFO 1) - endif () endif () include (${HDF_RESOURCES_DIR}/HDFCompilerFlags.cmake) -set (CMAKE_MODULE_PATH ${HDF_RESOURCES_DIR} ${HDF_RESOURCES_EXT_DIR} ${CMAKE_MODULE_PATH}) +set (CMAKE_MODULE_PATH ${HDF_RESOURCES_DIR} ${CMAKE_MODULE_PATH}) #----------------------------------------------------------------------------- # Option to Enable HDFS #----------------------------------------------------------------------------- -if (FALSE) # XXX(kitware): Hardcode settings. option (HDF5_ENABLE_HDFS "Enable HDFS" OFF) -else () -set(HDF5_ENABLE_HDFS OFF) -endif () if (HDF5_ENABLE_HDFS) find_package(JNI REQUIRED) if (JNI_FOUND) @@ -767,6 +718,7 @@ if (HDF5_ENABLE_HDFS) list (APPEND LINK_LIBS -pthread) endif () else () + set (HDF5_ENABLE_HDFS OFF CACHE BOOL "Enable HDFS" FORCE) message (FATAL_ERROR "Set to use libhdfs library, but could not find or use libhdfs. Please verify that the path to HADOOP_HOME is valid, and/or reconfigure without HDF5_ENABLE_HDFS") endif () endif () @@ -774,13 +726,17 @@ endif () #----------------------------------------------------------------------------- # Option to Enable MPI Parallel #----------------------------------------------------------------------------- -if (FALSE) # XXX(kitware): Hardcode settings. option (HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF) if (HDF5_ENABLE_PARALLEL) find_package(MPI REQUIRED) if (MPI_C_FOUND) set (H5_HAVE_PARALLEL 1) - if (FALSE) # XXX(kitware): VTK doesn't need Fortran support. + + # Require MPI standard 3.0 and greater + if (MPI_VERSION LESS 3) + message (FATAL_ERROR "HDF5 requires MPI standard 3.0 or greater") + endif () + # MPI checks, only do these if MPI_C_FOUND is true, otherwise they always fail # and once set, they are cached as false and not regenerated set (CMAKE_REQUIRED_LIBRARIES "${MPI_C_LIBRARIES}") @@ -788,14 +744,17 @@ if (HDF5_ENABLE_PARALLEL) # Used by Fortran + MPI CHECK_SYMBOL_EXISTS (MPI_Comm_c2f "mpi.h" H5_HAVE_MPI_MULTI_LANG_Comm) CHECK_SYMBOL_EXISTS (MPI_Info_c2f "mpi.h" H5_HAVE_MPI_MULTI_LANG_Info) - endif () # Used by Parallel Compression feature set (PARALLEL_FILTERED_WRITES ON) - CHECK_SYMBOL_EXISTS (MPI_Mprobe "mpi.h" H5_HAVE_MPI_Mprobe) - CHECK_SYMBOL_EXISTS (MPI_Imrecv "mpi.h" H5_HAVE_MPI_Imrecv) - if (NOT H5_HAVE_MPI_Mprobe OR NOT H5_HAVE_MPI_Imrecv) - message (WARNING "The MPI_Mprobe and/or MPI_Imrecv functions could not be located. + CHECK_SYMBOL_EXISTS (MPI_Ibarrier "mpi.h" H5_HAVE_MPI_Ibarrier) + CHECK_SYMBOL_EXISTS (MPI_Issend "mpi.h" H5_HAVE_MPI_Issend) + CHECK_SYMBOL_EXISTS (MPI_Iprobe "mpi.h" H5_HAVE_MPI_Iprobe) + CHECK_SYMBOL_EXISTS (MPI_Irecv "mpi.h" H5_HAVE_MPI_Irecv) + if (H5_HAVE_MPI_Ibarrier AND H5_HAVE_MPI_Issend AND H5_HAVE_MPI_Iprobe AND H5_HAVE_MPI_Irecv) + set (H5_HAVE_PARALLEL_FILTERED_WRITES 1) + else () + message (WARNING "The MPI_Ibarrier/MPI_Issend/MPI_Iprobe/MPI_Irecv functions could not be located. Parallel writes of filtered data will be disabled.") set (PARALLEL_FILTERED_WRITES OFF) endif () @@ -821,14 +780,81 @@ if (H5_HAVE_PARALLEL) set (CMAKE_EXE_LINKER_FLAGS "${MPI_C_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}") endif () endif () -else () -set(HDF5_ENABLE_PARALLEL OFF) -endif () -if (FALSE) # XXX(kitware): Hardcode settings. -#option (DEFAULT_API_VERSION "Enable v1.12 API (v16, v18, v110, v112)" "v112") -set (DEFAULT_API_VERSION "v112" CACHE STRING "Enable v1.12 API (v16, v18, v110, v112)") -set_property (CACHE DEFAULT_API_VERSION PROPERTY STRINGS v16 v18 v110 v112) +# Determine whether to build the HDF5 Subfiling VFD +set (H5FD_SUBFILING_DIR ${HDF5_SRC_DIR}/H5FDsubfiling) +set (HDF5_SRC_INCLUDE_DIRS + ${HDF5_SRC_INCLUDE_DIRS} + ${H5FD_SUBFILING_DIR} +) +option (HDF5_ENABLE_SUBFILING_VFD "Build Parallel HDF5 Subfiling VFD" OFF) +if (HDF5_ENABLE_SUBFILING_VFD) + if (WIN32) + message (FATAL_ERROR " **** Subfiling is not supported on Windows **** ") + endif () + if (NOT HDF5_ENABLE_PARALLEL) + message (FATAL_ERROR "Subfiling VFD requires a parallel HDF5 build") + else () + # Check for MPI_Comm_split_type + CHECK_SYMBOL_EXISTS (MPI_Comm_split_type "mpi.h" H5_HAVE_MPI_Comm_split_type) + if (NOT H5_HAVE_MPI_Comm_split_type) + message (FATAL_ERROR "Subfiling VFD requires MPI-3 support for MPI_Comm_split_type") + endif () + endif () + + if (NOT DEFINED Threads_FOUND) + set (THREADS_PREFER_PTHREAD_FLAG ON) + find_package (Threads REQUIRED) + endif () + + # For now, make sure we're using pthreads. Once Subfiling can be + # supported on Windows, we should allow Win32 threads as well + if (NOT ${Threads_FOUND} OR NOT ${CMAKE_USE_PTHREADS_INIT}) + message (FATAL_ERROR "Subfiling requires pthreads for system thread library") + endif () + + CHECK_INCLUDE_FILE("stdatomic.h" HAVE_STDATOMIC_H) + if (NOT HAVE_STDATOMIC_H) + message (FATAL_ERROR "Subfiling VFD requires atomic operations support. C11 stdatomic.h NOT available.") + else() + set (H5_HAVE_STDATOMIC_H 1) + endif() + + set (H5_HAVE_SUBFILING_VFD 1) + # IOC VFD is currently only built when subfiling is enabled + set (H5_HAVE_IOC_VFD 1) + + message (STATUS "Setting up to use Mercury components") + set (H5FD_SUBFILING_MERCURY_DIR ${H5FD_SUBFILING_DIR}/mercury/src/util) + set (HDF5_SRC_INCLUDE_DIRS + ${HDF5_SRC_INCLUDE_DIRS} + ${H5FD_SUBFILING_MERCURY_DIR} + ) + set (CMAKE_REQUIRED_INCLUDES "${H5FD_SUBFILING_MERCURY_DIR}") + + # Run some configure checks for the Mercury util files + set (CMAKE_EXTRA_INCLUDE_FILES pthread.h) + set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) + + check_type_size(PTHREAD_MUTEX_ADAPTIVE_NP PTHREAD_MUTEX_ADAPTIVE_NP_SIZE) + if (HAVE_PTHREAD_MUTEX_ADAPTIVE_NP_SIZE) + set (${HDF_PREFIX}_HAVE_PTHREAD_MUTEX_ADAPTIVE_NP 1) + endif () + + check_symbol_exists(pthread_condattr_setclock pthread.h + ${HDF_PREFIX}_HAVE_PTHREAD_CONDATTR_SETCLOCK) + + unset (CMAKE_EXTRA_INCLUDE_FILES) + unset (CMAKE_REQUIRED_LIBRARIES) + if(NOT H5_HAVE_SUBFILING_VFD EQUAL 1) + set (HDF5_ENABLE_SUBFILING_VFD OFF CACHE BOOL "Build Parallel HDF5 Subfiling VFD" FORCE) + endif() +endif() + +#option (DEFAULT_API_VERSION "Enable v1.14 API (v16, v18, v110, v112, v114)" "v114") +set (DEFAULT_API_VERSION "v114" CACHE STRING "Enable v1.14 API (v16, v18, v110, v112, v114)") +set_property (CACHE DEFAULT_API_VERSION PROPERTY STRINGS v16 v18 v110 v112 v114) + #----------------------------------------------------------------------------- # Option to use 1.6.x API #----------------------------------------------------------------------------- @@ -856,19 +882,20 @@ endif () #----------------------------------------------------------------------------- # Option to use 1.12.x API #----------------------------------------------------------------------------- -if (NOT DEFAULT_API_VERSION) - set (DEFAULT_API_VERSION "v112") -endif () set (H5_USE_112_API_DEFAULT 0) if (DEFAULT_API_VERSION MATCHES "v112") set (H5_USE_112_API_DEFAULT 1) endif () -else () -set (H5_USE_16_API_DEFAULT 0) -set (H5_USE_18_API_DEFAULT 0) -set (H5_USE_110_API_DEFAULT 0) -set (H5_USE_112_API_DEFAULT 0) -set (DEFAULT_API_VERSION "v112") + +#----------------------------------------------------------------------------- +# Option to use 1.14.x API +#----------------------------------------------------------------------------- +if (NOT DEFAULT_API_VERSION) + set (DEFAULT_API_VERSION "v114") +endif () +set (H5_USE_114_API_DEFAULT 0) +if (DEFAULT_API_VERSION MATCHES "v114") + set (H5_USE_114_API_DEFAULT 1) endif () #----------------------------------------------------------------------------- @@ -881,7 +908,11 @@ include (UserMacros.cmake) #----------------------------------------------------------------------------- include (CMakeFilters.cmake) -if (FALSE) # XXX(kitware): Disable packaging. +#----------------------------------------------------------------------------- +# Include external VOL connectors +#----------------------------------------------------------------------------- +include (CMakeVOL.cmake) + #----------------------------------------------------------------------------- # Option for external libraries on windows #----------------------------------------------------------------------------- @@ -889,13 +920,6 @@ option (HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF) if (NOT HDF5_EXTERNALLY_CONFIGURED) if (HDF5_PACKAGE_EXTLIBS) set (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE) - if (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND) - PACKAGE_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT}) - endif () - - if (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND) - PACKAGE_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT}) - endif () endif () endif () @@ -906,51 +930,33 @@ option (HDF5_ENABLE_THREADSAFE "Enable thread-safety" OFF) if (HDF5_ENABLE_THREADSAFE) # check for unsupported options if (WIN32) - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE " **** thread-safety option not supported with static library **** ") - message (VERBOSE " **** thread-safety option will not be used building static library **** ") - endif () - endif () - if (HDF5_ENABLE_PARALLEL) - if (NOT ALLOW_UNSUPPORTED) - message (FATAL_ERROR " **** parallel and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ") - else () - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE " **** Allowing unsupported parallel and thread-safety options **** ") - endif () + if (BUILD_STATIC_LIBS) + message (FATAL_ERROR " **** thread-safety option not supported with static library **** ") endif () endif () if (HDF5_BUILD_FORTRAN) if (NOT ALLOW_UNSUPPORTED) message (FATAL_ERROR " **** Fortran and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ") else () - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE " **** Allowing unsupported Fortran and thread-safety options **** ") - endif () + message (VERBOSE " **** Allowing unsupported Fortran and thread-safety options **** ") endif () endif () if (HDF5_BUILD_CPP_LIB) if (NOT ALLOW_UNSUPPORTED) message (FATAL_ERROR " **** C++ and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ") else () - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE " **** Allowing unsupported C++ and thread-safety options **** ") - endif () + message (VERBOSE " **** Allowing unsupported C++ and thread-safety options **** ") endif () endif () if (HDF5_BUILD_HL_LIB) if (NOT ALLOW_UNSUPPORTED) message (FATAL_ERROR " **** HL and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ") else () - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE " **** Allowing unsupported HL and thread-safety options **** ") - endif () + message (VERBOSE " **** Allowing unsupported HL and thread-safety options **** ") endif () endif () - if (H5_HAVE_IOEO) - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE " **** Win32 threads requires WINVER>=0x600 (Windows Vista/7/8) **** ") - endif () + if (WIN32) + # When Win32 is available, we use those threads set (H5_HAVE_WIN_THREADS 1) else () if (NOT H5_HAVE_PTHREAD_H) @@ -963,20 +969,15 @@ if (HDF5_ENABLE_THREADSAFE) set (H5_HAVE_THREADSAFE 1) endif () endif () -else () -set(HDF5_ENABLE_THREADSAFE OFF) -endif () #----------------------------------------------------------------------------- # Option to build the map API #----------------------------------------------------------------------------- -if (FALSE) # XXX(kitware): Hardcode settings. option (HDF5_ENABLE_MAP_API "Build the map API" OFF) -else () -set (HDF5_ENABLE_MAP_API OFF) -endif () if (HDF5_ENABLE_MAP_API) set (H5_HAVE_MAP_API 1) +else () + set (HDF5_ENABLE_MAP_API OFF CACHE BOOL "Build the map API" FORCE) endif () #----------------------------------------------------------------------------- @@ -984,123 +985,84 @@ endif () #----------------------------------------------------------------------------- add_subdirectory (src) -if (FALSE) # XXX(kitware): Hardcode settings. if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL) - if (NOT ONLY_SHARED_LIBS) - add_dependencies (${HDF5_LIB_TARGET} ZLIB) + if ((H5_ZLIB_FOUND AND ZLIB_USE_EXTERNAL) OR (H5_SZIP_FOUND AND SZIP_USE_EXTERNAL)) + if (BUILD_STATIC_LIBS) + add_dependencies (${HDF5_LIB_TARGET} ${LINK_COMP_LIBS}) endif () if (BUILD_SHARED_LIBS) - add_dependencies (${HDF5_LIBSH_TARGET} ZLIB) + add_dependencies (${HDF5_LIBSH_TARGET} ${LINK_COMP_LIBS}) endif () endif () - if (SZIP_FOUND AND SZIP_USE_EXTERNAL) - if (NOT ONLY_SHARED_LIBS) - add_dependencies (${HDF5_LIB_TARGET} SZIP) - endif () - if (BUILD_SHARED_LIBS) - add_dependencies (${HDF5_LIBSH_TARGET} SZIP) +endif () + +#----------------------------------------------------------------------------- +# Option to build documentation +#----------------------------------------------------------------------------- +option (HDF5_BUILD_DOC "Build documentation" OFF) +if (HDF5_BUILD_DOC AND EXISTS "${HDF5_DOXYGEN_DIR}" AND IS_DIRECTORY "${HDF5_DOXYGEN_DIR}") +# check if Doxygen is installed + find_package(Doxygen) + if (DOXYGEN_FOUND) + option (HDF5_ENABLE_DOXY_WARNINGS "Enable fail if doxygen parsing has warnings." OFF) + mark_as_advanced (HDF5_ENABLE_DOXY_WARNINGS) + if (HDF5_ENABLE_DOXY_WARNINGS) + set (HDF5_DOXY_WARNINGS "FAIL_ON_WARNINGS") + else () + set (HDF5_DOXY_WARNINGS "NO") endif () + message(STATUS "Doxygen version: ${DOXYGEN_VERSION}") + add_subdirectory (doxygen) + else () + message(STATUS "Doxygen needs to be installed to generate the doxygen documentation") endif () endif () -endif () -if (FALSE) # XXX(kitware): Disable testing of HDF5. #----------------------------------------------------------------------------- # Dashboard and Testing Settings #----------------------------------------------------------------------------- option (BUILD_TESTING "Build HDF5 Unit Testing" ON) if (BUILD_TESTING) - set (DART_TESTING_TIMEOUT 1200 - CACHE STRING - "Timeout in seconds for each test (default 1200=20minutes)" - ) - - # Generate a list of timeouts based on DART_TESTING_TIMEOUT - math (EXPR CTEST_SHORT_TIMEOUT "${DART_TESTING_TIMEOUT} / 2") - math (EXPR CTEST_LONG_TIMEOUT "${DART_TESTING_TIMEOUT} * 2") - math (EXPR CTEST_VERY_LONG_TIMEOUT "${DART_TESTING_TIMEOUT} * 3") - - option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF) - mark_as_advanced (HDF5_TEST_VFD) - if (HDF5_TEST_VFD) - option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON) - mark_as_advanced (HDF5_TEST_FHEAP_VFD) - endif () - - option (HDF5_TEST_PASSTHROUGH_VOL "Execute tests with different passthrough VOL connectors" OFF) - mark_as_advanced (HDF5_TEST_PASSTHROUGH_VOL) - if (HDF5_TEST_PASSTHROUGH_VOL) - option (HDF5_TEST_FHEAP_PASSTHROUGH_VOL "Execute fheap test with different passthrough VOL connectors" ON) - mark_as_advanced (HDF5_TEST_FHEAP_PASSTHROUGH VOL) - endif () - - option (HDF_TEST_EXPRESS "Control testing framework (0-3)" "0") - mark_as_advanced (HDF_TEST_EXPRESS) - - enable_testing () - include (CTest) - - include (${HDF5_SOURCE_DIR}/CTestConfig.cmake) - configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY) - - option (HDF5_TEST_SERIAL "Execute non-parallel tests" ON) - mark_as_advanced (HDF5_TEST_SERIAL) - - option (HDF5_TEST_TOOLS "Execute tools tests" ON) - mark_as_advanced (HDF5_TEST_TOOLS) - - option (HDF5_TEST_EXAMPLES "Execute tests on examples" ON) - mark_as_advanced (HDF5_TEST_EXAMPLES) - - option (HDF5_TEST_SWMR "Execute SWMR tests" ON) - mark_as_advanced (HDF5_TEST_SWMR) - - option (HDF5_TEST_PARALLEL "Execute parallel tests" ON) - mark_as_advanced (HDF5_TEST_PARALLEL) - - option (HDF5_TEST_FORTRAN "Execute fortran tests" ON) - mark_as_advanced (HDF5_TEST_FORTRAN) - - option (HDF5_TEST_CPP "Execute cpp tests" ON) - mark_as_advanced (HDF5_TEST_CPP) - - option (HDF5_TEST_JAVA "Execute java tests" ON) - mark_as_advanced (HDF5_TEST_JAVA) - - if (NOT HDF5_EXTERNALLY_CONFIGURED) - if (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test") - add_subdirectory (test) - endif () - if (H5_HAVE_PARALLEL) - if (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar") - add_subdirectory (testpar) - endif () - endif () - endif () + include (CMakeTests.cmake) endif () #----------------------------------------------------------------------------- # Option to build HDF5 Utilities #----------------------------------------------------------------------------- if (EXISTS "${HDF5_SOURCE_DIR}/utils" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/utils") - option (HDF5_BUILD_UTILS "Build HDF5 Utils" ON) - if (HDF5_BUILD_UTILS) - add_subdirectory (utils) + option (HDF5_BUILD_PARALLEL_TOOLS "Build Parallel HDF5 Tools" OFF) + if (HDF5_BUILD_PARALLEL_TOOLS AND HDF5_ENABLE_PARALLEL) + set (CMAKE_PREFIX_PATH "$HDF_RESOURCES_DIR") + find_package(MFU REQUIRED) + if (MFU_FOUND) + message(STATUS "LL_PATH=${LL_PATH}") + set (H5_HAVE_LIBMFU 1) + set (H5_HAVE_MFU_H 1) + set (CMAKE_REQUIRED_INCLUDES "${MFU_INCLUDE_DIR}") + set (MFU_LIBRARY_DEBUG "$MFU_LIBRARY") + set (MFU_LIBRARY_RELEASE "$MFU_LIBRARY") + endif () + find_package(CIRCLE REQUIRED) + if (CIRCLE_FOUND) + set (H5_HAVE_LIBCIRCLE 1) + set (H5_HAVE_CIRCLE_H 1) + set (CMAKE_REQUIRED_INCLUDES "${CIRCLE_INCLUDE_DIR}") + endif () + find_package(DTCMP REQUIRED) + if (DTCMP_FOUND) + set (H5_HAVE_LIBDTCMP 1) + set (H5_HAVE_DTCMP_H 1) + set (CMAKE_REQUIRED_INCLUDES "${DTCMP_INCLUDE_DIR}") + endif () endif () + add_subdirectory (utils) endif () -endif () # end IF (FALSE) # XXX(kitware) - #----------------------------------------------------------------------------- # Option to build HDF5 Tools #----------------------------------------------------------------------------- if (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools") - if (FALSE) # XXX(kitware): Hardcode settings. option (HDF5_BUILD_TOOLS "Build HDF5 Tools" ON) - else () - set(HDF5_BUILD_TOOLS OFF) - endif () if (HDF5_BUILD_TOOLS) add_subdirectory (tools) endif () @@ -1109,29 +1071,20 @@ endif () #----------------------------------------------------------------------------- # Include filter plugins #----------------------------------------------------------------------------- -include (CMakePlugins.cmake) +if (${H5_LIBVER_DIR} EQUAL 16 OR DEFAULT_API_VERSION MATCHES "v16") + set (HDF5_ENABLE_PLUGIN_SUPPORT OFF CACHE BOOL "" FORCE) + message (VERBOSE "Filter PLUGINs cannot be used with 1.6 API") +else () + include (CMakePlugins.cmake) -if (HDF5_PACKAGE_EXTLIBS AND NOT HDF5_NO_PACKAGES) - if (HDF5_ENABLE_PLUGIN_SUPPORT AND PLUGIN_FOUND) - PACKAGE_PLUGIN_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT}) -# option (HDF5_TEST_PLUGIN "Execute plugin tests" ON) -# mark_as_advanced (HDF5_TEST_PLUGIN) + if (HDF5_PACKAGE_EXTLIBS AND NOT HDF5_NO_PACKAGES) + if (HDF5_ENABLE_PLUGIN_SUPPORT AND PLUGIN_FOUND) + PACKAGE_PLUGIN_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT}) +# option (HDF5_TEST_PLUGIN "Execute plugin tests" ON) +# mark_as_advanced (HDF5_TEST_PLUGIN) -# TEST_PLUGIN_LIBRARY () - endif () -endif () - -#----------------------------------------------------------------------------- -# Option to build examples -#----------------------------------------------------------------------------- -if (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples") - if (FALSE) # XXX(kitware): Hardcode settings. - option (HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" ON) - else () - set(HDF5_BUILD_EXAMPLES OFF) - endif () - if (HDF5_BUILD_EXAMPLES) - add_subdirectory (examples) +# TEST_PLUGIN_LIBRARY () + endif () endif () endif () @@ -1139,11 +1092,7 @@ endif () # Option to build High Level API's #----------------------------------------------------------------------------- if (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl") - if (FALSE) # XXX(kitware): Hardcode settings. option (HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" ON) - else () - set(HDF5_BUILD_HL_LIB ON) - endif () if (HDF5_BUILD_HL_LIB) set (H5_INCLUDE_HL 1) add_subdirectory (hl) @@ -1151,22 +1100,17 @@ if (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl") endif () #----------------------------------------------------------------------------- -# Option to build Fortran bindings/tests/examples +# Option to build Fortran bindings/tests # Make sure this appears before the CONFIGURE_FILE step # so that fortran name mangling is detected before writing H5pubconf.h #----------------------------------------------------------------------------- # Set default name mangling : overridden by Fortran detection in fortran dir set (H5_FC_FUNC "H5_FC_FUNC(name,NAME) name ## _") set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) name ## _") -# XXX(kitware): VTK doesn't need Fortran support. -if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran" AND FALSE) +if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran") option (HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF) if (HDF5_BUILD_FORTRAN) - include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake) - - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}") - endif () + message (VERBOSE "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}") include (${HDF_RESOURCES_DIR}/HDFFortranCompilerFlags.cmake) include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake) set (LINK_Fortran_LIBS ${LINK_LIBS}) @@ -1177,10 +1121,18 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for # Parallel IO usage requires MPI to be Linked and Included if (H5_HAVE_PARALLEL) + find_package(MPI REQUIRED COMPONENTS Fortran) set (LINK_Fortran_LIBS ${LINK_Fortran_LIBS} ${MPI_Fortran_LIBRARIES}) if (MPI_Fortran_LINK_FLAGS) set (CMAKE_Fortran_EXE_LINKER_FLAGS "${MPI_Fortran_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}") endif () + # Check if MPI-3 Fortran 2008 module mpi_f08 is supported + if (MPI_Fortran_HAVE_F08_MODULE) + set (H5_HAVE_MPI_F08 1) + message (VERBOSE "MPI-3 Fortran 2008 module mpi_f08 is supported") + else () + message (VERBOSE "MPI-3 Fortran 2008 module mpi_f08 is NOT supported") + endif () endif () #option (HDF5_INSTALL_MOD_FORTRAN "Copy FORTRAN mod files to include directory (NO SHARED STATIC)" "NO") @@ -1215,13 +1167,10 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++") if (NOT ALLOW_UNSUPPORTED) message (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive, override with ALLOW_UNSUPPORTED option **** ") else () - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE " **** Allowing unsupported Parallel and C++ options **** ") - endif () + message (VERBOSE " **** Allowing unsupported Parallel and C++ options **** ") endif () endif () - include (${HDF_RESOURCES_EXT_DIR}/HDFUseCXX.cmake) include (${HDF_RESOURCES_DIR}/HDFCXXCompilerFlags.cmake) add_subdirectory (c++) @@ -1234,47 +1183,35 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++") endif () endif () -#----------------------------------------------------------------------------- -# Check if Fortran's default real is double precision. If it is and HL is -# being built then configure should fail due to bug HDFFV-889. -#----------------------------------------------------------------------------- -if (HDF5_BUILD_FORTRAN AND HDF5_BUILD_HL_LIB) - if (NOT H5_FORTRAN_DEFAULT_REAL_NOT_DOUBLE) - message (FATAL_ERROR " **** Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use HDF5_BUILD_HL_LIB:BOOL=OFF **** ") - endif () -endif () - #----------------------------------------------------------------------------- # Option to build HDF5 Java Library #----------------------------------------------------------------------------- -# XXX(kitware): VTK doesn't need Java support. -if (EXISTS "${HDF5_SOURCE_DIR}/java" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/java" AND FALSE) +if (EXISTS "${HDF5_SOURCE_DIR}/java" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/java") option (HDF5_BUILD_JAVA "Build Java HDF5 Library" OFF) if (HDF5_BUILD_JAVA) - add_subdirectory (java) + if (NOT BUILD_SHARED_LIBS) + message (FATAL_ERROR "\nJava requires shared libraries!\n") + else () + add_subdirectory (java) + endif () endif () endif () -# XXX(kitware): needed for various headers. -set(H5_STDC_HEADERS 1) -if (NOT WIN32) - set(H5_TIME_WITH_SYS_TIME 1) -endif () - #----------------------------------------------------------------------------- # Generate the H5pubconf.h file containing user settings needed by compilation #----------------------------------------------------------------------------- configure_file (${HDF_RESOURCES_DIR}/H5pubconf.h.in ${HDF5_SRC_BINARY_DIR}/H5pubconf.h @ONLY) #----------------------------------------------------------------------------- -# Options for use by cross compiling and toolchains +# Option to build examples #----------------------------------------------------------------------------- -if (FALSE) # XXX(kitware): Hardcode settings. -option (HDF5_USE_PREGEN "Use pre-generated Files" OFF) -option (HDF5_BATCH_H5DETECT "Use a batch command for running h5detect" OFF) -else () -set(HDF5_USE_PREGEN OFF) -set(HDF5_BATCH_H5DETECT OFF) +if (EXISTS "${HDF5_SOURCE_DIR}/HDF5Examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/HDF5Examples") + option (HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" ON) + if (HDF5_BUILD_EXAMPLES AND NOT USE_SANITIZER) + include (${HDF_RESOURCES_DIR}/HDF5ExampleCache.cmake) + set (HDF5_VERSION ${HDF5_PACKAGE_VERSION}) + add_subdirectory (HDF5Examples) + endif () endif () include (CMakeInstallation.cmake) diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakePlugins.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakePlugins.cmake index 24f8bf153ac..c6ff4f6356e 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakePlugins.cmake +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakePlugins.cmake @@ -11,13 +11,9 @@ # include (ExternalProject) -if (FALSE) # XXX(kitware): Hardcode settings. -#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO") +option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO") set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)") set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ) -else () -set(HDF5_ALLOW_EXTERNAL_SUPPORT "NO") -endif () if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") option (PLUGIN_USE_EXTERNAL "Use External Library Building for filter PLUGIN" 1) if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT") @@ -40,11 +36,7 @@ endif () #----------------------------------------------------------------------------- # Option for PLUGIN support #----------------------------------------------------------------------------- -if (FALSE) # XXX(kitware): Hardcode settings. option (HDF5_ENABLE_PLUGIN_SUPPORT "Enable PLUGIN Filters" OFF) -else () -set(HDF5_ENABLE_PLUGIN_SUPPORT OFF) -endif () if (HDF5_ENABLE_PLUGIN_SUPPORT) if (NOT PLUGIN_USE_EXTERNAL) find_package (PLUGIN NAMES ${PLUGIN_PACKAGE_NAME}${HDF_PACKAGE_EXT}) diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeTests.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeTests.cmake new file mode 100644 index 00000000000..66199010680 --- /dev/null +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeTests.cmake @@ -0,0 +1,112 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://www.hdfgroup.org/licenses. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# + +#----------------------------------------------------------------------------- +# Dashboard and Testing Settings +#----------------------------------------------------------------------------- + set (DART_TESTING_TIMEOUT 1200 + CACHE STRING + "Timeout in seconds for each test (default 1200=20minutes)" + ) + + # Generate a list of timeouts based on DART_TESTING_TIMEOUT + math (EXPR CTEST_SHORT_TIMEOUT "${DART_TESTING_TIMEOUT} / 2") + math (EXPR CTEST_LONG_TIMEOUT "${DART_TESTING_TIMEOUT} * 2") + math (EXPR CTEST_VERY_LONG_TIMEOUT "${DART_TESTING_TIMEOUT} * 3") + + option (HDF5_DISABLE_TESTS_REGEX "Regex pattern to set execution of specific tests to DISABLED" "") + mark_as_advanced (HDF5_DISABLE_TESTS_REGEX) + + option (HDF5_TEST_API "Execute HDF5 API tests" OFF) + mark_as_advanced (HDF5_TEST_API) + if (HDF5_TEST_API) + option (HDF5_TEST_API_INSTALL "Install HDF5 API tests" OFF) + mark_as_advanced (HDF5_TEST_API_INSTALL) + + # Enable HDF5 Async API tests + option (HDF5_TEST_API_ENABLE_ASYNC "Enable HDF5 Async API tests" OFF) + mark_as_advanced (HDF5_TEST_API_ENABLE_ASYNC) + + # Build and use HDF5 test driver program for API tests + option (HDF5_TEST_API_ENABLE_DRIVER "Enable HDF5 API test driver program" OFF) + mark_as_advanced (HDF5_TEST_API_ENABLE_DRIVER) + if (HDF5_TEST_API_ENABLE_DRIVER) + set (HDF5_TEST_API_SERVER "" CACHE STRING "Server executable for running API tests") + mark_as_advanced (HDF5_TEST_API_SERVER) + endif () + endif () + + option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF) + mark_as_advanced (HDF5_TEST_VFD) + if (HDF5_TEST_VFD) + option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON) + mark_as_advanced (HDF5_TEST_FHEAP_VFD) + + # Initialize the list of VFDs to be used for testing and create a test folder for each VFD + H5_SET_VFD_LIST() + endif () + + option (HDF5_TEST_PASSTHROUGH_VOL "Execute tests with different passthrough VOL connectors" OFF) + mark_as_advanced (HDF5_TEST_PASSTHROUGH_VOL) + if (HDF5_TEST_PASSTHROUGH_VOL) + option (HDF5_TEST_FHEAP_PASSTHROUGH_VOL "Execute fheap test with different passthrough VOL connectors" ON) + mark_as_advanced (HDF5_TEST_FHEAP_PASSTHROUGH VOL) + endif () + + set (H5_TEST_EXPRESS_LEVEL_DEFAULT "3") + set (HDF_TEST_EXPRESS "${H5_TEST_EXPRESS_LEVEL_DEFAULT}" + CACHE STRING "Control testing framework (0-3) (0 = exhaustive testing; 3 = quicker testing)") + mark_as_advanced (HDF_TEST_EXPRESS) + if (NOT "${HDF_TEST_EXPRESS}" STREQUAL "") + set (H5_TEST_EXPRESS_LEVEL_DEFAULT "${HDF_TEST_EXPRESS}") + endif () + + enable_testing () + include (CTest) + + include (${HDF5_SOURCE_DIR}/CTestConfig.cmake) + configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY) + + option (HDF5_TEST_SERIAL "Execute non-parallel tests" ON) + mark_as_advanced (HDF5_TEST_SERIAL) + + option (HDF5_TEST_TOOLS "Execute tools tests" ON) + mark_as_advanced (HDF5_TEST_TOOLS) + + option (HDF5_TEST_EXAMPLES "Execute tests on examples" ON) + mark_as_advanced (HDF5_TEST_EXAMPLES) + + option (HDF5_TEST_SWMR "Execute SWMR tests" ON) + mark_as_advanced (HDF5_TEST_SWMR) + + option (HDF5_TEST_PARALLEL "Execute parallel tests" ON) + mark_as_advanced (HDF5_TEST_PARALLEL) + + option (HDF5_TEST_FORTRAN "Execute fortran tests" ON) + mark_as_advanced (HDF5_TEST_FORTRAN) + + option (HDF5_TEST_CPP "Execute cpp tests" ON) + mark_as_advanced (HDF5_TEST_CPP) + + option (HDF5_TEST_JAVA "Execute java tests" ON) + mark_as_advanced (HDF5_TEST_JAVA) + + if (NOT HDF5_EXTERNALLY_CONFIGURED) + if (EXISTS "${HDF5_TEST_SRC_DIR}" AND IS_DIRECTORY "${HDF5_TEST_SRC_DIR}") + add_subdirectory (test) + endif () + if (H5_HAVE_PARALLEL) + if (EXISTS "${HDF5_TEST_PAR_DIR}" AND IS_DIRECTORY "${HDF5_TEST_PAR_DIR}") + add_subdirectory (testpar) + endif () + endif () + endif () diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeVOL.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeVOL.cmake new file mode 100644 index 00000000000..a6bd3b4adca --- /dev/null +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeVOL.cmake @@ -0,0 +1,310 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://www.hdfgroup.org/licenses. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# + +include (FetchContent) + +# Function to retrieve all of the CMake targets generated +# in a directory and all its subdirectories +function (get_generated_cmake_targets out_var dir) + get_directory_property (dir_targets DIRECTORY "${dir}" BUILDSYSTEM_TARGETS) + get_directory_property (dir_subdirs DIRECTORY "${dir}" SUBDIRECTORIES) + + foreach (subdir ${dir_subdirs}) + get_generated_cmake_targets(subdir_targets "${subdir}") + list (APPEND dir_targets "${subdir_targets}") + endforeach() + + set (${out_var} "${dir_targets}" PARENT_SCOPE) +endfunction () + +# Function to apply connector-specify workarounds to build +# code once a connector has been populated through FetchContent +function (apply_connector_workarounds connector_name source_dir) + # For the cache VOL, remove the call to find_package(ASYNC). + # Eventually, the FetchContent OVERRIDE_FIND_PACKAGE should be + # able to fulfill this dependency when building the cache VOL, + # but for now we have to hack around this until the async and + # cache VOLs create CMake .config files + if ("${connector_name}" MATCHES "vol-cache") + # Remove find_package(ASYNC) call from connector's CMake code + file (READ "${source_dir}/CMakeLists.txt" vol_cmake_contents) + string (REGEX REPLACE "[ \t]*find_package[ \t]*\\([ \t]*ASYNC[^\r\n\\)]*\\)[ \t]*[\r\n]+" "" vol_cmake_contents "${vol_cmake_contents}") + file (WRITE "${source_dir}/CMakeLists.txt" "${vol_cmake_contents}") + + # Remove setting of HDF5_VOL_CONNECTOR and HDF5_PLUGIN_PATH + # in connector's external tests CMake code + file (STRINGS "${source_dir}/tests/CMakeLists.txt" file_lines) + file (WRITE "${source_dir}/tests/CMakeLists.txt" "") + foreach (line IN LISTS file_lines) + set (stripped_line "${line}") + string (REGEX MATCH "^[ \t]*set_tests_properties\\([ \t]*[\r\n]?" match_string "${line}") + if (NOT "${match_string}" STREQUAL "") + string (REGEX REPLACE "^[ \t]*set_tests_properties\\([ \t]*[\r\n]?" "" stripped_line "${line}") + endif () + string (REGEX MATCH "^[ \t]*.\\{test\\}[ \t]*[\r\n]?" match_string "${line}") + if (NOT "${match_string}" STREQUAL "") + string (REGEX REPLACE "^[ \t]*.\\{[A-Za-z]*\\}[ \t]*[\r\n]?" "" stripped_line "${line}") + endif () + string (REGEX MATCH "^[ \t]*PROPERTIES[ \t]*[\r\n]?" match_string "${line}") + if (NOT "${match_string}" STREQUAL "") + string (REGEX REPLACE "^[ \t]*PROPERTIES[ \t]*[\r\n]?" "" stripped_line "${line}") + endif () + string (REGEX MATCH "^[ \t]*ENVIRONMENT[ \t]*.*[\r\n]?" match_string "${line}") + if (NOT "${match_string}" STREQUAL "") + string (REGEX REPLACE "^[ \t]*ENVIRONMENT[ \t]*.*[\r\n]?" "" stripped_line "${line}") + endif () + file (APPEND "${source_dir}/tests/CMakeLists.txt" "${stripped_line}\n") + endforeach () + endif () +endfunction () + +set (HDF5_VOL_ALLOW_EXTERNAL "NO" CACHE STRING "Allow building of external HDF5 VOL connectors with FetchContent") +set_property (CACHE HDF5_VOL_ALLOW_EXTERNAL PROPERTY STRINGS NO GIT LOCAL_DIR) +mark_as_advanced (HDF5_VOL_ALLOW_EXTERNAL) +if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT" OR HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR") + # For compatibility, set some variables that projects would + # typically look for after calling find_package(HDF5) + set (HDF5_FOUND 1) + set (HDF5_LIBRARIES "${HDF5_LIBSH_TARGET};${LINK_LIBS};${LINK_COMP_LIBS};$<$:MPI::MPI_C>") + set (HDF5_INCLUDE_DIRS "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + set (HDF5_IS_PARALLEL ${H5_HAVE_PARALLEL}) + set (HDF5_VERSION ${HDF5_PACKAGE_VERSION}) + + set (HDF5_C_LIBRARIES "${HDF5_LIBRARIES}") + + if (HDF5_BUILD_HL_LIB) + set (HDF5_C_HL_LIBRARIES "${HDF5_HL_LIBSH_TARGET}") + endif() + + set (HDF5_MAX_EXTERNAL_VOLS 10) + set (HDF5_EXTERNAL_VOL_TARGETS "") + + foreach (vol_idx RANGE 1 ${HDF5_MAX_EXTERNAL_VOLS}) + # Generate fixed-width index number prepended with 0s + # so VOL sources come in order from 1 - HDF5_MAX_EXTERNAL_VOLS + set (vol_idx_num_digits 2) # Based on HDF5_MAX_EXTERNAL_VOLS + set (vol_idx_fixed "${vol_idx}") + string (LENGTH "${vol_idx_fixed}" vol_idx_len) + while (vol_idx_len LESS vol_idx_num_digits) + string (PREPEND vol_idx_fixed "0") + math (EXPR vol_idx_len "${vol_idx_len}+1") + endwhile () + + if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT") + set (HDF5_VOL_URL${vol_idx_fixed} "" CACHE STRING "Git repository URL of an external HDF5 VOL connector to build") + mark_as_advanced (HDF5_VOL_URL${vol_idx_fixed}) + set (HDF5_VOL_SOURCE "${HDF5_VOL_URL${vol_idx_fixed}}") + elseif(HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR") + set (HDF5_VOL_PATH${vol_idx_fixed} "" CACHE STRING "Path to the source directory of an external HDF5 VOL connector to build") + mark_as_advanced (HDF5_VOL_PATH${vol_idx_fixed}) + set (HDF5_VOL_SOURCE "${HDF5_VOL_PATH${vol_idx_fixed}}") + endif() + + if (NOT "${HDF5_VOL_SOURCE}" STREQUAL "") + # Deal with trailing slash in path for LOCAL_DIR case + if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR") + # Erase trailing slash + string (REGEX REPLACE "/$" "" HDF5_VOL_SOURCE ${HDF5_VOL_SOURCE}) + endif() + + # Extract the name of the VOL connector + string (FIND "${HDF5_VOL_SOURCE}" "/" hdf5_vol_name_pos REVERSE) + if (hdf5_vol_name_pos EQUAL -1) + if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT") + message (SEND_ERROR "Invalid URL '${HDF5_VOL_SOURCE}' specified for HDF5_VOL_URL${vol_idx_fixed}") + elseif (HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR") + message (SEND_ERROR "Invalid source path '${HDF5_VOL_SOURCE}' specified for HDF5_VOL_PATH${vol_idx_fixed}") + endif() + endif () + + math (EXPR hdf5_vol_name_pos "${hdf5_vol_name_pos}+1") + + string (SUBSTRING "${HDF5_VOL_SOURCE}" ${hdf5_vol_name_pos} -1 hdf5_vol_name) + string (REPLACE ".git" "" hdf5_vol_name "${hdf5_vol_name}") + string (STRIP "${hdf5_vol_name}" hdf5_vol_name) + string (TOUPPER "${hdf5_vol_name}" hdf5_vol_name_upper) + string (TOLOWER "${hdf5_vol_name}" hdf5_vol_name_lower) + + message (VERBOSE "Building VOL connector '${hdf5_vol_name}' with FetchContent from source ${HDF5_VOL_SOURCE}") + + # Set some cache variables that can be set by users when building + if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT") + set ("HDF5_VOL_${hdf5_vol_name_upper}_BRANCH" "main" CACHE STRING "Git branch (or tag) to use when building VOL connector '${hdf5_vol_name}'") + mark_as_advanced ("HDF5_VOL_${hdf5_vol_name_upper}_BRANCH") + endif() + + set ("HDF5_VOL_${hdf5_vol_name_upper}_CMAKE_PACKAGE_NAME" + "${hdf5_vol_name_lower}" + CACHE + STRING + "CMake package name used by find_package(...) calls for VOL connector '${hdf5_vol_name}'" + ) + + set ("HDF5_VOL_${hdf5_vol_name_upper}_NAME" "" CACHE STRING "Name of VOL connector to set for the HDF5_VOL_CONNECTOR environment variable") + option ("HDF5_VOL_${hdf5_vol_name_upper}_TEST_PARALLEL" "Whether to test VOL connector '${hdf5_vol_name}' against the parallel API tests" OFF) + + mark_as_advanced ("HDF5_VOL_${hdf5_vol_name_upper}_NAME") + mark_as_advanced ("HDF5_VOL_${hdf5_vol_name_upper}_TEST_PARALLEL") + + if (HDF5_TEST_API) + if ("${HDF5_VOL_${hdf5_vol_name_upper}_NAME}" STREQUAL "") + message (SEND_ERROR "HDF5_VOL_${hdf5_vol_name_upper}_NAME must be set to a valid connector name to use VOL connector '${hdf5_vol_name}' for testing") + endif () + endif () + + if ((HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT") AND ("${HDF5_VOL_${hdf5_vol_name_upper}_BRANCH}" STREQUAL "")) + message (SEND_ERROR "HDF5_VOL_${hdf5_vol_name_upper}_BRANCH must be set to a valid git branch name (or git tag) to build VOL connector '${hdf5_vol_name}'") + endif () + + if ((HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR") + AND NOT (EXISTS ${HDF5_VOL_SOURCE} AND IS_DIRECTORY ${HDF5_VOL_SOURCE})) + message (FATAL_ERROR "HDF5_VOL_PATH${vol_idx_fixed} must be an absolute path to a valid directory") + endif () + + # Set internal convenience variables for FetchContent dependency name + set (hdf5_vol_depname "${HDF5_VOL_${hdf5_vol_name_upper}_CMAKE_PACKAGE_NAME}") + string (TOLOWER "${hdf5_vol_depname}" hdf5_vol_depname_lower) + + if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24") + set("OVERRIDE_FIND_PACKAGE_OPT" "OVERRIDE_FIND_PACKAGE") + endif() + + if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT") + FetchContent_Declare (${hdf5_vol_depname} + GIT_REPOSITORY "${HDF5_VOL_SOURCE}" + GIT_TAG "${HDF5_VOL_${hdf5_vol_name_upper}_BRANCH}" + "${OVERRIDE_FIND_PACKAGE_OPT}" + ) + elseif(HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR") + FetchContent_Declare (${hdf5_vol_depname} + SOURCE_DIR "${HDF5_VOL_SOURCE}" + ) + endif() + + FetchContent_GetProperties(${hdf5_vol_depname}) + if (NOT ${hdf5_vol_depname}_POPULATED) + FetchContent_Populate(${hdf5_vol_depname}) + + # Now that content has been populated, set other internal + # convenience variables for FetchContent dependency + set (hdf5_vol_depname_source_dir "${${hdf5_vol_depname_lower}_SOURCE_DIR}") + set (hdf5_vol_depname_binary_dir "${${hdf5_vol_depname_lower}_BINARY_DIR}") + + if (NOT EXISTS "${hdf5_vol_depname_source_dir}/CMakeLists.txt") + if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT") + message (SEND_ERROR "The git repository branch '${HDF5_VOL_${hdf5_vol_name_upper}_BRANCH}' for VOL connector '${hdf5_vol_name}' does not appear to contain a CMakeLists.txt file") + elseif (HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR") + message(SEND_ERROR "The local directory '${HDF5_VOL_SOURCE}' for VOL connector '${hdf5_vol_name}' does not appear to contain a CMakeLists.txt file") + endif() + endif () + + # If there are any calls to find_package(HDF5) in the connector's + # CMakeLists.txt files, remove those since any found HDF5 targets + # will conflict with targets being generated by this build of HDF5 + if (EXISTS "${hdf5_vol_depname_source_dir}/CMakeLists.txt") + file (READ "${hdf5_vol_depname_source_dir}/CMakeLists.txt" vol_cmake_contents) + string (REGEX REPLACE "[ \t]*find_package[ \t]*\\([ \t]*HDF5[^\r\n\\)]*\\)[ \t]*[\r\n]+" "" vol_cmake_contents "${vol_cmake_contents}") + file (WRITE "${hdf5_vol_depname_source_dir}/CMakeLists.txt" "${vol_cmake_contents}") + endif () + if (EXISTS "${hdf5_vol_depname_source_dir}/src/CMakeLists.txt") + file (READ "${hdf5_vol_depname_source_dir}/src/CMakeLists.txt" vol_cmake_contents) + string (REGEX REPLACE "[ \t]*find_package[ \t]*\\([ \t]*HDF5[^\r\n\\)]*\\)[ \t]*[\r\n]+" "" vol_cmake_contents "${vol_cmake_contents}") + file (WRITE "${hdf5_vol_depname_source_dir}/src/CMakeLists.txt" "${vol_cmake_contents}") + endif () + + # Apply any connector-specific workarounds + apply_connector_workarounds ("${hdf5_vol_name_lower}" "${hdf5_vol_depname_source_dir}") + + add_subdirectory (${hdf5_vol_depname_source_dir} ${hdf5_vol_depname_binary_dir}) + + # Get list of targets generated by build of connector + get_generated_cmake_targets (connector_targets ${hdf5_vol_depname_source_dir}) + + # Create a custom target for the connector to encompass all its + # targets and other custom properties set by us for later use + add_custom_target ("HDF5_VOL_${hdf5_vol_name_lower}") + + # Define and set a custom property on the VOL connector target to + # capture all of the connector's generated targets + define_property ( + TARGET + PROPERTY HDF5_VOL_TARGETS + BRIEF_DOCS "Generated targets of this connector" + FULL_DOCS "Generated targets of this connector" + ) + + set_target_properties ( + "HDF5_VOL_${hdf5_vol_name_lower}" + PROPERTIES + HDF5_VOL_TARGETS "${connector_targets}" + ) + + # Define and set a custom property on the VOL connector target to + # capture the connector's name to set for the HDF5_VOL_CONNECTOR + # environment variable for testing + define_property ( + TARGET + PROPERTY HDF5_VOL_NAME + BRIEF_DOCS "VOL connector name to use for the HDF5_VOL_CONNECTOR environment variable when testing" + FULL_DOCS "VOL connector name to use for the HDF5_VOL_CONNECTOR environment variable when testing" + ) + + set_target_properties ( + "HDF5_VOL_${hdf5_vol_name_lower}" + PROPERTIES + HDF5_VOL_NAME "${HDF5_VOL_${hdf5_vol_name_upper}_NAME}" + ) + + # Define and set a custom property on the VOL connector target to + # capture whether the connector should be tested with the parallel + # API tests + define_property ( + TARGET + PROPERTY HDF5_VOL_TEST_PARALLEL + BRIEF_DOCS "Whether the VOL connector should be tested with the parallel API tests" + FULL_DOCS "Whether the VOL connector should be tested with the parallel API tests" + ) + + set_target_properties ( + "HDF5_VOL_${hdf5_vol_name_lower}" + PROPERTIES + HDF5_VOL_TEST_PARALLEL ${HDF5_VOL_${hdf5_vol_name_upper}_TEST_PARALLEL} + ) + + # Add this VOL connector's target to the list of external connector targets + list (APPEND HDF5_EXTERNAL_VOL_TARGETS "HDF5_VOL_${hdf5_vol_name_lower}") + + # Get the list of library targets from this VOL connector + unset (connector_lib_targets) + foreach (connector_target ${connector_targets}) + get_target_property (target_type ${connector_target} TYPE) + if (target_type STREQUAL "SHARED_LIBRARY" OR target_type STREQUAL "STATIC_LIBRARY") + list (APPEND connector_lib_targets "${connector_target}") + endif () + endforeach () + + # Add all of the previous VOL connector's library targets as + # dependencies for the current VOL connector to ensure that + # VOL connectors get built serially in case there are dependencies + if (DEFINED last_vol_lib_targets) + foreach (connector_target ${connector_targets}) + add_dependencies (${connector_target} ${last_vol_lib_targets}) + endforeach () + endif () + + # Use this connector's library targets as dependencies + # for the next connector that is built + set (last_vol_lib_targets "${connector_lib_targets}") + endif () + endif () + endforeach () +endif () diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/COPYING b/Modules/ThirdParty/HDF5/src/itkhdf5/COPYING index 9d32232bdf2..fd50633d9e7 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/COPYING +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/COPYING @@ -49,7 +49,7 @@ works thereof, in binary and source code form. Limited portions of HDF5 were developed by Lawrence Berkeley National Laboratory (LBNL). LBNL's Copyright Notice and Licensing Terms can be found here: COPYING_LBNL_HDF5 file in this directory or at -http://support.hdfgroup.org/ftp/HDF5/releases/COPYING_LBNL_HDF5. +https://raw.githubusercontent.com/hdfgroup/hdf5/hdf5_1_14/COPYING_LBNL_HDF5. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/CTestConfig.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/CTestConfig.cmake index d2aad9c3477..dd2ed631a03 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/CTestConfig.cmake +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/CTestConfig.cmake @@ -12,7 +12,7 @@ ## This file should be placed in the root directory of your project. ## Then modify the CMakeLists.txt file in the root directory of your ## project to incorporate the testing dashboard. -## # The following are required to uses Dart and the Cdash dashboard +## # The following are required to use Dart and the CDash dashboard ## ENABLE_TESTING() ## INCLUDE(CTest) set (CTEST_PROJECT_NAME "HDF5") @@ -22,20 +22,12 @@ set (CTEST_DROP_METHOD "https") if (CTEST_DROP_SITE_INIT) set (CTEST_DROP_SITE "${CTEST_DROP_SITE_INIT}") else () - if (CDASH_LOCAL) - set (CTEST_DROP_SITE "cdash-internal.hdfgroup.org") - else () - set (CTEST_DROP_SITE "cdash.hdfgroup.org") - endif () + set (CTEST_DROP_SITE "cdash.hdfgroup.org") endif () if (CTEST_DROP_LOCATION_INIT) set (CTEST_DROP_LOCATION "${CTEST_DROP_LOCATION_INIT}") else () - if (CDASH_LOCAL) - set (CTEST_DROP_LOCATION "/submit.php?project=HDF5112") - else () - set (CTEST_DROP_LOCATION "/submit.php?project=HDF5") - endif () + set (CTEST_DROP_LOCATION "/submit.php?project=HDF5114") endif () set (CTEST_DROP_SITE_CDASH TRUE) diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/README.md b/Modules/ThirdParty/HDF5/src/itkhdf5/README.md new file mode 100644 index 00000000000..127ac4b2a3a --- /dev/null +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/README.md @@ -0,0 +1,91 @@ +HDF5 version 1.14.5 released on 2024-09-30 + +![HDF5 Logo](doxygen/img/HDF5.png) + +[![1.14 cmake build status](https://img.shields.io/github/actions/workflow/status/HDFGroup/hdf5/cmake.yml?branch=hdf5_1_14&label=HDF5%201.14%20CMake%20CI)](https://github.com/HDFGroup/hdf5/actions/workflows/cmake.yml?query=branch%3Ahdf5_1_14) +[![1.14 autotools build status](https://img.shields.io/github/actions/workflow/status/HDFGroup/hdf5/autotools.yml?branch=hdf5_1_14&label=HDF5%201.14%20Autotools%20CI)](https://github.com/HDFGroup/hdf5/actions/workflows/autotools.yml?query=branch%3Ahdf5_1_14) +[![BSD](https://img.shields.io/badge/License-BSD-blue.svg)](https://github.com/HDFGroup/hdf5/blob/hdf5_1_14/COPYING) + +[HPC configure/build/test results](https://my.cdash.org/index.php?project=HDF5) + +*Please refer to the release_docs/INSTALL file for installation instructions.* + +This repository contains a high-performance library's source code and a file format +specification that implements the HDF5® data model. The model has been adopted across +many industries, and this implementation has become a de facto data management standard +in science, engineering, and research communities worldwide. + +The HDF Group is the developer, maintainer, and steward of HDF5 software. Find more +information about The HDF Group, the HDF5 Community, and other HDF5 software projects, +tools, and services at [The HDF Group's website](https://www.hdfgroup.org/). + +DOCUMENTATION +------------- +This release is fully functional for the API described in the documentation. + + https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_5/documentation/doxygen/_l_b_a_p_i.html + +Full Documentation and Programming Resources for this release can be found at + + https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_5/documentation/doxygen/index.html + +The latest doxygen documentation generated on changes to HDF5 1.14.x is available at: + + https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_5/documentation/doxygen + +See the [RELEASE.txt](release_docs/RELEASE.txt) file in the [release_docs/](release_docs/) directory for information specific +to the features and updates included in this release of the library. + +Several more files are located within the [release_docs/](release_docs/) directory with specific +details for several common platforms and configurations. + + INSTALL - Start Here. General instructions for compiling and installing the library + INSTALL_CMAKE - instructions for building with CMake (Kitware.com) + INSTALL_parallel - instructions for building and configuring Parallel HDF5 + INSTALL_Windows and INSTALL_Cygwin - MS Windows installations. + + + +HELP AND SUPPORT +---------------- +Information regarding Help Desk and Support services is available at + + https://help.hdfgroup.org + + + +FORUM and NEWS +-------------- +The [HDF Forum](https://forum.hdfgroup.org) is provided for public announcements and discussions +of interest to the general HDF5 Community. + + - News and Announcements + https://forum.hdfgroup.org/c/news-and-announcements-from-the-hdf-group + + - HDF5 Topics + https://forum.hdfgroup.org/c/hdf5 + +These forums are provided as an open and public service for searching and reading. +Posting requires completing a simple registration and allows one to join in the +conversation. Please read the [instructions](https://forum.hdfgroup.org/t/quickstart-guide-welcome-to-the-new-hdf-forum +) pertaining to the Forum's use and configuration. + + +SNAPSHOTS, PREVIOUS RELEASES AND SOURCE CODE +-------------------------------------------- +Periodically development code snapshots are provided at the following URL: + + https://github.com/HDFGroup/hdf5/releases/tag/snapshot-1.14 + +Source packages for current and previous releases are located at: + + hdf5 1.14 releases: + https://support.hdfgroup.org/releases/hdf5/v1_14/index.html + + Archived releases: + https://support.hdfgroup.org/archive/support/ftp/HDF5/releases/index.html + +Development code is available at our Github location: + + https://github.com/HDFGroup/hdf5.git + diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/README.txt b/Modules/ThirdParty/HDF5/src/itkhdf5/README.txt deleted file mode 100644 index 1162b5fd802..00000000000 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/README.txt +++ /dev/null @@ -1,80 +0,0 @@ -HDF5 version 1.12.1 released on 2021-07-01 - ------------------------------------------------------------------------------- -Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------- - -THE HDF GROUP ---------------- - -The HDF Group is the developer of HDF5®, a high-performance software library and -data format that has been adopted across multiple industries and has become a -de facto standard in scientific and research communities. - -More information about The HDF Group, the HDF5 Community and the HDF5 software -project, tools and services can be found at the Group's website. - - https://www.hdfgroup.org/ - - -DOCUMENTATION -------------- -This release is fully functional for the API described in the documentation. - https://portal.hdfgroup.org/display/HDF5/The+HDF5+API - -Full Documentation and Programming Resources for this release can be found at - https://portal.hdfgroup.org/display/HDF5 - -See the RELEASE.txt file in the release_docs/ directory for information specific -to the features and updates included in this release of the library. - -Several more files are located within the release_docs/ directory with specific -details for several common platforms and configurations. - - INSTALL - Start Here. General instructions for compiling and installing the library - INSTALL_CMAKE - instructions for building with CMake (Kitware.com) - INSTALL_parallel - instructions for building and configuring Parallel HDF5 - INSTALL_Windows and INSTALL_Cygwin - MS Windows installations. - - - -HELP AND SUPPORT ----------------- -Information regarding Help Desk and Support services is available at - - https://portal.hdfgroup.org/display/support/The+HDF+Help+Desk - - - -FORUM and NEWS --------------- -The following public forums are provided for public announcements and discussions -of interest to the general HDF5 Community. - - Homepage of the Forum - https://forum.hdfgroup.org - - News and Announcement - https://forum.hdfgroup.org/c/news-and-announcements-from-the-hdf-group - - HDF5 and HDF4 Topics - https://forum.hdfgroup.org/c/hdf5 - -These forums are provided as an open and public service for searching and reading. -Posting requires completing a simple registration and allows one to join in the -conversation. Please read the following instructions pertaining to the Forum's -use and configuration - https://forum.hdfgroup.org/t/quickstart-guide-welcome-to-the-new-hdf-forum - - -SNAPSHOTS, PREVIOUS RELEASES AND SOURCE CODE --------------------------------------------- -Periodically development code snapshots are provided at the following URL: - https://gamma.hdfgroup.org/ftp/pub/outgoing/hdf5/snapshots/ - -Source packages for current and previous releases are located at: - https://portal.hdfgroup.org/display/support/Downloads - -Development code is available at our Github location: - https://github.com/HDFGroup/hdf5.git - diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/UserMacros.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/UserMacros.cmake index 0291dbf56f3..c9162236a8a 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/UserMacros.cmake +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/UserMacros.cmake @@ -23,11 +23,7 @@ macro (MACRO_USER_DEFINED_LIBS) endmacro () #------------------------------------------------------------------------------- -if (FALSE) # XXX(kitware): hardcode settings option (BUILD_USER_DEFINED_LIBS "Build With User Defined Values" OFF) -else () -set(BUILD_USER_DEFINED_LIBS OFF) -endif () if (BUILD_USER_DEFINED_LIBS) MACRO_USER_DEFINED_LIBS () endif () diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/CMakeLists.txt b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/CMakeLists.txt index f7560cb80e6..5e5b833c401 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/CMakeLists.txt +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/CMakeLists.txt @@ -1,23 +1,12 @@ -#[[ ITK --start -cmake_minimum_required (VERSION 3.12) -# ITK --stop ]] +cmake_minimum_required (VERSION 3.18) project (HDF5_CPP CXX) add_subdirectory (src) -#----------------------------------------------------------------------------- -# Build the CPP Examples -#----------------------------------------------------------------------------- -if (HDF5_BUILD_EXAMPLES) - add_subdirectory (examples) -endif () - #----------------------------------------------------------------------------- # Build the CPP unit tests #----------------------------------------------------------------------------- -# ITK --start -# ITK removed -#if (BUILD_TESTING) -# add_subdirectory (test) -#endif () -# ITK --stop + +if (NOT HDF5_EXTERNALLY_CONFIGURED AND BUILD_TESTING) + add_subdirectory (test) +endif () diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/CMakeLists.txt b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/CMakeLists.txt index 3822b77d7d1..09546acd451 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/CMakeLists.txt +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/CMakeLists.txt @@ -1,15 +1,6 @@ -#[[ ITK --start -cmake_minimum_required (VERSION 3.12) -# ITK --stop]] +cmake_minimum_required (VERSION 3.18) project (HDF5_CPP_SRC CXX) -#----------------------------------------------------------------------------- -# Generate configure file -#----------------------------------------------------------------------------- -configure_file (${HDF_RESOURCES_DIR}/H5cxx_config.h.in - ${HDF5_SRC_BINARY_DIR}/H5cxx_pubconf.h -) - #----------------------------------------------------------------------------- # Define cpp Library #----------------------------------------------------------------------------- @@ -86,15 +77,15 @@ set (CPP_HDRS ${HDF5_CPP_SRC_SOURCE_DIR}/H5VarLenType.h ) -if (NOT ONLY_SHARED_LIBS) +if (BUILD_STATIC_LIBS) add_library (${HDF5_CPP_LIB_TARGET} STATIC ${CPP_SOURCES} ${CPP_HDRS}) target_include_directories (${HDF5_CPP_LIB_TARGET} - PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" + PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" INTERFACE "$/include>" ) target_compile_options(${HDF5_CPP_LIB_TARGET} PRIVATE "${HDF5_CMAKE_CXX_FLAGS}") target_compile_definitions(${HDF5_CPP_LIB_TARGET} - PRIVATE $<$:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings + PRIVATE "$<$:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK>"# Parallel/MPI, prevent spurious cpp/cxx warnings ) TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} STATIC) target_link_libraries (${HDF5_CPP_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) @@ -107,13 +98,13 @@ endif () if (BUILD_SHARED_LIBS) add_library (${HDF5_CPP_LIBSH_TARGET} SHARED ${CPP_SOURCES} ${CPP_HDRS}) target_include_directories (${HDF5_CPP_LIBSH_TARGET} - PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" + PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" INTERFACE "$/include>" ) target_compile_options(${HDF5_CPP_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_CXX_FLAGS}") target_compile_definitions(${HDF5_CPP_LIBSH_TARGET} PUBLIC "H5_BUILT_AS_DYNAMIC_LIB" - PRIVATE $<$:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings + PRIVATE "$<$:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK>"# Parallel/MPI, prevent spurious cpp/cxx warnings ) TARGET_C_PROPERTIES (${HDF5_CPP_LIBSH_TARGET} SHARED) target_link_libraries (${HDF5_CPP_LIBSH_TARGET} @@ -134,7 +125,7 @@ endif () # Add Target to clang-format #----------------------------------------------------------------------------- if (HDF5_ENABLE_FORMATTERS) - if (NOT ONLY_SHARED_LIBS) + if (BUILD_STATIC_LIBS) clang_format (HDF5_CPP_SRC_FORMAT ${HDF5_CPP_LIB_TARGET}) else () clang_format (HDF5_CPP_SRC_FORMAT ${HDF5_CPP_LIBSH_TARGET}) @@ -160,7 +151,7 @@ if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) INSTALL_TARGET_PDB (${HDF5_CPP_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} cpplibraries) endif () - if (NOT ONLY_SHARED_LIBS) + if (BUILD_STATIC_LIBS) INSTALL_TARGET_PDB (${HDF5_CPP_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} cpplibraries) endif () @@ -182,22 +173,26 @@ endif () #----------------------------------------------------------------------------- set (_PKG_CONFIG_PREFIX ${CMAKE_INSTALL_PREFIX}) set (_PKG_CONFIG_EXEC_PREFIX \${prefix}) -set (_PKG_CONFIG_LIBDIR \${exec_prefix}/lib) -set (_PKG_CONFIG_INCLUDEDIR \${prefix}/include) -set (_PKG_CONFIG_LIBNAME "${HDF5_CPP_LIB_CORENAME}") +set (_PKG_CONFIG_LIBDIR \${exec_prefix}/${HDF5_INSTALL_LIB_DIR}) +set (_PKG_CONFIG_INCLUDEDIR \${prefix}/${HDF5_INSTALL_INCLUDE_DIR}) +set (_PKG_CONFIG_LIBNAME "${HDF5_CPP_LIB_NAME}") set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}") +set (PKG_CONFIG_LIBNAME "${HDF5_CPP_LIB_NAME}") +if (${HDF_CFG_NAME} MATCHES "Debug" OR ${HDF_CFG_NAME} MATCHES "Developer") + set (PKG_CONFIG_LIBNAME "${PKG_CONFIG_LIBNAME}${CMAKE_DEBUG_POSTFIX}") +endif () set (_PKG_CONFIG_LIBS_PRIVATE) -if (NOT ONLY_SHARED_LIBS) - set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_CPP_LIB_CORENAME}") +if (BUILD_STATIC_LIBS) + set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${PKG_CONFIG_LIBNAME}") endif () if (BUILD_SHARED_LIBS) - set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_CPP_LIB_CORENAME}") + set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${PKG_CONFIG_LIBNAME}") endif () -set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") -set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") +set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_NAME} = ${HDF5_PACKAGE_VERSION}") +set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_NAME} = ${HDF5_PACKAGE_VERSION}") configure_file ( ${HDF_CONFIG_DIR}/libhdf5.pc.in diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AbstractDs.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AbstractDs.cpp index eeb015584b1..ab3fabaeb69 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AbstractDs.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AbstractDs.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -36,7 +35,6 @@ namespace H5 { //-------------------------------------------------------------------------- // Function: AbstractDs default constructor ///\brief Default constructor -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- AbstractDs::AbstractDs() { @@ -45,7 +43,6 @@ AbstractDs::AbstractDs() //-------------------------------------------------------------------------- // Function: AbstractDs default constructor ///\brief Creates an AbstractDs instance using an existing id. -// Programmer Binh-Minh Ribler - 2000 // // *** Deprecation warning *** // This constructor is no longer appropriate because the data member "id" had @@ -61,7 +58,6 @@ AbstractDs::AbstractDs() /// object, which can be a dataset or an attribute. ///\return Datatype class identifier ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5T_class_t AbstractDs::getTypeClass() const @@ -108,7 +104,6 @@ AbstractDs::getTypeClass() const /// can be a dataset or an attribute. ///\return DataType instance ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DataType AbstractDs::getDataType() const @@ -136,7 +131,6 @@ AbstractDs::getDataType() const /// can be a dataset or an attribute. ///\return ArrayType instance ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Jul, 2005 //-------------------------------------------------------------------------- ArrayType AbstractDs::getArrayType() const @@ -166,7 +160,6 @@ AbstractDs::getArrayType() const /// can be a dataset or an attribute. ///\return CompType instance ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- CompType AbstractDs::getCompType() const @@ -194,7 +187,6 @@ AbstractDs::getCompType() const /// can be a dataset or an attribute. ///\return EnumType instance ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- EnumType AbstractDs::getEnumType() const @@ -222,7 +214,6 @@ AbstractDs::getEnumType() const /// can be a dataset or an attribute. ///\return IntType instance ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- IntType AbstractDs::getIntType() const @@ -250,7 +241,6 @@ AbstractDs::getIntType() const /// which can be a dataset or an attribute. ///\return FloatType instance ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FloatType AbstractDs::getFloatType() const @@ -278,7 +268,6 @@ AbstractDs::getFloatType() const /// can be a dataset or an attribute. ///\return StrType instance ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- StrType AbstractDs::getStrType() const @@ -302,11 +291,10 @@ AbstractDs::getStrType() const //-------------------------------------------------------------------------- // Function: AbstractDs::getVarLenType -///\brief Returns the floating-point datatype of this abstract dataset, +///\brief Returns the variable length datatype of this abstract dataset, /// which can be a dataset or an attribute. ///\return VarLenType instance ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Jul, 2005 //-------------------------------------------------------------------------- VarLenType AbstractDs::getVarLenType() const @@ -328,13 +316,4 @@ AbstractDs::getVarLenType() const } } -//-------------------------------------------------------------------------- -// Function: AbstractDs destructor -///\brief Noop destructor. -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -AbstractDs::~AbstractDs() -{ -} - } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AbstractDs.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AbstractDs.h index b84867b2cb9..d831bd65791 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AbstractDs.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AbstractDs.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -68,7 +67,7 @@ class H5_DLLCPP AbstractDs { virtual H5std_string fromClass() const = 0; // Destructor - virtual ~AbstractDs(); + virtual ~AbstractDs() = default; protected: // Default constructor diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Alltypes.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Alltypes.h index 7a14774f8ff..b18add8d1fb 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Alltypes.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Alltypes.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5ArrayType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5ArrayType.cpp index 6999f1bf70e..3a2da2bf39f 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5ArrayType.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5ArrayType.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -32,7 +31,6 @@ namespace H5 { //-------------------------------------------------------------------------- // Function: ArrayType default constructor ///\brief Default constructor: Creates a stub ArrayType -// Programmer Binh-Minh Ribler - May 2004 //-------------------------------------------------------------------------- ArrayType::ArrayType() : DataType() { @@ -43,7 +41,6 @@ ArrayType::ArrayType() : DataType() ///\brief Creates an ArrayType object using an existing id. ///\param existing_id - IN: Id of an existing datatype ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - May 2004 //-------------------------------------------------------------------------- ArrayType::ArrayType(const hid_t existing_id) : DataType(existing_id) { @@ -52,7 +49,6 @@ ArrayType::ArrayType(const hid_t existing_id) : DataType(existing_id) //-------------------------------------------------------------------------- // Function: ArrayType copy constructor ///\brief Copy constructor: same HDF5 object as \a original -// Programmer Binh-Minh Ribler - May 2004 //-------------------------------------------------------------------------- ArrayType::ArrayType(const ArrayType &original) : DataType(original) { @@ -66,12 +62,14 @@ ArrayType::ArrayType(const ArrayType &original) : DataType(original) ///\param ndims - IN: Rank of the array, [0..H5S_MAX_RANK] ///\param dims - IN: Size of each array dimension ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - May 2004 //-------------------------------------------------------------------------- ArrayType::ArrayType(const DataType &base_type, int ndims, const hsize_t *dims) : DataType() { + if (ndims < 0 || ndims > H5S_MAX_RANK) + throw DataTypeIException("ArrayType constructor", "ndims not in range [0..H5S_MAX_RANK]"); + // Call C API to create an array data type - hid_t new_type_id = H5Tarray_create2(base_type.getId(), ndims, dims); + hid_t new_type_id = H5Tarray_create2(base_type.getId(), static_cast(ndims), dims); if (new_type_id < 0) throw DataTypeIException("ArrayType constructor", "H5Tarray_create2 failed"); @@ -86,7 +84,6 @@ ArrayType::ArrayType(const DataType &base_type, int ndims, const hsize_t *dims) ///\param loc - IN: Location of the type ///\param dtype_name - IN: Array type name ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Dec 2016 // Description // In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openArrayType(const char*) to @@ -105,7 +102,6 @@ ArrayType::ArrayType(const H5Location &loc, const char *dtype_name) : DataType() ///\param loc - IN: Location of the type ///\param dtype_name - IN: Array type name ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Dec 2016 // Description // In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openArrayType(const H5std_string&) @@ -126,7 +122,6 @@ ArrayType::ArrayType(const H5Location &loc, const H5std_string &dtype_name) : Da // Description // Closes the id on the lhs object first with setId, then copies // each data member from the rhs object. (Issue HDFFV-9562) -// Programmer Binh-Minh Ribler - Mar 2016 //-------------------------------------------------------------------------- ArrayType & ArrayType::operator=(const ArrayType &rhs) @@ -151,7 +146,6 @@ ArrayType::operator=(const ArrayType &rhs) /// binary object description of this type. /// ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- DataType * ArrayType::decode() const @@ -173,7 +167,6 @@ ArrayType::decode() const ///\brief Returns the number of dimensions for an array datatype. ///\return Number of dimensions ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - May 2004 //-------------------------------------------------------------------------- int ArrayType::getArrayNDims() const @@ -193,7 +186,6 @@ ArrayType::getArrayNDims() const ///\param dims - OUT: Sizes of dimensions ///\return Number of dimensions ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - May 2004 //-------------------------------------------------------------------------- int ArrayType::getArrayDims(hsize_t *dims) const @@ -207,13 +199,4 @@ ArrayType::getArrayDims(hsize_t *dims) const return (ndims); } -//-------------------------------------------------------------------------- -// Function: ArrayType destructor -///\brief Properly terminates access to this array datatype. -// Programmer Binh-Minh Ribler - May 2004 -//-------------------------------------------------------------------------- -ArrayType::~ArrayType() -{ -} - } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5ArrayType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5ArrayType.h index b93ae4aa33b..e02a3a2a0e8 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5ArrayType.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5ArrayType.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -37,7 +36,7 @@ class H5_DLLCPP ArrayType : public DataType { // Returns an ArrayType object via DataType* by decoding the // binary object description of this type. - virtual DataType *decode() const H5_OVERRIDE; + virtual DataType *decode() const override; // Returns the number of dimensions of this array datatype. int getArrayNDims() const; @@ -49,7 +48,7 @@ class H5_DLLCPP ArrayType : public DataType { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("ArrayType"); } @@ -61,7 +60,7 @@ class H5_DLLCPP ArrayType : public DataType { ArrayType(const hid_t existing_id); // Noop destructor - virtual ~ArrayType() H5_OVERRIDE; + virtual ~ArrayType() override = default; // Default constructor ArrayType(); diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AtomType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AtomType.cpp index 0b480464c96..f2e037a98bc 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AtomType.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AtomType.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -33,7 +32,6 @@ namespace H5 { //-------------------------------------------------------------------------- // Function: AtomType default constructor [protected] // Purpose Default constructor: creates a stub atomic datatype. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- AtomType::AtomType() : DataType() { @@ -44,7 +42,6 @@ AtomType::AtomType() : DataType() // Purpose Creates an AtomType object using an existing id. // Parameter existing_id - IN: Id of an existing datatype // Exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- AtomType::AtomType(const hid_t existing_id) : DataType(existing_id) { @@ -53,7 +50,6 @@ AtomType::AtomType(const hid_t existing_id) : DataType(existing_id) //-------------------------------------------------------------------------- // Function: AtomType copy constructor ///\brief Copy constructor: same HDF5 object as \a original -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- AtomType::AtomType(const AtomType &original) : DataType(original) { @@ -65,7 +61,6 @@ AtomType::AtomType(const AtomType &original) : DataType(original) ///\brief Sets the total size for an atomic datatype. ///\param size - IN: Size to set ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void AtomType::setSize(size_t size) const @@ -85,7 +80,6 @@ AtomType::setSize(size_t size) const /// \li \c H5T_ORDER_BE /// \li \c H5T_ORDER_VAX ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Mar, 2005 //-------------------------------------------------------------------------- H5T_order_t AtomType::getOrder() const @@ -115,7 +109,6 @@ AtomType::getOrder() const /// \li \c H5T_ORDER_BE /// \li \c H5T_ORDER_VAX ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5T_order_t AtomType::getOrder(H5std_string &order_string) const @@ -141,7 +134,6 @@ AtomType::getOrder(H5std_string &order_string) const /// \li \c H5T_ORDER_BE /// \li \c H5T_ORDER_VAX ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void AtomType::setOrder(H5T_order_t order) const @@ -162,7 +154,6 @@ AtomType::setOrder(H5T_order_t order) const /// The precision is the number of significant bits which, /// unless padding is present, is 8 times larger than the /// value returned by \c DataType::getSize(). -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- size_t AtomType::getPrecision() const @@ -185,7 +176,6 @@ AtomType::getPrecision() const ///\par Description /// For information, please refer to the H5Tset_precision API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void AtomType::setPrecision(size_t precision) const @@ -205,7 +195,6 @@ AtomType::setPrecision(size_t precision) const ///\par Description /// For information, please refer to the H5Tget_offset API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 // Modification // 12/05/00: due to C API change // - return type changed from size_t to int @@ -231,7 +220,6 @@ AtomType::getOffset() const ///\par Description /// For information, please refer to the H5Tset_offset API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void AtomType::setOffset(size_t offset) const @@ -255,7 +243,6 @@ AtomType::setOffset(size_t offset) const /// \li \c H5T_PAD_ZERO (0) - Set background to zeros. /// \li \c H5T_PAD_ONE (1) - Set background to ones. /// \li \c H5T_PAD_BACKGROUND (2) - Leave background alone. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void AtomType::getPad(H5T_pad_t &lsb, H5T_pad_t &msb) const @@ -278,7 +265,6 @@ AtomType::getPad(H5T_pad_t &lsb, H5T_pad_t &msb) const /// \li \c H5T_PAD_ZERO (0) - Set background to zeros. /// \li \c H5T_PAD_ONE (1) - Set background to ones. /// \li \c H5T_PAD_BACKGROUND (2) - Leave background alone. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void AtomType::setPad(H5T_pad_t lsb, H5T_pad_t msb) const @@ -290,15 +276,4 @@ AtomType::setPad(H5T_pad_t lsb, H5T_pad_t msb) const } } -#ifndef DOXYGEN_SHOULD_SKIP_THIS -//-------------------------------------------------------------------------- -// Function: AtomType destructor -///\brief Noop destructor. -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -AtomType::~AtomType() -{ -} -#endif // DOXYGEN_SHOULD_SKIP_THIS - } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AtomType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AtomType.h index e00a3087eac..327604ddd56 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AtomType.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AtomType.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -58,7 +57,7 @@ class H5_DLLCPP AtomType : public DataType { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("AtomType"); } @@ -68,7 +67,7 @@ class H5_DLLCPP AtomType : public DataType { AtomType(const AtomType &original); // Noop destructor - virtual ~AtomType() H5_OVERRIDE; + virtual ~AtomType() override = default; #endif // DOXYGEN_SHOULD_SKIP_THIS protected: diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Attribute.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Attribute.cpp index 0e37c2b3247..a79d7c3a024 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Attribute.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Attribute.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -11,10 +10,10 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +#include #include #include -#include "H5private.h" // for HDfree #include "H5Include.h" #include "H5Exception.h" #include "H5IdComponent.h" @@ -42,7 +41,6 @@ class H5Object; // forward declaration for UserData4Aiterate //-------------------------------------------------------------------------- // Function: Attribute default constructor ///\brief Default constructor: Creates a stub attribute -// Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- Attribute::Attribute() : AbstractDs(), H5Location(), id(H5I_INVALID_HID) { @@ -52,7 +50,6 @@ Attribute::Attribute() : AbstractDs(), H5Location(), id(H5I_INVALID_HID) // Function: Attribute copy constructor ///\brief Copy constructor: same HDF5 object as \a original ///\param original - IN: Original Attribute object to copy -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- Attribute::Attribute(const Attribute &original) : AbstractDs(), H5Location(), id(original.id) { @@ -65,7 +62,6 @@ Attribute::Attribute(const Attribute &original) : AbstractDs(), H5Location(), id /// attribute. ///\param existing_id - IN: Id of an existing attribute ///\exception H5::AttributeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- Attribute::Attribute(const hid_t existing_id) : AbstractDs(), H5Location(), id(existing_id) { @@ -78,7 +74,6 @@ Attribute::Attribute(const hid_t existing_id) : AbstractDs(), H5Location(), id(e ///\param mem_type - IN: Attribute datatype (in memory) ///\param buf - IN: Data to be written ///\exception H5::AttributeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void Attribute::write(const DataType &mem_type, const void *buf) const @@ -96,7 +91,6 @@ Attribute::write(const DataType &mem_type, const void *buf) const ///\param mem_type - IN: Attribute datatype (in memory) ///\param strg - IN: Data to be written ///\exception H5::AttributeIException -// Programmer Binh-Minh Ribler - Apr, 2003 //-------------------------------------------------------------------------- void Attribute::write(const DataType &mem_type, const H5std_string &strg) const @@ -131,7 +125,6 @@ Attribute::write(const DataType &mem_type, const H5std_string &strg) const ///\param mem_type - IN: Attribute datatype (in memory) ///\param buf - OUT: Buffer for read data ///\exception H5::AttributeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void Attribute::read(const DataType &mem_type, void *buf) const @@ -149,7 +142,6 @@ Attribute::read(const DataType &mem_type, void *buf) const ///\param mem_type - IN: Attribute datatype (in memory) ///\param strg - IN: Buffer for read string ///\exception H5::AttributeIException -// Programmer Binh-Minh Ribler - Apr, 2003 // Modification // Mar 2008 // Corrected a misunderstanding that H5Aread would allocate @@ -186,7 +178,6 @@ Attribute::read(const DataType &mem_type, H5std_string &strg) const ///\brief Gets the size in memory of the attribute's data. ///\return Size of data (in memory) ///\exception H5::AttributeIException -// Programmer Binh-Minh Ribler - Apr 2009 //-------------------------------------------------------------------------- size_t Attribute::getInMemDataSize() const @@ -235,8 +226,9 @@ Attribute::getInMemDataSize() const } // Calculate and return the size of the data - size_t data_size = type_size * num_elements; - return (data_size); + size_t data_size = type_size * static_cast(num_elements); + + return data_size; } //-------------------------------------------------------------------------- @@ -244,7 +236,6 @@ Attribute::getInMemDataSize() const ///\brief Gets a copy of the dataspace for this attribute. ///\return Dataspace instance ///\exception H5::AttributeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DataSpace Attribute::getSpace() const @@ -278,7 +269,6 @@ Attribute::getSpace() const /// To get length of the attribute's name for buffer allocation, /// an application can call this function passing in NULL for the /// first argument and ignore the second argument. -// Programmer Binh-Minh Ribler - Mar, 2014 //-------------------------------------------------------------------------- ssize_t Attribute::getName(char *attr_name, size_t buf_size) const @@ -302,7 +292,6 @@ Attribute::getName(char *attr_name, size_t buf_size) const ///\brief Returns the name of this attribute as an \a H5std_string. ///\return Name of the attribute ///\exception H5::AttributeIException -// Programmer Binh-Minh Ribler - May, 2004 // Modification // Mar 2014 - BMR // Revised to use the modified getName() above @@ -313,7 +302,7 @@ Attribute::getName() const H5std_string attr_name; // attribute name to return // Preliminary call to get the size of the attribute name - ssize_t name_size = H5Aget_name(id, static_cast(0), NULL); + ssize_t name_size = H5Aget_name(id, 0, NULL); // If H5Aget_name failed, throw exception if (name_size < 0) { @@ -324,11 +313,15 @@ Attribute::getName() const } // Attribute's name exists, retrieve it else if (name_size > 0) { - char *name_C = new char[name_size + 1]; // temporary C-string - HDmemset(name_C, 0, name_size + 1); // clear buffer + // The actual size is the cast value + 1 for the terminal ASCII NUL + // (unfortunate in/out type sign mismatch) + size_t actual_name_size = static_cast(name_size) + 1; + + // Create buffer for C string + char *name_C = new char[actual_name_size](); // Use overloaded function - name_size = getName(name_C, name_size + 1); + name_size = getName(name_C, actual_name_size); // Convert the C attribute name to return attr_name = name_C; @@ -336,8 +329,9 @@ Attribute::getName() const // Clean up resource delete[] name_C; } + // Return attribute's name - return (attr_name); + return attr_name; } //-------------------------------------------------------------------------- @@ -348,7 +342,6 @@ Attribute::getName() const ///\return Name (or part of name) of the attribute ///\param len - IN: Desired length of the name ///\exception H5::AttributeIException -// Programmer Binh-Minh Ribler - 2000 // Modification // Mar 2014 - BMR // Revised to use the new getName() below @@ -375,7 +368,6 @@ Attribute::getName(size_t len) const /// This function retrieves the attribute's name as a string. The /// buf_size can specify a specific length or default to 0, in /// which case the entire name will be retrieved. -// Programmer Binh-Minh Ribler - Nov, 2001 // Modification // Mar 2014 - BMR // Added to replace getName(size_t, H5std_string&) so that it'll @@ -389,12 +381,12 @@ Attribute::getName(H5std_string &attr_name, size_t len) const // If no length is provided, get the entire attribute name if (len == 0) { attr_name = getName(); - name_size = attr_name.length(); + name_size = static_cast(attr_name.length()); } // If length is provided, get that number of characters in name else { - char *name_C = new char[len + 1]; // temporary C-string - HDmemset(name_C, 0, len + 1); // clear buffer + // Create buffer for C string + char *name_C = new char[len + 1](); // Use overloaded function name_size = getName(name_C, len + 1); @@ -408,7 +400,7 @@ Attribute::getName(H5std_string &attr_name, size_t len) const // Otherwise, keep attr_name intact // Return name size - return (name_size); + return name_size; } //-------------------------------------------------------------------------- @@ -420,7 +412,6 @@ Attribute::getName(H5std_string &attr_name, size_t len) const // Param attr_name - OUT: Buffer for the name string // Return Actual length of the attribute name // Exception H5::AttributeIException -// Programmer Binh-Minh Ribler - Nov, 2001 // Modification // Modified to call its replacement. -BMR, 2014/04/16 // Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0 @@ -438,7 +429,6 @@ Attribute::getName(H5std_string &attr_name, size_t len) const ///\exception H5::AttributeIException // Note: H5Dget_storage_size returns 0 when there is no data. This // function should have no failure. (from SLU) -// Programmer Binh-Minh Ribler - Mar, 2005 //-------------------------------------------------------------------------- hsize_t Attribute::getStorageSize() const @@ -456,7 +446,6 @@ Attribute::getStorageSize() const // AbstractDS and Attribute are moved out of H5Object. In // addition, member IdComponent::id is moved into subclasses, and // IdComponent::getId now becomes pure virtual function. -// Programmer Binh-Minh Ribler - May, 2008 // Modification // Aug 2016 - BMR // Note that Attribute is now inheriting from H5Location, because @@ -476,7 +465,6 @@ Attribute::getId() const // Exception H5::AttributeIException // Description // This private function is used in AbstractDs. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- hid_t Attribute::p_get_type() const @@ -495,7 +483,6 @@ Attribute::p_get_type() const // param mem_type - IN: Attribute datatype (in memory) // param strg - IN: Buffer for read string // exception H5::AttributeIException -// Programmer Binh-Minh Ribler - Jul, 2009 // Modification // Jul 2009 // Separated the fixed length case from the original @@ -511,7 +498,7 @@ Attribute::p_read_fixed_len(const DataType &mem_type, H5std_string &strg) const // If there is data, allocate buffer and read it. if (attr_size > 0) { - char * strg_C = new char[attr_size + 1]; + char *strg_C = new char[attr_size + 1]; herr_t ret_value = H5Aread(id, mem_type.getId(), strg_C); if (ret_value < 0) { delete[] strg_C; // de-allocate for fixed-len string @@ -530,7 +517,6 @@ Attribute::p_read_fixed_len(const DataType &mem_type, H5std_string &strg) const // param mem_type - IN: Attribute datatype (in memory) // param strg - IN: Buffer for read string // exception H5::AttributeIException -// Programmer Binh-Minh Ribler - Jul, 2009 // Modification // Jul 2009 // Separated the variable length case from the original @@ -551,7 +537,7 @@ Attribute::p_read_variable_len(const DataType &mem_type, H5std_string &strg) con // Get string from the C char* and release resource allocated by C API strg = strg_C; - HDfree(strg_C); + free(strg_C); } #ifndef DOXYGEN_SHOULD_SKIP_THIS @@ -562,10 +548,9 @@ Attribute::p_read_variable_len(const DataType &mem_type, H5std_string &strg) con ///\exception H5::IdComponentException when the attempt to close the HDF5 /// object fails // Description: -// The underlaying reference counting in the C library ensures +// The underlying reference counting in the C library ensures // that the current valid id of this object is properly closed. // Then the object's id is reset to the new id. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void Attribute::p_setId(const hid_t new_id) @@ -587,7 +572,6 @@ Attribute::p_setId(const hid_t new_id) ///\brief Closes this attribute. /// ///\exception H5::AttributeIException -// Programmer Binh-Minh Ribler - Mar 9, 2005 //-------------------------------------------------------------------------- void Attribute::close() @@ -605,7 +589,6 @@ Attribute::close() //-------------------------------------------------------------------------- // Function: Attribute destructor ///\brief Properly terminates access to this attribute. -// Programmer Binh-Minh Ribler - 2000 // Modification // - Replaced resetIdComponent() with decRefCount() to use C // library ID reference counting mechanism - BMR, Jun 1, 2004 @@ -622,4 +605,14 @@ Attribute::~Attribute() } } +//-------------------------------------------------------------------------- +// Function: Copy assignment operator +Attribute & +Attribute::operator=(const Attribute &original) +{ + IdComponent::operator=(original); + + return *this; +} + } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Attribute.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Attribute.h index 71bfa141eb5..970110274b4 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Attribute.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Attribute.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -38,7 +37,7 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location { Attribute(const hid_t attr_id); // Closes this attribute. - virtual void close() H5_OVERRIDE; + virtual void close() override; // Gets the name of this attribute. ssize_t getName(char *attr_name, size_t buf_size = 0) const; @@ -50,13 +49,13 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location { ssize_t getName(size_t buf_size, H5std_string &attr_name) const; // Gets a copy of the dataspace for this attribute. - virtual DataSpace getSpace() const H5_OVERRIDE; + virtual DataSpace getSpace() const override; // Returns the amount of storage size required for this attribute. - virtual hsize_t getStorageSize() const H5_OVERRIDE; + virtual hsize_t getStorageSize() const override; // Returns the in memory size of this attribute's data. - virtual size_t getInMemDataSize() const H5_OVERRIDE; + virtual size_t getInMemDataSize() const override; // Reads data from this attribute. void read(const DataType &mem_type, void *buf) const; @@ -68,21 +67,24 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("Attribute"); } // Gets the attribute id. - virtual hid_t getId() const H5_OVERRIDE; + virtual hid_t getId() const override; // Destructor: properly terminates access to this attribute. - virtual ~Attribute() H5_OVERRIDE; + virtual ~Attribute() override; + + // Copy assignment operator. + Attribute &operator=(const Attribute &original); #ifndef DOXYGEN_SHOULD_SKIP_THIS protected: // Sets the attribute id. - virtual void p_setId(const hid_t new_id) H5_OVERRIDE; + virtual void p_setId(const hid_t new_id) override; #endif // DOXYGEN_SHOULD_SKIP_THIS private: @@ -92,7 +94,7 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location { // getTypeClass and various API functions getXxxType // defined in AbstractDs for generic datatype and specific // sub-types - virtual hid_t p_get_type() const H5_OVERRIDE; + virtual hid_t p_get_type() const override; // Reads variable or fixed len strings from this attribute. void p_read_variable_len(const DataType &mem_type, H5std_string &strg) const; diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Classes.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Classes.h index 7820ce2564e..b4a0670d468 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Classes.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Classes.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CommonFG.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CommonFG.cpp index fb602d93319..d26c83fade0 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CommonFG.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CommonFG.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -13,7 +12,6 @@ #include -#include "H5private.h" // for HDstrcpy #include "H5Include.h" #include "H5Exception.h" #include "H5IdComponent.h" @@ -53,7 +51,6 @@ namespace H5 { ///\param name - IN: Name of the datatype to open ///\return DataType instance ///\exception H5::FileIException or H5::GroupIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DataType CommonFG::openDataType(const char *name) const @@ -77,7 +74,6 @@ CommonFG::openDataType(const char *name) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DataType CommonFG::openDataType(const H5std_string &name) const @@ -91,7 +87,6 @@ CommonFG::openDataType(const H5std_string &name) const ///\param name - IN: Name of the array datatype to open ///\return ArrayType instance ///\exception H5::FileIException or H5::GroupIException -// Programmer Binh-Minh Ribler - Jul, 2005 //-------------------------------------------------------------------------- ArrayType CommonFG::openArrayType(const char *name) const @@ -115,7 +110,6 @@ CommonFG::openArrayType(const char *name) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - Jul, 2005 //-------------------------------------------------------------------------- ArrayType CommonFG::openArrayType(const H5std_string &name) const @@ -129,7 +123,6 @@ CommonFG::openArrayType(const H5std_string &name) const ///\param name - IN: Name of the compound datatype to open ///\return CompType instance ///\exception H5::FileIException or H5::GroupIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- CompType CommonFG::openCompType(const char *name) const @@ -153,7 +146,6 @@ CommonFG::openCompType(const char *name) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- CompType CommonFG::openCompType(const H5std_string &name) const @@ -167,7 +159,6 @@ CommonFG::openCompType(const H5std_string &name) const ///\param name - IN: Name of the enumeration datatype to open ///\return EnumType instance ///\exception H5::FileIException or H5::GroupIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- EnumType CommonFG::openEnumType(const char *name) const @@ -191,7 +182,6 @@ CommonFG::openEnumType(const char *name) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- EnumType CommonFG::openEnumType(const H5std_string &name) const @@ -205,7 +195,6 @@ CommonFG::openEnumType(const H5std_string &name) const ///\param name - IN: Name of the integer datatype to open ///\return IntType instance ///\exception H5::FileIException or H5::GroupIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- IntType CommonFG::openIntType(const char *name) const @@ -229,7 +218,6 @@ CommonFG::openIntType(const char *name) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- IntType CommonFG::openIntType(const H5std_string &name) const @@ -243,7 +231,6 @@ CommonFG::openIntType(const H5std_string &name) const ///\param name - IN: Name of the floating-point datatype to open ///\return FloatType instance ///\exception H5::FileIException or H5::GroupIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FloatType CommonFG::openFloatType(const char *name) const @@ -267,7 +254,6 @@ CommonFG::openFloatType(const char *name) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FloatType CommonFG::openFloatType(const H5std_string &name) const @@ -281,7 +267,6 @@ CommonFG::openFloatType(const H5std_string &name) const ///\param name - IN: Name of the string datatype to open ///\return StrType instance ///\exception H5::FileIException or H5::GroupIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- StrType CommonFG::openStrType(const char *name) const @@ -305,7 +290,6 @@ CommonFG::openStrType(const char *name) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- StrType CommonFG::openStrType(const H5std_string &name) const @@ -319,7 +303,6 @@ CommonFG::openStrType(const H5std_string &name) const ///\param name - IN: Name of the variable length datatype to open ///\return VarLenType instance ///\exception H5::FileIException or H5::GroupIException -// Programmer Binh-Minh Ribler - Jul, 2005 //-------------------------------------------------------------------------- VarLenType CommonFG::openVarLenType(const char *name) const @@ -343,7 +326,6 @@ CommonFG::openVarLenType(const char *name) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - Jul, 2005 //-------------------------------------------------------------------------- VarLenType CommonFG::openVarLenType(const H5std_string &name) const @@ -355,21 +337,11 @@ CommonFG::openVarLenType(const H5std_string &name) const //-------------------------------------------------------------------------- // Function: CommonFG default constructor ///\brief Default constructor. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- CommonFG::CommonFG() { } -//-------------------------------------------------------------------------- -// Function: CommonFG destructor -///\brief Noop destructor. -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -CommonFG::~CommonFG() -{ -} - //-------------------------------------------------------------------------- // Function: f_DataType_setId - friend // Purpose: This function is friend to class H5::DataType so that it @@ -378,7 +350,6 @@ CommonFG::~CommonFG() // Applications shouldn't need to use it. // param dtype - IN/OUT: DataType object to be changed // param new_id - IN: New id to set -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- void f_DataType_setId(DataType *dtype, hid_t new_id) @@ -394,7 +365,6 @@ f_DataType_setId(DataType *dtype, hid_t new_id) // Applications shouldn't need to use it. // param dset - IN/OUT: DataSet object to be changed // param new_id - IN: New id to set -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- void f_DataSet_setId(DataSet *dset, hid_t new_id) diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CommonFG.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CommonFG.h index d87f9ca1348..6eb01db3bd1 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CommonFG.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CommonFG.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -73,7 +72,7 @@ class H5_DLLCPP CommonFG { CommonFG(); // Noop destructor. - virtual ~CommonFG(); + virtual ~CommonFG() = default; protected: virtual void p_setId(const hid_t new_id) = 0; diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CompType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CompType.cpp index 3b38c6d81cd..70bbe66556e 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CompType.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CompType.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -35,7 +34,6 @@ namespace H5 { //-------------------------------------------------------------------------- // Function: CompType default constructor ///\brief Default constructor: Creates a stub compound datatype -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- CompType::CompType() : DataType() { @@ -45,7 +43,6 @@ CompType::CompType() : DataType() // Function: CompType copy constructor ///\brief Copy constructor: same HDF5 object as \a original ///\param original - IN: Original CompType instance -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- CompType::CompType(const CompType &original) : DataType(original) { @@ -55,7 +52,6 @@ CompType::CompType(const CompType &original) : DataType(original) // Function: CompType overloaded constructor ///\brief Creates a CompType object using the id of an existing datatype. ///\param existing_id - IN: Id of an existing compound datatype -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- CompType::CompType(const hid_t existing_id) : DataType(existing_id) { @@ -69,7 +65,6 @@ CompType::CompType(const hid_t existing_id) : DataType(existing_id) // Description // The DataType constructor calls the C API H5Tcreate to create // the compound datatype. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- CompType::CompType(size_t size) : DataType(H5T_COMPOUND, size) { @@ -81,7 +76,6 @@ CompType::CompType(size_t size) : DataType(H5T_COMPOUND, size) ///\param dataset - IN: Dataset that this enum datatype associates with ///\return CompType instance ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- CompType::CompType(const DataSet &dataset) : DataType() { @@ -101,7 +95,6 @@ CompType::CompType(const DataSet &dataset) : DataType() ///\param loc - IN: Location of the type ///\param dtype_name - IN: Compound type name ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Dec 2016 // Description // In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openCompType(const char*) to @@ -120,7 +113,6 @@ CompType::CompType(const H5Location &loc, const char *dtype_name) : DataType() ///\param loc - IN: Location of the type ///\param dtype_name - IN: Compound type name ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Dec 2016 // Description // In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openCompType(const H5Location&) @@ -138,7 +130,6 @@ CompType::CompType(const H5Location &loc, const H5std_string &dtype_name) : Data /// binary object description of this datatype. /// ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- DataType * CompType::decode() const @@ -160,7 +151,6 @@ CompType::decode() const ///\brief Returns the number of members in this compound datatype. ///\return Number of members ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- int CompType::getNmembers() const @@ -179,7 +169,6 @@ CompType::getNmembers() const ///\param member_num - IN: Zero-based index of the member ///\return Name of member ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5std_string CompType::getMemberName(unsigned member_num) const @@ -205,7 +194,6 @@ CompType::getMemberName(unsigned member_num) const /// Members are stored in no particular order with numbers 0 /// through N-1, where N is the value returned by the member /// function \c CompType::getNmembers. -// Programmer Binh-Minh Ribler - May 16, 2002 //-------------------------------------------------------------------------- int CompType::getMemberIndex(const char *name) const @@ -228,7 +216,6 @@ CompType::getMemberIndex(const H5std_string &name) const /// respect to the beginning of the compound data type datum. ///\param member_num - IN: Zero-based index of the member ///\return Byte offset -// Programmer Binh-Minh Ribler - 2000 // Description /// Members are stored in no particular order with numbers 0 /// through N-1, where N is the value returned by the member @@ -250,7 +237,6 @@ CompType::getMemberOffset(unsigned member_num) const ///\param member_num - IN: Zero-based index of the member ///\return Type class of the member ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 // Modification // Modified to use H5Tget_member_class instead. - Jul, 2005 //-------------------------------------------------------------------------- @@ -289,7 +275,6 @@ CompType::p_get_member_type(unsigned member_num) const ///\param member_num - IN: Zero-based index of the member ///\return DataType instance ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DataType CompType::getMemberDataType(unsigned member_num) const @@ -311,7 +296,6 @@ CompType::getMemberDataType(unsigned member_num) const ///\param member_num - IN: Zero-based index of the member ///\return ArrayType instance ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Jul, 2005 //-------------------------------------------------------------------------- ArrayType CompType::getMemberArrayType(unsigned member_num) const @@ -333,7 +317,6 @@ CompType::getMemberArrayType(unsigned member_num) const ///\param member_num - IN: Zero-based index of the member ///\return CompType instance ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- CompType CompType::getMemberCompType(unsigned member_num) const @@ -355,7 +338,6 @@ CompType::getMemberCompType(unsigned member_num) const ///\param member_num - IN: Zero-based index of the member ///\return EnumType instance ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- EnumType CompType::getMemberEnumType(unsigned member_num) const @@ -377,7 +359,6 @@ CompType::getMemberEnumType(unsigned member_num) const ///\param member_num - IN: Zero-based index of the member ///\return IntType instance ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- IntType CompType::getMemberIntType(unsigned member_num) const @@ -399,7 +380,6 @@ CompType::getMemberIntType(unsigned member_num) const ///\param member_num - IN: Zero-based index of the member ///\return FloatType instance ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FloatType CompType::getMemberFloatType(unsigned member_num) const @@ -421,7 +401,6 @@ CompType::getMemberFloatType(unsigned member_num) const ///\param member_num - IN: Zero-based index of the member ///\return StrType instance ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- StrType CompType::getMemberStrType(unsigned member_num) const @@ -443,7 +422,6 @@ CompType::getMemberStrType(unsigned member_num) const ///\param member_num - IN: Zero-based index of the member ///\return VarLenType instance ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Jul, 2005 //-------------------------------------------------------------------------- VarLenType CompType::getMemberVarLenType(unsigned member_num) const @@ -498,7 +476,6 @@ void CompType::getMemberType(unsigned member_num, StrType& strtype) const ///\param offset - IN: Offset in memory structure of the field to insert ///\param new_member - IN: New member to be inserted ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void CompType::insertMember(const H5std_string &name, size_t offset, const DataType &new_member) const @@ -521,7 +498,6 @@ CompType::insertMember(const H5std_string &name, size_t offset, const DataType & ///\brief Recursively removes padding from within a compound datatype. /// ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void CompType::pack() const @@ -540,7 +516,6 @@ CompType::pack() const ///\exception H5::DataTypeIException // Note // H5Tset_size works on atom datatypes and compound datatypes only -// Programmer Binh-Minh Ribler - 2014 //-------------------------------------------------------------------------- void CompType::setSize(size_t size) const @@ -552,13 +527,4 @@ CompType::setSize(size_t size) const } } -//-------------------------------------------------------------------------- -// Function: CompType destructor -///\brief Properly terminates access to this compound datatype. -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -CompType::~CompType() -{ -} - } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CompType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CompType.h index 4424d894e8e..a642b0d5143 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CompType.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CompType.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -45,7 +44,7 @@ class H5_DLLCPP CompType : public DataType { // Returns a CompType object via DataType* by decoding the binary // object description of this type. - virtual DataType *decode() const H5_OVERRIDE; + virtual DataType *decode() const override; // Returns the type class of the specified member of this compound // datatype. It provides to the user a way of knowing what type @@ -108,13 +107,13 @@ class H5_DLLCPP CompType : public DataType { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("CompType"); } // Noop destructor. - virtual ~CompType() H5_OVERRIDE; + virtual ~CompType() override = default; private: // Contains common code that is used by the member functions diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Cpp.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Cpp.h index 9272bdb1f5a..34fdef2032d 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Cpp.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Cpp.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -48,14 +47,4 @@ #include "H5File.h" #include "H5Library.h" -/* Some C++ compilers do not have offsetof macro; define to bypass the problem - - BMR- -EIP- 2007/08/01 -*/ -#ifndef H5_CXX_HAVE_OFFSETOF -#ifdef HOFFSET -#undef HOFFSET -#endif -#define HOFFSET(TYPE, MEMBER) ((size_t) & ((TYPE *)0)->MEMBER) -#endif - #endif // H5Cpp_H diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CppDoc.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CppDoc.h index 4337a6fe911..37bd8a5cd07 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CppDoc.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CppDoc.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DaccProp.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DaccProp.cpp index 35c071ac7c8..ba4c8ef60b0 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DaccProp.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DaccProp.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -41,7 +40,6 @@ DSetAccPropList *DSetAccPropList::DEFAULT_ = 0; // If DSetAccPropList::DEFAULT_ already points to an allocated // object, throw a PropListIException. This scenario should // not happen. -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- DSetAccPropList * DSetAccPropList::getConstant() @@ -67,13 +65,11 @@ DSetAccPropList::getConstant() // Function: DSetAccPropList::deleteConstants // Purpose: Deletes the constant object that DSetAccPropList::DEFAULT_ // points to. -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- void DSetAccPropList::deleteConstants() { - if (DEFAULT_ != 0) - delete DEFAULT_; + delete DEFAULT_; } //-------------------------------------------------------------------------- @@ -86,7 +82,6 @@ const DSetAccPropList &DSetAccPropList::DEFAULT = *getConstant(); //-------------------------------------------------------------------------- // Function: DSetAccPropList default constructor ///\brief Default constructor: creates a stub dataset creation property list -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DSetAccPropList::DSetAccPropList() : LinkAccPropList(H5P_DATASET_ACCESS) { @@ -96,7 +91,6 @@ DSetAccPropList::DSetAccPropList() : LinkAccPropList(H5P_DATASET_ACCESS) // Function: DSetAccPropList copy constructor ///\brief Copy constructor: same HDF5 object as \a original /// DSetAccPropList object -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DSetAccPropList::DSetAccPropList(const DSetAccPropList &orig) : LinkAccPropList(orig) { @@ -106,7 +100,6 @@ DSetAccPropList::DSetAccPropList(const DSetAccPropList &orig) : LinkAccPropList( // Function: DSetAccPropList overloaded constructor ///\brief Creates a DSetAccPropList object using the id of an /// existing dataset creation property list. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DSetAccPropList::DSetAccPropList(const hid_t plist_id) : LinkAccPropList(plist_id) { @@ -160,13 +153,4 @@ DSetAccPropList::getChunkCache(size_t &rdcc_nslots, size_t &rdcc_nbytes, double } } -//-------------------------------------------------------------------------- -// Function: DSetAccPropList destructor -///\brief Noop destructor. -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -DSetAccPropList::~DSetAccPropList() -{ -} - } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DaccProp.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DaccProp.h index 398918df407..3f101f3aa70 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DaccProp.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DaccProp.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -38,7 +37,7 @@ class H5_DLLCPP DSetAccPropList : public LinkAccPropList { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("DSetAccPropList"); } @@ -51,7 +50,7 @@ class H5_DLLCPP DSetAccPropList : public LinkAccPropList { DSetAccPropList(const hid_t plist_id); // Noop destructor. - virtual ~DSetAccPropList() H5_OVERRIDE; + virtual ~DSetAccPropList() override = default; #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSet.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSet.cpp index 47031dbfaec..40b40f2f21e 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSet.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSet.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -11,10 +10,10 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +#include #include #include -#include "H5private.h" // for HDfree #include "H5Include.h" #include "H5Exception.h" #include "H5IdComponent.h" @@ -268,8 +267,10 @@ DataSet::getInMemDataSize() const } // Calculate and return the size of the data - size_t data_size = type_size * num_elements; - return (data_size); + // Note that large datasets can overflow a size_t + size_t data_size = type_size * static_cast(num_elements); + + return data_size; } //-------------------------------------------------------------------------- @@ -717,8 +718,8 @@ DataSet::p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, con // If there is data, allocate buffer and read it. if (data_size > 0) { - char *strg_C = new char[data_size + 1]; - HDmemset(strg_C, 0, data_size + 1); // clear buffer + // Create buffer for C string + char *strg_C = new char[data_size + 1](); herr_t ret_value = H5Dread(id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg_C); @@ -728,7 +729,7 @@ DataSet::p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, con } // Get string from the C char* and release resource allocated locally - strg = strg_C; + strg = H5std_string(strg_C, data_size); delete[] strg_C; } } @@ -759,7 +760,7 @@ DataSet::p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id, // Get string from the C char* and release resource allocated by C API strg = strg_C; - HDfree(strg_C); + free(strg_C); } #ifndef DOXYGEN_SHOULD_SKIP_THIS @@ -770,7 +771,7 @@ DataSet::p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id, ///\exception H5::IdComponentException when the attempt to close the HDF5 /// object fails // Description: -// The underlaying reference counting in the C library ensures +// The underlying reference counting in the C library ensures // that the current valid id of this object is properly closed. // Then the object's id is reset to the new id. //-------------------------------------------------------------------------- diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSet.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSet.h index d50b2c552d8..399235086f6 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSet.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSet.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -28,7 +27,7 @@ namespace H5 { class H5_DLLCPP DataSet : public H5Object, public AbstractDs { public: // Close this dataset. - virtual void close() H5_OVERRIDE; + virtual void close() override; // Extends the dataset with unlimited dimension. void extend(const hsize_t *size) const; @@ -53,16 +52,16 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs { haddr_t getOffset() const; // Gets the dataspace of this dataset. - virtual DataSpace getSpace() const H5_OVERRIDE; + virtual DataSpace getSpace() const override; // Determines whether space has been allocated for a dataset. void getSpaceStatus(H5D_space_status_t &status) const; // Returns the amount of storage size required for this dataset. - virtual hsize_t getStorageSize() const H5_OVERRIDE; + virtual hsize_t getStorageSize() const override; // Returns the in memory size of this attribute's data. - virtual size_t getInMemDataSize() const H5_OVERRIDE; + virtual size_t getInMemDataSize() const override; // Returns the number of bytes required to store VL data. hsize_t getVlenBufSize(const DataType &type, const DataSpace &space) const; @@ -78,20 +77,20 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs { // The memory and file dataspaces and the transferring property list // can be defaults. void read(void *buf, const DataType &mem_type, const DataSpace &mem_space = DataSpace::ALL, - const DataSpace & file_space = DataSpace::ALL, + const DataSpace &file_space = DataSpace::ALL, const DSetMemXferPropList &xfer_plist = DSetMemXferPropList::DEFAULT) const; void read(H5std_string &buf, const DataType &mem_type, const DataSpace &mem_space = DataSpace::ALL, - const DataSpace & file_space = DataSpace::ALL, + const DataSpace &file_space = DataSpace::ALL, const DSetMemXferPropList &xfer_plist = DSetMemXferPropList::DEFAULT) const; // Writes the buffered data to this dataset. // The memory and file dataspaces and the transferring property list // can be defaults. void write(const void *buf, const DataType &mem_type, const DataSpace &mem_space = DataSpace::ALL, - const DataSpace & file_space = DataSpace::ALL, + const DataSpace &file_space = DataSpace::ALL, const DSetMemXferPropList &xfer_plist = DSetMemXferPropList::DEFAULT) const; void write(const H5std_string &buf, const DataType &mem_type, const DataSpace &mem_space = DataSpace::ALL, - const DataSpace & file_space = DataSpace::ALL, + const DataSpace &file_space = DataSpace::ALL, const DSetMemXferPropList &xfer_plist = DSetMemXferPropList::DEFAULT) const; // Iterates the selected elements in the specified dataspace - not implemented in C++ style yet @@ -100,7 +99,7 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("DataSet"); } @@ -124,15 +123,15 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs { DataSet(const hid_t existing_id); // Gets the dataset id. - virtual hid_t getId() const H5_OVERRIDE; + virtual hid_t getId() const override; // Destructor: properly terminates access to this dataset. - virtual ~DataSet() H5_OVERRIDE; + virtual ~DataSet() override; protected: #ifndef DOXYGEN_SHOULD_SKIP_THIS // Sets the dataset id. - virtual void p_setId(const hid_t new_id) H5_OVERRIDE; + virtual void p_setId(const hid_t new_id) override; #endif // DOXYGEN_SHOULD_SKIP_THIS private: @@ -142,7 +141,7 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs { // getTypeClass and various API functions getXxxType // defined in AbstractDs for generic datatype and specific // sub-types - virtual hid_t p_get_type() const H5_OVERRIDE; + virtual hid_t p_get_type() const override; // Reads variable or fixed len strings from this dataset. void p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSpace.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSpace.cpp index 0485530d785..403f9ece67b 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSpace.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSpace.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -39,7 +38,6 @@ DataSpace *DataSpace::ALL_ = 0; // Description // If DataSpace::ALL_ already points to an allocated object, throw // a DataSpaceIException. This scenario should not happen. -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- DataSpace * DataSpace::getConstant() @@ -64,13 +62,11 @@ DataSpace::getConstant() //-------------------------------------------------------------------------- // Function: DataSpace::deleteConstants // Purpose: Deletes the constant object that DataSpace::ALL_ points to -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- void DataSpace::deleteConstants() { - if (ALL_ != 0) - delete ALL_; + delete ALL_; } //-------------------------------------------------------------------------- @@ -87,11 +83,9 @@ const DataSpace &DataSpace::ALL = *getConstant(); /// currently can be either \c H5S_SCALAR or \c H5S_SIMPLE; /// default to \c H5S_SCALAR. ///\exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -DataSpace::DataSpace(H5S_class_t type) : IdComponent() +DataSpace::DataSpace(H5S_class_t type) : IdComponent(), id{H5Screate(type)} { - id = H5Screate(type); if (id < 0) { throw DataSpaceIException("DataSpace constructor", "H5Screate failed"); } @@ -104,11 +98,10 @@ DataSpace::DataSpace(H5S_class_t type) : IdComponent() ///\param dims - IN: An array of the size of each dimension. ///\param maxdims - IN: An array of the maximum size of each dimension. ///\exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -DataSpace::DataSpace(int rank, const hsize_t *dims, const hsize_t *maxdims) : IdComponent() +DataSpace::DataSpace(int rank, const hsize_t *dims, const hsize_t *maxdims) + : IdComponent(), id{H5Screate_simple(rank, dims, maxdims)} { - id = H5Screate_simple(rank, dims, maxdims); if (id < 0) { throw DataSpaceIException("DataSpace constructor", "H5Screate_simple failed"); } @@ -120,7 +113,6 @@ DataSpace::DataSpace(int rank, const hsize_t *dims, const hsize_t *maxdims) : Id /// dataspace. ///\param existing_id - IN: Id of an existing dataspace ///\exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DataSpace::DataSpace(const hid_t existing_id) : IdComponent(), id(existing_id) { @@ -131,7 +123,6 @@ DataSpace::DataSpace(const hid_t existing_id) : IdComponent(), id(existing_id) // Function: DataSpace copy constructor ///\brief Copy constructor: same HDF5 object as \a original ///\param original - IN: DataSpace object to copy -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DataSpace::DataSpace(const DataSpace &original) : IdComponent(), id(original.id) { @@ -143,7 +134,6 @@ DataSpace::DataSpace(const DataSpace &original) : IdComponent(), id(original.id) ///\brief Makes a copy of an existing dataspace. ///\param like_space - IN: Dataspace to be copied ///\exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 // Modification // - Replaced resetIdComponent() with decRefCount() to use C // library ID reference counting mechanism - BMR, Jun 1, 2004 @@ -179,7 +169,6 @@ DataSpace::copy(const DataSpace &like_space) // Description // Makes a copy of the type on the right hand side and stores // the new id in the left hand side object. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DataSpace & DataSpace::operator=(const DataSpace &rhs) @@ -195,7 +184,6 @@ DataSpace::operator=(const DataSpace &rhs) ///\return \c true if the dataspace is a simple dataspace, and \c false, /// otherwise ///\exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- bool DataSpace::isSimple() const @@ -220,7 +208,6 @@ DataSpace::isSimple() const /// an extent, allowing the same shaped selection to be moved /// to different locations within a dataspace without requiring /// it to be re-defined. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataSpace::offsetSimple(const hssize_t *offset) const @@ -239,7 +226,6 @@ DataSpace::offsetSimple(const hssize_t *offset) const ///\return Number of dimensions, the same value as returned by /// \c DataSpace::getSimpleExtentNdims() ///\exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- int DataSpace::getSimpleExtentDims(hsize_t *dims, hsize_t *maxdims) const @@ -257,7 +243,6 @@ DataSpace::getSimpleExtentDims(hsize_t *dims, hsize_t *maxdims) const ///\brief Returns the dimensionality of a dataspace. ///\return Number of dimensions ///\exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- int DataSpace::getSimpleExtentNdims() const @@ -280,7 +265,6 @@ DataSpace::getSimpleExtentNdims() const // 12/05/00: due to C API change // return type hssize_t vs. hsize_t // num_elements = -1 when failure occurs vs. 0 -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- hssize_t DataSpace::getSimpleExtentNpoints() const @@ -300,7 +284,6 @@ DataSpace::getSimpleExtentNpoints() const ///\brief Returns the current class of a dataspace. ///\return Class of the dataspace ///\exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5S_class_t DataSpace::getSimpleExtentType() const @@ -318,7 +301,6 @@ DataSpace::getSimpleExtentType() const ///\brief Copies the extent of a dataspace. ///\param dest_space - IN: Dataspace to copy from ///\exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataSpace::extentCopy(const DataSpace &dest_space) const @@ -337,7 +319,6 @@ DataSpace::extentCopy(const DataSpace &dest_space) const // misses const. This wrapper will be removed in future release. // Param dest_space - IN: Dataspace to copy from // Exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 // Modification // Modified to call its replacement. -BMR, 2014/04/16 // Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0 @@ -355,7 +336,6 @@ DataSpace::extentCopy(const DataSpace &dest_space) const ///\param current_size - IN: Array containing current size of dataspace ///\param maximum_size - IN: Array containing maximum size of dataspace ///\exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataSpace::setExtentSimple(int rank, const hsize_t *current_size, const hsize_t *maximum_size) const @@ -372,7 +352,6 @@ DataSpace::setExtentSimple(int rank, const hsize_t *current_size, const hsize_t ///\brief Removes the extent from a dataspace. /// ///\exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataSpace::setExtentNone() const @@ -388,7 +367,6 @@ DataSpace::setExtentNone() const ///\brief Returns the number of elements in a dataspace selection. ///\return Number of elements ///\exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- hssize_t DataSpace::getSelectNpoints() const @@ -407,7 +385,6 @@ DataSpace::getSelectNpoints() const ///\brief Returns number of hyperslab blocks. ///\return Number of hyperslab blocks ///\exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- hssize_t DataSpace::getSelectHyperNblocks() const @@ -428,7 +405,6 @@ DataSpace::getSelectHyperNblocks() const ///\param numblocks - IN: Number of hyperslab blocks to get ///\param buf - IN: List of hyperslab blocks selected ///\exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataSpace::getSelectHyperBlocklist(hsize_t startblock, hsize_t numblocks, hsize_t *buf) const @@ -446,7 +422,6 @@ DataSpace::getSelectHyperBlocklist(hsize_t startblock, hsize_t numblocks, hsize_ ///\brief Returns the number of element points in the current selection. ///\return Number of element points ///\exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- hssize_t DataSpace::getSelectElemNpoints() const @@ -468,7 +443,6 @@ DataSpace::getSelectElemNpoints() const ///\par Description /// For information, please refer to the C API /// H5Sget_select_elem_pointlist in the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataSpace::getSelectElemPointlist(hsize_t startpoint, hsize_t numpoints, hsize_t *buf) const @@ -490,7 +464,6 @@ DataSpace::getSelectElemPointlist(hsize_t startpoint, hsize_t numpoints, hsize_t ///\par Description /// For information, please refer to the H5Sget_select_bounds API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataSpace::getSelectBounds(hsize_t *start, hsize_t *end) const @@ -514,7 +487,6 @@ DataSpace::getSelectBounds(hsize_t *start, hsize_t *end) const ///\par Description /// For information, please refer to the H5Sselect_elements API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataSpace::selectElements(H5S_seloper_t op, const size_t num_elements, const hsize_t *coord) const @@ -531,7 +503,6 @@ DataSpace::selectElements(H5S_seloper_t op, const size_t num_elements, const hsi ///\brief Selects the entire dataspace. /// ///\exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataSpace::selectAll() const @@ -547,7 +518,6 @@ DataSpace::selectAll() const ///\brief Resets the selection region to include no elements. /// ///\exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataSpace::selectNone() const @@ -565,7 +535,6 @@ DataSpace::selectNone() const ///\return \c true if the selection is within the extent of the /// dataspace, and \c false, otherwise ///\exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- bool DataSpace::selectValid() const @@ -592,7 +561,6 @@ DataSpace::selectValid() const ///\par Description /// For information, please refer to the H5Sselect_hyperslab API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataSpace::selectHyperslab(H5S_seloper_t op, const hsize_t *count, const hsize_t *start, @@ -615,7 +583,6 @@ DataSpace::selectHyperslab(H5S_seloper_t op, const hsize_t *count, const hsize_t // AbstractDS and Attribute are moved out of H5Object. In // addition, member IdComponent::id is moved into subclasses, and // IdComponent::getId now becomes pure virtual function. -// Programmer Binh-Minh Ribler - May, 2008 //-------------------------------------------------------------------------- hid_t DataSpace::getId() const @@ -631,10 +598,9 @@ DataSpace::getId() const ///\exception H5::IdComponentException when the attempt to close the HDF5 /// object fails // Description: -// The underlaying reference counting in the C library ensures +// The underlying reference counting in the C library ensures // that the current valid id of this object is properly closed. // Then the object's id is reset to the new id. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataSpace::p_setId(const hid_t new_id) @@ -656,7 +622,6 @@ DataSpace::p_setId(const hid_t new_id) ///\brief Closes this dataspace. /// ///\exception H5::DataSpaceIException -// Programmer Binh-Minh Ribler - Mar 9, 2005 //-------------------------------------------------------------------------- void DataSpace::close() @@ -675,7 +640,6 @@ DataSpace::close() //-------------------------------------------------------------------------- // Function: DataSpace destructor ///\brief Properly terminates access to this dataspace. -// Programmer Binh-Minh Ribler - 2000 // Modification // - Replaced resetIdComponent() with decRefCount() to use C // library ID reference counting mechanism - BMR, Jun 1, 2004 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSpace.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSpace.h index 5583baa51b9..136a8ea63b8 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSpace.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSpace.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -43,7 +42,7 @@ class H5_DLLCPP DataSpace : public IdComponent { DataSpace &operator=(const DataSpace &rhs); // Closes this dataspace. - virtual void close() H5_OVERRIDE; + virtual void close() override; // Makes copy of an existing dataspace. void copy(const DataSpace &like_space); @@ -115,25 +114,25 @@ class H5_DLLCPP DataSpace : public IdComponent { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("DataSpace"); } // Gets the dataspace id. - virtual hid_t getId() const H5_OVERRIDE; + virtual hid_t getId() const override; // Deletes the global constant static void deleteConstants(); // Destructor: properly terminates access to this dataspace. - virtual ~DataSpace() H5_OVERRIDE; + virtual ~DataSpace() override; #ifndef DOXYGEN_SHOULD_SKIP_THIS protected: // Sets the dataspace id. - virtual void p_setId(const hid_t new_id) H5_OVERRIDE; + virtual void p_setId(const hid_t new_id) override; #endif // DOXYGEN_SHOULD_SKIP_THIS diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataType.cpp index 3228dcbf175..13b0decc022 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataType.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataType.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -11,6 +10,7 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +#include #include #include @@ -32,7 +32,6 @@ #include "H5DataType.h" #include "H5AtomType.h" #include "H5PredType.h" -#include "H5private.h" #include "H5AbstractDs.h" #include "H5DataSet.h" #include "H5Attribute.h" @@ -44,7 +43,6 @@ using std::endl; //-------------------------------------------------------------------------- // Function: DataType default constructor ///\brief Default constructor: Creates a stub datatype -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DataType::DataType() : H5Object(), id(H5I_INVALID_HID), encoded_buf(NULL), buf_size(0) { @@ -57,7 +55,6 @@ DataType::DataType() : H5Object(), id(H5I_INVALID_HID), encoded_buf(NULL), buf_s // Description // Constructor creates a copy of an existing DataType using // its id. -// Programmer Binh-Minh Ribler - 2000 // Modification // Dec, 2005 // Removed second argument, "predefined", after changing to the @@ -74,12 +71,10 @@ DataType::DataType(const hid_t existing_id) : H5Object(), id(existing_id), encod ///\param type_class - IN: Class of datatype to create ///\param size - IN: Number of bytes in the datatype to create ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -DataType::DataType(const H5T_class_t type_class, size_t size) : H5Object(), encoded_buf(NULL), buf_size(0) +DataType::DataType(const H5T_class_t type_class, size_t size) + : H5Object(), id{H5Tcreate(type_class, size)}, encoded_buf(NULL), buf_size(0) { - // Call C routine to create the new datatype - id = H5Tcreate(type_class, size); if (id < 0) { throw DataTypeIException("DataType constructor", "H5Tcreate failed"); } @@ -94,12 +89,12 @@ DataType::DataType(const H5T_class_t type_class, size_t size) : H5Object(), enco ///\param ref_type - IN: Reference type - default to H5R_OBJECT ///\param plist - IN: Property list - default to PropList::DEFAULT ///\exception H5::ReferenceException -// Programmer Binh-Minh Ribler - Oct, 2006 //-------------------------------------------------------------------------- DataType::DataType(const H5Location &loc, const void *ref, H5R_type_t ref_type, const PropList &plist) - : H5Object(), encoded_buf(NULL), buf_size(0) + : H5Object(), id{H5Location::p_dereference(loc.getId(), ref, ref_type, plist, + "constructor - by dereference")}, + encoded_buf(NULL), buf_size(0) { - id = H5Location::p_dereference(loc.getId(), ref, ref_type, plist, "constructor - by dereference"); } //-------------------------------------------------------------------------- @@ -111,7 +106,6 @@ DataType::DataType(const H5Location &loc, const void *ref, H5R_type_t ref_type, // param ref_type - IN: Reference type - default to H5R_OBJECT // param plist - IN: Property list - default to PropList::DEFAULT // exception H5::ReferenceException -// Programmer Binh-Minh Ribler - Oct, 2006 // Modification // Jul, 2008 // Added for application convenience. @@ -126,7 +120,6 @@ H5Object(), id(H5I_INVALID_HID), encoded_buf(NULL), buf_size(0) //-------------------------------------------------------------------------- // Function: DataType copy constructor ///\brief Copy constructor: same HDF5 object as \a original -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DataType::DataType(const DataType &original) : H5Object(), id(original.id), encoded_buf(NULL), buf_size(0) { @@ -138,7 +131,6 @@ DataType::DataType(const DataType &original) : H5Object(), id(original.id), enco ///\brief Creates a DataType instance using a predefined type ///\param pred_type - IN: Predefined datatype ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2015 // Description // Copying the type so that when a predefined type is passed in, // a copy of it is made, not just a duplicate of the HDF5 id. @@ -146,10 +138,9 @@ DataType::DataType(const DataType &original) : H5Object(), id(original.id), enco // unnecessarily and will produce undefined behavior. // -BMR, Apr 2015 //-------------------------------------------------------------------------- -DataType::DataType(const PredType &pred_type) : H5Object(), encoded_buf(NULL), buf_size(0) +DataType::DataType(const PredType &pred_type) + : H5Object(), id{H5Tcopy(pred_type.getId())}, encoded_buf(NULL), buf_size(0) { - // Call C routine to copy the datatype - id = H5Tcopy(pred_type.getId()); if (id < 0) throw DataTypeIException("DataType constructor", "H5Tcopy failed"); } @@ -161,16 +152,15 @@ DataType::DataType(const PredType &pred_type) : H5Object(), encoded_buf(NULL), b ///\param loc - IN: Location of the type ///\param dtype_name - IN: Datatype name ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Dec 2016 // Description // In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openDataType(const char*) to // improve usability. // -BMR, Dec 2016 //-------------------------------------------------------------------------- -DataType::DataType(const H5Location &loc, const char *dtype_name) : H5Object(), encoded_buf(NULL), buf_size(0) +DataType::DataType(const H5Location &loc, const char *dtype_name) + : H5Object(), id{p_opentype(loc, dtype_name)}, encoded_buf(NULL), buf_size(0) { - id = p_opentype(loc, dtype_name); } //-------------------------------------------------------------------------- @@ -180,7 +170,6 @@ DataType::DataType(const H5Location &loc, const char *dtype_name) : H5Object(), ///\param loc - IN: Location of the type ///\param dtype_name - IN: Datatype name ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Dec 2016 // Description // In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openDataType(const H5std_string&) to @@ -188,9 +177,8 @@ DataType::DataType(const H5Location &loc, const char *dtype_name) : H5Object(), // -BMR, Dec 2016 //-------------------------------------------------------------------------- DataType::DataType(const H5Location &loc, const H5std_string &dtype_name) - : H5Object(), encoded_buf(NULL), buf_size(0) + : H5Object(), id{p_opentype(loc, dtype_name.c_str())}, encoded_buf(NULL), buf_size(0) { - id = p_opentype(loc, dtype_name.c_str()); } //-------------------------------------------------------------------------- @@ -198,7 +186,6 @@ DataType::DataType(const H5Location &loc, const H5std_string &dtype_name) ///\brief Copies an existing datatype to this datatype object ///\param like_type - IN: Datatype to be copied ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 // Modification // - Replaced resetIdComponent() with decRefCount() to use C // library ID reference counting mechanism - BMR, Jun 1, 2004 @@ -227,7 +214,6 @@ DataType::copy(const DataType &like_type) ///\brief Copies the datatype of the given dataset to this datatype object ///\param dset - IN: Dataset ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Jan, 2007 ///\par Description /// The resulted dataset will be transient and modifiable. //-------------------------------------------------------------------------- @@ -254,7 +240,6 @@ DataType::copy(const DataSet &dset) // Purpose Returns an id of a type by decoding the binary object /// description of this datatype. ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- hid_t DataType::p_decode() const @@ -283,7 +268,6 @@ DataType::p_decode() const /// description of this datatype. /// ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- DataType * DataType::decode() const @@ -305,7 +289,6 @@ DataType::decode() const ///\brief Creates a binary object description of this datatype. /// ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- void DataType::encode() @@ -318,8 +301,9 @@ DataType::encode() // Allocate buffer and call C function again to encode if (buf_size > 0) { - encoded_buf = (unsigned char *)HDcalloc((size_t)1, buf_size); - ret_value = H5Tencode(id, encoded_buf, &buf_size); + encoded_buf = new unsigned char[buf_size](); + + ret_value = H5Tencode(id, encoded_buf, &buf_size); if (ret_value < 0) { throw DataTypeIException("DataType::encode", "H5Tencode failed"); } @@ -335,15 +319,11 @@ DataType::encode() /// description. /// ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- bool DataType::hasBinaryDesc() const { - if (encoded_buf != NULL) - return true; - else - return false; + return encoded_buf != NULL; } //-------------------------------------------------------------------------- @@ -355,7 +335,6 @@ DataType::hasBinaryDesc() const // Description // Makes a copy of the type on the right hand side and stores // the new id in the left hand side object. -// Programmer Binh-Minh Ribler - 2000 // Modification // Changed operator= to simply copy the id of rhs instead of // calling H5Tcopy because, when the operator= is invoked, a @@ -381,7 +360,6 @@ DataType::operator=(const DataType &rhs) ///\param compared_type - IN: Reference to the datatype to compare ///\return true if the datatypes are equal, and false, otherwise. ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- bool DataType::operator==(const DataType &compared_type) const @@ -421,7 +399,6 @@ DataType::operator!=(const DataType &compared_type) const // datatype, or attribute. //\param name - IN: Name of the datatype //\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 // Modification: // Copied from DataType::commit and made into private function // to be commonly used by several overloads of DataType::commit. @@ -443,7 +420,6 @@ DataType::p_commit(hid_t loc_id, const char *name) ///\param loc - IN: A location (file, dataset, datatype, or group) ///\param name - IN: Name of the datatype ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Jan, 2007 //-------------------------------------------------------------------------- void DataType::commit(const H5Location &loc, const char *name) @@ -459,7 +435,6 @@ DataType::commit(const H5Location &loc, const char *name) // Param loc - IN: A location (file, dataset, datatype, or group) // Param name - IN: Name of the datatype // Exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Jan, 2007 // Modification // Planned for removal. -BMR, 2014/04/16 // Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0 @@ -475,7 +450,6 @@ DataType::commit(const H5Location &loc, const char *name) ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function only in the type of the /// argument \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::commit(const H5Location &loc, const H5std_string &name) @@ -491,7 +465,6 @@ DataType::commit(const H5Location &loc, const H5std_string &name) // Param loc - IN: A location (file, dataset, datatype, or group) // Param name - IN: Name of the datatype // Exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Jan, 2007 // Modification // Planned for removal. -BMR, 2014/04/16 // Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0 @@ -509,7 +482,6 @@ DataType::commit(const H5Location &loc, const H5std_string &name) ///\return \c true if the datatype is a named type, and \c false, /// otherwise. ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- bool DataType::committed() const @@ -533,7 +505,6 @@ DataType::committed() const ///\param pcdata - IN: Pointer to type conversion data ///\return Pointer to a suitable conversion function ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5T_conv_t DataType::find(const DataType &dest, H5T_cdata_t **pcdata) const @@ -557,7 +528,6 @@ DataType::find(const DataType &dest, H5T_cdata_t **pcdata) const ///\param plist - IN: Property list - default to PropList::DEFAULT ///\return Pointer to a suitable conversion function ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::convert(const DataType &dest, size_t nelmts, void *buf, void *background, @@ -587,7 +557,6 @@ DataType::convert(const DataType &dest, size_t nelmts, void *buf, void *backgrou /// /// Once a data type is locked it can never be unlocked unless /// the entire library is closed. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::lock() const @@ -604,7 +573,6 @@ DataType::lock() const ///\brief Returns the datatype class identifier. ///\return Datatype class identifier ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5T_class_t DataType::getClass() const @@ -623,7 +591,6 @@ DataType::getClass() const ///\brief Returns the size of a datatype. ///\return Datatype size in bytes ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- size_t DataType::getSize() const @@ -642,7 +609,6 @@ DataType::getSize() const ///\brief Returns the base datatype from which a datatype is derived. ///\return DataType object ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DataType DataType::getSuper() const @@ -677,7 +643,6 @@ DataType::getSuper() const ///\par Description /// For information, please refer to the H5Tregister API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::registerFunc(H5T_pers_t pers, const char *name, const DataType &dest, H5T_conv_t func) const @@ -696,7 +661,6 @@ DataType::registerFunc(H5T_pers_t pers, const char *name, const DataType &dest, ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function only in the type of the /// argument \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::registerFunc(H5T_pers_t pers, const H5std_string &name, const DataType &dest, H5T_conv_t func) const @@ -715,7 +679,6 @@ DataType::registerFunc(H5T_pers_t pers, const H5std_string &name, const DataType ///\param func - IN: Function to convert between source and /// destination datatypes. ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::unregister(H5T_pers_t pers, const char *name, const DataType &dest, H5T_conv_t func) const @@ -734,7 +697,6 @@ DataType::unregister(H5T_pers_t pers, const char *name, const DataType &dest, H5 ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function only in the type of the /// argument \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::unregister(H5T_pers_t pers, const H5std_string &name, const DataType &dest, H5T_conv_t func) const @@ -748,7 +710,6 @@ DataType::unregister(H5T_pers_t pers, const H5std_string &name, const DataType & ///\param tag - IN: Descriptive ASCII string with which the opaque /// datatype is to be tagged. ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::setTag(const char *tag) const @@ -765,7 +726,6 @@ DataType::setTag(const char *tag) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function only in the type of the /// argument \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::setTag(const H5std_string &tag) const @@ -778,7 +738,6 @@ DataType::setTag(const H5std_string &tag) const ///\brief Gets the tag associated with an opaque datatype. ///\return Tag associated with the opaque datatype ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5std_string DataType::getTag() const @@ -804,7 +763,6 @@ DataType::getTag() const ///\return true if this datatype contains or is the specified type, /// and false, otherwise. ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- bool DataType::detectClass(H5T_class_t cls) const @@ -825,7 +783,6 @@ DataType::detectClass(H5T_class_t cls) const ///\return true if this predtype is the specified type class, and false, /// otherwise. ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - August, 2017 //-------------------------------------------------------------------------- bool DataType::detectClass(const PredType &pred_type, H5T_class_t cls) @@ -846,7 +803,6 @@ DataType::detectClass(const PredType &pred_type, H5T_class_t cls) ///\return true if this datatype is a variable-length string, and /// false, otherwise. ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- bool DataType::isVariableStr() const @@ -867,7 +823,6 @@ DataType::isVariableStr() const /// creation. ///\return A property list object ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - March, 2017 // Description // Currently, there is no datatype creation property list class // in the C++ API because there is no associated functionality. @@ -895,7 +850,6 @@ DataType::getCreatePlist() const // AbstractDS and Attribute are moved out of H5Object. In // addition, member IdComponent::id is moved into subclasses, and // IdComponent::getId now becomes pure virtual function. -// Programmer Binh-Minh Ribler - May, 2008 //-------------------------------------------------------------------------- hid_t DataType::getId() const @@ -910,7 +864,6 @@ DataType::getId() const ///\param loc - IN: Location of the type ///\param dtype_name - IN: Datatype name ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Dec 2016 // Description // This function was introduced in 1.10.1 to be used by the new // XxxType constructors that open a datatype. -BMR, Dec 2016 @@ -932,10 +885,9 @@ DataType::p_opentype(const H5Location &loc, const char *dtype_name) const ///\exception H5::IdComponentException when the attempt to close the HDF5 /// object fails // Description: -// The underlaying reference counting in the C library ensures +// The underlying reference counting in the C library ensures // that the current valid id of this object is properly closed. // Then the object's id is reset to the new id. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::p_setId(const hid_t new_id) @@ -957,7 +909,6 @@ DataType::p_setId(const hid_t new_id) ///\brief Closes the datatype if it is not a predefined type. /// ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Mar 9, 2005 //-------------------------------------------------------------------------- void DataType::close() @@ -972,7 +923,7 @@ DataType::close() // Free and reset buffer of encoded object description if it's been used if (encoded_buf != NULL) { - HDfree(encoded_buf); + delete[] encoded_buf; buf_size = 0; } } @@ -981,14 +932,13 @@ DataType::close() //-------------------------------------------------------------------------- // Function: DataType destructor ///\brief Properly terminates access to this datatype. -// Programmer Binh-Minh Ribler - 2000 // Modification // - Replaced resetIdComponent() with decRefCount() to use C // library ID reference counting mechanism - BMR, Jun 1, 2004 // - Replaced decRefCount with close() to let the C library // handle the reference counting - BMR, Jun 1, 2006 // - Added the use of H5CPP_EXITED to terminate the HDF5 library -// and elimiate previous memory leaks. See comments in the +// and eliminate previous memory leaks. See comments in the // header file "H5PredType.h" for details. - BMR, Mar 30, 2012 // - Major re-implementation of the global constants was done // to avoid relying on the order of the creation and deletion diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataType.h index 7dd371b2b2f..7cc1d315793 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataType.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataType.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -47,7 +46,7 @@ class H5_DLLCPP DataType : public H5Object { // PropList& plist = PropList::DEFAULT); // Closes this datatype. - virtual void close() H5_OVERRIDE; + virtual void close() override; // Copies an existing datatype to this datatype object. void copy(const DataType &like_type); @@ -133,7 +132,7 @@ class H5_DLLCPP DataType : public H5Object { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("DataType"); } @@ -148,10 +147,10 @@ class H5_DLLCPP DataType : public H5Object { bool hasBinaryDesc() const; // Gets the datatype id. - virtual hid_t getId() const H5_OVERRIDE; + virtual hid_t getId() const override; // Destructor: properly terminates access to this datatype. - virtual ~DataType() H5_OVERRIDE; + virtual ~DataType() override; protected: #ifndef DOXYGEN_SHOULD_SKIP_THIS @@ -162,7 +161,7 @@ class H5_DLLCPP DataType : public H5Object { hid_t p_decode() const; // Sets the datatype id. - virtual void p_setId(const hid_t new_id) H5_OVERRIDE; + virtual void p_setId(const hid_t new_id) override; // Opens a datatype and returns the id. hid_t p_opentype(const H5Location &loc, const char *dtype_name) const; diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DcreatProp.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DcreatProp.cpp index 4c71d5ece90..f45b54e8dde 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DcreatProp.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DcreatProp.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -47,7 +46,6 @@ DSetCreatPropList *DSetCreatPropList::DEFAULT_ = 0; // If DSetCreatPropList::DEFAULT_ already points to an allocated // object, throw a PropListIException. This scenario should // not happen. -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- DSetCreatPropList * DSetCreatPropList::getConstant() @@ -73,13 +71,11 @@ DSetCreatPropList::getConstant() // Function: DSetCreatPropList::deleteConstants // Purpose: Deletes the constant object that DSetCreatPropList::DEFAULT_ // points to. -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- void DSetCreatPropList::deleteConstants() { - if (DEFAULT_ != 0) - delete DEFAULT_; + delete DEFAULT_; } //-------------------------------------------------------------------------- @@ -92,7 +88,6 @@ const DSetCreatPropList &DSetCreatPropList::DEFAULT = *getConstant(); //-------------------------------------------------------------------------- // Function: DSetCreatPropList default constructor ///\brief Default constructor: creates a stub dataset creation property list -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DSetCreatPropList::DSetCreatPropList() : ObjCreatPropList(H5P_DATASET_CREATE) { @@ -102,7 +97,6 @@ DSetCreatPropList::DSetCreatPropList() : ObjCreatPropList(H5P_DATASET_CREATE) // Function: DSetCreatPropList copy constructor ///\brief Copy constructor: same HDF5 object as \a original /// DSetCreatPropList object -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DSetCreatPropList::DSetCreatPropList(const DSetCreatPropList &orig) : ObjCreatPropList(orig) { @@ -112,7 +106,6 @@ DSetCreatPropList::DSetCreatPropList(const DSetCreatPropList &orig) : ObjCreatPr // Function: DSetCreatPropList overloaded constructor ///\brief Creates a DSetCreatPropList object using the id of an /// existing dataset creation property list. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DSetCreatPropList::DSetCreatPropList(const hid_t plist_id) : ObjCreatPropList(plist_id) { @@ -131,7 +124,6 @@ DSetCreatPropList::DSetCreatPropList(const hid_t plist_id) : ObjCreatPropList(pl /// define the size of the chunks to store the dataset's raw /// data. As a side-effect, the layout of the dataset will be /// changed to \c H5D_CHUNKED, if it is not so already. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::setChunk(int ndims, const hsize_t *dim) const @@ -149,7 +141,6 @@ DSetCreatPropList::setChunk(int ndims, const hsize_t *dim) const ///\param max_ndims - IN: Size of \a dim array ///\param dim - OUT: Array to store the chunk dimensions ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- int DSetCreatPropList::getChunk(int max_ndims, hsize_t *dim) const @@ -169,7 +160,6 @@ DSetCreatPropList::getChunk(int max_ndims, hsize_t *dim) const ///\par Description /// For information, please refer to the H5Pset_layout API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::setLayout(H5D_layout_t layout) const @@ -194,7 +184,6 @@ DSetCreatPropList::setLayout(H5D_layout_t layout) const /// in the file. ///\exception H5::PropListIException ///\par Description -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5D_layout_t DSetCreatPropList::getLayout() const @@ -203,7 +192,7 @@ DSetCreatPropList::getLayout() const if (layout == H5D_LAYOUT_ERROR) { throw PropListIException("DSetCreatPropList::getLayout", "H5Pget_layout returns H5D_LAYOUT_ERROR"); } - return (layout); + return layout; } //-------------------------------------------------------------------------- @@ -216,12 +205,16 @@ DSetCreatPropList::getLayout() const /// list to \c H5D_COMPRESS_DEFLATE and the compression level to /// \a level. Lower compression levels are faster but result in /// less compression. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::setDeflate(int level) const { - herr_t ret_value = H5Pset_deflate(id, level); + if (level < 0) { + throw PropListIException("DSetCreatPropList::setDeflate", "level can't be negative"); + } + + herr_t ret_value = H5Pset_deflate(id, static_cast(level)); + if (ret_value < 0) { throw PropListIException("DSetCreatPropList::setDeflate", "H5Pset_deflate failed"); } @@ -241,7 +234,6 @@ DSetCreatPropList::setDeflate(int level) const /// H5Z_FILTER_SZIP, for a dataset. For more information about /// SZIP and usage, please refer to the H5Pset_szip API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - Jan, 2007 //-------------------------------------------------------------------------- void DSetCreatPropList::setSzip(unsigned int options_mask, unsigned int pixels_per_block) const @@ -262,7 +254,6 @@ DSetCreatPropList::setSzip(unsigned int options_mask, unsigned int pixels_per_bl /// H5Z_FILTER_NBIT, for a dataset. For more information about /// Nbit compression, please refer to the H5Pset_nbit API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - Apr, 2016 //-------------------------------------------------------------------------- void DSetCreatPropList::setNbit() const @@ -288,7 +279,6 @@ DSetCreatPropList::setNbit() const ///\par /// For information on setting fill value, please refer to the /// H5Pset_fill_value API in the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::setFillValue(const DataType &fvalue_type, const void *value) const @@ -310,7 +300,6 @@ DSetCreatPropList::setFillValue(const DataType &fvalue_type, const void *value) /// and the memory is allocated by the caller. The fill /// value will be converted from its current data type to the /// specified by \a fvalue_type. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::getFillValue(const DataType &fvalue_type, void *value) const @@ -329,7 +318,6 @@ DSetCreatPropList::getFillValue(const DataType &fvalue_type, void *value) const /// \li \c H5D_FILL_VALUE_DEFAULT =1, /// \li \c H5D_FILL_VALUE_USER_DEFINED =2 ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5D_fill_value_t DSetCreatPropList::isFillValueDefined() const @@ -362,7 +350,6 @@ DSetCreatPropList::isFillValueDefined() const /// failed; the filter will not participate in the pipeline /// during a \c DataSet::read() of the chunk. If this bit is clear /// and the filter fails then the entire I/O operation fails. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::setFilter(H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts, @@ -381,8 +368,7 @@ DSetCreatPropList::setFilter(H5Z_filter_t filter_id, unsigned int flags, size_t ///\exception H5::PropListIException ///\par Description /// Deletes a filter from the dataset creation property list; -/// deletes all filters if \a filter_id is \c H5Z_FILTER_NONE. -// Programmer Binh-Minh Ribler - 2000 +/// deletes all filters if \a filter_id is \c H5Z_FILTER_ALL. //-------------------------------------------------------------------------- void DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const @@ -398,7 +384,6 @@ DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const ///\brief Returns the number of filters in the pipeline ///\return Number of filters ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- int DSetCreatPropList::getNfilters() const @@ -437,13 +422,15 @@ DSetCreatPropList::getFilter(int filter_number, unsigned int &flags, size_t &cd_ unsigned int *cd_values, size_t namelen, char name[], unsigned int &filter_config) const { - H5Z_filter_t filter_id; - filter_id = - H5Pget_filter2(id, filter_number, &flags, &cd_nelmts, cd_values, namelen, name, &filter_config); + if (filter_number < 0) + throw PropListIException("DSetCreatPropList::getFilter", "filter_number can't be negative"); + + H5Z_filter_t filter_id = H5Pget_filter2(id, static_cast(filter_number), &flags, &cd_nelmts, + cd_values, namelen, name, &filter_config); if (filter_id == H5Z_FILTER_ERROR) throw PropListIException("DSetCreatPropList::getFilter", "H5Pget_filter2 returned H5Z_FILTER_ERROR"); else - return (filter_id); + return filter_id; } //-------------------------------------------------------------------------- @@ -459,7 +446,6 @@ DSetCreatPropList::getFilter(int filter_number, unsigned int &flags, size_t &cd_ ///\param name - OUT: Name of the filter ///\param filter_config - OUT: Flags indicating whether filter can encode/decode ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::getFilterById(H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts, @@ -491,7 +477,6 @@ DSetCreatPropList::getFilterById(H5Z_filter_t filter_id, unsigned int &flags, si /// failed; the filter will not participate in the pipeline /// during a DataSet::read() of the chunk. If this bit is clear /// and the filter fails then the entire I/O operation fails. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::modifyFilter(H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts, @@ -510,7 +495,6 @@ DSetCreatPropList::modifyFilter(H5Z_filter_t filter_id, unsigned int flags, size ///\return true if all filters available, and false if one or more /// filters not currently available ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- bool DSetCreatPropList::allFiltersAvail() const @@ -535,7 +519,6 @@ DSetCreatPropList::allFiltersAvail() const ///\par Description /// For information, please refer to the H5Pset_shuffle API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::setShuffle() const @@ -553,12 +536,11 @@ DSetCreatPropList::setShuffle() const ///\exception H5::PropListIException ///\par Description /// The values of space allocation time can be one of the -/// followings: +/// following: /// \li \c H5D_ALLOC_TIME_DEFAULT /// \li \c H5D_ALLOC_TIME_EARLY /// \li \c H5D_ALLOC_TIME_LATE /// \li \c H5D_ALLOC_TIME_INCR -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5D_alloc_time_t DSetCreatPropList::getAllocTime() const @@ -581,7 +563,6 @@ DSetCreatPropList::getAllocTime() const /// Valid values for fill value writing time include /// \li \c H5D_FILL_TIME_NEVER /// \li \c H5D_FILL_TIME_ALLOC. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5D_fill_time_t DSetCreatPropList::getFillTime() const @@ -606,7 +587,6 @@ DSetCreatPropList::getFillTime() const /// \li \c H5D_ALLOC_TIME_EARLY /// \li \c H5D_ALLOC_TIME_LATE /// \li \c H5D_ALLOC_TIME_INCR -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time) const @@ -626,7 +606,6 @@ DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time) const /// Valid values for fill value writing time include /// \li \c H5D_FILL_TIME_NEVER /// \li \c H5D_FILL_TIME_ALLOC. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time) const @@ -642,7 +621,6 @@ DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time) const ///\brief Sets Fletcher32 checksum of EDC for this property list. /// ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::setFletcher32() const @@ -667,7 +645,8 @@ DSetCreatPropList::setFletcher32() const /// the total size is larger than the size of a dataset then the /// dataset can be extended (provided the data space also allows /// the extending). -// Programmer Binh-Minh Ribler - 2000 +///\note On Windows, off_t is typically a 32-bit signed long value, which +/// limits the valid offset that can be set to 2 GiB. //-------------------------------------------------------------------------- void DSetCreatPropList::setExternal(const char *name, off_t offset, hsize_t size) const @@ -683,7 +662,6 @@ DSetCreatPropList::setExternal(const char *name, off_t offset, hsize_t size) con ///\brief Returns the number of external files for a dataset ///\return Number of external files ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- int DSetCreatPropList::getExternalCount() const @@ -717,7 +695,8 @@ DSetCreatPropList::getExternalCount() const /// external file name will not be returned. If \a offset or /// \a size are null pointers then the corresponding information /// will not be returned. -// Programmer Binh-Minh Ribler - 2000 +///\note On Windows, off_t is typically a 32-bit signed long value, which +/// limits the valid offset that can be returned to 2 GiB. //-------------------------------------------------------------------------- void DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char *name, off_t &offset, hsize_t &size) const @@ -744,7 +723,6 @@ DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char *name, off_t ///\par Description /// For information, please refer to the H5Pset_virtual API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - Mar, 2017 //-------------------------------------------------------------------------- void DSetCreatPropList::setVirtual(const DataSpace &vspace, const char *src_fname, const char *src_dsname, @@ -772,7 +750,6 @@ DSetCreatPropList::setVirtual(const DataSpace &vspace, const char *src_fname, co ///\par Description /// For information, please refer to the H5Pset_virtual API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - Mar, 2017 //-------------------------------------------------------------------------- void DSetCreatPropList::setVirtual(const DataSpace &vspace, const H5std_string src_fname, @@ -781,13 +758,4 @@ DSetCreatPropList::setVirtual(const DataSpace &vspace, const H5std_string src_fn setVirtual(vspace, src_fname.c_str(), src_dsname.c_str(), sspace); } -//-------------------------------------------------------------------------- -// Function: DSetCreatPropList destructor -///\brief Noop destructor. -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -DSetCreatPropList::~DSetCreatPropList() -{ -} - } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DcreatProp.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DcreatProp.h index b822c254caa..3c8587dbe6b 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DcreatProp.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DcreatProp.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -128,7 +127,7 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("DSetCreatPropList"); } @@ -141,7 +140,7 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList { DSetCreatPropList(const hid_t plist_id); // Noop destructor. - virtual ~DSetCreatPropList() H5_OVERRIDE; + virtual ~DSetCreatPropList() override = default; #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DxferProp.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DxferProp.cpp index 2b50de42333..1b9d6510580 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DxferProp.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DxferProp.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -13,7 +12,6 @@ #include -#include "H5private.h" // for HDmemset #include "H5Include.h" #include "H5Exception.h" #include "H5IdComponent.h" @@ -40,7 +38,6 @@ DSetMemXferPropList *DSetMemXferPropList::DEFAULT_ = 0; // If DSetMemXferPropList::DEFAULT_ already points to an allocated // object, throw a PropListIException. This scenario should not // happen. -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- DSetMemXferPropList * DSetMemXferPropList::getConstant() @@ -67,13 +64,11 @@ DSetMemXferPropList::getConstant() // Function: DSetMemXferPropList::deleteConstants // Purpose: Deletes the constant object that DSetMemXferPropList::DEFAULT_ // points to. -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- void DSetMemXferPropList::deleteConstants() { - if (DEFAULT_ != 0) - delete DEFAULT_; + delete DEFAULT_; } //-------------------------------------------------------------------------- @@ -87,7 +82,6 @@ const DSetMemXferPropList &DSetMemXferPropList::DEFAULT = *getConstant(); // Function DSetMemXferPropList default constructor ///\brief Default constructor: creates a stub dataset memory and /// transfer property list object. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DSetMemXferPropList::DSetMemXferPropList() : PropList(H5P_DATASET_XFER) { @@ -97,7 +91,6 @@ DSetMemXferPropList::DSetMemXferPropList() : PropList(H5P_DATASET_XFER) // Function DSetMemXferPropList constructor ///\brief Creates a dataset transfer property list with transform /// expression. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DSetMemXferPropList::DSetMemXferPropList(const char *exp) : PropList(H5P_DATASET_XFER) { @@ -110,7 +103,6 @@ DSetMemXferPropList::DSetMemXferPropList(const char *exp) : PropList(H5P_DATASET /// DSetMemXferPropList object ///\param original - IN: Original dataset memory and transfer property /// list object to copy -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DSetMemXferPropList::DSetMemXferPropList(const DSetMemXferPropList &original) : PropList(original) { @@ -122,7 +114,6 @@ DSetMemXferPropList::DSetMemXferPropList(const DSetMemXferPropList &original) : /// existing DSetMemXferPropList. ///\param plist_id - IN: Id of an existing dataset memory and transfer /// property list -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DSetMemXferPropList::DSetMemXferPropList(const hid_t plist_id) : PropList(plist_id) { @@ -135,7 +126,6 @@ DSetMemXferPropList::DSetMemXferPropList(const hid_t plist_id) : PropList(plist_ ///\param tconv - IN: Pointer to application-allocated type conversion buffer ///\param bkg - IN: Pointer to application-allocated background buffer ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetMemXferPropList::setBuffer(size_t size, void *tconv, void *bkg) const @@ -153,7 +143,6 @@ DSetMemXferPropList::setBuffer(size_t size, void *tconv, void *bkg) const ///\param bkg - OUT: Pointer to application-allocated background buffer ///\return Buffer size, in bytes ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- size_t DSetMemXferPropList::getBuffer(void **tconv, void **bkg) const @@ -171,12 +160,11 @@ DSetMemXferPropList::getBuffer(void **tconv, void **bkg) const ///\brief Sets the dataset transfer property list status to true or false. ///\param status - IN: Status to set, true or false ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetMemXferPropList::setPreserve(bool status) const { - herr_t ret_value = H5Pset_preserve(id, (hbool_t)status); + herr_t ret_value = H5Pset_preserve(id, static_cast(status)); if (ret_value < 0) { throw PropListIException("DSetMemXferPropList::setPreserve", "H5Pset_preserve failed"); } @@ -187,7 +175,6 @@ DSetMemXferPropList::setPreserve(bool status) const ///\brief Checks status of the dataset transfer property list. ///\return Status of the dataset transfer property list ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- bool DSetMemXferPropList::getPreserve() const @@ -210,7 +197,6 @@ DSetMemXferPropList::getPreserve() const ///\param middle - IN: B-tree split ratio for right-most nodes and lone nodes ///\param right - IN: B-tree split ratio for all other nodes ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetMemXferPropList::setBtreeRatios(double left, double middle, double right) const @@ -228,7 +214,6 @@ DSetMemXferPropList::setBtreeRatios(double left, double middle, double right) co ///\param middle - OUT: B-tree split ratio for right-most nodes and lone nodes ///\param right - OUT: B-tree split ratio for all other nodes ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetMemXferPropList::getBtreeRatios(double &left, double &middle, double &right) const @@ -244,7 +229,6 @@ DSetMemXferPropList::getBtreeRatios(double &left, double &middle, double &right) ///\brief Sets data transform expression. ///\param expression - IN: null-terminated data transform expression (char*) ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - Mar, 2014 //-------------------------------------------------------------------------- void DSetMemXferPropList::setDataTransform(const char *expression) const @@ -261,7 +245,6 @@ DSetMemXferPropList::setDataTransform(const char *expression) const /// It takes a reference to a \c H5std_string for the expression. ///\param expression - IN: H5std_string data transform expression ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - Mar, 2014 //-------------------------------------------------------------------------- void DSetMemXferPropList::setDataTransform(const H5std_string &expression) const @@ -276,7 +259,6 @@ DSetMemXferPropList::setDataTransform(const H5std_string &expression) const ///\param buf_size - IN: size of buffer for expression, including the /// null terminator ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - Mar, 2014 //-------------------------------------------------------------------------- ssize_t DSetMemXferPropList::getDataTransform(char *exp, size_t buf_size) const @@ -305,7 +287,6 @@ DSetMemXferPropList::getDataTransform(char *exp, size_t buf_size) const /// It takes no parameter and returns a \c H5std_string for the expression. /// ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - Mar, 2014 //-------------------------------------------------------------------------- H5std_string DSetMemXferPropList::getDataTransform() const @@ -315,7 +296,7 @@ DSetMemXferPropList::getDataTransform() const H5std_string expression; // Preliminary call to get the expression's length - ssize_t exp_len = H5Pget_data_transform(id, NULL, (size_t)0); + ssize_t exp_len = H5Pget_data_transform(id, NULL, 0); // If H5Pget_data_transform returns a negative value, raise an exception if (exp_len < 0) { @@ -324,12 +305,16 @@ DSetMemXferPropList::getDataTransform() const // If expression exists, calls C routine again to get it else if (exp_len > 0) { + + // The actual size is the cast value + 1 for the terminal ASCII NUL + // (unfortunate in/out type sign mismatch) + size_t actual_exp_len = static_cast(exp_len) + 1; + // Temporary buffer for char* expression - char *exp_C = new char[exp_len + 1]; - HDmemset(exp_C, 0, exp_len + 1); // clear buffer + char *exp_C = new char[actual_exp_len](); // Used overloaded function - exp_len = getDataTransform(exp_C, exp_len + 1); + exp_len = getDataTransform(exp_C, actual_exp_len); // Convert the C expression to return expression = exp_C; @@ -348,7 +333,6 @@ DSetMemXferPropList::getDataTransform() const ///\param op - IN: User's function ///\param user_data - IN: User's data ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void DSetMemXferPropList::setTypeConvCB(H5T_conv_except_func_t op, void *user_data) const @@ -365,7 +349,6 @@ DSetMemXferPropList::setTypeConvCB(H5T_conv_except_func_t op, void *user_data) c ///\param op - IN: Retrieved user function ///\param user_data - IN: Retrieved user data ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void DSetMemXferPropList::getTypeConvCB(H5T_conv_except_func_t *op, void **user_data) const @@ -384,7 +367,6 @@ DSetMemXferPropList::getTypeConvCB(H5T_conv_except_func_t *op, void **user_data) ///\param free_func - IN: User's free routine ///\param free_info - IN: User's free parameters ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetMemXferPropList::setVlenMemManager(H5MM_allocate_t alloc_func, void *alloc_info, H5MM_free_t free_func, @@ -402,7 +384,6 @@ DSetMemXferPropList::setVlenMemManager(H5MM_allocate_t alloc_func, void *alloc_i /// allocation - system \c malloc and \c free will be used. /// ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetMemXferPropList::setVlenMemManager() const @@ -418,7 +399,6 @@ DSetMemXferPropList::setVlenMemManager() const ///\param free_func - OUT: User's free routine ///\param free_info - OUT: User's free parameters ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetMemXferPropList::getVlenMemManager(H5MM_allocate_t &alloc_func, void **alloc_info, H5MM_free_t &free_func, @@ -438,7 +418,6 @@ DSetMemXferPropList::getVlenMemManager(H5MM_allocate_t &alloc_func, void **alloc ///\par Description /// For detail, please refer to the H5Pset_small_data_block_size /// API in the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void DSetMemXferPropList::setSmallDataBlockSize(hsize_t size) const @@ -455,7 +434,6 @@ DSetMemXferPropList::setSmallDataBlockSize(hsize_t size) const ///\brief Returns the current small data block size setting. ///\return Size of the small data block, in bytes ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- hsize_t DSetMemXferPropList::getSmallDataBlockSize() const @@ -477,7 +455,6 @@ DSetMemXferPropList::getSmallDataBlockSize() const ///\par Description /// For detail, please refer to the H5Pset_hyper_vector_size /// API in the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void DSetMemXferPropList::setHyperVectorSize(size_t vector_size) const @@ -495,7 +472,6 @@ DSetMemXferPropList::setHyperVectorSize(size_t vector_size) const /// hyperslab I/O. ///\return Number of I/O vectors ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- size_t DSetMemXferPropList::getHyperVectorSize() const @@ -525,7 +501,6 @@ DSetMemXferPropList::getHyperVectorSize() const /// Valid values are as follows: /// \li \c H5Z_ENABLE_EDC (default) /// \li \c H5Z_DISABLE_EDC -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void DSetMemXferPropList::setEDCCheck(H5Z_EDC_t check) const @@ -541,7 +516,6 @@ DSetMemXferPropList::setEDCCheck(H5Z_EDC_t check) const ///\brief Determines whether error-detection is enabled for dataset reads. ///\return \c H5Z_ENABLE_EDC or \c H5Z_DISABLE_EDC ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- H5Z_EDC_t DSetMemXferPropList::getEDCCheck() const @@ -553,13 +527,4 @@ DSetMemXferPropList::getEDCCheck() const return (check); } -//-------------------------------------------------------------------------- -// Function: DSetMemXferPropList destructor -///\brief Noop destructor. -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -DSetMemXferPropList::~DSetMemXferPropList() -{ -} - } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DxferProp.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DxferProp.h index 3925a57c113..b86202da254 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DxferProp.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DxferProp.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -100,7 +99,7 @@ class H5_DLLCPP DSetMemXferPropList : public PropList { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("DSetMemXferPropList"); } @@ -113,7 +112,7 @@ class H5_DLLCPP DSetMemXferPropList : public PropList { DSetMemXferPropList(const hid_t plist_id); // Noop destructor - virtual ~DSetMemXferPropList() H5_OVERRIDE; + virtual ~DSetMemXferPropList() override = default; #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5EnumType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5EnumType.cpp index 6c7b53384f5..569e56abf47 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5EnumType.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5EnumType.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -13,7 +12,6 @@ #include -#include "H5private.h" // for HDmemset #include "H5Include.h" #include "H5Exception.h" #include "H5IdComponent.h" @@ -39,7 +37,6 @@ namespace H5 { //-------------------------------------------------------------------------- // Function: EnumType default constructor ///\brief Default constructor: Creates a stub datatype -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- EnumType::EnumType() : DataType() { @@ -50,7 +47,6 @@ EnumType::EnumType() : DataType() ///\brief Creates an EnumType object using the id of an existing datatype. ///\param existing_id - IN: Id of an existing datatype ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- EnumType::EnumType(const hid_t existing_id) : DataType(existing_id) { @@ -59,7 +55,6 @@ EnumType::EnumType(const hid_t existing_id) : DataType(existing_id) //-------------------------------------------------------------------------- // Function: EnumType copy constructor ///\brief Copy constructor: same HDF5 object as \a original -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- EnumType::EnumType(const EnumType &original) : DataType(original) { @@ -73,7 +68,6 @@ EnumType::EnumType(const EnumType &original) : DataType(original) // Description // The DataType constructor calls the C API H5Tcreate to create // the enum datatype. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- EnumType::EnumType(size_t size) : DataType(H5T_ENUM, size) { @@ -84,7 +78,6 @@ EnumType::EnumType(size_t size) : DataType(H5T_ENUM, size) ///\brief Gets the enum datatype of the specified dataset. ///\param dataset - IN: Dataset that this enum datatype associates with ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- EnumType::EnumType(const DataSet &dataset) : DataType() { @@ -102,7 +95,6 @@ EnumType::EnumType(const DataSet &dataset) : DataType() ///\brief Creates a new enum datatype based on an integer datatype. ///\param data_type - IN: Base datatype ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- EnumType::EnumType(const IntType &data_type) : DataType() { @@ -122,7 +114,6 @@ EnumType::EnumType(const IntType &data_type) : DataType() ///\param dtype_name - IN: Enum datatype name ///\param loc - IN: Location of the type ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Dec 2016 // Description // In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openEnumType(const char*) to @@ -141,7 +132,6 @@ EnumType::EnumType(const H5Location &loc, const char *dtype_name) : DataType() ///\param loc - IN: Location of the type ///\param dtype_name - IN: Enum datatype name ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Dec 2016 // Description // In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openEnumType(const H5std_string&) @@ -159,7 +149,6 @@ EnumType::EnumType(const H5Location &loc, const H5std_string &dtype_name) : Data /// binary object description of this type. /// ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- DataType * EnumType::decode() const @@ -182,7 +171,6 @@ EnumType::decode() const ///\param name - IN: Name of the new member ///\param value - IN: Pointer to the value of the new member ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void EnumType::insert(const char *name, void *value) const @@ -199,7 +187,6 @@ EnumType::insert(const char *name, void *value) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function only in the type of /// argument \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void EnumType::insert(const H5std_string &name, void *value) const @@ -214,13 +201,11 @@ EnumType::insert(const H5std_string &name, void *value) const ///\param value - IN: Pointer to the value of the enum datatype ///\param size - IN: Size for the name ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5std_string EnumType::nameOf(void *value, size_t size) const { - char *name_C = new char[size + 1]; // temporary C-string for C API - HDmemset(name_C, 0, size + 1); // clear buffer + char *name_C = new char[size + 1](); // temporary C-string for C API // Calls C routine H5Tenum_nameof to get the name of the specified enum type herr_t ret_value = H5Tenum_nameof(id, value, name_C, size); @@ -243,7 +228,6 @@ EnumType::nameOf(void *value, size_t size) const ///\param name - IN: Name of the queried member ///\param value - OUT: Pointer to the retrieved value ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void EnumType::valueOf(const char *name, void *value) const @@ -260,7 +244,6 @@ EnumType::valueOf(const char *name, void *value) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function only in the type of /// argument \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void EnumType::valueOf(const H5std_string &name, void *value) const @@ -276,7 +259,6 @@ EnumType::valueOf(const H5std_string &name, void *value) const /// between 0 and \c N-1, where \c N is the value returned by the /// member function \c EnumType::getNmembers. ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - May 16, 2002 //-------------------------------------------------------------------------- int EnumType::getMemberIndex(const char *name) const @@ -293,7 +275,6 @@ EnumType::getMemberIndex(const char *name) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function only in the type of /// argument \a name. -// Programmer Binh-Minh Ribler - May 16, 2002 //-------------------------------------------------------------------------- int EnumType::getMemberIndex(const H5std_string &name) const @@ -306,7 +287,6 @@ EnumType::getMemberIndex(const H5std_string &name) const ///\brief Returns the number of members in this enumeration datatype. ///\return Number of members ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- int EnumType::getNmembers() const @@ -326,7 +306,6 @@ EnumType::getNmembers() const ///\param memb_no - IN: Index of the queried member ///\param value - OUT: Pointer to the retrieved value ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void EnumType::getMemberValue(unsigned memb_no, void *value) const @@ -338,13 +317,4 @@ EnumType::getMemberValue(unsigned memb_no, void *value) const } } -//-------------------------------------------------------------------------- -// Function: EnumType destructor -///\brief Properly terminates access to this enum datatype. -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -EnumType::~EnumType() -{ -} - } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5EnumType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5EnumType.h index 2501e4bae4b..a5096fcf905 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5EnumType.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5EnumType.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -41,7 +40,7 @@ class H5_DLLCPP EnumType : public DataType { // Returns an EnumType object via DataType* by decoding the // binary object description of this type. - virtual DataType *decode() const H5_OVERRIDE; + virtual DataType *decode() const override; // Returns the number of members in this enumeration datatype. int getNmembers() const; @@ -68,7 +67,7 @@ class H5_DLLCPP EnumType : public DataType { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("EnumType"); } @@ -82,7 +81,7 @@ class H5_DLLCPP EnumType : public DataType { // Copy constructor: same as the original EnumType. EnumType(const EnumType &original); - virtual ~EnumType() H5_OVERRIDE; + virtual ~EnumType() override = default; }; // end of EnumType } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Exception.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Exception.cpp index 67694390f11..906bd27e594 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Exception.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Exception.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -23,9 +22,8 @@ const char Exception::DEFAULT_MSG[] = "No detailed information provided"; //-------------------------------------------------------------------------- // Function: Exception default constructor ///\brief Default constructor. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -Exception::Exception() +Exception::Exception() : detail_message{""}, func_name{""} { } @@ -35,7 +33,6 @@ Exception::Exception() /// in which the failure occurs, and an optional detailed message. ///\param func - IN: Name of the function where failure occurs ///\param message - IN: Message on the failure -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- Exception::Exception(const H5std_string &func, const H5std_string &message) : detail_message(message), func_name(func) @@ -46,7 +43,6 @@ Exception::Exception(const H5std_string &func, const H5std_string &message) // Function: Exception copy constructor ///\brief Copy constructor: same HDF5 object as \a original ///\param orig - IN: Exception instance to copy -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- Exception::Exception(const Exception &orig) : detail_message(orig.detail_message), func_name(orig.func_name) { @@ -61,7 +57,6 @@ Exception::Exception(const Exception &orig) : detail_message(orig.detail_message ///\par Description /// In the failure case, the string "Invalid major error number" /// will be returned. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5std_string Exception::getMajorString(hid_t err_major) const @@ -73,9 +68,14 @@ Exception::getMajorString(hid_t err_major) const if (mesg_size < 0) throw IdComponentException("Exception::getMajorString", "H5Eget_msg failed"); + // The actual message size is the cast value + 1 for the terminal ASCII NUL + // (unfortunate in/out type sign mismatch) + size_t actual_mesg_size = static_cast(mesg_size) + 1; + // Call H5Eget_msg again to get the actual message - char *mesg_C = new char[mesg_size + 1]; // temporary C-string for C API - mesg_size = H5Eget_msg(err_major, NULL, mesg_C, mesg_size + 1); + char *mesg_C = new char[actual_mesg_size]; // temporary C-string for C API + + mesg_size = H5Eget_msg(err_major, NULL, mesg_C, actual_mesg_size); // Check for failure again if (mesg_size < 0) { @@ -98,7 +98,6 @@ Exception::getMajorString(hid_t err_major) const ///\par Description /// In the failure case, the string "Invalid minor error number" /// will be returned. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5std_string Exception::getMinorString(hid_t err_minor) const @@ -110,9 +109,14 @@ Exception::getMinorString(hid_t err_minor) const if (mesg_size < 0) throw IdComponentException("Exception::getMinorString", "H5Eget_msg failed"); + // The actual message size is the cast value + 1 for the terminal ASCII NUL + // (unfortunate in/out type sign mismatch) + size_t actual_mesg_size = static_cast(mesg_size) + 1; + // Call H5Eget_msg again to get the actual message - char *mesg_C = new char[mesg_size + 1]; // temporary C-string for C API - mesg_size = H5Eget_msg(err_minor, NULL, mesg_C, mesg_size + 1); + char *mesg_C = new char[actual_mesg_size]; // temporary C-string for C API + + mesg_size = H5Eget_msg(err_minor, NULL, mesg_C, actual_mesg_size); // Check for failure again if (mesg_size < 0) { @@ -140,7 +144,6 @@ Exception::getMinorString(hid_t err_minor) const ///\par /// Users are encouraged to write their own more specific error /// handlers -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void Exception::setAutoPrint(H5E_auto2_t &func, void *client_data) @@ -155,7 +158,6 @@ Exception::setAutoPrint(H5E_auto2_t &func, void *client_data) //-------------------------------------------------------------------------- // Function: Exception::dontPrint ///\brief Turns off the automatic error printing from the C library. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void Exception::dontPrint() @@ -175,7 +177,6 @@ Exception::dontPrint() /// called upon an error condition ///\param client_data - OUT: Current setting for the data passed to /// the error function -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void Exception::getAutoPrint(H5E_auto2_t &func, void **client_data) @@ -193,7 +194,6 @@ Exception::getAutoPrint(H5E_auto2_t &func, void **client_data) ///\par Description /// The stack is also cleared whenever a C API function is /// called, with certain exceptions (for instance, \c H5Eprint). -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void Exception::clearErrorStack() @@ -243,7 +243,6 @@ Exception::clearErrorStack() /// const char *desc; //optional supplied description /// } H5E_error2_t; ///\endcode -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void Exception::walkErrorStack(H5E_direction_t direction, H5E_walk2_t func, void *client_data) @@ -259,7 +258,6 @@ Exception::walkErrorStack(H5E_direction_t direction, H5E_walk2_t func, void *cli ///\brief Returns the detailed message set at the time the exception /// is thrown. ///\return Text message - \c H5std_string -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5std_string Exception::getDetailMsg() const @@ -272,7 +270,6 @@ Exception::getDetailMsg() const ///\brief Returns the detailed message set at the time the exception /// is thrown. ///\return Text message - \c char pointer -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- const char * Exception::getCDetailMsg() const @@ -284,7 +281,6 @@ Exception::getCDetailMsg() const // Function: Exception::getFuncName ///\brief Returns the name of the function, where the exception is thrown. ///\return Text message - \c H5std_string -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5std_string Exception::getFuncName() const @@ -296,7 +292,6 @@ Exception::getFuncName() const // Function: Exception::getCFuncName ///\brief Returns the name of the function, where the exception is thrown. ///\return Text message - \c char pointer -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- const char * Exception::getCFuncName() const @@ -309,7 +304,6 @@ Exception::getCFuncName() const ///\brief Prints the error stack in a default manner. ///\param stream - IN: File pointer, default to stderr ///\param err_stack - IN: Error stack ID, default to H5E_DEFAULT(0) -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void Exception::printErrorStack(FILE *stream, hid_t err_stack) @@ -325,7 +319,6 @@ Exception::printErrorStack(FILE *stream, hid_t err_stack) // function is replaced by the static function printErrorStack // and will be removed from the next major release. // Parameter stream - IN: File pointer -// Programmer Binh-Minh Ribler - 2000 // Description: // This function can be removed in next major release. // -BMR, 2014/04/24 @@ -337,18 +330,8 @@ Exception::printErrorStack(FILE *stream, hid_t err_stack) // Exception::printErrorStack(stream, H5E_DEFAULT); //} -//-------------------------------------------------------------------------- -// Function: Exception destructor -///\brief Noop destructor -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -Exception::~Exception() throw() -{ -} - //-------------------------------------------------------------------------- // Subclass: FileIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- // Function: FileIException default constructor @@ -368,17 +351,9 @@ FileIException::FileIException(const H5std_string &func, const H5std_string &mes : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: FileIException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -FileIException::~FileIException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: GroupIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- // Function: GroupIException default constructor @@ -398,17 +373,8 @@ GroupIException::GroupIException(const H5std_string &func, const H5std_string &m : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: GroupIException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -GroupIException::~GroupIException() throw() -{ -} - //-------------------------------------------------------------------------- // Subclass: DataSpaceIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- // Function: DataSpaceIException default constructor @@ -428,17 +394,9 @@ DataSpaceIException::DataSpaceIException(const H5std_string &func, const H5std_s : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: DataSpaceIException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -DataSpaceIException::~DataSpaceIException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- // Function: DataTypeIException default constructor @@ -458,17 +416,9 @@ DataTypeIException::DataTypeIException(const H5std_string &func, const H5std_str : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: DataTypeIException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -DataTypeIException::~DataTypeIException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: ObjHeaderIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- // Function: ObjHeaderIException default constructor @@ -488,17 +438,9 @@ ObjHeaderIException::ObjHeaderIException(const H5std_string &func, const H5std_s : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: ObjHeaderIException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -ObjHeaderIException::~ObjHeaderIException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- // Function: PropListIException default constructor @@ -518,17 +460,9 @@ PropListIException::PropListIException(const H5std_string &func, const H5std_str : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: PropListIException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -PropListIException::~PropListIException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: DataSetIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- // Function: DataSetIException default constructor @@ -548,17 +482,9 @@ DataSetIException::DataSetIException(const H5std_string &func, const H5std_strin : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: DataSetIException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -DataSetIException::~DataSetIException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: AttributeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- // Function: AttributeIException default constructor @@ -578,17 +504,9 @@ AttributeIException::AttributeIException(const H5std_string &func, const H5std_s : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: AttributeIException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -AttributeIException::~AttributeIException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: ReferenceException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- // Function: ReferenceException default constructor @@ -608,17 +526,9 @@ ReferenceException::ReferenceException(const H5std_string &func, const H5std_str : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: ReferenceException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -ReferenceException::~ReferenceException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: LibraryIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- // Function: LibraryIException default constructor @@ -638,17 +548,9 @@ LibraryIException::LibraryIException(const H5std_string &func, const H5std_strin : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: LibraryIException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -LibraryIException::~LibraryIException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: LocationException -// Programmer Binh-Minh Ribler - 2014 //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- // Function: LocationException default constructor @@ -668,17 +570,9 @@ LocationException::LocationException(const H5std_string &func, const H5std_strin : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: LocationException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -LocationException::~LocationException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: IdComponentException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- // Function: IdComponentException default constructor @@ -698,12 +592,5 @@ IdComponentException::IdComponentException(const H5std_string &func, const H5std : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: IdComponentException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -IdComponentException::~IdComponentException() throw() -{ -} } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Exception.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Exception.h index 9970d2229b0..6bf51ef893b 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Exception.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Exception.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -41,9 +40,9 @@ class H5_DLLCPP Exception { // Returns the detailed message set at the time the exception is thrown H5std_string getDetailMsg() const; - const char * getCDetailMsg() const; // C string of detailed message + const char *getCDetailMsg() const; // C string of detailed message H5std_string getFuncName() const; // function name as a string object - const char * getCFuncName() const; // function name as a char string + const char *getCFuncName() const; // function name as a char string // Turns on the automatic error printing. static void setAutoPrint(H5E_auto2_t &func, void *client_data); @@ -75,7 +74,7 @@ class H5_DLLCPP Exception { Exception(const Exception &orig); // virtual Destructor - virtual ~Exception() throw(); + virtual ~Exception() = default; protected: // Default value for detail_message @@ -90,84 +89,84 @@ class H5_DLLCPP FileIException : public Exception { public: FileIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); FileIException(); - virtual ~FileIException() throw() H5_OVERRIDE; + virtual ~FileIException() override = default; }; class H5_DLLCPP GroupIException : public Exception { public: GroupIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); GroupIException(); - virtual ~GroupIException() throw() H5_OVERRIDE; + virtual ~GroupIException() override = default; }; class H5_DLLCPP DataSpaceIException : public Exception { public: DataSpaceIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); DataSpaceIException(); - virtual ~DataSpaceIException() throw() H5_OVERRIDE; + virtual ~DataSpaceIException() override = default; }; class H5_DLLCPP DataTypeIException : public Exception { public: DataTypeIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); DataTypeIException(); - virtual ~DataTypeIException() throw() H5_OVERRIDE; + virtual ~DataTypeIException() override = default; }; class H5_DLLCPP ObjHeaderIException : public Exception { public: ObjHeaderIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); ObjHeaderIException(); - virtual ~ObjHeaderIException() throw() H5_OVERRIDE; + virtual ~ObjHeaderIException() override = default; }; class H5_DLLCPP PropListIException : public Exception { public: PropListIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); PropListIException(); - virtual ~PropListIException() throw() H5_OVERRIDE; + virtual ~PropListIException() override = default; }; class H5_DLLCPP DataSetIException : public Exception { public: DataSetIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); DataSetIException(); - virtual ~DataSetIException() throw() H5_OVERRIDE; + virtual ~DataSetIException() override = default; }; class H5_DLLCPP AttributeIException : public Exception { public: AttributeIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); AttributeIException(); - virtual ~AttributeIException() throw() H5_OVERRIDE; + virtual ~AttributeIException() override = default; }; class H5_DLLCPP ReferenceException : public Exception { public: ReferenceException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); ReferenceException(); - virtual ~ReferenceException() throw() H5_OVERRIDE; + virtual ~ReferenceException() override = default; }; class H5_DLLCPP LibraryIException : public Exception { public: LibraryIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); LibraryIException(); - virtual ~LibraryIException() throw() H5_OVERRIDE; + virtual ~LibraryIException() override = default; }; class H5_DLLCPP LocationException : public Exception { public: LocationException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); LocationException(); - virtual ~LocationException() throw() H5_OVERRIDE; + virtual ~LocationException() override = default; }; class H5_DLLCPP IdComponentException : public Exception { public: IdComponentException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); IdComponentException(); - virtual ~IdComponentException() throw() H5_OVERRIDE; + virtual ~IdComponentException() override = default; }; // end of IdComponentException } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FaccProp.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FaccProp.cpp index 005e5997c01..dc4b949b5b3 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FaccProp.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FaccProp.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -17,8 +16,6 @@ using std::cerr; using std::endl; -//#include - #include "H5Include.h" #include "H5Exception.h" #include "H5IdComponent.h" @@ -44,7 +41,6 @@ FileAccPropList *FileAccPropList::DEFAULT_ = 0; // If FileAccPropList::DEFAULT_ already points to an allocated // object, throw a PropListIException. This scenario should not // happen. -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- FileAccPropList * FileAccPropList::getConstant() @@ -71,13 +67,11 @@ FileAccPropList::getConstant() // Purpose Deletes the constant object that FileAccPropList::DEFAULT_ // points to. // exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- void FileAccPropList::deleteConstants() { - if (DEFAULT_ != 0) - delete DEFAULT_; + delete DEFAULT_; } //-------------------------------------------------------------------------- @@ -90,7 +84,6 @@ const FileAccPropList &FileAccPropList::DEFAULT = *getConstant(); //-------------------------------------------------------------------------- // Function: Default Constructor ///\brief Creates a file access property list -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FileAccPropList::FileAccPropList() : PropList(H5P_FILE_ACCESS) { @@ -100,7 +93,6 @@ FileAccPropList::FileAccPropList() : PropList(H5P_FILE_ACCESS) // Function: FileAccPropList copy constructor ///\brief Copy constructor: same HDF5 object as \a original ///\param original - IN: FileAccPropList instance to copy -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FileAccPropList::FileAccPropList(const FileAccPropList &original) : PropList(original) { @@ -110,7 +102,6 @@ FileAccPropList::FileAccPropList(const FileAccPropList &original) : PropList(ori // Function: FileAccPropList overloaded constructor ///\brief Creates a file access property list using the id of an /// existing one. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FileAccPropList::FileAccPropList(const hid_t plist_id) : PropList(plist_id) { @@ -121,7 +112,6 @@ FileAccPropList::FileAccPropList(const hid_t plist_id) : PropList(plist_id) ///\brief Modifies this property list to use the \c H5FD_STDIO driver. /// ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setStdio() const @@ -141,7 +131,6 @@ FileAccPropList::setStdio() const /// For detail on valid driver identifiers, please refer to the /// H5Pget_driver API in the HDF5 C Reference Manual. ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- hid_t FileAccPropList::getDriver() const @@ -157,12 +146,11 @@ FileAccPropList::getDriver() const // Function: FileAccPropList::setDriver ///\brief Set file driver for this property list. ///\param new_driver_id - IN: File driver -///\param new_driver_info - IN: Struct containing the driver-specific properites +///\param new_driver_info - IN: Struct containing the driver-specific properties ///\exception H5::PropListIException ///\par Description /// For information, please refer to the H5Pset_driver API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setDriver(hid_t new_driver_id, const void *new_driver_info) const @@ -178,7 +166,6 @@ FileAccPropList::setDriver(hid_t new_driver_id, const void *new_driver_info) con ///\brief Sets offset for family driver. ///\param offset - IN: offset value ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setFamilyOffset(hsize_t offset) const @@ -194,7 +181,6 @@ FileAccPropList::setFamilyOffset(hsize_t offset) const ///\brief Get offset for family driver. ///\return Offset for family driver ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- hsize_t FileAccPropList::getFamilyOffset() const @@ -219,7 +205,6 @@ FileAccPropList::getFamilyOffset() const ///\par Description /// For more details on the use of \c H5FD_CORE driver, please /// refer to the H5Pset_fapl_core API in the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setCore(size_t increment, hbool_t backing_store) const @@ -237,7 +222,6 @@ FileAccPropList::setCore(size_t increment, hbool_t backing_store) const ///\param backing_store - OUT: Indicating whether to write the file /// contents to disk when the file is closed ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::getCore(size_t &increment, hbool_t &backing_store) const @@ -257,7 +241,6 @@ FileAccPropList::getCore(size_t &increment, hbool_t &backing_store) const ///\exception H5::PropListIException ///\par Description /// Note that \a memb_size is used only when creating a new file. -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setFamily(hsize_t memb_size, const FileAccPropList &memb_plist) const @@ -276,7 +259,6 @@ FileAccPropList::setFamily(hsize_t memb_size, const FileAccPropList &memb_plist) ///\param memb_plist - OUT: Retrieved file access property list for each /// file member ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::getFamily(hsize_t &memb_size, FileAccPropList &memb_plist) const @@ -297,7 +279,6 @@ FileAccPropList::getFamily(hsize_t &memb_size, FileAccPropList &memb_plist) cons ///\param memb_size - OUT: Size in bytes of each file member ///\return The file access property list for each file member ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- FileAccPropList FileAccPropList::getFamily(hsize_t &memb_size) const @@ -323,7 +304,6 @@ FileAccPropList::getFamily(hsize_t &memb_size) const ///\par Description /// For information, please refer to the H5Pset_fapl_split API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setSplit(const FileAccPropList &meta_plist, const FileAccPropList &raw_plist, @@ -346,7 +326,6 @@ FileAccPropList::setSplit(const FileAccPropList &meta_plist, const FileAccPropLi ///\param meta_ext - IN: Metadata filename extension as \c H5std_string ///\param raw_ext - IN: Raw data filename extension as \c H5std_string ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setSplit(const FileAccPropList &meta_plist, const FileAccPropList &raw_plist, @@ -365,7 +344,6 @@ FileAccPropList::setSplit(const FileAccPropList &meta_plist, const FileAccPropLi /// property from this property list. ///\return Data sieve buffer size, in bytes ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- size_t FileAccPropList::getSieveBufSize() const @@ -386,7 +364,6 @@ FileAccPropList::getSieveBufSize() const ///\par Description /// For more detail, please refer to the H5Pset_sieve_buf_size /// API in the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setSieveBufSize(size_t bufsize) const @@ -406,7 +383,6 @@ FileAccPropList::setSieveBufSize(size_t bufsize) const ///\par Description /// For information, please refer to the H5Pset_meta_block_size /// API in the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setMetaBlockSize(hsize_t &block_size) const @@ -422,7 +398,6 @@ FileAccPropList::setMetaBlockSize(hsize_t &block_size) const ///\brief Returns the current metadata block size setting. ///\return Metadata block size ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- hsize_t FileAccPropList::getMetaBlockSize() const @@ -446,7 +421,6 @@ FileAccPropList::getMetaBlockSize() const ///\par Description /// For information, please refer to the H5Pset_fapl_log API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setLog(const char *logfile, unsigned flags, size_t buf_size) const @@ -465,7 +439,6 @@ FileAccPropList::setLog(const char *logfile, unsigned flags, size_t buf_size) co ///\param logfile - IN: Name of the log file - string ///\param flags - IN: Flags specifying the types of logging activity ///\param buf_size - IN: Size of the logging buffer -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setLog(const H5std_string &logfile, unsigned flags, size_t buf_size) const @@ -479,7 +452,6 @@ FileAccPropList::setLog(const H5std_string &logfile, unsigned flags, size_t buf_ /// driver. /// ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setSec2() const @@ -504,7 +476,6 @@ FileAccPropList::setSec2() const /// /// For more detail, please refer to the H5Pset_alignment API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileAccPropList::setAlignment(hsize_t threshold, hsize_t alignment) const @@ -522,7 +493,6 @@ FileAccPropList::setAlignment(hsize_t threshold, hsize_t alignment) const ///\param threshold - OUT: Retrieved threshold value for file object size ///\param alignment - OUT: Retrieved alignment value ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileAccPropList::getAlignment(hsize_t &threshold, hsize_t &alignment) const @@ -541,7 +511,6 @@ FileAccPropList::getAlignment(hsize_t &threshold, hsize_t &alignment) const ///\par Description /// For information, please refer to the H5Pset_multi_type API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setMultiType(H5FD_mem_t dtype) const @@ -560,7 +529,6 @@ FileAccPropList::setMultiType(H5FD_mem_t dtype) const ///\par Description /// For information, please refer to the H5Pget_multi_type API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- H5FD_mem_t FileAccPropList::getMultiType() const @@ -588,7 +556,6 @@ FileAccPropList::getMultiType() const /// means fully read chunks are treated no differently than other /// chunks (the preemption is strictly LRU) while a value of one /// means fully read chunks are always preempted before other chunks. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileAccPropList::setCache(int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0) const @@ -607,7 +574,6 @@ FileAccPropList::setCache(int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes ///\param rdcc_nbytes - OUT: Total size of the raw data chunk cache, in bytes ///\param rdcc_w0 - OUT: Preemption policy ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileAccPropList::getCache(int &mdc_nelmts, size_t &rdcc_nelmts, size_t &rdcc_nbytes, double &rdcc_w0) const @@ -623,7 +589,6 @@ FileAccPropList::getCache(int &mdc_nelmts, size_t &rdcc_nelmts, size_t &rdcc_nby ///\brief Sets the degree for the file close behavior. ///\param degree - IN: ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setFcloseDegree(H5F_close_degree_t degree) const @@ -639,7 +604,6 @@ FileAccPropList::setFcloseDegree(H5F_close_degree_t degree) const ///\brief Returns the degree for the file close behavior. ///\return The degree for the file close behavior ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- H5F_close_degree_t FileAccPropList::getFcloseDegree() const @@ -661,7 +625,6 @@ FileAccPropList::getFcloseDegree() const ///\par Description /// For information, please refer to the H5Pset_gc_references API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileAccPropList::setGcReferences(unsigned gc_ref) const @@ -677,7 +640,6 @@ FileAccPropList::setGcReferences(unsigned gc_ref) const ///\brief Returns the garbage collecting references setting. ///\return Garbage collecting references setting, 0 (off) or 1 (on) ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- unsigned FileAccPropList::getGcReferences() const @@ -703,7 +665,6 @@ FileAccPropList::getGcReferences() const ///\par Description /// For information, please refer to the H5Pset_file_locking API in /// the HDF5 C Reference Manual. -// Programmer Dana Robinson - 2020 //-------------------------------------------------------------------------- void FileAccPropList::setFileLocking(hbool_t use_file_locking, hbool_t ignore_when_disabled) const @@ -726,7 +687,6 @@ FileAccPropList::setFileLocking(hbool_t use_file_locking, hbool_t ignore_when_di ///\par Description /// For information, please refer to the H5Pget_file_locking API in /// the HDF5 C Reference Manual. -// Programmer Dana Robinson - 2020 //-------------------------------------------------------------------------- void FileAccPropList::getFileLocking(hbool_t &use_file_locking, hbool_t &ignore_when_disabled) const @@ -752,17 +712,18 @@ FileAccPropList::getFileLocking(hbool_t &use_file_locking, hbool_t &ignore_when_ /// \li \c H5F_LIBVER_18 /// \li \c H5F_LIBVER_110 /// \li \c H5F_LIBVER_112 +/// \li \c H5F_LIBVER_114 /// \li \c H5F_LIBVER_LATEST /// /// Valid values of \a libver_high are as follows: /// \li \c H5F_LIBVER_18 /// \li \c H5F_LIBVER_110 /// \li \c H5F_LIBVER_112 +/// \li \c H5F_LIBVER_114 /// \li \c H5F_LIBVER_LATEST (Default) /// /// For more detail, please refer to the H5Pset_libver_bounds API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - March, 2015 //-------------------------------------------------------------------------- void FileAccPropList::setLibverBounds(H5F_libver_t libver_low, H5F_libver_t libver_high) const @@ -789,14 +750,15 @@ FileAccPropList::setLibverBounds(H5F_libver_t libver_low, H5F_libver_t libver_hi /// \li \c H5F_LIBVER_18 /// \li \c H5F_LIBVER_110 /// \li \c H5F_LIBVER_112 +/// \li \c H5F_LIBVER_114 /// \li \c H5F_LIBVER_LATEST /// /// and \a libver_high: /// \li \c H5F_LIBVER_18 /// \li \c H5F_LIBVER_110 /// \li \c H5F_LIBVER_112 +/// \li \c H5F_LIBVER_114 /// \li \c H5F_LIBVER_LATEST -// Programmer Binh-Minh Ribler - March, 2015 //-------------------------------------------------------------------------- void FileAccPropList::getLibverBounds(H5F_libver_t &libver_low, H5F_libver_t &libver_high) const @@ -807,13 +769,4 @@ FileAccPropList::getLibverBounds(H5F_libver_t &libver_low, H5F_libver_t &libver_ } } -//-------------------------------------------------------------------------- -// Function: FileAccPropList destructor -///\brief Noop destructor -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -FileAccPropList::~FileAccPropList() -{ -} - } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FaccProp.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FaccProp.h index 53c7799a1ca..67394f1c3a5 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FaccProp.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FaccProp.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -137,7 +136,7 @@ class H5_DLLCPP FileAccPropList : public PropList { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("FileAccPropList"); } @@ -150,7 +149,7 @@ class H5_DLLCPP FileAccPropList : public PropList { FileAccPropList(const hid_t plist_id); // Noop destructor - virtual ~FileAccPropList() H5_OVERRIDE; + virtual ~FileAccPropList() override = default; #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FcreatProp.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FcreatProp.cpp index b9be5634f27..66e4ceb886b 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FcreatProp.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FcreatProp.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -37,7 +36,6 @@ FileCreatPropList *FileCreatPropList::DEFAULT_ = 0; // Description // If FileCreatPropList::DEFAULT_ already points to an allocated // object, throw a PropListIException. This scenario should not happen. -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- FileCreatPropList * FileCreatPropList::getConstant() @@ -63,13 +61,11 @@ FileCreatPropList::getConstant() // Function: FileCreatPropList::deleteConstants // Purpose Deletes the constant object that FileCreatPropList::DEFAULT_ // points to. -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- void FileCreatPropList::deleteConstants() { - if (DEFAULT_ != 0) - delete DEFAULT_; + delete DEFAULT_; } //-------------------------------------------------------------------------- @@ -82,7 +78,6 @@ const FileCreatPropList &FileCreatPropList::DEFAULT = *getConstant(); //-------------------------------------------------------------------------- // Function: FileCreatPropList default constructor ///\brief Default constructor: Creates a file create property list -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FileCreatPropList::FileCreatPropList() : PropList(H5P_FILE_CREATE) { @@ -93,7 +88,6 @@ FileCreatPropList::FileCreatPropList() : PropList(H5P_FILE_CREATE) ///\brief Copy constructor: same HDF5 object as \a original /// FileCreatPropList object. ///\param original - IN: FileCreatPropList instance to copy -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FileCreatPropList::FileCreatPropList(const FileCreatPropList &original) : PropList(original) { @@ -104,7 +98,6 @@ FileCreatPropList::FileCreatPropList(const FileCreatPropList &original) : PropLi ///\brief Creates a file creation property list using the id of an /// existing one. ///\param plist_id - IN: FileCreatPropList id to use -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FileCreatPropList::FileCreatPropList(const hid_t plist_id) : PropList(plist_id) { @@ -121,7 +114,6 @@ FileCreatPropList::FileCreatPropList(const hid_t plist_id) : PropList(plist_id) ///\exception H5::PropListIException ///\par Description /// Any (or even all) of the output arguments can be null pointers. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileCreatPropList::getVersion(unsigned &super, unsigned &freelist, unsigned &stab, unsigned &shhdr) const @@ -141,7 +133,6 @@ FileCreatPropList::getVersion(unsigned &super, unsigned &freelist, unsigned &sta ///\par Description /// The default user block size is 0; it may be set to any power /// of 2 equal to 512 or greater (512, 1024, 2048, etc.) -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileCreatPropList::setUserblock(hsize_t size) const @@ -157,7 +148,6 @@ FileCreatPropList::setUserblock(hsize_t size) const ///\brief Returns the user block size of this file creation property list. ///\return User block size ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- hsize_t FileCreatPropList::getUserblock() const @@ -180,7 +170,6 @@ FileCreatPropList::getUserblock() const ///\par Description /// For information, please refer to the H5Pset_sizes API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileCreatPropList::setSizes(size_t sizeof_addr, size_t sizeof_size) const @@ -197,7 +186,6 @@ FileCreatPropList::setSizes(size_t sizeof_addr, size_t sizeof_size) const /// HDF5 file. /// ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileCreatPropList::getSizes(size_t &sizeof_addr, size_t &sizeof_size) const @@ -218,7 +206,6 @@ FileCreatPropList::getSizes(size_t &sizeof_addr, size_t &sizeof_size) const ///\par Description /// For information, please refer to the H5Pset_sym_k API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileCreatPropList::setSymk(unsigned ik, unsigned lk) const @@ -238,7 +225,6 @@ FileCreatPropList::setSymk(unsigned ik, unsigned lk) const ///\par Description /// For information, please refer to the H5Pget_sym_k API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileCreatPropList::getSymk(unsigned &ik, unsigned &lk) const @@ -258,7 +244,6 @@ FileCreatPropList::getSymk(unsigned &ik, unsigned &lk) const ///\par Description /// For information, please refer to the H5Pset_istore_k API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileCreatPropList::setIstorek(unsigned ik) const @@ -277,7 +262,6 @@ FileCreatPropList::setIstorek(unsigned ik) const ///\par Description /// For information, please refer to the H5Pget_istore_k API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- unsigned FileCreatPropList::getIstorek() const @@ -306,7 +290,6 @@ FileCreatPropList::getIstorek() const /// changed and the existing threshold will be retained. /// For information, please refer to the H5Pset_file_space_strategy /// API in the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - Feb, 2017 //-------------------------------------------------------------------------- void FileCreatPropList::setFileSpaceStrategy(H5F_fspace_strategy_t strategy, hbool_t persist, @@ -327,7 +310,6 @@ FileCreatPropList::setFileSpaceStrategy(H5F_fspace_strategy_t strategy, hbool_t ///\param persist - OUT: Whether to persist free-space ///\param threshold - OUT: Free-space section threshold ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - Feb, 2017 //-------------------------------------------------------------------------- void FileCreatPropList::getFileSpaceStrategy(H5F_fspace_strategy_t &strategy, hbool_t &persist, @@ -345,7 +327,6 @@ FileCreatPropList::getFileSpaceStrategy(H5F_fspace_strategy_t &strategy, hbool_t ///\brief Sets the file space page size for paged aggregation. ///\param fsp_psize - IN: Filespace's page size ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - Feb, 2017 //-------------------------------------------------------------------------- void FileCreatPropList::setFileSpacePagesize(hsize_t fsp_psize) const @@ -363,7 +344,6 @@ FileCreatPropList::setFileSpacePagesize(hsize_t fsp_psize) const /// metadata or raw data. ///\return File space page size ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - Feb, 2017 //-------------------------------------------------------------------------- hsize_t FileCreatPropList::getFileSpacePagesize() const @@ -377,13 +357,4 @@ FileCreatPropList::getFileSpacePagesize() const return (fsp_psize); } -//-------------------------------------------------------------------------- -// Function: FileCreatPropList destructor -///\brief Noop destructor. -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -FileCreatPropList::~FileCreatPropList() -{ -} - } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FcreatProp.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FcreatProp.h index 65daf8f2e72..76c2ae5b952 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FcreatProp.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FcreatProp.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -78,7 +77,7 @@ class H5_DLLCPP FileCreatPropList : public PropList { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("FileCreatPropList"); } @@ -91,7 +90,7 @@ class H5_DLLCPP FileCreatPropList : public PropList { FileCreatPropList(const hid_t plist_id); // Noop destructor - virtual ~FileCreatPropList() H5_OVERRIDE; + virtual ~FileCreatPropList() override = default; #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5File.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5File.cpp index 9a6f191f70f..9c390f9c73f 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5File.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5File.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -119,6 +118,52 @@ H5File::H5File(const H5std_string &name, unsigned int flags, const FileCreatProp } } +//-------------------------------------------------------------------------- +// Function: H5File overloaded constructor +///\brief Opens an HDF5 file using a non-default access property list +///\param name - IN: Name of the file +///\param flags - IN: File access flags +///\param access_plist - IN: File access property list. +///\par Description +/// Valid values of \a flags include: +/// \li \c H5F_ACC_RDONLY - Open file as read-only, if it already +/// exists, and fail, otherwise +/// \li \c H5F_ACC_RDWR - Open file for read/write, if it already +/// exists, and fail, otherwise +// Notes With a PGI compiler (~2012-2013,) the exception thrown by +// p_get_file could not be caught in the applications. Added try +// block here to catch then re-throw it. -BMR 2013/03/21 +//-------------------------------------------------------------------------- +H5File::H5File(const char *name, unsigned int flags, const FileAccPropList &access_plist) + : Group(), id(H5I_INVALID_HID) +{ + try { + p_get_file(name, flags, FileCreatPropList::DEFAULT, access_plist); + } + catch (FileIException &open_file) { + throw open_file; + } +} + +//-------------------------------------------------------------------------- +// Function: H5File overloaded constructor +///\brief This is another overloaded constructor. It differs from the +/// above constructor only in the type of the \a name argument. +///\param name - IN: Name of the file - \c H5std_string +///\param flags - IN: File access flags +///\param access_plist - IN: File access property list +//-------------------------------------------------------------------------- +H5File::H5File(const H5std_string &name, unsigned int flags, const FileAccPropList &access_plist) + : Group(), id(H5I_INVALID_HID) +{ + try { + p_get_file(name.c_str(), flags, FileCreatPropList::DEFAULT, access_plist); + } + catch (FileIException &open_file) { + throw open_file; + } +} + #ifndef DOXYGEN_SHOULD_SKIP_THIS //-------------------------------------------------------------------------- // This function is private and contains common code between the @@ -165,9 +210,8 @@ H5File::p_get_file(const char *name, unsigned int flags, const FileCreatPropList // constructor is needed by the library in order to return // an object, H5File doesn't need it. -BMR (HDFFV-8766 partially) //-------------------------------------------------------------------------- -H5File::H5File(hid_t existing_id) : Group() +H5File::H5File(hid_t existing_id) : Group(), id{existing_id} { - id = existing_id; incRefCount(); // increment number of references to this id } @@ -180,9 +224,8 @@ H5File::H5File(hid_t existing_id) : Group() ///\param original - IN: H5File instance to copy // December 2000 //-------------------------------------------------------------------------- -H5File::H5File(const H5File &original) : Group(original) +H5File::H5File(const H5File &original) : Group(original), id{original.getId()} { - id = original.getId(); incRefCount(); // increment number of references to this id } @@ -575,7 +618,6 @@ H5File::getVFDHandle(void **file_handle) const ///\par Description /// This function is called after an existing file is opened in /// order to learn the true size of the underlying file. -// Programmer Raymond Lu - June 24, 2004 //-------------------------------------------------------------------------- hsize_t H5File::getFileSize() const @@ -596,7 +638,6 @@ H5File::getFileSize() const ///\par Description /// This function is called after an existing file is opened in /// order to retrieve the unique 'file number' for the file. -// Programmer Quincey Koziol - April 13, 2019 //-------------------------------------------------------------------------- unsigned long H5File::getFileNum() const @@ -667,7 +708,7 @@ H5File::getLocId() const ///\exception H5::IdComponentException when the attempt to close the HDF5 /// object fails // Description -// The underlaying reference counting in the C library ensures +// The underlying reference counting in the C library ensures // that the current valid id of this object is properly closed. // Then the object's id is reset to the new id. // December 2000 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5File.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5File.h index bdd7b84734f..617adaadb4d 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5File.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5File.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -27,10 +26,12 @@ class H5_DLLCPP H5File : public Group { // Creates or opens an HDF5 file. H5File(const char *name, unsigned int flags, const FileCreatPropList &create_plist = FileCreatPropList::DEFAULT, - const FileAccPropList & access_plist = FileAccPropList::DEFAULT); + const FileAccPropList &access_plist = FileAccPropList::DEFAULT); H5File(const H5std_string &name, unsigned int flags, const FileCreatPropList &create_plist = FileCreatPropList::DEFAULT, - const FileAccPropList & access_plist = FileAccPropList::DEFAULT); + const FileAccPropList &access_plist = FileAccPropList::DEFAULT); + H5File(const char *name, unsigned int flags, const FileAccPropList &access_plist); + H5File(const H5std_string &name, unsigned int flags, const FileAccPropList &access_plist); // Open the file void openFile(const H5std_string &name, unsigned int flags, @@ -39,7 +40,7 @@ class H5_DLLCPP H5File : public Group { const FileAccPropList &access_plist = FileAccPropList::DEFAULT); // Close this file. - virtual void close() H5_OVERRIDE; + virtual void close() override; // Gets a copy of the access property list of this file. FileAccPropList getAccessPlist() const; @@ -77,9 +78,9 @@ class H5_DLLCPP H5File : public Group { static bool isHdf5(const H5std_string &name); // Determines if a file, specified by its name, can be accessed as HDF5 - static bool isAccessible(const char * name, + static bool isAccessible(const char *name, const FileAccPropList &access_plist = FileAccPropList::DEFAULT); - static bool isAccessible(const H5std_string & name, + static bool isAccessible(const H5std_string &name, const FileAccPropList &access_plist = FileAccPropList::DEFAULT); // Reopens this file. @@ -96,16 +97,16 @@ class H5_DLLCPP H5File : public Group { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("H5File"); } // Throw file exception. - virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const H5_OVERRIDE; + virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const override; // For CommonFG to get the file id. - virtual hid_t getLocId() const H5_OVERRIDE; + virtual hid_t getLocId() const override; // Default constructor H5File(); @@ -114,15 +115,15 @@ class H5_DLLCPP H5File : public Group { H5File(const H5File &original); // Gets the HDF5 file id. - virtual hid_t getId() const H5_OVERRIDE; + virtual hid_t getId() const override; // H5File destructor. - virtual ~H5File() H5_OVERRIDE; + virtual ~H5File() override; protected: #ifndef DOXYGEN_SHOULD_SKIP_THIS // Sets the HDF5 file id. - virtual void p_setId(const hid_t new_id) H5_OVERRIDE; + virtual void p_setId(const hid_t new_id) override; #endif // DOXYGEN_SHOULD_SKIP_THIS private: diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FloatType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FloatType.cpp index 33f83770844..41ee8a850bc 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FloatType.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FloatType.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -38,7 +37,6 @@ namespace H5 { //-------------------------------------------------------------------------- // Function: FloatType default constructor ///\brief Default constructor: Creates a stub floating-point datatype -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FloatType::FloatType() { @@ -49,7 +47,6 @@ FloatType::FloatType() ///\brief Creates a floating-point datatype using a predefined type. ///\param pred_type - IN: Predefined datatype ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FloatType::FloatType(const PredType &pred_type) : AtomType() { @@ -63,7 +60,6 @@ FloatType::FloatType(const PredType &pred_type) : AtomType() /// datatype. ///\param existing_id - IN: Id of an existing datatype ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FloatType::FloatType(const hid_t existing_id) : AtomType(existing_id) { @@ -72,7 +68,6 @@ FloatType::FloatType(const hid_t existing_id) : AtomType(existing_id) //-------------------------------------------------------------------------- // Function: FloatType copy constructor ///\brief Copy constructor: same HDF5 object as \a original -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FloatType::FloatType(const FloatType &original) : AtomType(original) { @@ -84,7 +79,6 @@ FloatType::FloatType(const FloatType &original) : AtomType(original) ///\param dataset - IN: Dataset that this floating-point datatype /// associates with ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FloatType::FloatType(const DataSet &dataset) : AtomType() { @@ -103,7 +97,6 @@ FloatType::FloatType(const DataSet &dataset) : AtomType() ///\param loc - IN: Location of the type ///\param dtype_name - IN: Float type name ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Dec 2016 // Description // In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openFloatType(const char*) @@ -122,7 +115,6 @@ FloatType::FloatType(const H5Location &loc, const char *dtype_name) : AtomType() ///\param loc - IN: Location of the type ///\param dtype_name - IN: Float type name ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Dec 2016 // Description // In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openFloatType(const H5std_string&) @@ -140,7 +132,6 @@ FloatType::FloatType(const H5Location &loc, const H5std_string &dtype_name) : At /// binary object description of this type. /// ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- DataType * FloatType::decode() const @@ -166,7 +157,6 @@ FloatType::decode() const ///\param mpos - OUT: Retrieved mantissa bit-position ///\param msize - OUT: Retrieved size of mantissa, in bits ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FloatType::getFields(size_t &spos, size_t &epos, size_t &esize, size_t &mpos, size_t &msize) const @@ -187,7 +177,6 @@ FloatType::getFields(size_t &spos, size_t &epos, size_t &esize, size_t &mpos, si ///\param mpos - OUT: Mantissa bit-position ///\param msize - OUT: Size of mantissa, in bits ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FloatType::setFields(size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize) const @@ -203,7 +192,6 @@ FloatType::setFields(size_t spos, size_t epos, size_t esize, size_t mpos, size_t ///\brief Retrieves the exponent bias of a floating-point type. ///\return Exponent bias ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- size_t FloatType::getEbias() const @@ -221,7 +209,6 @@ FloatType::getEbias() const ///\brief Sets the exponent bias of a floating-point type. ///\param ebias - Exponent bias value ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FloatType::setEbias(size_t ebias) const @@ -245,7 +232,6 @@ FloatType::setEbias(size_t ebias) const /// For your convenience, this function also provides the text /// string of the returned normalization type, via parameter /// \a norm_string. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5T_norm_t FloatType::getNorm(H5std_string &norm_string) const @@ -274,7 +260,6 @@ FloatType::getNorm(H5std_string &norm_string) const /// \li \c H5T_NORM_IMPLIED (0) - MSB of mantissa is not stored /// \li \c H5T_NORM_MSBSET (1) - MSB of mantissa is always 1 /// \li \c H5T_NORM_NONE (2) - Mantissa is not normalized -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FloatType::setNorm(H5T_norm_t norm) const @@ -298,7 +283,6 @@ FloatType::setNorm(H5T_norm_t norm) const /// For your convenience, this function also provides the text /// string of the returned internal padding type, via parameter /// \a pad_string. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5T_pad_t FloatType::getInpad(H5std_string &pad_string) const @@ -332,7 +316,6 @@ FloatType::getInpad(H5std_string &pad_string) const /// \li \c H5T_PAD_ZERO (0) - Set background to zeros /// \li \c H5T_PAD_ONE (1) - Set background to ones /// \li \c H5T_PAD_BACKGROUND (2) - Leave background alone -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FloatType::setInpad(H5T_pad_t inpad) const @@ -343,13 +326,4 @@ FloatType::setInpad(H5T_pad_t inpad) const } } -//-------------------------------------------------------------------------- -// Function: FloatType destructor -///\brief Noop destructor. -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -FloatType::~FloatType() -{ -} - } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FloatType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FloatType.h index e8df757c3b5..b804892b0a8 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FloatType.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FloatType.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -36,7 +35,7 @@ class H5_DLLCPP FloatType : public AtomType { // Returns an FloatType object via DataType* by decoding the // binary object description of this type. - virtual DataType *decode() const H5_OVERRIDE; + virtual DataType *decode() const override; // Retrieves the exponent bias of a floating-point type. size_t getEbias() const; @@ -64,7 +63,7 @@ class H5_DLLCPP FloatType : public AtomType { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("FloatType"); } @@ -79,7 +78,7 @@ class H5_DLLCPP FloatType : public AtomType { FloatType(const FloatType &original); // Noop destructor. - virtual ~FloatType() H5_OVERRIDE; + virtual ~FloatType() override = default; }; // end of FloatType } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Group.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Group.cpp index fe791dae9df..48358b3a5cb 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Group.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Group.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -44,7 +43,6 @@ using std::endl; //-------------------------------------------------------------------------- // Function: Group default constructor ///\brief Default constructor: creates a stub Group. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- Group::Group() : H5Object(), CommonFG(), id(H5I_INVALID_HID) { @@ -54,7 +52,6 @@ Group::Group() : H5Object(), CommonFG(), id(H5I_INVALID_HID) // Function: Group copy constructor ///\brief Copy constructor: same HDF5 object as \a original ///\param original - IN: Original group to copy -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- Group::Group(const Group &original) : H5Object(), CommonFG(), id(original.id) { @@ -66,7 +63,6 @@ Group::Group(const Group &original) : H5Object(), CommonFG(), id(original.id) ///\brief Closes an object, which was opened with Group::getObjId /// ///\exception H5::FileIException or H5::GroupIException -// Programmer Binh-Minh Ribler - March, 2017 //-------------------------------------------------------------------------- void Group::closeObjId(hid_t obj_id) const @@ -80,7 +76,6 @@ Group::closeObjId(hid_t obj_id) const //-------------------------------------------------------------------------- // Function: Group::getLocId // Purpose: Get the id of this group -// Programmer Binh-Minh Ribler - 2000 // Description // This function is a redefinition of CommonFG::getLocId. It // is used by CommonFG member functions to get the file id. @@ -99,7 +94,6 @@ Group::getLocId() const // Function: Group overloaded constructor ///\brief Creates a Group object using the id of an existing group. ///\param existing_id - IN: Id of an existing group -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- Group::Group(const hid_t existing_id) : H5Object(), CommonFG(), id(existing_id) { @@ -117,7 +111,6 @@ Group::Group(const hid_t existing_id) : H5Object(), CommonFG(), id(existing_id) ///\par Description /// \c obj can be DataSet, Group, or named DataType, that /// is a datatype that has been named by DataType::commit. -// Programmer Binh-Minh Ribler - Oct, 2006 //-------------------------------------------------------------------------- Group::Group(const H5Location &loc, const void *ref, H5R_type_t ref_type, const PropList &plist) : H5Object(), CommonFG(), id(H5I_INVALID_HID) @@ -130,7 +123,6 @@ Group::Group(const H5Location &loc, const void *ref, H5R_type_t ref_type, const ///\brief Returns the number of objects in this group. ///\return Number of objects ///\exception H5::FileIException or H5::GroupIException -// Programmer Binh-Minh Ribler - January, 2003 //-------------------------------------------------------------------------- hsize_t Group::getNumObjs() const @@ -154,7 +146,6 @@ Group::getNumObjs() const /// This function opens an object in a group or file, using /// H5Oopen. Thus, an object can be opened without knowing /// the object's type. -// Programmer Binh-Minh Ribler - March, 2017 //-------------------------------------------------------------------------- hid_t Group::getObjId(const char *obj_name, const PropList &plist) const @@ -174,7 +165,6 @@ Group::getObjId(const char *obj_name, const PropList &plist) const ///\param plist - IN: Access property list for the link pointing to /// the object ///\exception H5::FileIException or H5::GroupIException -// Programmer Binh-Minh Ribler - March, 2017 //-------------------------------------------------------------------------- hid_t Group::getObjId(const H5std_string &obj_name, const PropList &plist) const @@ -192,7 +182,6 @@ Group::getObjId(const H5std_string &obj_name, const PropList &plist) const // AbstractDS and Attribute are moved out of H5Object. In // addition, member IdComponent::id is moved into subclasses, and // IdComponent::getId now becomes pure virtual function. -// Programmer Binh-Minh Ribler - May, 2008 //-------------------------------------------------------------------------- hid_t Group::getId() const @@ -208,10 +197,9 @@ Group::getId() const ///\exception H5::IdComponentException when the attempt to close the HDF5 /// object fails // Description: -// The underlaying reference counting in the C library ensures +// The underlying reference counting in the C library ensures // that the current valid id of this object is properly closed. // Then the object's id is reset to the new id. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void Group::p_setId(const hid_t new_id) @@ -233,7 +221,6 @@ Group::p_setId(const hid_t new_id) ///\brief Closes this group. /// ///\exception H5::GroupIException -// Programmer Binh-Minh Ribler - Mar 9, 2005 //-------------------------------------------------------------------------- void Group::close() @@ -259,7 +246,6 @@ Group::close() // proper exception can be thrown for file or group. The // "Group::" will be inserted to indicate the function called is // an implementation of Group. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void Group::throwException(const H5std_string &func_name, const H5std_string &msg) const @@ -272,7 +258,6 @@ Group::throwException(const H5std_string &func_name, const H5std_string &msg) co //-------------------------------------------------------------------------- // Function: Group destructor ///\brief Properly terminates access to this group. -// Programmer Binh-Minh Ribler - 2000 // Modification // - Replaced resetIdComponent() with decRefCount() to use C // library ID reference counting mechanism - BMR, Feb 20, 2005 @@ -289,4 +274,14 @@ Group::~Group() } } +//-------------------------------------------------------------------------- +// Function: Copy assignment operator +Group & +Group::operator=(const Group &original) +{ + IdComponent::operator=(original); + + return *this; +} + } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Group.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Group.h index b5f7e51110d..9c89dd1599a 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Group.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Group.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -24,20 +23,20 @@ namespace H5 { class H5_DLLCPP Group : public H5Object, public CommonFG { public: // Close this group. - virtual void close() H5_OVERRIDE; + virtual void close() override; ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("Group"); } // Throw group exception. - virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const H5_OVERRIDE; + virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const override; // for CommonFG to get the file id. - virtual hid_t getLocId() const H5_OVERRIDE; + virtual hid_t getLocId() const override; // Creates a group by way of dereference. Group(const H5Location &loc, const void *ref, H5R_type_t ref_type = H5R_OBJECT, @@ -63,10 +62,13 @@ class H5_DLLCPP Group : public H5Object, public CommonFG { Group(const Group &original); // Gets the group id. - virtual hid_t getId() const H5_OVERRIDE; + virtual hid_t getId() const override; // Destructor - virtual ~Group() H5_OVERRIDE; + virtual ~Group() override; + + // Copy assignment operator. + Group &operator=(const Group &original); // Creates a copy of an existing group using its id. Group(const hid_t group_id); @@ -74,7 +76,7 @@ class H5_DLLCPP Group : public H5Object, public CommonFG { protected: #ifndef DOXYGEN_SHOULD_SKIP_THIS // Sets the group id. - virtual void p_setId(const hid_t new_id) H5_OVERRIDE; + virtual void p_setId(const hid_t new_id) override; #endif // DOXYGEN_SHOULD_SKIP_THIS private: diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IdComponent.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IdComponent.cpp index 18bcbd3c870..0d15aac7fb9 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IdComponent.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IdComponent.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -13,7 +12,6 @@ #include -#include "H5private.h" // for HDmemset #include "H5Include.h" #include "H5Exception.h" #include "H5Library.h" @@ -36,7 +34,6 @@ bool IdComponent::H5dontAtexit_called = false; //-------------------------------------------------------------------------- // Function: IdComponent::incRefCount ///\brief Increment reference counter for a given id. -// Programmer Binh-Minh Ribler - May 2005 //-------------------------------------------------------------------------- void IdComponent::incRefCount(const hid_t obj_id) const @@ -49,7 +46,6 @@ IdComponent::incRefCount(const hid_t obj_id) const //-------------------------------------------------------------------------- // Function: IdComponent::incRefCount ///\brief Increment reference counter for the id of this object. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void IdComponent::incRefCount() const @@ -60,7 +56,6 @@ IdComponent::incRefCount() const //-------------------------------------------------------------------------- // Function: IdComponent::decRefCount ///\brief Decrement reference counter for a given id. -// Programmer Binh-Minh Ribler - May 2005 // Modification: // Added the check for ref counter to give a little more info // on why H5Idec_ref fails in some cases - BMR 5/19/2005 @@ -80,7 +75,6 @@ IdComponent::decRefCount(const hid_t obj_id) const //-------------------------------------------------------------------------- // Function: IdComponent::decRefCount ///\brief Decrement reference counter for the id of this object. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void IdComponent::decRefCount() const @@ -92,7 +86,6 @@ IdComponent::decRefCount() const // Function: IdComponent::getCounter ///\brief Returns the reference counter for a given id. ///\return Reference count -// Programmer Binh-Minh Ribler - May 2005 //-------------------------------------------------------------------------- int IdComponent::getCounter(const hid_t obj_id) const @@ -111,7 +104,6 @@ IdComponent::getCounter(const hid_t obj_id) const // Function: IdComponent::getCounter ///\brief Returns the reference counter for the id of this object. ///\return Reference count -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- int IdComponent::getCounter() const @@ -131,7 +123,6 @@ IdComponent::getCounter() const /// \li \c H5I_ATTR /// \li or \c H5I_BADID, if no valid type can be determined or the /// input object id is invalid. -// Programmer Binh-Minh Ribler - Jul, 2005 //-------------------------------------------------------------------------- H5I_type_t IdComponent::getHDFObjType(const hid_t obj_id) @@ -158,7 +149,6 @@ IdComponent::getHDFObjType(const hid_t obj_id) /// \li \c H5I_ATTR /// \li or \c H5I_BADID, if no valid type can be determined or the /// input object id is invalid. -// Programmer Binh-Minh Ribler - Mar, 2014 //-------------------------------------------------------------------------- H5I_type_t IdComponent::getHDFObjType() const @@ -186,7 +176,6 @@ IdComponent::getHDFObjType() const /// \li \c H5I_ERROR_CLASS /// \li \c H5I_ERROR_MSG /// \li \c H5I_ERROR_STACK -// Programmer Binh-Minh Ribler - Feb, 2017 //-------------------------------------------------------------------------- hsize_t IdComponent::getNumMembers(H5I_type_t type) @@ -206,7 +195,6 @@ IdComponent::getNumMembers(H5I_type_t type) ///\par Description /// A valid ID is one that is in use and has an application /// reference count of at least 1. -// Programmer Binh-Minh Ribler - Mar 1, 2017 //-------------------------------------------------------------------------- bool IdComponent::isValid(hid_t an_id) @@ -241,7 +229,6 @@ IdComponent::isValid(hid_t an_id) /// \li \c H5I_ERROR_CLASS /// \li \c H5I_ERROR_MSG /// \li \c H5I_ERROR_STACK -// Programmer Binh-Minh Ribler - Feb, 2017 //-------------------------------------------------------------------------- bool IdComponent::typeExists(H5I_type_t type) @@ -272,7 +259,6 @@ IdComponent::typeExists(H5I_type_t type) // 2010/5/9 - BMR // Removed close() and incRefCount() because setId/p_setId takes // care of close() and setId takes care incRefCount(). -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- IdComponent & IdComponent::operator=(const IdComponent &rhs) @@ -300,7 +286,6 @@ IdComponent::operator=(const IdComponent &rhs) // Description: // p_setId ensures that the current valid id of this object is // properly closed before resetting the object's id to the new id. -// Programmer Binh-Minh Ribler - 2000 // Modification // 2008/7/23 - BMR // Changed all subclasses' setId to p_setId and put back setId @@ -322,15 +307,6 @@ IdComponent::setId(const hid_t new_id) incRefCount(); } -//-------------------------------------------------------------------------- -// Function: IdComponent destructor -///\brief Noop destructor. -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -IdComponent::~IdComponent() -{ -} - // // Implementation of protected functions for HDF5 Reference Interface // and miscellaneous helpers. @@ -347,7 +323,6 @@ IdComponent::~IdComponent() /// where the failure occurs. The class-name is provided by /// fromClass(). This string will be used by a base class when /// an exception is thrown. -// Programmer Binh-Minh Ribler - Aug 6, 2005 //-------------------------------------------------------------------------- H5std_string IdComponent::inMemFunc(const char *func_name) const @@ -361,7 +336,6 @@ IdComponent::inMemFunc(const char *func_name) const //-------------------------------------------------------------------------- // Function: IdComponent default constructor - private ///\brief Default constructor. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- IdComponent::IdComponent() { @@ -383,7 +357,6 @@ IdComponent::IdComponent() // September 2017 // This function should be moved to H5Location now that Attribute // inherits from H5Location. -// Programmer Binh-Minh Ribler - Jul, 2004 //-------------------------------------------------------------------------- H5std_string IdComponent::p_get_file_name() const @@ -398,11 +371,14 @@ IdComponent::p_get_file_name() const throw IdComponentException("", "H5Fget_name failed"); } + // The actual message size is the cast value + 1 for the terminal ASCII NUL + // (unfortunate in/out type sign mismatch) + size_t actual_name_size = static_cast(name_size) + 1; + // Call H5Fget_name again to get the actual file name - char *name_C = new char[name_size + 1]; // temporary C-string for C API - HDmemset(name_C, 0, name_size + 1); // clear buffer + char *name_C = new char[actual_name_size](); - name_size = H5Fget_name(temp_id, name_C, name_size + 1); + name_size = H5Fget_name(temp_id, name_C, actual_name_size); // Check for failure again if (name_size < 0) { @@ -413,7 +389,8 @@ IdComponent::p_get_file_name() const // Convert the C file name and return H5std_string file_name(name_C); delete[] name_C; - return (file_name); + + return file_name; } // @@ -425,7 +402,6 @@ IdComponent::p_get_file_name() const // Purpose Verifies that the given id is a valid id so it can be passed // into an H5I C function. // Return true if id is valid, false, otherwise -// Programmer Binh-Minh Ribler - May, 2005 //-------------------------------------------------------------------------- bool IdComponent::p_valid_id(const hid_t obj_id) @@ -434,10 +410,7 @@ IdComponent::p_valid_id(const hid_t obj_id) return false; H5I_type_t id_type = H5Iget_type(obj_id); - if (id_type <= H5I_BADID || id_type >= H5I_NTYPES) - return false; - else - return true; + return (id_type > H5I_BADID && id_type < H5I_NTYPES); } // Notes about IdComponent::id diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IdComponent.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IdComponent.h index 383d42d333f..2fef96f4137 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IdComponent.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IdComponent.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -82,7 +81,7 @@ class H5_DLLCPP IdComponent { #endif // DOXYGEN_SHOULD_SKIP_THIS // Destructor - virtual ~IdComponent(); + virtual ~IdComponent() = default; #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Include.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Include.h index ee8ca6d33eb..1a97e0a2944 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Include.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Include.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -25,10 +24,3 @@ * magic number as prefix and checksum as suffix for all chunks. */ #define H5O_VERSION_2 2 - -// Define H5_OVERRIDE to override for C++11. -#if defined(__cplusplus) && (201103L <= __cplusplus) -#define H5_OVERRIDE override -#else -#define H5_OVERRIDE -#endif diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IntType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IntType.cpp index 27c449165bb..7c8b7d36ff9 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IntType.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IntType.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -38,7 +37,6 @@ namespace H5 { //-------------------------------------------------------------------------- // Function: IntType default constructor ///\brief Default constructor: Creates a stub integer datatype -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- IntType::IntType() { @@ -47,7 +45,6 @@ IntType::IntType() //-------------------------------------------------------------------------- // Function: IntType copy constructor ///\brief Copy constructor: same HDF5 object as \a original -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- IntType::IntType(const IntType &original) : AtomType(original) { @@ -58,7 +55,6 @@ IntType::IntType(const IntType &original) : AtomType(original) ///\brief Creates a integer type using a predefined type ///\param pred_type - IN: Predefined datatype ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- IntType::IntType(const PredType &pred_type) : AtomType() { @@ -72,7 +68,6 @@ IntType::IntType(const PredType &pred_type) : AtomType() /// datatype. ///\param existing_id - IN: Id of an existing datatype ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- IntType::IntType(const hid_t existing_id) : AtomType(existing_id) { @@ -83,7 +78,6 @@ IntType::IntType(const hid_t existing_id) : AtomType(existing_id) ///\brief Gets the integer datatype of the specified dataset. ///\param dataset - IN: Dataset that this integer datatype associates with ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- IntType::IntType(const DataSet &dataset) : AtomType() { @@ -102,7 +96,6 @@ IntType::IntType(const DataSet &dataset) : AtomType() ///\param loc - IN: Location of the type ///\param dtype_name - IN: Integer type name ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Dec 2016 // Description // In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openIntType(const char*) to @@ -121,7 +114,6 @@ IntType::IntType(const H5Location &loc, const char *dtype_name) : AtomType() ///\param loc - IN: Location of the type ///\param dtype_name - IN: Integer type name ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Dec 2016 // Description // In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openIntType(const H5std_string&) @@ -139,7 +131,6 @@ IntType::IntType(const H5Location &loc, const H5std_string &dtype_name) : AtomTy /// binary object description of this type. /// ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- DataType * IntType::decode() const @@ -161,7 +152,6 @@ IntType::decode() const ///\brief Retrieves the sign type for an integer type. ///\return Valid sign type ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5T_sign_t IntType::getSign() const @@ -181,7 +171,6 @@ IntType::getSign() const ///\brief Sets the sign property for an integer type. ///\param sign - IN: Sign type ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void IntType::setSign(H5T_sign_t sign) const @@ -193,13 +182,4 @@ IntType::setSign(H5T_sign_t sign) const } } -//-------------------------------------------------------------------------- -// Function: IntType destructor -///\brief Noop destructor. -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -IntType::~IntType() -{ -} - } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IntType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IntType.h index f0f30ac132e..1ca0ab147d2 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IntType.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IntType.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -36,17 +35,17 @@ class H5_DLLCPP IntType : public AtomType { // Returns an IntType object via DataType* by decoding the // binary object description of this type. - virtual DataType *decode() const H5_OVERRIDE; + virtual DataType *decode() const override; // Retrieves the sign type for an integer type H5T_sign_t getSign() const; - // Sets the sign proprety for an integer type. + // Sets the sign property for an integer type. void setSign(H5T_sign_t sign) const; ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("IntType"); } @@ -61,7 +60,7 @@ class H5_DLLCPP IntType : public AtomType { IntType(const IntType &original); // Noop destructor. - virtual ~IntType() H5_OVERRIDE; + virtual ~IntType() override = default; }; // end of IntType } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LaccProp.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LaccProp.cpp index feaa555255b..7a66c13d323 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LaccProp.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LaccProp.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -38,7 +37,6 @@ LinkAccPropList *LinkAccPropList::DEFAULT_ = 0; // If LinkAccPropList::DEFAULT_ already points to an allocated // object, throw a PropListIException. This scenario should not // happen. -// Programmer Binh-Minh Ribler - December, 2016 //-------------------------------------------------------------------------- LinkAccPropList * LinkAccPropList::getConstant() @@ -65,13 +63,11 @@ LinkAccPropList::getConstant() // Purpose: Deletes the constant object that LinkAccPropList::DEFAULT_ // points to. // exception H5::PropListIException -// Programmer Binh-Minh Ribler - December, 2016 //-------------------------------------------------------------------------- void LinkAccPropList::deleteConstants() { - if (DEFAULT_ != 0) - delete DEFAULT_; + delete DEFAULT_; } //-------------------------------------------------------------------------- @@ -84,7 +80,6 @@ const LinkAccPropList &LinkAccPropList::DEFAULT = *getConstant(); //-------------------------------------------------------------------------- // Function: Default Constructor ///\brief Creates a file access property list -// Programmer Binh-Minh Ribler - December, 2016 //-------------------------------------------------------------------------- LinkAccPropList::LinkAccPropList() : PropList(H5P_LINK_ACCESS) { @@ -94,7 +89,6 @@ LinkAccPropList::LinkAccPropList() : PropList(H5P_LINK_ACCESS) // Function: LinkAccPropList copy constructor ///\brief Copy Constructor: same HDF5 object as \a original ///\param original - IN: LinkAccPropList instance to copy -// Programmer Binh-Minh Ribler - December, 2016 //-------------------------------------------------------------------------- LinkAccPropList::LinkAccPropList(const LinkAccPropList &original) : PropList(original) { @@ -104,7 +98,6 @@ LinkAccPropList::LinkAccPropList(const LinkAccPropList &original) : PropList(ori // Function: LinkAccPropList overloaded constructor ///\brief Creates a file access property list using the id of an /// existing one. -// Programmer Binh-Minh Ribler - December, 2016 //-------------------------------------------------------------------------- LinkAccPropList::LinkAccPropList(const hid_t plist_id) : PropList(plist_id) { @@ -117,7 +110,6 @@ LinkAccPropList::LinkAccPropList(const hid_t plist_id) : PropList(plist_id) /// traversal. /// ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - March 1, 2017 //-------------------------------------------------------------------------- void LinkAccPropList::setNumLinks(size_t nlinks) const @@ -135,7 +127,6 @@ LinkAccPropList::setNumLinks(size_t nlinks) const /// traversed before a failure occurs. /// ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - March 1, 2017 //-------------------------------------------------------------------------- size_t LinkAccPropList::getNumLinks() const @@ -149,13 +140,4 @@ LinkAccPropList::getNumLinks() const return (nlinks); } -//-------------------------------------------------------------------------- -// Function: LinkAccPropList destructor -///\brief Noop destructor -// Programmer Binh-Minh Ribler - December, 2016 -//-------------------------------------------------------------------------- -LinkAccPropList::~LinkAccPropList() -{ -} - } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LaccProp.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LaccProp.h index 65a96735f1d..6f4b9190f06 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LaccProp.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LaccProp.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -32,7 +31,7 @@ class H5_DLLCPP LinkAccPropList : public PropList { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("LinkAccPropList"); } @@ -52,7 +51,7 @@ class H5_DLLCPP LinkAccPropList : public PropList { size_t getNumLinks() const; // Noop destructor - virtual ~LinkAccPropList() H5_OVERRIDE; + virtual ~LinkAccPropList() override = default; #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LcreatProp.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LcreatProp.cpp index 29721c18090..0dbb0b275c0 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LcreatProp.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LcreatProp.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -70,8 +69,7 @@ LinkCreatPropList::getConstant() void LinkCreatPropList::deleteConstants() { - if (DEFAULT_ != 0) - delete DEFAULT_; + delete DEFAULT_; } //-------------------------------------------------------------------------- @@ -122,7 +120,7 @@ LinkCreatPropList::LinkCreatPropList(const hid_t plist_id) : PropList(plist_id) void LinkCreatPropList::setCreateIntermediateGroup(bool crt_intmd_group) const { - herr_t ret_value = H5Pset_create_intermediate_group(id, (unsigned)crt_intmd_group); + herr_t ret_value = H5Pset_create_intermediate_group(id, static_cast(crt_intmd_group)); // Throw exception if H5Pset_create_intermediate_group returns failure if (ret_value < 0) { throw PropListIException("setCreateIntermediateGroup", "H5Pset_create_intermediate_group failed"); @@ -147,7 +145,7 @@ LinkCreatPropList::getCreateIntermediateGroup() const throw PropListIException("getCreateIntermediateGroup", "H5Pget_create_intermediate_group failed"); } - return ((bool)crt_intmd_group); + return static_cast(crt_intmd_group); } //-------------------------------------------------------------------------- @@ -186,13 +184,4 @@ LinkCreatPropList::getCharEncoding() const return (encoding); } -//-------------------------------------------------------------------------- -// Function: LinkCreatPropList destructor -///\brief Noop destructor -// December, 2016 -//-------------------------------------------------------------------------- -LinkCreatPropList::~LinkCreatPropList() -{ -} - } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LcreatProp.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LcreatProp.h index c0c66a43fcc..272f260b253 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LcreatProp.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LcreatProp.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -32,7 +31,7 @@ class H5_DLLCPP LinkCreatPropList : public PropList { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("LinkCreatPropList"); } @@ -59,7 +58,7 @@ class H5_DLLCPP LinkCreatPropList : public PropList { H5T_cset_t getCharEncoding() const; // Noop destructor - virtual ~LinkCreatPropList() H5_OVERRIDE; + virtual ~LinkCreatPropList() override = default; #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Library.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Library.cpp index 37516be9f43..c16bd819268 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Library.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Library.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -11,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include #include +#include #include "H5CppDoc.h" // included only for Doxygen to generate part of RM #include "H5Include.h" @@ -42,7 +41,6 @@ namespace H5 { ///\brief Initializes the HDF5 library. /// ///\exception H5::LibraryIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void H5Library::open() @@ -58,7 +56,6 @@ H5Library::open() ///\brief Flushes all data to disk, closes files, and cleans up memory. /// ///\exception H5::LibraryIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void H5Library::close() @@ -74,7 +71,6 @@ H5Library::close() ///\brief Instructs library not to install the C \c atexit cleanup routine /// ///\exception H5::LibraryIException -// Programmer Binh-Minh Ribler - 2000 // Modification // Removed the check for failure returned from H5dont_atexit. // will be fixed to not fail (HDFFV-9540) @@ -92,7 +88,6 @@ H5Library::dontAtExit() ///\param minnum - OUT: Minor version of the library ///\param relnum - OUT: Release number of the library ///\exception H5::LibraryIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void H5Library::getLibVersion(unsigned &majnum, unsigned &minnum, unsigned &relnum) @@ -114,7 +109,6 @@ H5Library::getLibVersion(unsigned &majnum, unsigned &minnum, unsigned &relnum) ///\par Description /// For information about library version, please refer to /// the H5check_version API in the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void H5Library::checkVersion(unsigned majnum, unsigned minnum, unsigned relnum) @@ -143,7 +137,6 @@ H5Library::checkVersion(unsigned majnum, unsigned minnum, unsigned relnum) ///\par /// The library automatically garbage collects all the free /// lists when the application ends. -// Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- void H5Library::garbageCollect() @@ -167,7 +160,6 @@ H5Library::garbageCollect() // for global constants ///\exception H5::LibraryIException // -// Programmer Binh-Minh Ribler - September, 2015 //-------------------------------------------------------------------------- void H5Library::initH5cpp() @@ -237,7 +229,6 @@ H5Library::initH5cpp() ///\brief Sends request for the C layer to terminate. ///\par Description /// If the C library fails to terminate, exit with a failure. -// Programmer Binh-Minh Ribler - September, 2015 //-------------------------------------------------------------------------- void H5Library::termH5cpp() @@ -262,7 +253,6 @@ H5Library::termH5cpp() /// Setting a value of -1 for a limit means no limit of that type. /// For more information on free list limits, please refer to /// the H5set_free_list_limits API in the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- void H5Library::setFreeListLimits(int reg_global_lim, int reg_list_lim, int arr_global_lim, int arr_list_lim, @@ -279,20 +269,10 @@ H5Library::setFreeListLimits(int reg_global_lim, int reg_list_lim, int arr_globa //-------------------------------------------------------------------------- // Function: H5Library default constructor - private ///\brief Default constructor: Creates a stub H5Library object -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5Library::H5Library() { } - -//-------------------------------------------------------------------------- -// Function: H5Library destructor -///\brief Noop destructor -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -H5Library::~H5Library() -{ -} #endif // DOXYGEN_SHOULD_SKIP_THIS } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Library.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Library.h index 3df8d56d9b3..10e5536bc14 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Library.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Library.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -63,7 +62,7 @@ class H5_DLLCPP H5Library { H5Library(); // Destructor - ~H5Library(); + ~H5Library() = default; #endif // DOXYGEN_SHOULD_SKIP_THIS }; // end of H5Library diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Location.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Location.cpp index 065de0c09bc..87eac679238 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Location.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Location.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -11,11 +10,10 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include #include +#include using namespace std; -#include "H5private.h" // for HDmemset #include "H5Include.h" #include "H5Exception.h" #include "H5IdComponent.h" @@ -43,7 +41,6 @@ namespace H5 { #ifndef DOXYGEN_SHOULD_SKIP_THIS //-------------------------------------------------------------------------- // Function: H5Location default constructor (protected) -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5Location::H5Location() : IdComponent() { @@ -54,7 +51,6 @@ H5Location::H5Location() : IdComponent() // Purpose Creates an H5Location object using the id of an existing HDF5 // object. // Parameters object_id - IN: Id of an existing HDF5 object -// Programmer Binh-Minh Ribler - 2000 // *** Deprecation warning *** // This constructor is no longer appropriate because the data member "id" had @@ -70,7 +66,6 @@ H5Location::H5Location() : IdComponent() // Purpose This noop copy constructor is removed as a result of the data // member "id" being moved down to sub-classes. (Mar 2015) ///\param original - IN: H5Location instance to copy -// Programmer Binh-Minh Ribler - 2000 // // *** Deprecation warning *** // This constructor is no longer appropriate because the data member "id" had @@ -126,7 +121,6 @@ H5Location::nameExists(const H5std_string &name, const LinkAccPropList &lapl) co ///\param name - IN: Searched name ///\param lapl - IN: Link access property list ///\exception H5::LocationException -// Programmer Binh-Minh Ribler - Nov, 2016 // Modification // Renamed to nameExists() in 1.10.2 -BMR //-------------------------------------------------------------------------- @@ -143,7 +137,6 @@ H5Location::exists(const char *name, const LinkAccPropList &lapl) const ///\param name - IN: Searched name ///\param lapl - IN: Link access property list ///\exception H5::LocationException -// Programmer Binh-Minh Ribler - Dec, 2016 // Modification // Renamed to nameExists() in 1.10.2 -BMR //-------------------------------------------------------------------------- @@ -163,7 +156,6 @@ H5Location::exists(const H5std_string &name, const LinkAccPropList &lapl) const ///\exception H5::LocationException ///\par Description /// This location is used to identify the file to be flushed. -// Programmer Binh-Minh Ribler - 2012 // Modification // Sep 2012 - BMR // Moved from H5File/H5Object @@ -183,7 +175,6 @@ H5Location::flush(H5F_scope_t scope) const /// location belongs. ///\return File name ///\exception H5::LocationException -// Programmer Binh-Minh Ribler - Jul, 2004 //-------------------------------------------------------------------------- H5std_string H5Location::getFileName() const @@ -209,7 +200,6 @@ H5Location::getFileName() const /// strings. They can be attached to any object that has an /// object header, e.g., data sets, groups, named data types, /// and data spaces, but not symbolic links. -// Programmer Binh-Minh Ribler - 2000 (moved from CommonFG, Sep 2013) // Modification // 2007: QAK modified to use H5O APIs; however the first parameter is // no longer just file or group, this function should be moved @@ -229,7 +219,6 @@ H5Location::setComment(const char *name, const char *comment) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name and \a comment. -// Programmer Binh-Minh Ribler - 2000 (moved from CommonFG, Sep 2013) //-------------------------------------------------------------------------- void H5Location::setComment(const H5std_string &name, const H5std_string &comment) const @@ -242,7 +231,6 @@ H5Location::setComment(const H5std_string &name, const H5std_string &comment) co ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it doesn't take /// an object name. -// Programmer Binh-Minh Ribler - Sep 2013 //-------------------------------------------------------------------------- void H5Location::setComment(const char *comment) const @@ -257,7 +245,6 @@ H5Location::setComment(const char *comment) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a comment. -// Programmer Binh-Minh Ribler - Sep 2013 //-------------------------------------------------------------------------- void H5Location::setComment(const H5std_string &comment) const @@ -270,7 +257,6 @@ H5Location::setComment(const H5std_string &comment) const ///\brief Removes the comment from an object specified by its name. ///\param name - IN: Name of the object ///\exception H5::LocationException -// Programmer Binh-Minh Ribler - May 2005 (moved from CommonFG, Sep 2013) // 2007: QAK modified to use H5O APIs; however the first parameter is // no longer just file or group, this function should be moved // to another class to accommodate attribute, dataset, and named @@ -289,7 +275,6 @@ H5Location::removeComment(const char *name) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - May 2005 (moved from CommonFG, Sep 2013) //-------------------------------------------------------------------------- void H5Location::removeComment(const H5std_string &name) const @@ -310,7 +295,6 @@ H5Location::removeComment(const H5std_string &name) const /// including the null terminator. Thus, if the actual length /// of the comment is more than buf_size-1, the retrieved comment /// will be truncated to accommodate the null terminator. -// Programmer Binh-Minh Ribler - Mar 2014 //-------------------------------------------------------------------------- ssize_t H5Location::getComment(const char *name, size_t buf_size, char *comment) const @@ -341,7 +325,6 @@ H5Location::getComment(const char *name, size_t buf_size, char *comment) const ///\param buf_size - IN: Length of the comment to retrieve, default to 0 ///\return Comment string ///\exception H5::LocationException -// Programmer Binh-Minh Ribler - 2000 (moved from CommonFG, Sep 2013) //-------------------------------------------------------------------------- H5std_string H5Location::getComment(const char *name, size_t buf_size) const @@ -351,7 +334,7 @@ H5Location::getComment(const char *name, size_t buf_size) const H5std_string comment; // Preliminary call to get the comment's length - ssize_t comment_len = H5Oget_comment_by_name(getId(), name, NULL, (size_t)0, H5P_DEFAULT); + ssize_t comment_len = H5Oget_comment_by_name(getId(), name, NULL, 0, H5P_DEFAULT); // If H5Oget_comment_by_name returns a negative value, raise an exception if (comment_len < 0) { @@ -364,11 +347,10 @@ H5Location::getComment(const char *name, size_t buf_size) const // If buffer size is not provided, use comment length if (tmp_len == 0) - tmp_len = comment_len; + tmp_len = static_cast(comment_len); // Temporary buffer for char* comment - char *comment_C = new char[tmp_len + 1]; - HDmemset(comment_C, 0, tmp_len + 1); // clear buffer + char *comment_C = new char[tmp_len + 1](); // Used overloaded function ssize_t temp_len = getComment(name, tmp_len + 1, comment_C); @@ -393,7 +375,6 @@ H5Location::getComment(const char *name, size_t buf_size) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 (moved from CommonFG, Sep 2013) //-------------------------------------------------------------------------- H5std_string H5Location::getComment(const H5std_string &name, size_t buf_size) const @@ -411,7 +392,6 @@ H5Location::getComment(const H5std_string &name, size_t buf_size) const // dataspace - IN: Dataspace with selection // ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION // Exception H5::ReferenceException -// Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- void H5Location::p_reference(void *ref, const char *name, hid_t space_id, H5R_type_t ref_type) const @@ -436,7 +416,6 @@ H5Location::p_reference(void *ref, const char *name, hid_t space_id, H5R_type_t /// reference. (default) ///\exception H5::ReferenceException ///\note This method is more suitable for a dataset region reference. -// Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- void H5Location::reference(void *ref, const char *name, const DataSpace &dataspace, H5R_type_t ref_type) const @@ -463,7 +442,6 @@ H5Location::reference(void *ref, const char *name, const DataSpace &dataspace, H /// reference. (default) ///\exception H5::ReferenceException ///\note This method is more suitable for a dataset region reference. -// Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- void H5Location::reference(void *ref, const H5std_string &name, const DataSpace &dataspace, @@ -489,7 +467,6 @@ H5Location::reference(void *ref, const H5std_string &name, const DataSpace &data /// \li \c H5R_DATASET_REGION - Reference is a dataset region ///\exception H5::ReferenceException ///\note This method is more suitable for an object reference. -// Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- void H5Location::reference(void *ref, const char *name, H5R_type_t ref_type) const @@ -513,7 +490,6 @@ H5Location::reference(void *ref, const char *name, H5R_type_t ref_type) const /// \li \c H5R_OBJECT - Reference is an object reference (default) /// \li \c H5R_DATASET_REGION - Reference is a dataset region ///\note This method is more suitable for an object reference. -// Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- void H5Location::reference(void *ref, const H5std_string &name, H5R_type_t ref_type) const @@ -533,7 +509,6 @@ H5Location::reference(void *ref, const H5std_string &name, H5R_type_t ref_type) // plist - IN: Property list - default to PropList::DEFAULT // from_func - IN: Name of the calling function // Exception H5::ReferenceException -// Programmer Binh-Minh Ribler - Oct, 2006 //-------------------------------------------------------------------------- hid_t H5Location::p_dereference(hid_t loc_id, const void *ref, H5R_type_t ref_type, const PropList &plist, @@ -562,7 +537,6 @@ H5Location::p_dereference(hid_t loc_id, const void *ref, H5R_type_t ref_type, co ///\param ref_type - IN: Reference type ///\param plist - IN: Property list - default to PropList::DEFAULT ///\exception H5::ReferenceException -// Programmer Binh-Minh Ribler - Oct, 2006 //-------------------------------------------------------------------------- void H5Location::dereference(const H5Location &loc, const void *ref, H5R_type_t ref_type, const PropList &plist) @@ -578,7 +552,6 @@ H5Location::dereference(const H5Location &loc, const void *ref, H5R_type_t ref_t // param ref_type - IN: Reference type // param plist - IN: Property list - default to PropList::DEFAULT // exception H5::ReferenceException -// Programmer Binh-Minh Ribler - Oct, 2006 // Modification // Mar, 2017 // Removed in 1.10.1 because H5Location is Attribute's baseclass @@ -607,7 +580,6 @@ plist) /// \li \c H5G_LINK - Object is a symbolic link. /// \li \c H5G_UDLINK - Object is a user-defined link. ///\exception H5::ReferenceException -// Programmer Binh-Minh Ribler - May, 2004 // Modification // Sep 2012: Moved up from H5File, Group, DataSet, and DataType //-------------------------------------------------------------------------- @@ -637,7 +609,6 @@ H5Location::getObjType(void *ref, H5R_type_t ref_type) const // H5G_LINK \tObject is a symbolic link. // H5G_UDLINK \tObject is a user-defined link. // Exception H5::ReferenceException -// Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- H5G_obj_t H5Location::p_get_obj_type(void *ref, H5R_type_t ref_type) const @@ -666,7 +637,6 @@ H5Location::p_get_obj_type(void *ref, H5R_type_t ref_type) const /// \li \c H5O_TYPE_NAMED_DATATYPE - Object is a named datatype /// \li \c H5O_TYPE_NTYPES - Number of different object types ///\exception H5::ReferenceException -// Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- H5O_type_t H5Location::getRefObjType(void *ref, H5R_type_t ref_type) const @@ -693,7 +663,6 @@ H5Location::getRefObjType(void *ref, H5R_type_t ref_type) const // H5O_TYPE_NAMED_DATATYPE - Object is a named datatype // H5O_TYPE_NTYPES - Number of object types // Exception H5::ReferenceException -// Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- H5O_type_t H5Location::p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const @@ -718,7 +687,6 @@ H5Location::p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const // to H5R_DATASET_REGION ///\return DataSpace object ///\exception H5::ReferenceException -// Programmer Binh-Minh Ribler - May, 2004 // Modification // Mar 29, 2015 // Used friend function to set id for DataSpace instead of the @@ -788,7 +756,6 @@ H5Location::getRegion(void *ref, H5R_type_t ref_type) const /// reserve for storing the names that will appear in this new /// group. If a non-positive value is provided for the \a size_hint /// then a default size is chosen. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- Group H5Location::createGroup(const char *name, const LinkCreatPropList &lcpl) const @@ -813,7 +780,6 @@ H5Location::createGroup(const char *name, const LinkCreatPropList &lcpl) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- Group H5Location::createGroup(const H5std_string &name, const LinkCreatPropList &lcpl) const @@ -835,7 +801,6 @@ H5Location::createGroup(const H5std_string &name, const LinkCreatPropList &lcpl) /// reserve for storing the names that will appear in this new /// group. If a non-positive value is provided for the \a size_hint /// then a default size is chosen. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- Group H5Location::createGroup(const char *name, size_t size_hint) const @@ -879,7 +844,6 @@ H5Location::createGroup(const char *name, size_t size_hint) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- Group H5Location::createGroup(const H5std_string &name, size_t size_hint) const @@ -894,7 +858,6 @@ H5Location::createGroup(const H5std_string &name, size_t size_hint) const ///\param name - IN: Name of the group to open ///\return Group instance ///\exception H5::FileIException/H5::GroupIException/H5::LocationException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- Group H5Location::openGroup(const char *name) const @@ -920,7 +883,6 @@ H5Location::openGroup(const char *name) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- Group H5Location::openGroup(const H5std_string &name) const @@ -1187,7 +1149,6 @@ H5Location::link(const H5std_string &curr_name, const hid_t same_loc, const H5st /// For information on creating hard link and soft link, please /// refer to the H5Lcreate_hard and H5Lcreate_soft APIs in the /// HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 // Modification // 2007: QAK modified to use H5L APIs - BMR // Mar 2018: Inadequate functionality, new hard link is only in @@ -1225,7 +1186,6 @@ H5Location::link(H5L_type_t link_type, const char *curr_name, const char *new_na ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a curr_name and \a new_name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void H5Location::link(H5L_type_t link_type, const H5std_string &curr_name, const H5std_string &new_name) const @@ -1735,7 +1695,6 @@ H5Location::getObjinfo(const char *name, hbool_t follow_link, H5G_stat_t &statbu ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void H5Location::getObjinfo(const H5std_string &name, hbool_t follow_link, H5G_stat_t &statbuf) const @@ -1747,7 +1706,7 @@ H5Location::getObjinfo(const H5std_string &name, hbool_t follow_link, H5G_stat_t // Function: H5Location::getObjinfo ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above functions in that it doesn't have -/// the paramemter \a follow_link. +/// the parameter \a follow_link. // Nov, 2005 //-------------------------------------------------------------------------- void @@ -1763,7 +1722,6 @@ H5Location::getObjinfo(const char *name, H5G_stat_t &statbuf) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - Nov, 2005 //-------------------------------------------------------------------------- void H5Location::getObjinfo(const H5std_string &name, H5G_stat_t &statbuf) const @@ -1819,7 +1777,7 @@ H5std_string H5Location::getLinkval(const char *name, size_t size) const { H5L_info2_t linkinfo; - char * value_C; // value in C string + char *value_C; // value in C string size_t val_size = size; H5std_string value; herr_t ret_value; @@ -1835,8 +1793,8 @@ H5Location::getLinkval(const char *name, size_t size) const // if link has value, retrieve the value, otherwise, return null string if (val_size > 0) { - value_C = new char[val_size + 1]; // temporary C-string for C API - HDmemset(value_C, 0, val_size + 1); // clear buffer + // Create buffer for C string + value_C = new char[val_size + 1](); ret_value = H5Lget_val(getId(), name, value_C, val_size, H5P_DEFAULT); if (ret_value < 0) { @@ -1855,7 +1813,6 @@ H5Location::getLinkval(const char *name, size_t size) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5std_string H5Location::getLinkval(const H5std_string &name, size_t size) const @@ -1870,7 +1827,6 @@ H5Location::getLinkval(const H5std_string &name, size_t size) const ///\param child - IN: File to mount ///\param plist - IN: Property list to use ///\exception H5::FileIException or H5::GroupIException -// Programmer Binh-Minh Ribler - 2014 (original 2000) //-------------------------------------------------------------------------- void H5Location::mount(const char *name, const H5File &child, const PropList &plist) const @@ -1896,7 +1852,6 @@ H5Location::mount(const char *name, const H5File &child, const PropList &plist) // Param child - IN: File to mount // Param plist - IN: Property list to use // Exception H5::FileIException or H5::GroupIException -// Programmer Binh-Minh Ribler - 2000 // Modification // Modified to call its replacement. -BMR, 2014/04/16 // Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0 @@ -1911,7 +1866,6 @@ H5Location::mount(const char *name, const H5File &child, const PropList &plist) // Function: H5Location::mount ///\brief This is an overloaded member function, provided for convenience. /// It takes an \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void H5Location::mount(const H5std_string &name, const H5File &child, const PropList &plist) const @@ -1924,7 +1878,6 @@ H5Location::mount(const H5std_string &name, const H5File &child, const PropList // Purpose This is an overloaded member function, kept for backward // compatibility. It differs from the above function in that it // misses const's. This wrapper will be removed in future release. -// Programmer Binh-Minh Ribler - 2014 // Modification // Modified to call its replacement. -BMR, 2014/04/16 // Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0 @@ -1940,7 +1893,6 @@ H5Location::mount(const H5std_string &name, const H5File &child, const PropList ///\brief Unmounts the specified file. ///\param name - IN: Name of the file to unmount ///\exception H5::FileIException/H5::GroupIException/H5::LocationException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void H5Location::unmount(const char *name) const @@ -1958,7 +1910,6 @@ H5Location::unmount(const char *name) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void H5Location::unmount(const H5std_string &name) const @@ -1978,7 +1929,6 @@ H5Location::unmount(const H5std_string &name) const /// or zero if all members were processed with no operator /// returning non-zero. ///\exception H5::FileIException/H5::GroupIException/H5::LocationException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- int H5Location::iterateElems(const char *name, int *idx, H5G_iterate_t op, void *op_data) @@ -1995,7 +1945,6 @@ H5Location::iterateElems(const char *name, int *idx, H5G_iterate_t op, void *op_ ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- int H5Location::iterateElems(const H5std_string &name, int *idx, H5G_iterate_t op, void *op_data) @@ -2009,7 +1958,6 @@ H5Location::iterateElems(const H5std_string &name, int *idx, H5G_iterate_t op, v ///\brief Deprecated - moved to H5::Group in 1.10.2. ///\return Deprecated ///\exception Deprecated -// Programmer Binh-Minh Ribler - January, 2003 //-------------------------------------------------------------------------- hsize_t H5Location::getNumObjs() const @@ -2035,7 +1983,6 @@ H5Location::getNumObjs() const /// the function \c H5Location::getNumObjs. Note that this is a /// transient index; thus, an object may have a different index /// each time the group is opened. -// Programmer Binh-Minh Ribler - Mar, 2005 //-------------------------------------------------------------------------- H5std_string H5Location::getObjnameByIdx(hsize_t idx) const @@ -2046,12 +1993,15 @@ H5Location::getObjnameByIdx(hsize_t idx) const if (name_len < 0) throwException("getObjnameByIdx", "H5Lget_name_by_idx failed"); - // now, allocate C buffer to get the name - char *name_C = new char[name_len + 1]; - HDmemset(name_C, 0, name_len + 1); // clear buffer + // The actual size is the cast value + 1 for the terminal ASCII NUL + // (unfortunate in/out type sign mismatch) + size_t actual_name_len = static_cast(name_len) + 1; - name_len = - H5Lget_name_by_idx(getId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, name_C, name_len + 1, H5P_DEFAULT); + // Create buffer for C string + char *name_C = new char[actual_name_len](); + + name_len = H5Lget_name_by_idx(getId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, name_C, actual_name_len, + H5P_DEFAULT); if (name_len < 0) { delete[] name_C; @@ -2079,7 +2029,6 @@ H5Location::getObjnameByIdx(hsize_t idx) const /// the function \c H5Location::getNumObjs. Note that this is a /// transient index; thus, an object may have a different index /// each time the group is opened. -// Programmer Binh-Minh Ribler - January, 2003 //-------------------------------------------------------------------------- ssize_t H5Location::getObjnameByIdx(hsize_t idx, char *name, size_t size) const @@ -2097,13 +2046,12 @@ H5Location::getObjnameByIdx(hsize_t idx, char *name, size_t size) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - January, 2003 //-------------------------------------------------------------------------- ssize_t H5Location::getObjnameByIdx(hsize_t idx, H5std_string &name, size_t size) const { - char *name_C = new char[size + 1]; // temporary C-string for object name - HDmemset(name_C, 0, size + 1); // clear buffer + // Create buffer for C string + char *name_C = new char[size + 1](); // call overloaded function to get the name ssize_t name_len = getObjnameByIdx(idx, name_C, size + 1); @@ -2134,7 +2082,6 @@ H5Location::getObjnameByIdx(hsize_t idx, H5std_string &name, size_t size) const /// Exception will be thrown when: /// - an error returned by the C API /// - object type is not one of the valid values above -// Programmer Binh-Minh Ribler - April, 2014 //-------------------------------------------------------------------------- H5O_type_t H5Location::childObjType(const char *objname) const @@ -2173,7 +2120,6 @@ H5Location::childObjType(const char *objname) const /// object's name. ///\param objname - IN: Name of the object (H5std_string&) ///\exception H5::FileIException/H5::GroupIException/H5::LocationException -// Programmer Binh-Minh Ribler - April, 2014 //-------------------------------------------------------------------------- H5O_type_t H5Location::childObjType(const H5std_string &objname) const @@ -2210,7 +2156,6 @@ H5Location::childObjType(const H5std_string &objname) const // fully specified // - Leave property list out for now because C API is not using it, it // can be added later when needed. -// Programmer Binh-Minh Ribler - April, 2014 //-------------------------------------------------------------------------- H5O_type_t H5Location::childObjType(hsize_t index, H5_index_t index_type, H5_iter_order_t order, @@ -2256,7 +2201,6 @@ H5Location::childObjType(hsize_t index, H5_index_t index_type, H5_iter_order_t o /// Exception will be thrown when: /// - an error returned by the C API /// - version number is not one of the valid values above -// Programmer Binh-Minh Ribler - April, 2014 //-------------------------------------------------------------------------- unsigned H5Location::childObjVersion(const char *objname) const @@ -2288,7 +2232,6 @@ H5Location::childObjVersion(const char *objname) const /// object's name. ///\param objname - IN: Name of the object (H5std_string&) ///\exception H5::FileIException/H5::GroupIException/H5::LocationException -// Programmer Binh-Minh Ribler - April, 2014 //-------------------------------------------------------------------------- unsigned H5Location::childObjVersion(const H5std_string &objname) const @@ -2306,7 +2249,6 @@ H5Location::childObjVersion(const H5std_string &objname) const ///\param idx - IN: Transient index of the object ///\return Object type ///\exception H5::FileIException/H5::GroupIException/H5::LocationException -// Programmer Binh-Minh Ribler - January, 2003 //-------------------------------------------------------------------------- H5G_obj_t H5Location::getObjTypeByIdx(hsize_t idx) const @@ -2327,7 +2269,6 @@ H5Location::getObjTypeByIdx(hsize_t idx) const ///\param type_name - OUT: Object type in text ///\return Object type ///\exception H5::FileIException/H5::GroupIException/H5::LocationException -// Programmer Binh-Minh Ribler - May, 2010 // Modification // Modified to use the other function. -BMR, 2016/03/07 //-------------------------------------------------------------------------- @@ -2346,7 +2287,6 @@ H5Location::getObjTypeByIdx(hsize_t idx, char *type_name) const ///\param type_name - OUT: Object type in text ///\return Object type ///\exception H5::FileIException/H5::GroupIException/H5::LocationException -// Programmer Binh-Minh Ribler - January, 2003 //-------------------------------------------------------------------------- H5G_obj_t H5Location::getObjTypeByIdx(hsize_t idx, H5std_string &type_name) const @@ -2384,7 +2324,6 @@ H5Location::getObjTypeByIdx(hsize_t idx, H5std_string &type_name) const ///\param func_name - Name of the function where failure occurs ///\param msg - Message describing the failure ///\exception H5::GroupIException -// Programmer Binh-Minh Ribler - 2000 // Modification // August 2017 - BMR // Keep H5Location::throwException and H5File::throwException to @@ -2421,7 +2360,6 @@ H5Location::throwException(const H5std_string &func_name, const H5std_string &ms // Applications shouldn't need to use it. // param dspace - IN/OUT: DataSpace object to be changed // param new_id - IN: New id to set -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- void f_DataSpace_setId(DataSpace *dspace, hid_t new_id) @@ -2429,13 +2367,4 @@ f_DataSpace_setId(DataSpace *dspace, hid_t new_id) dspace->p_setId(new_id); } -//-------------------------------------------------------------------------- -// Function: H5Location destructor -///\brief Noop destructor. -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -H5Location::~H5Location() -{ -} - } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Location.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Location.h index 2a5015939d6..f10a00531f0 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Location.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Location.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -15,7 +14,7 @@ #ifndef H5Location_H #define H5Location_H -#include "H5Classes.h" // constains forward class declarations +#include "H5Classes.h" // contains forward class declarations namespace H5 { @@ -108,11 +107,11 @@ class H5_DLLCPP H5Location : public IdComponent { // Creates a new dataset in this location. DataSet createDataSet(const char *name, const DataType &data_type, const DataSpace &data_space, const DSetCreatPropList &create_plist = DSetCreatPropList::DEFAULT, - const DSetAccPropList & dapl = DSetAccPropList::DEFAULT, + const DSetAccPropList &dapl = DSetAccPropList::DEFAULT, const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT) const; DataSet createDataSet(const H5std_string &name, const DataType &data_type, const DataSpace &data_space, const DSetCreatPropList &create_plist = DSetCreatPropList::DEFAULT, - const DSetAccPropList & dapl = DSetAccPropList::DEFAULT, + const DSetAccPropList &dapl = DSetAccPropList::DEFAULT, const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT) const; // Deprecated to add LinkCreatPropList and DSetAccPropList - 1.10.3 @@ -124,12 +123,12 @@ class H5_DLLCPP H5Location : public IdComponent { // Opens an existing dataset at this location. // DSetAccPropList is added - 1.10.3 DataSet openDataSet(const char *name, const DSetAccPropList &dapl = DSetAccPropList::DEFAULT) const; - DataSet openDataSet(const H5std_string & name, + DataSet openDataSet(const H5std_string &name, const DSetAccPropList &dapl = DSetAccPropList::DEFAULT) const; - H5L_info2_t getLinkInfo(const char * link_name, + H5L_info2_t getLinkInfo(const char *link_name, const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const; - H5L_info2_t getLinkInfo(const H5std_string & link_name, + H5L_info2_t getLinkInfo(const H5std_string &link_name, const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const; // Returns the value of a symbolic link. @@ -216,26 +215,26 @@ class H5_DLLCPP H5Location : public IdComponent { // Creates a soft link from link_name to target_name. void link(const char *target_name, const char *link_name, const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT, - const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const; + const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const; void link(const H5std_string &target_name, const H5std_string &link_name, const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT, - const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const; + const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const; // Creates a hard link from new_name to curr_name. void link(const char *curr_name, const Group &new_loc, const char *new_name, const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT, - const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const; + const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const; void link(const H5std_string &curr_name, const Group &new_loc, const H5std_string &new_name, const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT, - const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const; + const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const; // Creates a hard link from new_name to curr_name in same location. void link(const char *curr_name, const hid_t same_loc, const char *new_name, const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT, - const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const; + const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const; void link(const H5std_string &curr_name, const hid_t same_loc, const H5std_string &new_name, const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT, - const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const; + const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const; // Creates a link of the specified type from new_name to current_name; // both names are interpreted relative to the specified location id. @@ -258,34 +257,34 @@ class H5_DLLCPP H5Location : public IdComponent { // Copies a link from a group to another. void copyLink(const char *src_name, const Group &dst, const char *dst_name, const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT, - const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const; + const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const; void copyLink(const H5std_string &src_name, const Group &dst, const H5std_string &dst_name, const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT, - const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const; + const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const; // Makes a copy of a link in the same group. void copyLink(const char *src_name, const char *dst_name, const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT, - const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const; + const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const; void copyLink(const H5std_string &src_name, const H5std_string &dst_name, const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT, - const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const; + const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const; // Renames a link in this group and moves to a new location. void moveLink(const char *src_name, const Group &dst, const char *dst_name, const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT, - const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const; + const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const; void moveLink(const H5std_string &src_name, const Group &dst, const H5std_string &dst_name, const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT, - const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const; + const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const; // Renames a link in this group. void moveLink(const char *src_name, const char *dst_name, const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT, - const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const; + const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const; void moveLink(const H5std_string &src_name, const H5std_string &dst_name, const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT, - const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const; + const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const; // Renames an object at this location. // Deprecated due to inadequate functionality. @@ -334,7 +333,7 @@ class H5_DLLCPP H5Location : public IdComponent { #endif // DOXYGEN_SHOULD_SKIP_THIS // Noop destructor. - virtual ~H5Location() H5_OVERRIDE; + virtual ~H5Location() override = default; }; // end of H5Location } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Object.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Object.cpp index 71109d3db1f..54114378e85 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Object.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Object.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -13,7 +12,6 @@ #include -#include "H5private.h" // for HDmemset #include "H5Include.h" #include "H5Exception.h" #include "H5IdComponent.h" @@ -45,9 +43,12 @@ namespace H5 { extern "C" { static herr_t -userAttrOpWrpr(H5_ATTR_UNUSED hid_t loc_id, const char *attr_name, H5_ATTR_UNUSED const H5A_info_t *ainfo, - void *op_data) +userAttrOpWrpr(hid_t loc_id, const char *attr_name, const H5A_info_t *ainfo, void *op_data) { + // Unused + (void)loc_id; + (void)ainfo; + H5std_string s_attr_name = H5std_string(attr_name); UserData4Aiterate *myData = reinterpret_cast(op_data); myData->op(*myData->location, s_attr_name, myData->opData); @@ -57,9 +58,11 @@ userAttrOpWrpr(H5_ATTR_UNUSED hid_t loc_id, const char *attr_name, H5_ATTR_UNUSE // userVisitOpWrpr interfaces between the user's function and the // C library function H5Ovisit3 static herr_t -userVisitOpWrpr(H5_ATTR_UNUSED hid_t obj_id, const char *attr_name, const H5O_info2_t *obj_info, - void *op_data) +userVisitOpWrpr(hid_t obj_id, const char *attr_name, const H5O_info2_t *obj_info, void *op_data) { + // Unused + (void)obj_id; + H5std_string s_attr_name = H5std_string(attr_name); UserData4Visit *myData = reinterpret_cast(op_data); int status = myData->op(*myData->obj, s_attr_name, obj_info, myData->opData); @@ -70,7 +73,6 @@ userVisitOpWrpr(H5_ATTR_UNUSED hid_t obj_id, const char *attr_name, const H5O_in //-------------------------------------------------------------------------- // Function: H5Object default constructor (protected) -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5Object::H5Object() : H5Location() { @@ -84,7 +86,6 @@ H5Object::H5Object() : H5Location() // Applications shouldn't need to use it. // param attr - IN/OUT: Attribute object to be changed // param new_id - IN: New id to set -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- void f_Attribute_setId(Attribute *attr, hid_t new_id) @@ -112,7 +113,6 @@ f_Attribute_setId(Attribute *attr, hid_t new_id) /// attribute with a new attribute of the same name, first /// delete the existing one with \c H5Object::removeAttr, then /// recreate it with this function. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- Attribute H5Object::createAttribute(const char *name, const DataType &data_type, const DataSpace &data_space, @@ -138,7 +138,6 @@ H5Object::createAttribute(const char *name, const DataType &data_type, const Dat ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes /// a reference to an \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- Attribute H5Object::createAttribute(const H5std_string &name, const DataType &data_type, const DataSpace &data_space, @@ -153,7 +152,6 @@ H5Object::createAttribute(const H5std_string &name, const DataType &data_type, c ///\param name - IN: Name of the attribute ///\return Attribute instance ///\exception H5::AttributeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- Attribute H5Object::openAttribute(const char *name) const @@ -174,7 +172,6 @@ H5Object::openAttribute(const char *name) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes /// a reference to an \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- Attribute H5Object::openAttribute(const H5std_string &name) const @@ -188,7 +185,6 @@ H5Object::openAttribute(const H5std_string &name) const ///\param idx - IN: Index of the attribute, a 0-based, non-negative integer ///\return Attribute instance ///\exception H5::AttributeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- Attribute H5Object::openAttribute(const unsigned int idx) const @@ -218,7 +214,6 @@ H5Object::openAttribute(const unsigned int idx) const ///\par Description /// The signature of user_op is /// void (*)(H5::H5Location&, H5std_string, void*). -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- int H5Object::iterateAttrs(attr_operator_t user_op, unsigned *_idx, void *op_data) @@ -278,7 +273,6 @@ H5Object::iterateAttrs(attr_operator_t user_op, unsigned *_idx, void *op_data) ///\par Description /// For information, please refer to the H5Ovisit3 API in the HDF5 /// C Reference Manual. -// Programmer Binh-Minh Ribler - Feb, 2019 //-------------------------------------------------------------------------- void H5Object::visit(H5_index_t idx_type, H5_iter_order_t order, visit_operator_t user_op, void *op_data, @@ -313,7 +307,6 @@ H5Object::visit(H5_index_t idx_type, H5_iter_order_t order, visit_operator_t use /// Exception will be thrown when: /// - an error returned by the C API /// - version number is not one of the valid values above -// Programmer Binh-Minh Ribler - December, 2016 //-------------------------------------------------------------------------- unsigned H5Object::objVersion() const @@ -341,7 +334,6 @@ H5Object::objVersion() const ///\brief Returns the number of attributes attached to this HDF5 object. ///\return Number of attributes ///\exception H5::AttributeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- int H5Object::getNumAttrs() const @@ -359,7 +351,6 @@ H5Object::getNumAttrs() const ///\brief Checks whether the named attribute exists at this location. ///\param name - IN: Name of the attribute to be queried ///\exception H5::AttributeIException -// Programmer Binh-Minh Ribler - 2013 //-------------------------------------------------------------------------- bool H5Object::attrExists(const char *name) const @@ -381,7 +372,6 @@ H5Object::attrExists(const char *name) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes /// a reference to an \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- bool H5Object::attrExists(const H5std_string &name) const @@ -394,7 +384,6 @@ H5Object::attrExists(const H5std_string &name) const ///\brief Removes the named attribute from this object. ///\param name - IN: Name of the attribute to be removed ///\exception H5::AttributeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void H5Object::removeAttr(const char *name) const @@ -409,7 +398,6 @@ H5Object::removeAttr(const char *name) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes /// a reference to an \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void H5Object::removeAttr(const H5std_string &name) const @@ -423,7 +411,6 @@ H5Object::removeAttr(const H5std_string &name) const ///\param oldname - IN: Name of the attribute to be renamed ///\param newname - IN: New name ame of the attribute ///\exception H5::AttributeIException -// Programmer Binh-Minh Ribler - Mar, 2005 //-------------------------------------------------------------------------- void H5Object::renameAttr(const char *oldname, const char *newname) const @@ -438,7 +425,6 @@ H5Object::renameAttr(const char *oldname, const char *newname) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes /// a reference to an \c H5std_string for the names. -// Programmer Binh-Minh Ribler - Mar, 2005 //-------------------------------------------------------------------------- void H5Object::renameAttr(const H5std_string &oldname, const H5std_string &newname) const @@ -450,7 +436,6 @@ H5Object::renameAttr(const H5std_string &oldname, const H5std_string &newname) c // Function: getObjName ///\brief Given an id, returns the type of the object. ///\return The name of the object -// Programmer Binh-Minh Ribler - Mar, 2014 //-------------------------------------------------------------------------- ssize_t H5Object::getObjName(char *obj_name, size_t buf_size) const @@ -474,7 +459,6 @@ H5Object::getObjName(char *obj_name, size_t buf_size) const ///\brief Returns the name of this object as an \a H5std_string. ///\return Name of the object ///\exception H5::Exception -// Programmer Binh-Minh Ribler - Mar, 2014 //-------------------------------------------------------------------------- H5std_string H5Object::getObjName() const @@ -482,7 +466,7 @@ H5Object::getObjName() const H5std_string obj_name; // object name to return // Preliminary call to get the size of the object name - ssize_t name_size = H5Iget_name(getId(), NULL, static_cast(0)); + ssize_t name_size = H5Iget_name(getId(), NULL, 0); // If H5Iget_name failed, throw exception if (name_size < 0) { @@ -493,11 +477,16 @@ H5Object::getObjName() const } // Object's name exists, retrieve it else if (name_size > 0) { - char *name_C = new char[name_size + 1]; // temporary C-string - HDmemset(name_C, 0, name_size + 1); // clear buffer + + // The actual size is the cast value + 1 for the terminal ASCII NUL + // (unfortunate in/out type sign mismatch) + size_t actual_name_size = static_cast(name_size) + 1; + + // Create buffer for C string + char *name_C = new char[actual_name_size](); // Use overloaded function - name_size = getObjName(name_C, name_size + 1); + name_size = getObjName(name_C, actual_name_size); // Convert the C object name to return obj_name = name_C; @@ -505,8 +494,9 @@ H5Object::getObjName() const // Clean up resource delete[] name_C; } + // Return object's name - return (obj_name); + return obj_name; } //-------------------------------------------------------------------------- @@ -520,7 +510,6 @@ H5Object::getObjName() const /// This function retrieves the object's name as an std string. /// buf_size can specify a specific length or default to 0, in /// which case the entire name will be retrieved. -// Programmer Binh-Minh Ribler - Mar, 2014 //-------------------------------------------------------------------------- ssize_t H5Object::getObjName(H5std_string &obj_name, size_t len) const @@ -530,12 +519,12 @@ H5Object::getObjName(H5std_string &obj_name, size_t len) const // If no length is provided, get the entire object name if (len == 0) { obj_name = getObjName(); - name_size = obj_name.length(); + name_size = static_cast(obj_name.length()); } // If length is provided, get that number of characters in name else { - char *name_C = new char[len + 1]; // temporary C-string - HDmemset(name_C, 0, len + 1); // clear buffer + // Create buffer for C string + char *name_C = new char[len + 1](); // Use overloaded function name_size = getObjName(name_C, len + 1); @@ -549,18 +538,7 @@ H5Object::getObjName(H5std_string &obj_name, size_t len) const // Otherwise, keep obj_name intact // Return name size - return (name_size); -} - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -//-------------------------------------------------------------------------- -// Function: H5Object destructor -///\brief Noop destructor. -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -H5Object::~H5Object() -{ + return name_size; } -#endif // DOXYGEN_SHOULD_SKIP_THIS } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Object.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Object.h index bc2f14a1860..b2905842ad7 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Object.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Object.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -50,16 +49,16 @@ typedef int (*visit_operator_t)(H5Object &obj, const H5std_string attr_name, con class UserData4Aiterate { public: attr_operator_t op; - void * opData; - H5Object * location; // Consider changing to H5Location + void *opData; + H5Object *location; // Consider changing to H5Location }; // User data for visit iteration class UserData4Visit { public: visit_operator_t op; - void * opData; - H5Object * obj; + void *opData; + H5Object *obj; }; class H5_DLLCPP H5Object : public H5Location { @@ -106,7 +105,7 @@ class H5_DLLCPP H5Object : public H5Location { void removeAttr(const H5std_string &name) const; // Returns an identifier. - virtual hid_t getId() const H5_OVERRIDE = 0; + virtual hid_t getId() const override = 0; // Gets the name of this HDF5 object, i.e., Group, DataSet, or // DataType. @@ -122,10 +121,10 @@ class H5_DLLCPP H5Object : public H5Location { // Sets the identifier of this object to a new value. - this one // doesn't increment reference count - virtual void p_setId(const hid_t new_id) H5_OVERRIDE = 0; + virtual void p_setId(const hid_t new_id) override = 0; // Noop destructor. - virtual ~H5Object() H5_OVERRIDE; + virtual ~H5Object() override = default; #endif // DOXYGEN_SHOULD_SKIP_THIS diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5OcreatProp.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5OcreatProp.cpp index 81dae313ada..0f1da1c5a8d 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5OcreatProp.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5OcreatProp.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -38,7 +37,6 @@ ObjCreatPropList *ObjCreatPropList::DEFAULT_ = 0; // If ObjCreatPropList::DEFAULT_ already points to an allocated // object, throw a PropListIException. This scenario should not // happen. -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- ObjCreatPropList * ObjCreatPropList::getConstant() @@ -65,13 +63,11 @@ ObjCreatPropList::getConstant() // Purpose: Deletes the constant object that ObjCreatPropList::DEFAULT_ // points to. // exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- void ObjCreatPropList::deleteConstants() { - if (DEFAULT_ != 0) - delete DEFAULT_; + delete DEFAULT_; } //-------------------------------------------------------------------------- @@ -84,7 +80,6 @@ const ObjCreatPropList &ObjCreatPropList::DEFAULT = *getConstant(); //-------------------------------------------------------------------------- // Function: Default Constructor ///\brief Creates a file access property list -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- ObjCreatPropList::ObjCreatPropList() : PropList(H5P_OBJECT_CREATE) { @@ -94,7 +89,6 @@ ObjCreatPropList::ObjCreatPropList() : PropList(H5P_OBJECT_CREATE) // Function: ObjCreatPropList copy constructor ///\brief Copy constructor: same HDF5 object as \a original ///\param original - IN: ObjCreatPropList instance to copy -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- ObjCreatPropList::ObjCreatPropList(const ObjCreatPropList &original) : PropList(original) { @@ -104,7 +98,6 @@ ObjCreatPropList::ObjCreatPropList(const ObjCreatPropList &original) : PropList( // Function: ObjCreatPropList overloaded constructor ///\brief Creates a file access property list using the id of an /// existing one. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- ObjCreatPropList::ObjCreatPropList(const hid_t plist_id) : PropList(plist_id) { @@ -122,7 +115,6 @@ ObjCreatPropList::ObjCreatPropList(const hid_t plist_id) : PropList(plist_id) /// If \c max_compact is set to 0, dense storage will be used. /// For more detail about on attribute storage, please refer to the /// H5Pset_attr_phase_change API in the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - September 2015 //-------------------------------------------------------------------------- void ObjCreatPropList::setAttrPhaseChange(unsigned max_compact, unsigned min_dense) const @@ -145,7 +137,6 @@ ObjCreatPropList::setAttrPhaseChange(unsigned max_compact, unsigned min_dense) c /// If \c max_compact is set to 0, dense storage will be used. /// For more detail about on attribute storage, please refer to the /// H5Pget_attr_phase_change API in the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - September 2015 //-------------------------------------------------------------------------- void ObjCreatPropList::getAttrPhaseChange(unsigned &max_compact, unsigned &min_dense) const @@ -174,7 +165,6 @@ ObjCreatPropList::getAttrPhaseChange(unsigned &max_compact, unsigned &min_dense) /// creation time and to build the index later. /// For detail, please refer to the H5Pset_attr_creation_order API /// in the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - September 2015 //-------------------------------------------------------------------------- void ObjCreatPropList::setAttrCrtOrder(unsigned crt_order_flags) const @@ -196,7 +186,6 @@ ObjCreatPropList::setAttrCrtOrder(unsigned crt_order_flags) const /// creation order is neither tracked not indexed. /// For detail, please refer to the H5Pget_attr_creation_order API /// in the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - September 2015 //-------------------------------------------------------------------------- unsigned ObjCreatPropList::getAttrCrtOrder() const @@ -210,13 +199,4 @@ ObjCreatPropList::getAttrCrtOrder() const return (crt_order_flags); } -//-------------------------------------------------------------------------- -// Function: ObjCreatPropList destructor -///\brief Noop destructor -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -ObjCreatPropList::~ObjCreatPropList() -{ -} - } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5OcreatProp.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5OcreatProp.h index 0aa825b943a..fbe399197fe 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5OcreatProp.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5OcreatProp.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -44,7 +43,7 @@ class H5_DLLCPP ObjCreatPropList : public PropList { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("ObjCreatPropList"); } @@ -57,7 +56,7 @@ class H5_DLLCPP ObjCreatPropList : public PropList { ObjCreatPropList(const hid_t plist_id); // Noop destructor - virtual ~ObjCreatPropList() H5_OVERRIDE; + virtual ~ObjCreatPropList() override = default; #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PredType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PredType.cpp index 9e67968bfc6..0338a01e016 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PredType.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PredType.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -27,7 +26,6 @@ #include "H5DataType.h" #include "H5AtomType.h" #include "H5PredType.h" -#include "H5private.h" namespace H5 { @@ -40,7 +38,6 @@ namespace H5 { // Description // This constructor creates a PredType object by copying // the provided HDF5 predefined datatype. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- PredType::PredType(const hid_t predtype_id) : AtomType(predtype_id) { @@ -50,7 +47,6 @@ PredType::PredType(const hid_t predtype_id) : AtomType(predtype_id) //-------------------------------------------------------------------------- // Function: PredType default constructor ///\brief Default constructor: Creates a stub predefined datatype -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- PredType::PredType() : AtomType() { @@ -61,7 +57,6 @@ PredType::PredType() : AtomType() // Function: PredType copy constructor ///\brief Copy constructor: same HDF5 object as \a original ///\param original - IN: PredType instance to copy -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- PredType::PredType(const PredType &original) : AtomType(original) { @@ -76,7 +71,6 @@ PredType::PredType(const PredType &original) : AtomType(original) // Description // Makes a copy of the type on the right hand side and stores // the new id in the left hand side object. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- PredType & PredType::operator=(const PredType &rhs) @@ -90,8 +84,12 @@ PredType::operator=(const PredType &rhs) // These dummy functions do not inherit from DataType - they'll // throw an DataTypeIException if invoked. void -PredType::commit(H5_ATTR_UNUSED H5Location &loc, H5_ATTR_UNUSED const char *name) +PredType::commit(H5Location &loc, const char *name) { + // Unused + (void)loc; + (void)name; + throw DataTypeIException("PredType::commit", "Error: Attempted to commit a predefined datatype. Invalid operation!"); } @@ -110,16 +108,6 @@ PredType::committed() } #endif // DOXYGEN_SHOULD_SKIP_THIS -// Default destructor -//-------------------------------------------------------------------------- -// Function: PredType destructor -///\brief Noop destructor. -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -PredType::~PredType() -{ -} - /***************************************************************************** The following section is regarding the global constants PredType, DataSpace, and PropList. @@ -246,63 +234,32 @@ PredType *PredType::NATIVE_INT32_; PredType *PredType::NATIVE_UINT32_; PredType *PredType::NATIVE_INT64_; PredType *PredType::NATIVE_UINT64_; + // LEAST types -#if H5_SIZEOF_INT_LEAST8_T != 0 PredType *PredType::NATIVE_INT_LEAST8_; -#endif /* H5_SIZEOF_INT_LEAST8_T */ -#if H5_SIZEOF_UINT_LEAST8_T != 0 PredType *PredType::NATIVE_UINT_LEAST8_; -#endif /* H5_SIZEOF_UINT_LEAST8_T */ -#if H5_SIZEOF_INT_LEAST16_T != 0 PredType *PredType::NATIVE_INT_LEAST16_; -#endif /* H5_SIZEOF_INT_LEAST16_T */ -#if H5_SIZEOF_UINT_LEAST16_T != 0 PredType *PredType::NATIVE_UINT_LEAST16_; -#endif /* H5_SIZEOF_UINT_LEAST16_T */ -#if H5_SIZEOF_INT_LEAST32_T != 0 PredType *PredType::NATIVE_INT_LEAST32_; -#endif /* H5_SIZEOF_INT_LEAST32_T */ -#if H5_SIZEOF_UINT_LEAST32_T != 0 PredType *PredType::NATIVE_UINT_LEAST32_; -#endif /* H5_SIZEOF_UINT_LEAST32_T */ -#if H5_SIZEOF_INT_LEAST64_T != 0 PredType *PredType::NATIVE_INT_LEAST64_; -#endif /* H5_SIZEOF_INT_LEAST64_T */ -#if H5_SIZEOF_UINT_LEAST64_T != 0 PredType *PredType::NATIVE_UINT_LEAST64_; -#endif /* H5_SIZEOF_UINT_LEAST64_T */ // FAST types -#if H5_SIZEOF_INT_FAST8_T != 0 PredType *PredType::NATIVE_INT_FAST8_; -#endif /* H5_SIZEOF_INT_FAST8_T */ -#if H5_SIZEOF_UINT_FAST8_T != 0 PredType *PredType::NATIVE_UINT_FAST8_; -#endif /* H5_SIZEOF_UINT_FAST8_T */ -#if H5_SIZEOF_INT_FAST16_T != 0 PredType *PredType::NATIVE_INT_FAST16_; -#endif /* H5_SIZEOF_INT_FAST16_T */ -#if H5_SIZEOF_UINT_FAST16_T != 0 PredType *PredType::NATIVE_UINT_FAST16_; -#endif /* H5_SIZEOF_UINT_FAST16_T */ -#if H5_SIZEOF_INT_FAST32_T != 0 PredType *PredType::NATIVE_INT_FAST32_; -#endif /* H5_SIZEOF_INT_FAST32_T */ -#if H5_SIZEOF_UINT_FAST32_T != 0 PredType *PredType::NATIVE_UINT_FAST32_; -#endif /* H5_SIZEOF_UINT_FAST32_T */ -#if H5_SIZEOF_INT_FAST64_T != 0 PredType *PredType::NATIVE_INT_FAST64_; -#endif /* H5_SIZEOF_INT_FAST64_T */ -#if H5_SIZEOF_UINT_FAST64_T != 0 PredType *PredType::NATIVE_UINT_FAST64_; -#endif /* H5_SIZEOF_UINT_FAST64_T */ //-------------------------------------------------------------------------- // Function: PredType::getPredTypes @@ -316,7 +273,6 @@ PredType *PredType::NATIVE_UINT_FAST64_; // Note that, there is a similar function to getPredTypes() in // other classes, that have global constants, is called getConstant(). // -// Programmer Binh-Minh Ribler - September 2015 //-------------------------------------------------------------------------- PredType * PredType::getPredTypes() @@ -342,7 +298,6 @@ PredType::getPredTypes() //-------------------------------------------------------------------------- // Function: PredType::makePredTypes // Purpose Allocate all PredType constants. -// Programmer Binh-Minh Ribler - September 2015 //-------------------------------------------------------------------------- void PredType::makePredTypes() @@ -434,31 +389,29 @@ PredType::makePredTypes() MIPS_F32_ = new PredType(H5T_MIPS_F32); MIPS_F64_ = new PredType(H5T_MIPS_F64); - NATIVE_CHAR_ = new PredType(H5T_NATIVE_CHAR); - NATIVE_INT_ = new PredType(H5T_NATIVE_INT); - NATIVE_FLOAT_ = new PredType(H5T_NATIVE_FLOAT); - NATIVE_SCHAR_ = new PredType(H5T_NATIVE_SCHAR); - NATIVE_UCHAR_ = new PredType(H5T_NATIVE_UCHAR); - NATIVE_SHORT_ = new PredType(H5T_NATIVE_SHORT); - NATIVE_USHORT_ = new PredType(H5T_NATIVE_USHORT); - NATIVE_UINT_ = new PredType(H5T_NATIVE_UINT); - NATIVE_LONG_ = new PredType(H5T_NATIVE_LONG); - NATIVE_ULONG_ = new PredType(H5T_NATIVE_ULONG); - NATIVE_LLONG_ = new PredType(H5T_NATIVE_LLONG); - NATIVE_ULLONG_ = new PredType(H5T_NATIVE_ULLONG); - NATIVE_DOUBLE_ = new PredType(H5T_NATIVE_DOUBLE); -#if H5_SIZEOF_LONG_DOUBLE != 0 + NATIVE_CHAR_ = new PredType(H5T_NATIVE_CHAR); + NATIVE_INT_ = new PredType(H5T_NATIVE_INT); + NATIVE_FLOAT_ = new PredType(H5T_NATIVE_FLOAT); + NATIVE_SCHAR_ = new PredType(H5T_NATIVE_SCHAR); + NATIVE_UCHAR_ = new PredType(H5T_NATIVE_UCHAR); + NATIVE_SHORT_ = new PredType(H5T_NATIVE_SHORT); + NATIVE_USHORT_ = new PredType(H5T_NATIVE_USHORT); + NATIVE_UINT_ = new PredType(H5T_NATIVE_UINT); + NATIVE_LONG_ = new PredType(H5T_NATIVE_LONG); + NATIVE_ULONG_ = new PredType(H5T_NATIVE_ULONG); + NATIVE_LLONG_ = new PredType(H5T_NATIVE_LLONG); + NATIVE_ULLONG_ = new PredType(H5T_NATIVE_ULLONG); + NATIVE_DOUBLE_ = new PredType(H5T_NATIVE_DOUBLE); NATIVE_LDOUBLE_ = new PredType(H5T_NATIVE_LDOUBLE); -#endif - NATIVE_B8_ = new PredType(H5T_NATIVE_B8); - NATIVE_B16_ = new PredType(H5T_NATIVE_B16); - NATIVE_B32_ = new PredType(H5T_NATIVE_B32); - NATIVE_B64_ = new PredType(H5T_NATIVE_B64); - NATIVE_OPAQUE_ = new PredType(H5T_NATIVE_OPAQUE); - NATIVE_HSIZE_ = new PredType(H5T_NATIVE_HSIZE); - NATIVE_HSSIZE_ = new PredType(H5T_NATIVE_HSSIZE); - NATIVE_HERR_ = new PredType(H5T_NATIVE_HERR); - NATIVE_HBOOL_ = new PredType(H5T_NATIVE_HBOOL); + NATIVE_B8_ = new PredType(H5T_NATIVE_B8); + NATIVE_B16_ = new PredType(H5T_NATIVE_B16); + NATIVE_B32_ = new PredType(H5T_NATIVE_B32); + NATIVE_B64_ = new PredType(H5T_NATIVE_B64); + NATIVE_OPAQUE_ = new PredType(H5T_NATIVE_OPAQUE); + NATIVE_HSIZE_ = new PredType(H5T_NATIVE_HSIZE); + NATIVE_HSSIZE_ = new PredType(H5T_NATIVE_HSSIZE); + NATIVE_HERR_ = new PredType(H5T_NATIVE_HERR); + NATIVE_HBOOL_ = new PredType(H5T_NATIVE_HBOOL); NATIVE_INT8_ = new PredType(H5T_NATIVE_INT8); NATIVE_UINT8_ = new PredType(H5T_NATIVE_UINT8); @@ -469,70 +422,37 @@ PredType::makePredTypes() NATIVE_INT64_ = new PredType(H5T_NATIVE_INT64); NATIVE_UINT64_ = new PredType(H5T_NATIVE_UINT64); -// LEAST types -#if H5_SIZEOF_INT_LEAST8_T != 0 - NATIVE_INT_LEAST8_ = new PredType(H5T_NATIVE_INT_LEAST8); -#endif /* H5_SIZEOF_INT_LEAST8_T */ -#if H5_SIZEOF_UINT_LEAST8_T != 0 + // LEAST types + NATIVE_INT_LEAST8_ = new PredType(H5T_NATIVE_INT_LEAST8); NATIVE_UINT_LEAST8_ = new PredType(H5T_NATIVE_UINT_LEAST8); -#endif /* H5_SIZEOF_UINT_LEAST8_T */ -#if H5_SIZEOF_INT_LEAST16_T != 0 - NATIVE_INT_LEAST16_ = new PredType(H5T_NATIVE_INT_LEAST16); -#endif /* H5_SIZEOF_INT_LEAST16_T */ -#if H5_SIZEOF_UINT_LEAST16_T != 0 + NATIVE_INT_LEAST16_ = new PredType(H5T_NATIVE_INT_LEAST16); NATIVE_UINT_LEAST16_ = new PredType(H5T_NATIVE_UINT_LEAST16); -#endif /* H5_SIZEOF_UINT_LEAST16_T */ -#if H5_SIZEOF_INT_LEAST32_T != 0 - NATIVE_INT_LEAST32_ = new PredType(H5T_NATIVE_INT_LEAST32); -#endif /* H5_SIZEOF_INT_LEAST32_T */ -#if H5_SIZEOF_UINT_LEAST32_T != 0 + NATIVE_INT_LEAST32_ = new PredType(H5T_NATIVE_INT_LEAST32); NATIVE_UINT_LEAST32_ = new PredType(H5T_NATIVE_UINT_LEAST32); -#endif /* H5_SIZEOF_UINT_LEAST32_T */ -#if H5_SIZEOF_INT_LEAST64_T != 0 - NATIVE_INT_LEAST64_ = new PredType(H5T_NATIVE_INT_LEAST64); -#endif /* H5_SIZEOF_INT_LEAST64_T */ -#if H5_SIZEOF_UINT_LEAST64_T != 0 + NATIVE_INT_LEAST64_ = new PredType(H5T_NATIVE_INT_LEAST64); NATIVE_UINT_LEAST64_ = new PredType(H5T_NATIVE_UINT_LEAST64); -#endif /* H5_SIZEOF_UINT_LEAST64_T */ -// FAST types -#if H5_SIZEOF_INT_FAST8_T != 0 - NATIVE_INT_FAST8_ = new PredType(H5T_NATIVE_INT_FAST8); -#endif /* H5_SIZEOF_INT_FAST8_T */ -#if H5_SIZEOF_UINT_FAST8_T != 0 + // FAST types + NATIVE_INT_FAST8_ = new PredType(H5T_NATIVE_INT_FAST8); NATIVE_UINT_FAST8_ = new PredType(H5T_NATIVE_UINT_FAST8); -#endif /* H5_SIZEOF_UINT_FAST8_T */ -#if H5_SIZEOF_INT_FAST16_T != 0 - NATIVE_INT_FAST16_ = new PredType(H5T_NATIVE_INT_FAST16); -#endif /* H5_SIZEOF_INT_FAST16_T */ -#if H5_SIZEOF_UINT_FAST16_T != 0 + NATIVE_INT_FAST16_ = new PredType(H5T_NATIVE_INT_FAST16); NATIVE_UINT_FAST16_ = new PredType(H5T_NATIVE_UINT_FAST16); -#endif /* H5_SIZEOF_UINT_FAST16_T */ -#if H5_SIZEOF_INT_FAST32_T != 0 - NATIVE_INT_FAST32_ = new PredType(H5T_NATIVE_INT_FAST32); -#endif /* H5_SIZEOF_INT_FAST32_T */ -#if H5_SIZEOF_UINT_FAST32_T != 0 + NATIVE_INT_FAST32_ = new PredType(H5T_NATIVE_INT_FAST32); NATIVE_UINT_FAST32_ = new PredType(H5T_NATIVE_UINT_FAST32); -#endif /* H5_SIZEOF_UINT_FAST32_T */ -#if H5_SIZEOF_INT_FAST64_T != 0 - NATIVE_INT_FAST64_ = new PredType(H5T_NATIVE_INT_FAST64); -#endif /* H5_SIZEOF_INT_FAST64_T */ -#if H5_SIZEOF_UINT_FAST64_T != 0 + NATIVE_INT_FAST64_ = new PredType(H5T_NATIVE_INT_FAST64); NATIVE_UINT_FAST64_ = new PredType(H5T_NATIVE_UINT_FAST64); -#endif /* H5_SIZEOF_UINT_FAST64_T */ } // makePredTypes //-------------------------------------------------------------------------- // Function: PredType::deleteConstants // Purpose Deletes all PredType constant pointers. -// Programmer Binh-Minh Ribler - September 2015 //-------------------------------------------------------------------------- void PredType::deleteConstants() @@ -655,63 +575,31 @@ PredType::deleteConstants() delete NATIVE_INT64_; delete NATIVE_UINT64_; -// LEAST types -#if H5_SIZEOF_INT_LEAST8_T != 0 + // LEAST types delete NATIVE_INT_LEAST8_; -#endif /* H5_SIZEOF_INT_LEAST8_T */ -#if H5_SIZEOF_UINT_LEAST8_T != 0 delete NATIVE_UINT_LEAST8_; -#endif /* H5_SIZEOF_UINT_LEAST8_T */ -#if H5_SIZEOF_INT_LEAST16_T != 0 delete NATIVE_INT_LEAST16_; -#endif /* H5_SIZEOF_INT_LEAST16_T */ -#if H5_SIZEOF_UINT_LEAST16_T != 0 delete NATIVE_UINT_LEAST16_; -#endif /* H5_SIZEOF_UINT_LEAST16_T */ -#if H5_SIZEOF_INT_LEAST32_T != 0 delete NATIVE_INT_LEAST32_; -#endif /* H5_SIZEOF_INT_LEAST32_T */ -#if H5_SIZEOF_UINT_LEAST32_T != 0 delete NATIVE_UINT_LEAST32_; -#endif /* H5_SIZEOF_UINT_LEAST32_T */ -#if H5_SIZEOF_INT_LEAST64_T != 0 delete NATIVE_INT_LEAST64_; -#endif /* H5_SIZEOF_INT_LEAST64_T */ -#if H5_SIZEOF_UINT_LEAST64_T != 0 delete NATIVE_UINT_LEAST64_; -#endif /* H5_SIZEOF_UINT_LEAST64_T */ -// FAST types -#if H5_SIZEOF_INT_FAST8_T != 0 + // FAST types delete NATIVE_INT_FAST8_; -#endif /* H5_SIZEOF_INT_FAST8_T */ -#if H5_SIZEOF_UINT_FAST8_T != 0 delete NATIVE_UINT_FAST8_; -#endif /* H5_SIZEOF_UINT_FAST8_T */ -#if H5_SIZEOF_INT_FAST16_T != 0 delete NATIVE_INT_FAST16_; -#endif /* H5_SIZEOF_INT_FAST16_T */ -#if H5_SIZEOF_UINT_FAST16_T != 0 delete NATIVE_UINT_FAST16_; -#endif /* H5_SIZEOF_UINT_FAST16_T */ -#if H5_SIZEOF_INT_FAST32_T != 0 delete NATIVE_INT_FAST32_; -#endif /* H5_SIZEOF_INT_FAST32_T */ -#if H5_SIZEOF_UINT_FAST32_T != 0 delete NATIVE_UINT_FAST32_; -#endif /* H5_SIZEOF_UINT_FAST32_T */ -#if H5_SIZEOF_INT_FAST64_T != 0 delete NATIVE_INT_FAST64_; -#endif /* H5_SIZEOF_INT_FAST64_T */ -#if H5_SIZEOF_UINT_FAST64_T != 0 delete NATIVE_UINT_FAST64_; -#endif /* H5_SIZEOF_UINT_FAST64_T */ delete PREDTYPE_CONST_; PREDTYPE_CONST_ = 0; @@ -845,62 +733,30 @@ const PredType &PredType::NATIVE_INT64 = *NATIVE_INT64_; const PredType &PredType::NATIVE_UINT64 = *NATIVE_UINT64_; // LEAST types -#if H5_SIZEOF_INT_LEAST8_T != 0 -const PredType &PredType::NATIVE_INT_LEAST8 = *NATIVE_INT_LEAST8_; -#endif /* H5_SIZEOF_INT_LEAST8_T */ -#if H5_SIZEOF_UINT_LEAST8_T != 0 +const PredType &PredType::NATIVE_INT_LEAST8 = *NATIVE_INT_LEAST8_; const PredType &PredType::NATIVE_UINT_LEAST8 = *NATIVE_UINT_LEAST8_; -#endif /* H5_SIZEOF_UINT_LEAST8_T */ -#if H5_SIZEOF_INT_LEAST16_T != 0 -const PredType &PredType::NATIVE_INT_LEAST16 = *NATIVE_INT_LEAST16_; -#endif /* H5_SIZEOF_INT_LEAST16_T */ -#if H5_SIZEOF_UINT_LEAST16_T != 0 +const PredType &PredType::NATIVE_INT_LEAST16 = *NATIVE_INT_LEAST16_; const PredType &PredType::NATIVE_UINT_LEAST16 = *NATIVE_UINT_LEAST16_; -#endif /* H5_SIZEOF_UINT_LEAST16_T */ -#if H5_SIZEOF_INT_LEAST32_T != 0 -const PredType &PredType::NATIVE_INT_LEAST32 = *NATIVE_INT_LEAST32_; -#endif /* H5_SIZEOF_INT_LEAST32_T */ -#if H5_SIZEOF_UINT_LEAST32_T != 0 +const PredType &PredType::NATIVE_INT_LEAST32 = *NATIVE_INT_LEAST32_; const PredType &PredType::NATIVE_UINT_LEAST32 = *NATIVE_UINT_LEAST32_; -#endif /* H5_SIZEOF_UINT_LEAST32_T */ -#if H5_SIZEOF_INT_LEAST64_T != 0 -const PredType &PredType::NATIVE_INT_LEAST64 = *NATIVE_INT_LEAST64_; -#endif /* H5_SIZEOF_INT_LEAST64_T */ -#if H5_SIZEOF_UINT_LEAST64_T != 0 +const PredType &PredType::NATIVE_INT_LEAST64 = *NATIVE_INT_LEAST64_; const PredType &PredType::NATIVE_UINT_LEAST64 = *NATIVE_UINT_LEAST64_; -#endif /* H5_SIZEOF_UINT_LEAST64_T */ // FAST types -#if H5_SIZEOF_INT_FAST8_T != 0 -const PredType &PredType::NATIVE_INT_FAST8 = *NATIVE_INT_FAST8_; -#endif /* H5_SIZEOF_INT_FAST8_T */ -#if H5_SIZEOF_UINT_FAST8_T != 0 +const PredType &PredType::NATIVE_INT_FAST8 = *NATIVE_INT_FAST8_; const PredType &PredType::NATIVE_UINT_FAST8 = *NATIVE_UINT_FAST8_; -#endif /* H5_SIZEOF_UINT_FAST8_T */ -#if H5_SIZEOF_INT_FAST16_T != 0 -const PredType &PredType::NATIVE_INT_FAST16 = *NATIVE_INT_FAST16_; -#endif /* H5_SIZEOF_INT_FAST16_T */ -#if H5_SIZEOF_UINT_FAST16_T != 0 +const PredType &PredType::NATIVE_INT_FAST16 = *NATIVE_INT_FAST16_; const PredType &PredType::NATIVE_UINT_FAST16 = *NATIVE_UINT_FAST16_; -#endif /* H5_SIZEOF_UINT_FAST16_T */ -#if H5_SIZEOF_INT_FAST32_T != 0 -const PredType &PredType::NATIVE_INT_FAST32 = *NATIVE_INT_FAST32_; -#endif /* H5_SIZEOF_INT_FAST32_T */ -#if H5_SIZEOF_UINT_FAST32_T != 0 +const PredType &PredType::NATIVE_INT_FAST32 = *NATIVE_INT_FAST32_; const PredType &PredType::NATIVE_UINT_FAST32 = *NATIVE_UINT_FAST32_; -#endif /* H5_SIZEOF_UINT_FAST32_T */ -#if H5_SIZEOF_INT_FAST64_T != 0 -const PredType &PredType::NATIVE_INT_FAST64 = *NATIVE_INT_FAST64_; -#endif /* H5_SIZEOF_INT_FAST64_T */ -#if H5_SIZEOF_UINT_FAST64_T != 0 +const PredType &PredType::NATIVE_INT_FAST64 = *NATIVE_INT_FAST64_; const PredType &PredType::NATIVE_UINT_FAST64 = *NATIVE_UINT_FAST64_; -#endif /* H5_SIZEOF_UINT_FAST64_T */ #endif // DOXYGEN_SHOULD_SKIP_THIS @@ -916,7 +772,7 @@ September 2015: classes, such as PropList, PredType, DataSpace, etc... Previously, these global constants were declared statically and the C++ library used a constant, called PredType::AtExit, to detect when all the global - contants are destroyed then close the C library (H5close). This method + constants are destroyed then close the C library (H5close). This method relied on the order of the constants being created and destroyed and that PredType constants be the last to be destroyed. In September 2015, it was recognized that the order in which the global constants were diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PredType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PredType.h index c4ac6b2d2c6..85b6e96fb0a 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PredType.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PredType.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -29,7 +28,7 @@ class H5_DLLCPP PredType : public AtomType { public: ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("PredType"); } @@ -42,7 +41,7 @@ class H5_DLLCPP PredType : public AtomType { PredType(const PredType &original); // Noop destructor - virtual ~PredType() H5_OVERRIDE; + virtual ~PredType() override = default; /*! \brief This dummy function do not inherit from DataType - it will throw a DataTypeIException if invoked. @@ -176,63 +175,31 @@ class H5_DLLCPP PredType : public AtomType { static const PredType &NATIVE_INT64; static const PredType &NATIVE_UINT64; -// LEAST types -#if H5_SIZEOF_INT_LEAST8_T != 0 + // LEAST types static const PredType &NATIVE_INT_LEAST8; -#endif /* H5_SIZEOF_INT_LEAST8_T */ -#if H5_SIZEOF_UINT_LEAST8_T != 0 static const PredType &NATIVE_UINT_LEAST8; -#endif /* H5_SIZEOF_UINT_LEAST8_T */ -#if H5_SIZEOF_INT_LEAST16_T != 0 static const PredType &NATIVE_INT_LEAST16; -#endif /* H5_SIZEOF_INT_LEAST16_T */ -#if H5_SIZEOF_UINT_LEAST16_T != 0 static const PredType &NATIVE_UINT_LEAST16; -#endif /* H5_SIZEOF_UINT_LEAST16_T */ -#if H5_SIZEOF_INT_LEAST32_T != 0 static const PredType &NATIVE_INT_LEAST32; -#endif /* H5_SIZEOF_INT_LEAST32_T */ -#if H5_SIZEOF_UINT_LEAST32_T != 0 static const PredType &NATIVE_UINT_LEAST32; -#endif /* H5_SIZEOF_UINT_LEAST32_T */ -#if H5_SIZEOF_INT_LEAST64_T != 0 static const PredType &NATIVE_INT_LEAST64; -#endif /* H5_SIZEOF_INT_LEAST64_T */ -#if H5_SIZEOF_UINT_LEAST64_T != 0 static const PredType &NATIVE_UINT_LEAST64; -#endif /* H5_SIZEOF_UINT_LEAST64_T */ -// FAST types -#if H5_SIZEOF_INT_FAST8_T != 0 + // FAST types static const PredType &NATIVE_INT_FAST8; -#endif /* H5_SIZEOF_INT_FAST8_T */ -#if H5_SIZEOF_UINT_FAST8_T != 0 static const PredType &NATIVE_UINT_FAST8; -#endif /* H5_SIZEOF_UINT_FAST8_T */ -#if H5_SIZEOF_INT_FAST16_T != 0 static const PredType &NATIVE_INT_FAST16; -#endif /* H5_SIZEOF_INT_FAST16_T */ -#if H5_SIZEOF_UINT_FAST16_T != 0 static const PredType &NATIVE_UINT_FAST16; -#endif /* H5_SIZEOF_UINT_FAST16_T */ -#if H5_SIZEOF_INT_FAST32_T != 0 static const PredType &NATIVE_INT_FAST32; -#endif /* H5_SIZEOF_INT_FAST32_T */ -#if H5_SIZEOF_UINT_FAST32_T != 0 static const PredType &NATIVE_UINT_FAST32; -#endif /* H5_SIZEOF_UINT_FAST32_T */ -#if H5_SIZEOF_INT_FAST64_T != 0 static const PredType &NATIVE_INT_FAST64; -#endif /* H5_SIZEOF_INT_FAST64_T */ -#if H5_SIZEOF_UINT_FAST64_T != 0 static const PredType &NATIVE_UINT_FAST64; -#endif /* H5_SIZEOF_UINT_FAST64_T */ #ifndef DOXYGEN_SHOULD_SKIP_THIS @@ -378,64 +345,31 @@ class H5_DLLCPP PredType : public AtomType { static PredType *NATIVE_INT64_; static PredType *NATIVE_UINT64_; -// LEAST types -#if H5_SIZEOF_INT_LEAST8_T != 0 + // LEAST types static PredType *NATIVE_INT_LEAST8_; -#endif /* H5_SIZEOF_INT_LEAST8_T */ -#if H5_SIZEOF_UINT_LEAST8_T != 0 static PredType *NATIVE_UINT_LEAST8_; -#endif /* H5_SIZEOF_UINT_LEAST8_T */ -#if H5_SIZEOF_INT_LEAST16_T != 0 static PredType *NATIVE_INT_LEAST16_; -#endif /* H5_SIZEOF_INT_LEAST16_T */ -#if H5_SIZEOF_UINT_LEAST16_T != 0 static PredType *NATIVE_UINT_LEAST16_; -#endif /* H5_SIZEOF_UINT_LEAST16_T */ -#if H5_SIZEOF_INT_LEAST32_T != 0 static PredType *NATIVE_INT_LEAST32_; -#endif /* H5_SIZEOF_INT_LEAST32_T */ -#if H5_SIZEOF_UINT_LEAST32_T != 0 static PredType *NATIVE_UINT_LEAST32_; -#endif /* H5_SIZEOF_UINT_LEAST32_T */ -#if H5_SIZEOF_INT_LEAST64_T != 0 static PredType *NATIVE_INT_LEAST64_; -#endif /* H5_SIZEOF_INT_LEAST64_T */ -#if H5_SIZEOF_UINT_LEAST64_T != 0 static PredType *NATIVE_UINT_LEAST64_; -#endif /* H5_SIZEOF_UINT_LEAST64_T */ -// FAST types -#if H5_SIZEOF_INT_FAST8_T != 0 + // FAST types static PredType *NATIVE_INT_FAST8_; -#endif /* H5_SIZEOF_INT_FAST8_T */ -#if H5_SIZEOF_UINT_FAST8_T != 0 static PredType *NATIVE_UINT_FAST8_; -#endif /* H5_SIZEOF_UINT_FAST8_T */ -#if H5_SIZEOF_INT_FAST16_T != 0 static PredType *NATIVE_INT_FAST16_; -#endif /* H5_SIZEOF_INT_FAST16_T */ -#if H5_SIZEOF_UINT_FAST16_T != 0 static PredType *NATIVE_UINT_FAST16_; -#endif /* H5_SIZEOF_UINT_FAST16_T */ -#if H5_SIZEOF_INT_FAST32_T != 0 static PredType *NATIVE_INT_FAST32_; -#endif /* H5_SIZEOF_INT_FAST32_T */ -#if H5_SIZEOF_UINT_FAST32_T != 0 static PredType *NATIVE_UINT_FAST32_; -#endif /* H5_SIZEOF_UINT_FAST32_T */ -#if H5_SIZEOF_INT_FAST64_T != 0 static PredType *NATIVE_INT_FAST64_; -#endif /* H5_SIZEOF_INT_FAST64_T */ -#if H5_SIZEOF_UINT_FAST64_T != 0 static PredType *NATIVE_UINT_FAST64_; -#endif /* H5_SIZEOF_UINT_FAST64_T */ - // End of Declaration of pointers #endif // DOXYGEN_SHOULD_SKIP_THIS diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PropList.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PropList.cpp index c8c1a48079d..a116494a401 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PropList.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PropList.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -12,10 +11,8 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include - #include -#include "H5private.h" // for HDmemset #include "H5Include.h" #include "H5Exception.h" #include "H5IdComponent.h" @@ -41,7 +38,6 @@ PropList *PropList::DEFAULT_ = 0; // Description // If PropList::DEFAULT_ already points to an allocated object, // throw a PropListIException. This scenario should not happen. -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- PropList * PropList::getConstant() @@ -66,13 +62,11 @@ PropList::getConstant() //-------------------------------------------------------------------------- // Function: PropList::deleteConstants // Purpose Deletes the constant object that PropList::DEFAULT_ points to. -// Programmer Binh-Minh Ribler - 2015 //-------------------------------------------------------------------------- void PropList::deleteConstants() { - if (DEFAULT_ != 0) - delete DEFAULT_; + delete DEFAULT_; } //-------------------------------------------------------------------------- @@ -85,7 +79,6 @@ const PropList &PropList::DEFAULT = *getConstant(); //-------------------------------------------------------------------------- // Function: Default constructor ///\brief Default constructor: creates a stub property list object. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- PropList::PropList() : IdComponent(), id(H5P_DEFAULT) { @@ -95,7 +88,6 @@ PropList::PropList() : IdComponent(), id(H5P_DEFAULT) // Function: PropList copy constructor ///\brief Copy constructor: same HDF5 object as \a original ///\param original - IN: The original property list to copy -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- PropList::PropList(const PropList &original) : IdComponent(), id(original.id) { @@ -112,13 +104,9 @@ PropList::PropList(const PropList &original) : IdComponent(), id(original.id) // class is provided or makes a copy of a property list if one // is given. If the given id is anything else, then set this // property's id to H5P_DEFAULT. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -PropList::PropList(const hid_t plist_id) : IdComponent() +PropList::PropList(const hid_t plist_id) : IdComponent(), id{H5P_DEFAULT} { - if (plist_id <= 0) - id = H5P_DEFAULT; - H5I_type_t id_type = H5Iget_type(plist_id); switch (id_type) { case H5I_GENPROP_CLS: @@ -155,6 +143,7 @@ PropList::PropList(const hid_t plist_id) : IdComponent() case H5I_UNINIT: case H5I_MAP: case H5I_SPACE_SEL_ITER: + case H5I_EVENTSET: default: id = H5P_DEFAULT; break; @@ -166,7 +155,6 @@ PropList::PropList(const hid_t plist_id) : IdComponent() ///\brief Makes a copy of an existing property list. ///\param like_plist - IN: Reference to the existing property list ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 // Modification // - Replaced resetIdComponent() with decRefCount() to use C // library ID reference counting mechanism - BMR, Jun 1, 2004 @@ -200,7 +188,6 @@ PropList::copy(const PropList &like_plist) // Description // Makes a copy of the property list on the right hand side // and stores the new id in the left hand side object. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- PropList & PropList::operator=(const PropList &rhs) @@ -216,7 +203,6 @@ PropList::operator=(const PropList &rhs) ///\param dest - IN: Destination property list or class ///\param name - IN: Name of the property to copy - \c char pointer ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - Jul, 2005 //-------------------------------------------------------------------------- void PropList::copyProp(PropList &dest, const char *name) const @@ -235,7 +221,6 @@ PropList::copyProp(PropList &dest, const char *name) const /// accepts. ///\param dest - IN: Destination property list or class ///\param name - IN: Name of the property to copy - \c H5std_string -// Programmer Binh-Minh Ribler - Jul, 2005 //-------------------------------------------------------------------------- void PropList::copyProp(PropList &dest, const H5std_string &name) const @@ -251,7 +236,6 @@ PropList::copyProp(PropList &dest, const H5std_string &name) const ///\param name - IN: Name of the property to copy - \c char pointer ///\note This member function will be removed in the next release ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void PropList::copyProp(PropList &dest, PropList &src, const char *name) const @@ -272,7 +256,6 @@ PropList::copyProp(PropList &dest, PropList &src, const char *name) const ///\param dest - IN: Destination property list or class ///\param src - IN: Source property list or class ///\param name - IN: Name of the property to copy - \c H5std_string -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void PropList::copyProp(PropList &dest, PropList &src, const H5std_string &name) const @@ -289,7 +272,6 @@ PropList::copyProp(PropList &dest, PropList &src, const H5std_string &name) cons // AbstractDS and Attribute are moved out of H5Object. In // addition, member IdComponent::id is moved into subclasses, and // IdComponent::getId now becomes pure virtual function. -// Programmer Binh-Minh Ribler - May, 2008 //-------------------------------------------------------------------------- hid_t PropList::getId() const @@ -305,10 +287,9 @@ PropList::getId() const ///\exception H5::IdComponentException when the attempt to close the HDF5 /// object fails // Description: -// The underlaying reference counting in the C library ensures +// The underlying reference counting in the C library ensures // that the current valid id of this object is properly closed. // Then the object's id is reset to the new id. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void PropList::p_setId(const hid_t new_id) @@ -331,7 +312,6 @@ PropList::p_setId(const hid_t new_id) ///\brief Closes the property list if it is not a default one. /// ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - Mar 9, 2005 //-------------------------------------------------------------------------- void PropList::close() @@ -351,7 +331,6 @@ PropList::close() ///\brief Returns the class of this property list, i.e. \c H5P_FILE_CREATE... ///\return The property list class if it is not equal to \c H5P_ROOT ///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- hid_t PropList::getClass() const @@ -373,7 +352,6 @@ PropList::getClass() const ///\par Description /// This routine checks if a property exists within a property /// list or class. -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- bool PropList::propExist(const char *name) const @@ -397,7 +375,6 @@ PropList::propExist(const char *name) const /// It differs from the above function only in what arguments it /// accepts. ///\param name - IN: Name of property to check for - \c H5std_string -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- bool PropList::propExist(const H5std_string &name) const @@ -413,7 +390,6 @@ PropList::propExist(const H5std_string &name) const ///\par Description /// Releases memory and detaches a class from the property /// list class hierarchy. -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void PropList::closeClass() const @@ -434,7 +410,6 @@ PropList::closeClass() const /// Retrieves a copy of the value for a property in a property /// list. The property name must exist or this routine will /// throw an exception. -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void PropList::getProperty(const char *name, void *value) const @@ -452,7 +427,6 @@ PropList::getProperty(const char *name, void *value) const ///\param name - IN: Name of property to query - \c char pointer ///\return The property that is a \c H5std_string. ///\exception H5::PropListIException -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- H5std_string PropList::getProperty(const char *name) const @@ -461,8 +435,7 @@ PropList::getProperty(const char *name) const size_t size = getPropSize(name); // Allocate buffer then get the property - char *prop_strg_C = new char[size + 1]; // temporary C-string for C API - HDmemset(prop_strg_C, 0, size + 1); // clear buffer + char *prop_strg_C = new char[size + 1](); herr_t ret_value = H5Pget(id, name, prop_strg_C); // call C API @@ -484,7 +457,6 @@ PropList::getProperty(const char *name) const /// accepts. ///\param name - IN: Name of property to query - \c H5std_string ///\param value - OUT: Pointer to the buffer for the property value -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void PropList::getProperty(const H5std_string &name, void *value) const @@ -498,7 +470,6 @@ PropList::getProperty(const H5std_string &name, void *value) const /// accepts. ///\param name - IN: Name of property to query - \c H5std_string ///\return The property that is a \c H5std_string. -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- H5std_string PropList::getProperty(const H5std_string &name) const @@ -517,7 +488,6 @@ PropList::getProperty(const H5std_string &name) const /// in bytes. Zero-sized properties are allowed and the return /// value will be of 0. This function works for both property /// lists and classes. -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- size_t PropList::getPropSize(const char *name) const @@ -536,7 +506,6 @@ PropList::getPropSize(const char *name) const /// accepts. ///\param name - IN: Name of property to query - \c H5std_string /// -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- size_t PropList::getPropSize(const H5std_string &name) const @@ -548,8 +517,7 @@ PropList::getPropSize(const H5std_string &name) const // Function: PropList::getClassName ///\brief Return the name of a generic property list class. ///\return A string containing the class name, if success, otherwise, -/// a NULL string. -// Programmer: Binh-Minh Ribler - April, 2004 +/// an empty string. //-------------------------------------------------------------------------- H5std_string PropList::getClassName() const @@ -564,12 +532,12 @@ PropList::getClassName() const else return ""; } + //-------------------------------------------------------------------------- // Function: PropList::getNumProps ///\brief Returns the number of properties in this property list or class. ///\return Size of the property. ///\exception H5::PropListIException -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- size_t PropList::getNumProps() const @@ -591,7 +559,6 @@ PropList::getNumProps() const // Description // Revision svn r29815 changed 'value' to const, hence, deprecated // the non-const setProperty. -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void PropList::setProperty(const char *name, const void *value) const @@ -605,7 +572,6 @@ PropList::setProperty(const char *name, const void *value) const //-------------------------------------------------------------------------- // Function: PropList::setProperty ///\brief Deprecated due to missing const in prototype. (1.10.1) -// Programmer: Binh-Minh Ribler - March, 2017 // Modification // Planned for removal. -BMR, 2017/03/17 1.10.1 //-------------------------------------------------------------------------- @@ -628,16 +594,16 @@ PropList::setProperty(const char *name, void *value) const // Description // Revision svn r29815 changed 'value' to const, hence, deprecated // the non-const setProperty. -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void PropList::setProperty(const char *name, const char *charptr) const { - herr_t ret_value = H5Pset(id, name, (const void *)charptr); + herr_t ret_value = H5Pset(id, name, static_cast(charptr)); if (ret_value < 0) { throw PropListIException(inMemFunc("setProperty"), "H5Pset failed"); } } + //-------------------------------------------------------------------------- // Function: PropList::setProperty ///\brief This is an overloaded member function, provided for convenience. @@ -645,7 +611,6 @@ PropList::setProperty(const char *name, const char *charptr) const /// accepts. ///\param name - IN: Name of property to set - \c char pointer ///\param strg - IN: Value for the property is a \c H5std_string -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void PropList::setProperty(const char *name, const H5std_string &strg) const @@ -656,7 +621,6 @@ PropList::setProperty(const char *name, const H5std_string &strg) const //-------------------------------------------------------------------------- // Function: PropList::setProperty ///\brief Deprecated due to missing const in prototype. (1.10.1) -// Programmer: Binh-Minh Ribler - March, 2017 // Modification // Planned for removal. -BMR, 2017/03/17 1.10.1 //-------------------------------------------------------------------------- @@ -673,7 +637,6 @@ PropList::setProperty(const char *name, H5std_string &strg) const /// accepts. ///\param name - IN: Name of property to set - \c H5std_string ///\param value - IN: Void pointer to the value for the property -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void PropList::setProperty(const H5std_string &name, const void *value) const @@ -684,7 +647,6 @@ PropList::setProperty(const H5std_string &name, const void *value) const //-------------------------------------------------------------------------- // Function: PropList::setProperty ///\brief Deprecated due to missing const in prototype. (1.10.1) -// Programmer: Binh-Minh Ribler - March, 2017 // Modification // Planned for removal. -BMR, 2017/03/17 1.10.1 //-------------------------------------------------------------------------- @@ -701,7 +663,6 @@ PropList::setProperty(const H5std_string &name, void *value) const /// accepts. ///\param name - IN: Name of property to set - \c H5std_string ///\param strg - IN: Value for the property is a \c H5std_string -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void PropList::setProperty(const H5std_string &name, const H5std_string &strg) const @@ -712,7 +673,6 @@ PropList::setProperty(const H5std_string &name, const H5std_string &strg) const //-------------------------------------------------------------------------- // Function: PropList::setProperty ///\brief Deprecated due to missing const in prototype. (1.10.1) -// Programmer: Binh-Minh Ribler - March, 2017 // Modification // Planned for removal. -BMR, 2017/03/17 1.10.1 //-------------------------------------------------------------------------- @@ -729,7 +689,6 @@ PropList::setProperty(const H5std_string &name, H5std_string &strg) const ///\return true if the property list is a member of the property list /// class, and false, otherwise. ///\exception H5::PropListIException -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- bool PropList::isAClass(const PropList &prop_class) const @@ -750,7 +709,6 @@ PropList::isAClass(const PropList &prop_class) const ///\brief Removes a property from a property list. ///\param name - IN: Name of property to remove - \c char pointer ///\exception H5::PropListIException -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void PropList::removeProp(const char *name) const @@ -767,7 +725,6 @@ PropList::removeProp(const char *name) const /// It differs from the above function only in what arguments it /// accepts. ///\param name - IN: Name of property to remove - \c H5std_string -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void PropList::removeProp(const H5std_string &name) const @@ -782,7 +739,6 @@ PropList::removeProp(const H5std_string &name) const ///\return true if the property lists or classes are equal, and /// false, otherwise. ///\exception H5::PropListIException -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- bool PropList::operator==(const PropList &rhs) const @@ -803,7 +759,6 @@ PropList::operator==(const PropList &rhs) const ///\brief Returns the parent class of a generic property class ///\return The parent class of a property class ///\exception H5::PropListIException -// Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- PropList PropList::getClassParent() const @@ -819,7 +774,6 @@ PropList::getClassParent() const //-------------------------------------------------------------------------- // Function: PropList destructor ///\brief Properly terminates access to this property list. -// Programmer Binh-Minh Ribler - 2000 // Modification // - Replaced resetIdComponent() with decRefCount() to use C // library ID reference counting mechanism - BMR, Jun 1, 2004 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PropList.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PropList.h index 2df326b5e33..beef474f65e 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PropList.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PropList.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -38,7 +37,7 @@ class H5_DLLCPP PropList : public IdComponent { bool operator==(const PropList &rhs) const; // Close this property list. - virtual void close() H5_OVERRIDE; + virtual void close() override; // Close a property list class. void closeClass() const; @@ -102,7 +101,7 @@ class H5_DLLCPP PropList : public IdComponent { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("PropList"); } @@ -114,10 +113,10 @@ class H5_DLLCPP PropList : public IdComponent { PropList(const PropList &original); // Gets the property list id. - virtual hid_t getId() const H5_OVERRIDE; + virtual hid_t getId() const override; // Destructor: properly terminates access to this property list. - virtual ~PropList() H5_OVERRIDE; + virtual ~PropList() override; #ifndef DOXYGEN_SHOULD_SKIP_THIS @@ -128,7 +127,7 @@ class H5_DLLCPP PropList : public IdComponent { hid_t id; // HDF5 property list id // Sets the property list id. - virtual void p_setId(const hid_t new_id) H5_OVERRIDE; + virtual void p_setId(const hid_t new_id) override; private: static PropList *DEFAULT_; diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5StrType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5StrType.cpp index 5df48f38660..1b45814f4e7 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5StrType.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5StrType.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -32,14 +31,12 @@ #include "H5StrType.h" #include "H5DataSet.h" #include "H5PredType.h" -#include "H5private.h" namespace H5 { //-------------------------------------------------------------------------- // Function: StrType default constructor ///\brief Default constructor: Creates a stub string datatype -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- StrType::StrType() : AtomType() { @@ -50,7 +47,6 @@ StrType::StrType() : AtomType() ///\brief Creates a string datatype using a predefined type. ///\param pred_type - IN: Predefined datatype ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- StrType::StrType(const PredType &pred_type) : AtomType() { @@ -76,7 +72,6 @@ StrType::StrType(const PredType &pred_type) : AtomType() // Note // The use of this constructor can be shortened by using // its overloaded below as StrType(0, size). -// Programmer Binh-Minh Ribler - 2000 // Modification // Planned for removal. -BMR, 2005/12/02 // Removed from documentation. -BMR, 2016/03/07 @@ -103,10 +98,12 @@ StrType::StrType(const PredType &pred_type, const size_t &size) : AtomType() /// StrType atype(PredType::C_S1, size) // Note // This constructor replaced the previous one. -// Programmer Binh-Minh Ribler - Nov 28, 2005 //-------------------------------------------------------------------------- -StrType::StrType(H5_ATTR_UNUSED const int dummy, const size_t &size) : AtomType() +StrType::StrType(const int dummy, const size_t &size) : AtomType() { + // Unused + (void)dummy; + // use DataType::copy to make a copy of the string predefined type // then set its length copy(PredType::C_S1); @@ -118,7 +115,6 @@ StrType::StrType(H5_ATTR_UNUSED const int dummy, const size_t &size) : AtomType( ///\brief Creates an StrType object using the id of an existing datatype. ///\param existing_id - IN: Id of an existing datatype ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- StrType::StrType(const hid_t existing_id) : AtomType(existing_id) { @@ -127,7 +123,6 @@ StrType::StrType(const hid_t existing_id) : AtomType(existing_id) //-------------------------------------------------------------------------- // Function: StrType copy constructor ///\brief Copy constructor: same HDF5 object as \a original -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- StrType::StrType(const StrType &original) : AtomType(original) { @@ -138,7 +133,6 @@ StrType::StrType(const StrType &original) : AtomType(original) ///\brief Gets the string datatype of the specified dataset ///\param dataset - IN: Dataset that this string datatype associates with ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- StrType::StrType(const DataSet &dataset) : AtomType() { @@ -157,7 +151,6 @@ StrType::StrType(const DataSet &dataset) : AtomType() ///\param loc - IN: Location of the type ///\param dtype_name - IN: String type name ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Dec 2016 // Description // In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openStrType(const char*) to @@ -176,7 +169,6 @@ StrType::StrType(const H5Location &loc, const char *dtype_name) : AtomType() ///\param loc - IN: Location of the type ///\param dtype_name - IN: String type name ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Dec 2016 // Description // In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openStrType(const H5std_string&) @@ -194,7 +186,6 @@ StrType::StrType(const H5Location &loc, const H5std_string &dtype_name) : AtomTy /// binary object description of this type. /// ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- DataType * StrType::decode() const @@ -224,7 +215,6 @@ StrType::decode() const /// and usability problems. See the C API entry H5Pset_char_encoding for /// more information. ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5T_cset_t StrType::getCset() const @@ -251,7 +241,6 @@ StrType::getCset() const /// and usability problems. See the C API entry H5Pset_char_encoding for /// more information. ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void StrType::setCset(H5T_cset_t cset) const @@ -270,7 +259,6 @@ StrType::setCset(H5T_cset_t cset) const /// \li \c H5T_STR_NULLPAD (0) - Pad with zeros /// \li \c H5T_STR_SPACEPAD (0) - pad with spaces (as FORTRAN does) ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5T_str_t StrType::getStrpad() const @@ -292,7 +280,6 @@ StrType::getStrpad() const ///\par Description /// For information, please refer to the H5Tset_strpad API in /// the HDF5 C Reference Manual. -// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void StrType::setStrpad(H5T_str_t strpad) const @@ -303,13 +290,4 @@ StrType::setStrpad(H5T_str_t strpad) const } } -//-------------------------------------------------------------------------- -// Function: StrType destructor -///\brief Properly terminates access to this string datatype. -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -StrType::~StrType() -{ -} - } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5StrType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5StrType.h index 3e4013a6e42..0f51e759aaf 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5StrType.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5StrType.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -42,7 +41,7 @@ class H5_DLLCPP StrType : public AtomType { // Returns an StrType object via DataType* by decoding the // binary object description of this type. - virtual DataType *decode() const H5_OVERRIDE; + virtual DataType *decode() const override; // Retrieves the character set type of this string datatype. H5T_cset_t getCset() const; @@ -58,7 +57,7 @@ class H5_DLLCPP StrType : public AtomType { ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("StrType"); } @@ -73,7 +72,7 @@ class H5_DLLCPP StrType : public AtomType { StrType(const StrType &original); // Noop destructor. - virtual ~StrType() H5_OVERRIDE; + virtual ~StrType() override = default; }; // end of StrType } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5VarLenType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5VarLenType.cpp index 0270febfe59..49f2cbdd22b 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5VarLenType.cpp +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5VarLenType.cpp @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -42,7 +41,6 @@ VarLenType::VarLenType() : DataType() ///\brief Creates an VarLenType object using an existing id. ///\param existing_id - IN: Id of an existing datatype ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- VarLenType::VarLenType(const hid_t existing_id) : DataType(existing_id) { @@ -51,7 +49,6 @@ VarLenType::VarLenType(const hid_t existing_id) : DataType(existing_id) //-------------------------------------------------------------------------- // Function: VarLenType copy constructor ///\brief Copy constructor: same HDF5 object as \a original -// Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- VarLenType::VarLenType(const VarLenType &original) : DataType(original) { @@ -67,7 +64,6 @@ VarLenType::VarLenType(const VarLenType &original) : DataType(original) // constructor. // Updated: this is unnecessary. // -BMR, Sep, 2017 -// Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- VarLenType::VarLenType(const DataType *base_type) : DataType() { @@ -83,7 +79,6 @@ VarLenType::VarLenType(const DataType *base_type) : DataType() /// \a base_type. ///\param base_type - IN: An existing datatype ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- VarLenType::VarLenType(const DataType &base_type) : DataType() { @@ -100,7 +95,6 @@ VarLenType::VarLenType(const DataType &base_type) : DataType() ///\param loc - IN: Location of the type ///\param dtype_name - IN: Variable length type name ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Dec 2016 // Description // In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openVarLenType(const char*) to @@ -119,7 +113,6 @@ VarLenType::VarLenType(const H5Location &loc, const char *dtype_name) : DataType ///\param loc - IN: Location of the type ///\param dtype_name - IN: Variable length type name ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Dec 2016 // Description // In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openVarLenType(const H5std_string&) @@ -137,7 +130,6 @@ VarLenType::VarLenType(const H5Location &loc, const H5std_string &dtype_name) : /// binary object description of this type. /// ///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- DataType * VarLenType::decode() const @@ -154,13 +146,4 @@ VarLenType::decode() const return (encoded_vltype); } -//-------------------------------------------------------------------------- -// Function: VarLenType destructor -///\brief Properly terminates access to this datatype. -// Programmer Binh-Minh Ribler - May, 2004 -//-------------------------------------------------------------------------- -VarLenType::~VarLenType() -{ -} - } // namespace H5 diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5VarLenType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5VarLenType.h index 583b9cd57a5..d7f0ff1aefe 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5VarLenType.h +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5VarLenType.h @@ -1,7 +1,6 @@ // C++ informative line for the emacs editor: -*- C++ -*- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -33,11 +32,11 @@ class H5_DLLCPP VarLenType : public DataType { // Returns an VarLenType object via DataType* by decoding the // binary object description of this type. - virtual DataType *decode() const H5_OVERRIDE; + virtual DataType *decode() const override; ///\brief Returns this class name. virtual H5std_string - fromClass() const H5_OVERRIDE + fromClass() const override { return ("VarLenType"); } @@ -53,7 +52,7 @@ class H5_DLLCPP VarLenType : public DataType { VarLenType(const H5Location &loc, const H5std_string &name); // Noop destructor - virtual ~VarLenType() H5_OVERRIDE; + virtual ~VarLenType() override = default; // Default constructor VarLenType(); diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/RM_stylesheet.css b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/RM_stylesheet.css deleted file mode 100644 index 5d3f93b2e3a..00000000000 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/RM_stylesheet.css +++ /dev/null @@ -1,450 +0,0 @@ -BODY -{ -} -H1 -{ - FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif -} -H2 -{ - FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif -} -H3 -{ - FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif -} -H4 -{ - FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif -} -H5 -{ - FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif -} -H6 -{ - FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif -} -P -{ -} -CENTER -{ - FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif -} -TD -{ -} -TH -{ - FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif -} -UL -{ -} -DL -{ -} -DIV -{ - FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif -} -H1 -{ - TEXT-ALIGN: center -} -CAPTION -{ - FONT-WEIGHT: bold -} -DIV.qindex -{ - BORDER-RIGHT: #b0b0b0 1px solid; - PADDING-RIGHT: 2px; - BORDER-TOP: #b0b0b0 1px solid; - PADDING-LEFT: 2px; - PADDING-BOTTOM: 2px; - MARGIN: 2px; - BORDER-LEFT: #b0b0b0 1px solid; - WIDTH: 100%; - LINE-HEIGHT: 140%; - PADDING-TOP: 2px; - BORDER-BOTTOM: #b0b0b0 1px solid; - BACKGROUND-COLOR: #eeeeff; - TEXT-ALIGN: center -} -DIV.nav -{ - BORDER-RIGHT: #b0b0b0 1px solid; - PADDING-RIGHT: 2px; - BORDER-TOP: #b0b0b0 1px solid; - PADDING-LEFT: 2px; - PADDING-BOTTOM: 2px; - MARGIN: 2px; - BORDER-LEFT: #b0b0b0 1px solid; - WIDTH: 100%; - LINE-HEIGHT: 140%; - PADDING-TOP: 2px; - BORDER-BOTTOM: #b0b0b0 1px solid; - BACKGROUND-COLOR: #eeeeff; - TEXT-ALIGN: center -} -A.qindex -{ - FONT-WEIGHT: bold; - COLOR: #1a419d; - TEXT-DECORATION: none -} -A.qindex:visited -{ - FONT-WEIGHT: bold; - COLOR: #1a419d; - TEXT-DECORATION: none -} -A.qindex:hover -{ - BACKGROUND-COLOR: #ddddff; - TEXT-DECORATION: none -} -A.qindexHL -{ - BORDER-RIGHT: #9295c2 1px double; - BORDER-TOP: #9295c2 1px double; - FONT-WEIGHT: bold; - BORDER-LEFT: #9295c2 1px double; - COLOR: #ffffff; - BORDER-BOTTOM: #9295c2 1px double; - BACKGROUND-COLOR: #6666cc; - TEXT-DECORATION: none -} -A.qindexHL:hover -{ - COLOR: #ffffff; - BACKGROUND-COLOR: #6666cc; - TEXT-DECORATION: none -} -A.qindexHL:visited -{ - COLOR: #ffffff; - BACKGROUND-COLOR: #6666cc; - TEXT-DECORATION: none -} -A.el -{ - FONT-WEIGHT: bold; - TEXT-DECORATION: none -} -A.elRef -{ - FONT-WEIGHT: bold -} -A.code:link -{ - FONT-WEIGHT: normal; - COLOR: #0000ff; - TEXT-DECORATION: none -} -A.code:visited -{ - FONT-WEIGHT: normal; - COLOR: #0000ff; - TEXT-DECORATION: none -} -A.codeRef:link -{ - FONT-WEIGHT: normal; - COLOR: #0000ff -} -A.codeRef:visited -{ - FONT-WEIGHT: normal; - COLOR: #0000ff -} -A:hover -{ - BACKGROUND-COLOR: #f2f2ff; - TEXT-DECORATION: none -} -DL.el -{ - MARGIN-LEFT: -1cm -} -.fragment -{ - FONT-FAMILY: monospace -} -PRE.fragment -{ - BORDER-RIGHT: #cccccc 1px solid; - PADDING-RIGHT: 6px; - BORDER-TOP: #cccccc 1px solid; - PADDING-LEFT: 6px; - PADDING-BOTTOM: 4px; - MARGIN: 4px 8px 4px 2px; - BORDER-LEFT: #cccccc 1px solid; - PADDING-TOP: 4px; - BORDER-BOTTOM: #cccccc 1px solid; - BACKGROUND-COLOR: #f5f5f5 -} -DIV.ah -{ - MARGIN-TOP: 3px; - FONT-WEIGHT: bold; - MARGIN-BOTTOM: 3px; - COLOR: #ffffff; - BACKGROUND-COLOR: black -} -TD.md -{ - FONT-WEIGHT: bold; - BACKGROUND-COLOR: #f4f4fb -} -TD.mdname1 -{ - FONT-WEIGHT: bold; - COLOR: #602020; - BACKGROUND-COLOR: #f4f4fb -} -TD.mdname -{ - FONT-WEIGHT: bold; - WIDTH: 600px; - COLOR: #602020; - BACKGROUND-COLOR: #f4f4fb -} -DIV.groupHeader -{ - MARGIN-TOP: 12px; - FONT-WEIGHT: bold; - MARGIN-BOTTOM: 6px; - MARGIN-LEFT: 16px -} -DIV.groupText -{ - FONT-SIZE: 14px; - MARGIN-LEFT: 16px; - FONT-STYLE: italic -} -BODY -{ - BACKGROUND: white; - MARGIN-LEFT: 20px; - COLOR: black; - MARGIN-RIGHT: 20px -} -TD.indexkey -{ - BORDER-RIGHT: #cccccc 1px solid; - PADDING-RIGHT: 10px; - BORDER-TOP: #cccccc 1px solid; - PADDING-LEFT: 10px; - FONT-WEIGHT: bold; - PADDING-BOTTOM: 2px; - MARGIN: 2px 0px; - BORDER-LEFT: #cccccc 1px solid; - PADDING-TOP: 2px; - BORDER-BOTTOM: #cccccc 1px solid; - BACKGROUND-COLOR: #eeeeff -} -TD.indexvalue -{ - BORDER-RIGHT: #cccccc 1px solid; - PADDING-RIGHT: 10px; - BORDER-TOP: #cccccc 1px solid; - PADDING-LEFT: 10px; - PADDING-BOTTOM: 2px; - MARGIN: 2px 0px; - BORDER-LEFT: #cccccc 1px solid; - PADDING-TOP: 2px; - BORDER-BOTTOM: #cccccc 1px solid; - FONT-STYLE: italic; - BACKGROUND-COLOR: #eeeeff -} -TR.memlist -{ - BACKGROUND-COLOR: #f0f0f0 -} -P.formulaDsp -{ - TEXT-ALIGN: center -} -IMG.formulaDsp -{ -} -IMG.formulaInl -{ - VERTICAL-ALIGN: middle -} -SPAN.keyword -{ - COLOR: #008000 -} -SPAN.keywordtype -{ - COLOR: #604020 -} -SPAN.keywordflow -{ - COLOR: #e08000 -} -SPAN.comment -{ - COLOR: #800000 -} -SPAN.preprocessor -{ - COLOR: #806020 -} -SPAN.stringliteral -{ - COLOR: #002080 -} -SPAN.charliteral -{ - COLOR: #008080 -} -.mdTable -{ - BORDER-RIGHT: #868686 1px solid; - BORDER-TOP: #868686 1px solid; - BORDER-LEFT: #868686 1px solid; - BORDER-BOTTOM: #868686 1px solid; - BACKGROUND-COLOR: #f4f4fb -} -.mdRow -{ - PADDING-RIGHT: 10px; - PADDING-LEFT: 10px; - PADDING-BOTTOM: 8px; - PADDING-TOP: 8px -} -.mdescLeft -{ - BORDER-RIGHT: #e0e0e0 1px; - PADDING-RIGHT: 8px; - BORDER-TOP: #e0e0e0 1px; - PADDING-LEFT: 8px; - FONT-SIZE: 12px; - PADDING-BOTTOM: 4px; - MARGIN: 0px; - BORDER-LEFT: #e0e0e0 1px; - PADDING-TOP: 0px; - BORDER-BOTTOM: #e0e0e0 1px; - FONT-STYLE: italic; - BACKGROUND-COLOR: #fafafa -} -.mdescRight -{ - BORDER-RIGHT: #e0e0e0 1px; - PADDING-RIGHT: 8px; - BORDER-TOP: #e0e0e0 1px; - PADDING-LEFT: 8px; - FONT-SIZE: 12px; - PADDING-BOTTOM: 4px; - MARGIN: 0px; - BORDER-LEFT: #e0e0e0 1px; - PADDING-TOP: 0px; - BORDER-BOTTOM: #e0e0e0 1px; - FONT-STYLE: italic; - BACKGROUND-COLOR: #fafafa -} -.memItemLeft -{ - BORDER-RIGHT: #e0e0e0 1px; - PADDING-RIGHT: 0px; - BORDER-TOP: #e0e0e0 1px solid; - PADDING-LEFT: 8px; - FONT-SIZE: 12px; - PADDING-BOTTOM: 0px; - MARGIN: 4px; - BORDER-LEFT: #e0e0e0 1px; - PADDING-TOP: 1px; - BORDER-BOTTOM: #e0e0e0 1px; - BACKGROUND-COLOR: #fafafa -} -.memItemRight -{ - BORDER-RIGHT: #e0e0e0 1px; - PADDING-RIGHT: 8px; - BORDER-TOP: #e0e0e0 1px solid; - PADDING-LEFT: 8px; - FONT-SIZE: 13px; - PADDING-BOTTOM: 0px; - MARGIN: 4px; - BORDER-LEFT: #e0e0e0 1px; - PADDING-TOP: 1px; - BORDER-BOTTOM: #e0e0e0 1px; - BACKGROUND-COLOR: #fafafa -} -.memTemplItemLeft -{ - BORDER-RIGHT: #e0e0e0 1px; - PADDING-RIGHT: 0px; - BORDER-TOP: #e0e0e0 1px; - PADDING-LEFT: 8px; - FONT-SIZE: 12px; - PADDING-BOTTOM: 0px; - MARGIN: 4px; - BORDER-LEFT: #e0e0e0 1px; - PADDING-TOP: 1px; - BORDER-BOTTOM: #e0e0e0 1px; - BACKGROUND-COLOR: #fafafa -} -.memTemplItemRight -{ - BORDER-RIGHT: #e0e0e0 1px; - PADDING-RIGHT: 8px; - BORDER-TOP: #e0e0e0 1px; - PADDING-LEFT: 8px; - FONT-SIZE: 13px; - PADDING-BOTTOM: 0px; - MARGIN: 4px; - BORDER-LEFT: #e0e0e0 1px; - PADDING-TOP: 1px; - BORDER-BOTTOM: #e0e0e0 1px; - BACKGROUND-COLOR: #fafafa -} -.memTemplParams -{ - BORDER-RIGHT: #e0e0e0 1px; - PADDING-RIGHT: 0px; - BORDER-TOP: #e0e0e0 1px solid; - PADDING-LEFT: 8px; - FONT-SIZE: 12px; - PADDING-BOTTOM: 0px; - MARGIN: 4px; - BORDER-LEFT: #e0e0e0 1px; - COLOR: #606060; - PADDING-TOP: 1px; - BORDER-BOTTOM: #e0e0e0 1px; - BACKGROUND-COLOR: #fafafa -} -.search -{ - FONT-WEIGHT: bold; - COLOR: #003399 -} -FORM.search -{ - MARGIN-TOP: 0px; - MARGIN-BOTTOM: 0px -} -INPUT.search -{ - FONT-WEIGHT: normal; - FONT-SIZE: 75%; - COLOR: #000080; - BACKGROUND-COLOR: #eeeeff -} -TD.tiny -{ - FONT-SIZE: 75% -} -A -{ - COLOR: #252e78 -} -A:visited -{ - COLOR: #3d2185 -} diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/cpp_doc_config b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/cpp_doc_config deleted file mode 100644 index f17652eee6b..00000000000 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/cpp_doc_config +++ /dev/null @@ -1,2352 +0,0 @@ -# Doxyfile 1.8.5 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = "1.12.1" - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = cpplus_RM - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese- -# Traditional, Croatian, Czech, Danish, Dutch, English, Esperanto, Farsi, -# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en, -# Korean, Korean-en, Latvian, Norwegian, Macedonian, Persian, Polish, -# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, -# Turkish, Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = NO - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make -# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C -# (default is Fortran), use: inc=Fortran f=C. -# -# Note For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = NO - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = YES - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = YES - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be -# included in the documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. -# The default value is: YES. - -GENERATE_TODOLIST = NO - -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. -# The default value is: YES. - -GENERATE_TESTLIST = NO - -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = NO - -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= NO - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = NO - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = NO - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. Do not use file names with spaces, bibtex cannot handle them. See -# also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. -# Note: If this tag is empty the current directory is searched. - -INPUT = . - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. - -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.idl \ - *.ddl \ - *.odl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.cs \ - *.d \ - *.php \ - *.php4 \ - *.php5 \ - *.phtml \ - *.inc \ - *.m \ - *.markdown \ - *.md \ - *.mm \ - *.dox \ - *.py \ - *.f90 \ - *.f \ - *.for \ - *.tcl \ - *.vhd \ - *.vhdl \ - *.ucf \ - *.qsf \ - *.as \ - *.js - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = C:/hdf/C++/src/H5Alltypes.h \ - C:/hdf/C++/src/H5Classes.h - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = ../examples - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = ./header_files - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# compiled with the --with-libclang option. -# The default value is: NO. - -# CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -# CLANG_OPTIONS = - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = . - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = footer.html - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- -# defined cascading style sheet that is included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet file to the output directory. For an example -# see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = ./header_files/help.jpg \ - ./C2Cppfunction_map.htm - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = NO - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /