diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2009-09-02 21:27:03 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2009-09-02 21:27:03 (GMT) |
commit | 42be1460e464fc1d3d2c843ff9a2841cb9767d15 (patch) | |
tree | ef534736944298a20a076c1111c9e30bd2d8e5f5 /c++/src | |
parent | c1d205d282137c93dc8f2cac757045960075ca2c (diff) | |
download | hdf5-42be1460e464fc1d3d2c843ff9a2841cb9767d15.zip hdf5-42be1460e464fc1d3d2c843ff9a2841cb9767d15.tar.gz hdf5-42be1460e464fc1d3d2c843ff9a2841cb9767d15.tar.bz2 |
[svn-r17443] Description:
Merged changes from the trunk into the branch:
svn merge -r17188:17442 https://svn.hdfgroup.uiuc.edu/hdf5/trunk
Tested: smirom (icc, gcc)
Diffstat (limited to 'c++/src')
-rw-r--r-- | c++/src/H5AbstractDs.cpp | 5 | ||||
-rw-r--r-- | c++/src/H5AbstractDs.h | 3 | ||||
-rw-r--r-- | c++/src/H5Attribute.cpp | 243 | ||||
-rw-r--r-- | c++/src/H5Attribute.h | 8 | ||||
-rw-r--r-- | c++/src/H5DataSet.cpp | 203 | ||||
-rw-r--r-- | c++/src/H5DataSet.h | 9 | ||||
-rw-r--r-- | c++/src/Makefile.in | 182 |
7 files changed, 470 insertions, 183 deletions
diff --git a/c++/src/H5AbstractDs.cpp b/c++/src/H5AbstractDs.cpp index a61cc88..19eeb33 100644 --- a/c++/src/H5AbstractDs.cpp +++ b/c++/src/H5AbstractDs.cpp @@ -25,6 +25,11 @@ #include "H5CommonFG.h" #include "H5Alltypes.h" +#include <iostream> // remove when done + + using std::cerr; + using std::endl; + #ifndef H5_NO_NAMESPACE namespace H5 { #endif diff --git a/c++/src/H5AbstractDs.h b/c++/src/H5AbstractDs.h index c98e5e1..1d04d6c 100644 --- a/c++/src/H5AbstractDs.h +++ b/c++/src/H5AbstractDs.h @@ -51,6 +51,9 @@ class H5_DLLCPP AbstractDs { StrType getStrType() const; VarLenType getVarLenType() const; + // Gets the size in memory of this abstract dataset. + virtual size_t getInMemDataSize() const = 0; + // Gets the dataspace of this abstract dataset - pure virtual. virtual DataSpace getSpace() const = 0; diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp index a844b77..6de5e63 100644 --- a/c++/src/H5Attribute.cpp +++ b/c++/src/H5Attribute.cpp @@ -150,50 +150,6 @@ void Attribute::read( const DataType& mem_type, void *buf ) const } //-------------------------------------------------------------------------- -// Function: Attribute::getInMemDataSize -///\brief Gets the size in memory of the attribute's data. -///\exception H5::AttributeIException -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -size_t Attribute::getInMemDataSize() const -{ - // Get the data type of this attribute - hid_t mem_type_id = H5Aget_type(id); - if (mem_type_id <= 0) - { - throw AttributeIException("Attribute::getDataSize", "H5Aget_type failed"); - } - - // Get the data type's size - hid_t native_type = H5Tget_native_type(mem_type_id, H5T_DIR_DEFAULT); - if (native_type < 0) - { - throw AttributeIException("Attribute::read", "H5Tget_native_type failed"); - } - size_t type_size = H5Tget_size(native_type); - if (type_size == 0) - { - throw AttributeIException("Attribute::read", "H5Tget_size failed"); - } - - // Get number of elements of the attribute - hid_t space_id = H5Aget_space(id); - if (space_id < 0) - { - throw AttributeIException("Attribute::read", "H5Aget_space failed"); - } - hssize_t num_elements = H5Sget_simple_extent_npoints(space_id); - if (num_elements < 0) - { - throw AttributeIException("Attribute::read", "H5Sget_simple_extent_npoints failed"); - } - - // Calculate and return the size of the data - size_t data_size = type_size * num_elements; - return(data_size); -} - -//-------------------------------------------------------------------------- // Function: Attribute::read ///\brief This is an overloaded member function, provided for convenience. /// It reads a \a H5std_string from this attribute. @@ -206,73 +162,78 @@ size_t Attribute::getInMemDataSize() const // Corrected a misunderstanding that H5Aread would allocate // space for the buffer. Obtained the attribute size and // allocated memory properly. - BMR +// Apr 2009 +// Used getInMemDataSize to get attribute data size. - BMR +// Jul 2009 +// Divided into specific private functions for fixed- and +// variable-len string data: p_read_fixed_len and +// p_read_variable_len. This should improve readability. //-------------------------------------------------------------------------- void Attribute::read(const DataType& mem_type, H5std_string& strg) const { - // Check if this attribute has variable-len string or fixed-len string and // proceed appropriately. htri_t is_variable_len = H5Tis_variable_str(mem_type.getId()); if (is_variable_len < 0) { - throw AttributeIException("Attribute::write", "H5Tis_variable_str failed"); + throw AttributeIException("Attribute::read", "H5Tis_variable_str failed"); } - // Prepare and call C API to read attribute. - char *strg_C; - herr_t ret_value = 0; - size_t attr_size; - if (!is_variable_len) // only allocate for fixed-len string + if (!is_variable_len) // only allocate for fixed-len string { - // Get the size of the attribute's data - attr_size = getInMemDataSize(); - - if (attr_size > 0) - { - strg_C = new char [(size_t)attr_size+1]; - if (strg_C == NULL) - { - throw AttributeIException("Attribute::read", - "Unable to allocate buffer to read the attribute"); - } - ret_value = H5Aread(id, mem_type.getId(), strg_C); - } - else - HDstrcpy(strg_C, ""); + p_read_fixed_len(mem_type, strg); } else { - // no allocation for variable-len string; C library will - ret_value = H5Aread(id, mem_type.getId(), &strg_C); + p_read_variable_len(mem_type, strg); } - if( ret_value < 0 ) +} + +//-------------------------------------------------------------------------- +// Function: Attribute::getInMemDataSize +///\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 +{ + char *func = "Attribute::getInMemDataSize"; + + // Get the data type of this attribute + hid_t mem_type_id = H5Aget_type(id); + if( mem_type_id < 0 ) { - if (!is_variable_len) // only de-allocate for fixed-len string - delete []strg_C; - throw AttributeIException("Attribute::read", "H5Aread failed"); + throw AttributeIException(func, "H5Aget_type failed"); } - if( ret_value < 0 ) + // Get the data type's size + hid_t native_type = H5Tget_native_type(mem_type_id, H5T_DIR_DEFAULT); + if (native_type < 0) { - if (!is_variable_len) // only de-allocate for fixed-len string - delete []strg_C; - throw AttributeIException("Attribute::read", "H5Aread failed"); + throw AttributeIException(func, "H5Tget_native_type failed"); + } + size_t type_size = H5Tget_size(native_type); + if (type_size == 0) + { + throw AttributeIException(func, "H5Tget_size failed"); } - // Get string from the C char* and release resource allocated locally - if (!is_variable_len) + // Get number of elements of the attribute + hid_t space_id = H5Aget_space(id); + if (space_id < 0) { - if (strg_C != "") - strg_C[attr_size] = '\0'; - strg = strg_C; - delete []strg_C; + throw AttributeIException(func, "H5Aget_space failed"); } - // Get string from the C char* and release resource allocated by C API - else + hssize_t num_elements = H5Sget_simple_extent_npoints(space_id); + if (num_elements < 0) { - strg = strg_C; - HDfree(strg_C); + throw AttributeIException(func, "H5Sget_simple_extent_npoints failed"); } + + // Calculate and return the size of the data + size_t data_size = type_size * num_elements; + return(data_size); } //-------------------------------------------------------------------------- @@ -300,26 +261,6 @@ DataSpace Attribute::getSpace() const } //-------------------------------------------------------------------------- -// Function: Attribute::p_get_type (private) -// Purpose Gets the datatype of this attribute. -// Return Id of the datatype -// Exception H5::AttributeIException -// Description -// This private function is used in AbstractDs. -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -hid_t Attribute::p_get_type() const -{ - hid_t type_id = H5Aget_type( id ); - if( type_id > 0 ) - return( type_id ); - else - { - throw AttributeIException("", "H5Aget_type failed"); - } -} - -//-------------------------------------------------------------------------- // Function: Attribute::getFileName ///\brief Gets the name of the file, in which this attribute belongs. ///\return File name @@ -441,6 +382,96 @@ hid_t Attribute::getId() const } //-------------------------------------------------------------------------- +// Function: Attribute::p_get_type (private) +// Purpose Gets the datatype of this attribute. +// Return Id of the datatype +// Exception H5::AttributeIException +// Description +// This private function is used in AbstractDs. +// Programmer Binh-Minh Ribler - 2000 +//-------------------------------------------------------------------------- +hid_t Attribute::p_get_type() const +{ + hid_t type_id = H5Aget_type( id ); + if( type_id > 0 ) + return( type_id ); + else + { + throw AttributeIException("", "H5Aget_type failed"); + } +} + +//-------------------------------------------------------------------------- +// Function: Attribute::p_read_fixed_len (private) +// brief Reads a fixed length \a H5std_string from an attribute. +// 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 +// Attribute::read +//-------------------------------------------------------------------------- +void Attribute::p_read_fixed_len(const DataType& mem_type, H5std_string& strg) const +{ + // Only allocate for fixed-len string. + + // Get the size of the attribute's data + size_t attr_size = getInMemDataSize(); + + // If there is data, allocate buffer and read it. + if (attr_size > 0) + { + char *strg_C = NULL; + + strg_C = new char [(size_t)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 + throw AttributeIException("Attribute::read", "H5Aread failed"); + } + + // Get string from the C char* and release resource allocated locally + strg = strg_C; + delete []strg_C; + } +} + +//-------------------------------------------------------------------------- +// Function: Attribute::p_read_variable_len (private) +// brief Reads a variable length \a H5std_string from an attribute. +// 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 +// Attribute::read +//-------------------------------------------------------------------------- +void Attribute::p_read_variable_len(const DataType& mem_type, H5std_string& strg) const +{ + + // Prepare and call C API to read attribute. + char *strg_C; + + // Read attribute, no allocation for variable-len string; C library will + herr_t ret_value = H5Aread(id, mem_type.getId(), &strg_C); + + if( ret_value < 0 ) + { + throw AttributeIException("Attribute::read", "H5Aread failed"); + } + + // Get string from the C char* and release resource allocated by C API + strg = strg_C; + HDfree(strg_C); +} + +//-------------------------------------------------------------------------- // Function: Attribute::p_setId ///\brief Sets the identifier of this object to a new value. /// diff --git a/c++/src/H5Attribute.h b/c++/src/H5Attribute.h index 00a08a5..284e5bc 100644 --- a/c++/src/H5Attribute.h +++ b/c++/src/H5Attribute.h @@ -38,10 +38,10 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent { virtual DataSpace getSpace() const; // Returns the amount of storage size required for this attribute. - hsize_t getStorageSize() const; + virtual hsize_t getStorageSize() const; // Returns the in memory size of this attribute's data. - size_t getInMemDataSize() const; + virtual size_t getInMemDataSize() const; // Reads data from this attribute. void read( const DataType& mem_type, void *buf ) const; @@ -82,6 +82,10 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent { // sub-types virtual hid_t p_get_type() const; + // Reads variable or fixed len strings from this attribute. + void p_read_variable_len(const DataType& mem_type, H5std_string& strg) const; + void p_read_fixed_len(const DataType& mem_type, H5std_string& strg) const; + // do not inherit H5Object::iterateAttrs int iterateAttrs() { return 0; } diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp index 494d3ea..cddb5d4 100644 --- a/c++/src/H5DataSet.cpp +++ b/c++/src/H5DataSet.cpp @@ -37,6 +37,7 @@ #include "H5File.h" #include "H5Attribute.h" #include "H5DataSet.h" +#include "H5private.h" // for HDfree #ifndef H5_NO_NAMESPACE namespace H5 { @@ -220,6 +221,53 @@ hsize_t DataSet::getStorageSize() const } //-------------------------------------------------------------------------- +// Function: DataSet::getInMemDataSize +///\brief Gets the size in memory of the dataset's data. +///\return Size of data (in memory) +///\exception H5::DataSetIException +// Programmer Binh-Minh Ribler - Apr 2009 +//-------------------------------------------------------------------------- +size_t DataSet::getInMemDataSize() const +{ + char *func = "DataSet::getInMemDataSize"; + + // Get the data type of this dataset + hid_t mem_type_id = H5Dget_type(id); + if( mem_type_id < 0 ) + { + throw DataSetIException(func, "H5Dget_type failed"); + } + + // Get the data type's size + hid_t native_type = H5Tget_native_type(mem_type_id, H5T_DIR_DEFAULT); + if (native_type < 0) + { + throw DataSetIException(func, "H5Tget_native_type failed"); + } + size_t type_size = H5Tget_size(native_type); + if (type_size == 0) + { + throw DataSetIException(func, "H5Tget_size failed"); + } + + // Get number of elements of the dataset + hid_t space_id = H5Dget_space(id); // first get its data space + if (space_id < 0) + { + throw DataSetIException(func, "H5Dget_space failed"); + } + hssize_t num_elements = H5Sget_simple_extent_npoints(space_id); + if (num_elements < 0) + { + throw DataSetIException(func, "H5Sget_simple_extent_npoints failed"); + } + + // Calculate and return the size of the data + size_t data_size = type_size * num_elements; + return(data_size); +} + +//-------------------------------------------------------------------------- // Function: DataSet::getOffset ///\brief Returns the address of this dataset in the file. ///\return Address of dataset @@ -364,20 +412,45 @@ void DataSet::read( void* buf, const DataType& mem_type, const DataSpace& mem_sp // Function: DataSet::read ///\brief This is an overloaded member function, provided for convenience. /// It takes a reference to a \c std::string for the buffer. +///\param buf - IN: Buffer for read data +///\param mem_type - IN: Memory datatype +///\param mem_space - IN: Memory dataspace +///\param file_space - IN: Dataset's dataspace in the file +///\param xfer_plist - IN: Transfer property list for this I/O operation +///\exception H5::DataSetIException // Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -void DataSet::read( H5std_string& strg, const DataType& mem_type, const DataSpace& mem_space, const DataSpace& file_space, const DSetMemXferPropList& xfer_plist ) const +// Modification +// Jul 2009 +// Follow the change to Attribute::read and use the following +// private functions to read datasets with fixed- and +// variable-length string: +// DataSet::p_read_fixed_len and +// DataSet::p_read_variable_len +//-------------------------------------------------------------------------- +void DataSet::read(H5std_string& strg, const DataType& mem_type, const DataSpace& mem_space, const DataSpace& file_space, const DSetMemXferPropList& xfer_plist) const { - // Allocate C character string for reading - size_t size = mem_type.getSize(); - char* strg_C = new char[size+1]; // temporary C-string for C API + // Check if this dataset has variable-len string or fixed-len string and + // proceed appropriately. + htri_t is_variable_len = H5Tis_variable_str(mem_type.getId()); + if (is_variable_len < 0) + { + throw DataSetIException("DataSet::read", "H5Tis_variable_str failed"); + } - // Use the overloaded member to read - read(strg_C, mem_type, mem_space, file_space, xfer_plist); + // Obtain identifiers for C API + hid_t mem_type_id = mem_type.getId(); + hid_t mem_space_id = mem_space.getId(); + hid_t file_space_id = file_space.getId(); + hid_t xfer_plist_id = xfer_plist.getId(); - // Get the String and clean up - strg = strg_C; - delete []strg_C; + if (!is_variable_len) // only allocate for fixed-len string + { + p_read_fixed_len(mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg); + } + else + { + p_read_variable_len(mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg); + } } //-------------------------------------------------------------------------- @@ -416,15 +489,46 @@ void DataSet::write( const void* buf, const DataType& mem_type, const DataSpace& ///\brief This is an overloaded member function, provided for convenience. /// It takes a reference to a \c std::string for the buffer. // Programmer Binh-Minh Ribler - 2000 +// Modification +// Jul 2009 +// Modified to pass the buffer into H5Dwrite properly depending +// whether the dataset has variable- or fixed-length string. //-------------------------------------------------------------------------- void DataSet::write( const H5std_string& strg, const DataType& mem_type, const DataSpace& mem_space, const DataSpace& file_space, const DSetMemXferPropList& xfer_plist ) const { - // Convert string to C-string - const char* strg_C; - strg_C = strg.c_str(); // strg_C refers to the contents of strg as a C-str + // Check if this attribute has variable-len string or fixed-len string and + // proceed appropriately. + htri_t is_variable_len = H5Tis_variable_str(mem_type.getId()); + if (is_variable_len < 0) + { + throw DataSetIException("DataSet::write", "H5Tis_variable_str failed"); + } + + // Obtain identifiers for C API + hid_t mem_type_id = mem_type.getId(); + hid_t mem_space_id = mem_space.getId(); + hid_t file_space_id = file_space.getId(); + hid_t xfer_plist_id = xfer_plist.getId(); + + // Convert string to C-string + const char* strg_C; + strg_C = strg.c_str(); // strg_C refers to the contents of strg as a C-str + herr_t ret_value = 0; - // Use the overloaded member - write(strg_C, mem_type, mem_space, file_space, xfer_plist); + // Pass string in differently depends on variable or fixed length + if (!is_variable_len) + { + ret_value = H5Dwrite( id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg_C ); + } + else + { + // passing string argument by address + ret_value = H5Dwrite( id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, &strg_C ); + } + if (ret_value < 0) + { + throw DataSetIException("DataSet::write", "H5Dwrite failed"); + } } //-------------------------------------------------------------------------- @@ -586,7 +690,74 @@ hid_t DataSet::getId() const } //-------------------------------------------------------------------------- -// Function: DataSet::p_setId +// Function: DataSet::p_read_fixed_len (private) +// brief Reads a fixed length \a H5std_string from an dataset. +// param mem_type - IN: DataSet datatype (in memory) +// param strg - IN: Buffer for read string +// exception H5::DataSetIException +// Programmer Binh-Minh Ribler - Jul, 2009 +// Modification +// Jul 2009 +// Added in follow to the change in Attribute::read +//-------------------------------------------------------------------------- +void DataSet::p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const +{ + // Only allocate for fixed-len string. + + // Get the size of the dataset's data + size_t attr_size = getInMemDataSize(); + + // If there is data, allocate buffer and read it. + if (attr_size > 0) + { + char *strg_C = NULL; + + strg_C = new char [(size_t)attr_size+1]; + herr_t ret_value = H5Dread(id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg_C); + + if( ret_value < 0 ) + { + delete []strg_C; // de-allocate for fixed-len string + throw DataSetIException("DataSet::read", "H5Dread failed for fixed length string"); + } + + // Get string from the C char* and release resource allocated locally + strg = strg_C; + delete []strg_C; + } +} + +//-------------------------------------------------------------------------- +// Function: DataSet::p_read_variable_len (private) +// brief Reads a variable length \a H5std_string from an dataset. +// param mem_type - IN: DataSet datatype (in memory) +// param strg - IN: Buffer for read string +// exception H5::DataSetIException +// Programmer Binh-Minh Ribler - Jul, 2009 +// Modification +// Jul 2009 +// Added in follow to the change in Attribute::read +//-------------------------------------------------------------------------- +void DataSet::p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const +{ + // Prepare and call C API to read dataset. + char *strg_C; + + // Read dataset, no allocation for variable-len string; C library will + herr_t ret_value = H5Dread(id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, &strg_C); + + if( ret_value < 0 ) + { + throw DataSetIException("DataSet::read", "H5Dread failed for variable length string"); + } + + // Get string from the C char* and release resource allocated by C API + strg = strg_C; + HDfree(strg_C); +} + +//-------------------------------------------------------------------------- +// Function: DataSet::p_setId (private) ///\brief Sets the identifier of this object to a new value. /// ///\exception H5::IdComponentException when the attempt to close the HDF5 diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h index f26d775..3d9183d 100644 --- a/c++/src/H5DataSet.h +++ b/c++/src/H5DataSet.h @@ -49,7 +49,10 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs { void getSpaceStatus(H5D_space_status_t& status) const; // Returns the amount of storage size required for this dataset. - hsize_t getStorageSize() const; + virtual hsize_t getStorageSize() const; + + // Returns the in memory size of this attribute's data. + virtual size_t getInMemDataSize() const; // Returns the number of bytes required to store VL data. hsize_t getVlenBufSize( DataType& type, DataSpace& space ) const; @@ -113,6 +116,10 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs { // sub-types virtual hid_t p_get_type() const; + // 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, const hid_t xfer_plist_id, H5std_string& strg) const; + void p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const; + protected: // Sets the dataset id. virtual void p_setId(const hid_t new_id); diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 49a4990..ce5ad91 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.2 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -35,8 +36,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -65,15 +67,30 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = h5c++ +CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(includedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libhdf5_cpp_la_LIBADD = am_libhdf5_cpp_la_OBJECTS = H5Exception.lo H5IdComponent.lo \ @@ -87,11 +104,11 @@ libhdf5_cpp_la_OBJECTS = $(am_libhdf5_cpp_la_OBJECTS) libhdf5_cpp_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libhdf5_cpp_la_LDFLAGS) $(LDFLAGS) -o $@ -binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ @@ -103,10 +120,11 @@ CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libhdf5_cpp_la_SOURCES) DIST_SOURCES = $(libhdf5_cpp_la_SOURCES) -includeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@ @@ -221,6 +239,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ @@ -312,6 +331,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @@ -360,7 +380,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 34 +LT_VERS_REVISION = 35 LT_VERS_AGE = 0 # Include src directory @@ -430,9 +450,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign c++/src/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign c++/src/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign c++/src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign c++/src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -450,25 +470,30 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): h5c++: $(top_builddir)/config.status $(srcdir)/h5c++.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + list2="$$list2 $$p"; \ else :; fi; \ - done + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: @@ -484,22 +509,37 @@ libhdf5_cpp.la: $(libhdf5_cpp_la_OBJECTS) $(libhdf5_cpp_la_DEPENDENCIES) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_SCRIPTS)'; for p in $$list; do \ + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ - else :; fi; \ - done + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) - @list='$(bin_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -536,21 +576,21 @@ distclean-compile: .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< @@ -563,20 +603,23 @@ clean-libtool: install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; for p in $$list; do \ + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -590,7 +633,7 @@ tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -598,29 +641,34 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -641,13 +689,17 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -679,6 +731,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @@ -701,6 +754,8 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: @@ -709,18 +764,28 @@ install-data-am: install-includeHEADERS install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-binSCRIPTS install-libLTLIBRARIES install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -744,7 +809,7 @@ ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-includeHEADERS \ uninstall-libLTLIBRARIES -.MAKE: install-am install-strip +.MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am all-local check check-TESTS check-am \ clean clean-generic clean-libLTLIBRARIES clean-libtool ctags \ @@ -990,6 +1055,7 @@ check-vfd: $(LIB) $(PROGS) $(TESTS) HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: |