summaryrefslogtreecommitdiffstats
path: root/c++/src
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src')
-rw-r--r--c++/src/H5AbstractDs.cpp42
-rw-r--r--c++/src/H5AbstractDs.h16
-rw-r--r--c++/src/H5ArrayType.cpp32
-rw-r--r--c++/src/H5ArrayType.h4
-rw-r--r--c++/src/H5AtomType.cpp32
-rw-r--r--c++/src/H5AtomType.h22
-rw-r--r--c++/src/H5Attribute.cpp49
-rw-r--r--c++/src/H5Attribute.h34
-rw-r--r--c++/src/H5CompType.cpp40
-rw-r--r--c++/src/H5CompType.h31
-rw-r--r--c++/src/H5DataSet.cpp5
-rw-r--r--c++/src/H5DataSet.h41
-rw-r--r--c++/src/H5DataSpace.cpp83
-rw-r--r--c++/src/H5DataSpace.h88
-rw-r--r--c++/src/H5DataType.cpp38
-rw-r--r--c++/src/H5DcreatProp.cpp251
-rw-r--r--c++/src/H5DcreatProp.h114
-rw-r--r--c++/src/H5DxferProp.cpp70
-rw-r--r--c++/src/H5DxferProp.h6
-rw-r--r--c++/src/H5EnumType.h36
-rw-r--r--c++/src/H5FaccProp.cpp114
-rw-r--r--c++/src/H5FaccProp.h18
-rw-r--r--c++/src/H5FcreatProp.cpp18
-rw-r--r--c++/src/H5FcreatProp.h18
-rw-r--r--c++/src/H5FloatType.h39
-rw-r--r--c++/src/H5Group.cpp16
-rw-r--r--c++/src/H5Group.h10
-rw-r--r--c++/src/H5IntType.h24
-rw-r--r--c++/src/H5Library.cpp4
-rw-r--r--c++/src/H5Library.h4
-rw-r--r--c++/src/H5PredType.cpp57
-rw-r--r--c++/src/H5PredType.h25
-rw-r--r--c++/src/H5PropList.cpp37
-rw-r--r--c++/src/H5PropList.h58
-rw-r--r--c++/src/H5StrType.cpp10
-rw-r--r--c++/src/H5StrType.h31
-rw-r--r--c++/src/H5VarLenType.cpp10
-rw-r--r--c++/src/H5VarLenType.h4
38 files changed, 843 insertions, 688 deletions
diff --git a/c++/src/H5AbstractDs.cpp b/c++/src/H5AbstractDs.cpp
index 79aaadf..33fadc5 100644
--- a/c++/src/H5AbstractDs.cpp
+++ b/c++/src/H5AbstractDs.cpp
@@ -53,16 +53,16 @@ AbstractDs::AbstractDs( const AbstractDs& original ) : H5Object( original ) {}
// Function: AbstractDs::getTypeClass
///\brief Returns the class of the datatype that is used by this
/// object, which can be a dataset or an attribute.
-///\return Datatype class identifier
+///\return Datatype class identifier
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_class_t AbstractDs::getTypeClass() const
{
// Gets the datatype used by this dataset or attribute.
- // p_getType calls either H5Dget_type or H5Aget_type depending on
+ // p_get_type calls either H5Dget_type or H5Aget_type depending on
// which object invokes getTypeClass
- DataType datatype( p_getType());
+ DataType datatype(p_get_type());
// Gets the class of the datatype and validate it before returning
H5T_class_t type_class = H5Tget_class( datatype.getId());
@@ -79,16 +79,16 @@ H5T_class_t AbstractDs::getTypeClass() const
// Function: AbstractDs::getDataType
///\brief Returns the generic datatype of this abstract dataset, which
/// can be a dataset or an attribute.
-///\return DataType instance
+///\return DataType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType AbstractDs::getDataType() const
{
// Gets the id of the datatype used by this dataset or attribute.
- // p_getType calls either H5Dget_type or H5Aget_type depending on
+ // p_get_type calls either H5Dget_type or H5Aget_type depending on
// which object invokes getTypeClass
- hid_t datatype_id = p_getType(); // returned value is already validated
+ hid_t datatype_id = p_get_type(); // returned value is already validated
// Create and return the DataType object
DataType datatype( datatype_id );
@@ -99,70 +99,70 @@ DataType AbstractDs::getDataType() const
// Function: AbstractDs::getEnumType
///\brief Returns the enumeration datatype of this abstract dataset which
/// can be a dataset or an attribute.
-///\return EnumType instance
+///\return EnumType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType AbstractDs::getEnumType() const
{
- EnumType enumtype( p_getType());
- return( enumtype );
+ EnumType enumtype(p_get_type());
+ return(enumtype);
}
//--------------------------------------------------------------------------
// Function: AbstractDs::getCompType
///\brief Returns the compound datatype of this abstract dataset which
/// can be a dataset or an attribute.
-///\return CompType instance
+///\return CompType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType AbstractDs::getCompType() const
{
- CompType comptype( p_getType());
- return( comptype );
+ CompType comptype(p_get_type());
+ return(comptype);
}
//--------------------------------------------------------------------------
// Function: AbstractDs::getIntType
///\brief Returns the integer datatype of this abstract dataset which
/// can be a dataset or an attribute.
-///\return IntType instance
+///\return IntType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType AbstractDs::getIntType() const
{
- IntType inttype( p_getType());
- return( inttype );
+ IntType inttype(p_get_type());
+ return(inttype);
}
//--------------------------------------------------------------------------
// Function: AbstractDs::getFloatType
///\brief Returns the floating-point datatype of this abstract dataset,
/// which can be a dataset or an attribute.
-///\return FloatType instance
+///\return FloatType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType AbstractDs::getFloatType() const
{
- FloatType floatype( p_getType());
- return( floatype );
+ FloatType floatype(p_get_type());
+ return(floatype);
}
//--------------------------------------------------------------------------
// Function: AbstractDs::getStrType
///\brief Returns the string datatype of this abstract dataset which
/// can be a dataset or an attribute.
-///\return StrType instance
+///\return StrType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType AbstractDs::getStrType() const
{
- StrType strtype( p_getType());
- return( strtype );
+ StrType strtype(p_get_type());
+ return(strtype);
}
//--------------------------------------------------------------------------
diff --git a/c++/src/H5AbstractDs.h b/c++/src/H5AbstractDs.h
index 579fc18..8f56e2b 100644
--- a/c++/src/H5AbstractDs.h
+++ b/c++/src/H5AbstractDs.h
@@ -26,13 +26,6 @@ namespace H5 {
#endif
class H5_DLLCPP AbstractDs : public H5Object {
public:
- // Gets the dataspace of this abstract dataset - pure virtual
- virtual DataSpace getSpace() const = 0;
-
- // Gets the class of the datatype that is used by this abstract
- // dataset
- H5T_class_t getTypeClass() const;
-
// Gets a copy the datatype of that this abstract dataset uses.
// Note that this datatype is a generic one and can only be accessed
// via generic member functions, i.e., member functions belong
@@ -47,6 +40,13 @@ class H5_DLLCPP AbstractDs : public H5Object {
FloatType getFloatType() const;
StrType getStrType() const;
+ // Gets the dataspace of this abstract dataset - pure virtual
+ virtual DataSpace getSpace() const = 0;
+
+ // Gets the class of the datatype that is used by this abstract
+ // dataset
+ H5T_class_t getTypeClass() const;
+
// Copy constructor
AbstractDs( const AbstractDs& original );
@@ -61,7 +61,7 @@ class H5_DLLCPP AbstractDs : public H5Object {
private:
// This member function is implemented by DataSet and Attribute
- virtual hid_t p_getType() const = 0;
+ virtual hid_t p_get_type() const = 0;
};
#ifndef H5_NO_NAMESPACE
}
diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp
index ed69a8c..b580660 100644
--- a/c++/src/H5ArrayType.cpp
+++ b/c++/src/H5ArrayType.cpp
@@ -41,10 +41,10 @@ ArrayType::ArrayType() : DataType()
}
//--------------------------------------------------------------------------
-// Function: ArrayType overloaded constructor
-///\brief Creates an ArrayType object using an existing id.
-///\param existing_id - IN: Id of an existing datatype
-///\exception H5::DataTypeIException
+// Function: ArrayType overloaded constructor
+///\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 )
@@ -80,13 +80,13 @@ ArrayType::ArrayType( const ArrayType& original ) : DataType( original )
}
//--------------------------------------------------------------------------
-// Function: ArrayType overloaded constructor
-///\brief Creates a new array data type based on the specified
+// Function: ArrayType overloaded constructor
+///\brief Creates a new array data type based on the specified
/// \a base_type.
-///\param base_type - IN: Existing datatype
-///\param ndims - IN: Rank of the array, [0..H5S_MAX_RANK]
-///\param dims - IN: Size of each array dimension
-///\exception H5::DataTypeIException
+///\param base_type - IN: Existing datatype
+///\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()
@@ -104,10 +104,10 @@ ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims)
}
//--------------------------------------------------------------------------
-// Function: ArrayType::getArrayNDims
-///\brief Returns the number of dimensions for an array datatype.
+// Function: ArrayType::getArrayNDims
+///\brief Returns the number of dimensions for an array datatype.
///\return Number of dimensions
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
int ArrayType::getArrayNDims()
@@ -126,11 +126,11 @@ int ArrayType::getArrayNDims()
}
//--------------------------------------------------------------------------
-// Function: ArrayType::getArrayDims
-///\brief Retrieves the size of all dimensions of an array datatype.
+// Function: ArrayType::getArrayDims
+///\brief Retrieves the size of all dimensions of an array datatype.
///\param dims - OUT: Sizes of dimensions
///\return Number of dimensions
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
int ArrayType::getArrayDims(hsize_t* dims)
diff --git a/c++/src/H5ArrayType.h b/c++/src/H5ArrayType.h
index d98488e..fb5eb2e 100644
--- a/c++/src/H5ArrayType.h
+++ b/c++/src/H5ArrayType.h
@@ -34,10 +34,10 @@ class H5_DLLCPP ArrayType : public DataType {
// Returns the sizes of dimensions of this array datatype.
int getArrayDims(hsize_t* dims);
- // Copy constructor - makes copy of the original object
+ // Copy constructor: makes copy of the original object.
ArrayType( const ArrayType& original );
- // Default destructor
+ // Noop destructor
virtual ~ArrayType();
protected:
diff --git a/c++/src/H5AtomType.cpp b/c++/src/H5AtomType.cpp
index b041d53..902d07c 100644
--- a/c++/src/H5AtomType.cpp
+++ b/c++/src/H5AtomType.cpp
@@ -28,21 +28,23 @@
namespace H5 {
#endif
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
-// Function: AtomType default constructor
-///\brief Default constructor: Creates a stub datatype
+// Function: AtomType default constructor [protected]
+// Purpose Default constructor: creates a stub atomic datatype.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::AtomType() : DataType() {}
//--------------------------------------------------------------------------
-// Function: AtomType overloaded constructor
-///\brief Creates an AtomType object using an existing id.
-///\param existing_id - IN: Id of an existing datatype
-///\exception H5::DataTypeIException
+// Function: AtomType overloaded constructor [protected]
+// 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 ) {}
+#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: AtomType copy constructor
@@ -55,7 +57,7 @@ AtomType::AtomType( const AtomType& original ) : DataType( original ) {}
// Function: AtomType::setSize
///\brief Sets the total size for an atomic datatype.
///\param size - IN: Size to set
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::setSize( size_t size ) const
@@ -76,7 +78,7 @@ void AtomType::setSize( size_t size ) const
/// \li \c H5T_ORDER_LE
/// \li \c H5T_ORDER_BE
/// \li \c H5T_ORDER_VAX
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_order_t AtomType::getOrder( string& order_string ) const
@@ -106,7 +108,7 @@ H5T_order_t AtomType::getOrder( string& order_string ) const
/// \li \c H5T_ORDER_LE
/// \li \c H5T_ORDER_BE
/// \li \c H5T_ORDER_VAX
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::setOrder( H5T_order_t order ) const
@@ -123,7 +125,7 @@ void AtomType::setOrder( H5T_order_t order ) const
// Function: AtomType::getPrecision
///\brief Returns the precision of an atomic datatype.
///\return Number of significant bits
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
///\par Description
/// The precision is the number of significant bits which,
/// unless padding is present, is 8 times larger than the
@@ -147,7 +149,7 @@ size_t AtomType::getPrecision() const
// Function: AtomType::setPrecision
///\brief Sets the precision of an atomic datatype.
///\param precision - IN: Number of bits of precision
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
///\par Description
/// For information, please see C layer Reference Manuat at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-SetPrecision
@@ -167,7 +169,7 @@ void AtomType::setPrecision( size_t precision ) const
// Function: AtomType::getOffset
///\brief Retrieves the bit offset of the first significant bit.
///\return Offset value
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
///\par Description
/// For information, please see C layer Reference Manuat at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-GetOffset
@@ -194,7 +196,7 @@ int AtomType::getOffset() const
// Function: AtomType::setOffset
///\brief Sets the bit offset of the first significant bit.
///\param offset - IN: Offset of first significant bit
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
///\par Description
/// For information, please see C layer Reference Manuat at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-SetOffset
@@ -216,7 +218,7 @@ void AtomType::setOffset( size_t offset ) const
/// bit padding.
///\param lsb - OUT: Least-significant bit padding type
///\param msb - OUT: Most-significant bit padding type
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
///\par Description
/// Possible values for \a lsb and \a msb include:
/// \li \c H5T_PAD_ZERO (0) - Set background to zeros.
@@ -239,7 +241,7 @@ void AtomType::getPad( H5T_pad_t& lsb, H5T_pad_t& msb ) const
///\brief Sets the least and most-significant bits padding types.
///\param lsb - IN: Least-significant bit padding type
///\param msb - IN: Most-significant bit padding type
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
///\par Description
/// Valid values for \a lsb and \a msb include:
/// \li \c H5T_PAD_ZERO (0) - Set background to zeros.
diff --git a/c++/src/H5AtomType.h b/c++/src/H5AtomType.h
index bb20bd3..4190b80 100644
--- a/c++/src/H5AtomType.h
+++ b/c++/src/H5AtomType.h
@@ -26,21 +26,12 @@ namespace H5 {
#endif
class H5_DLLCPP AtomType : public DataType {
public:
- // Sets the total size for an atomic datatype.
- void setSize( size_t size ) const;
-
// Returns the byte order of an atomic datatype.
H5T_order_t getOrder( string& order_string ) const;
// Sets the byte ordering of an atomic datatype.
void setOrder( H5T_order_t order ) const;
- // Returns the precision of an atomic datatype.
- size_t getPrecision() const;
-
- // Sets the precision of an atomic datatype.
- void setPrecision( size_t precision ) const;
-
// Retrieves the bit offset of the first significant bit.
// 12/05/00 - changed return type to int from size_t - C API
int getOffset() const;
@@ -54,18 +45,29 @@ class H5_DLLCPP AtomType : public DataType {
// Sets the least and most-significant bits padding types
void setPad( H5T_pad_t lsb, H5T_pad_t msb ) const;
+ // Returns the precision of an atomic datatype.
+ size_t getPrecision() const;
+
+ // Sets the precision of an atomic datatype.
+ void setPrecision( size_t precision ) const;
+
+ // Sets the total size for an atomic datatype.
+ void setSize( size_t size ) const;
+
// Copy constructor - makes copy of the original object
AtomType( const AtomType& original );
- // Default destructor
+ // Noop destructor
virtual ~AtomType();
protected:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Default constructor
AtomType();
// Constructor that takes an existing id
AtomType( const hid_t existing_id );
+#endif // DOXYGEN_SHOULD_SKIP_THIS
};
#ifndef H5_NO_NAMESPACE
}
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp
index 570dbe7..7b26947 100644
--- a/c++/src/H5Attribute.cpp
+++ b/c++/src/H5Attribute.cpp
@@ -163,7 +163,7 @@ DataSpace Attribute::getSpace() const
}
//--------------------------------------------------------------------------
-// Function: Attribute::p_getType (private)
+// Function: Attribute::p_get_type (private)
// Purpose Gets the datatype of this attribute.
// Return Id of the datatype
// Exception H5::AttributeIException
@@ -171,7 +171,7 @@ DataSpace Attribute::getSpace() const
// This private function is used in AbstractDs.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-hid_t Attribute::p_getType() const
+hid_t Attribute::p_get_type() const
{
hid_t type_id = H5Aget_type( id );
if( type_id > 0 )
@@ -203,7 +203,7 @@ ssize_t Attribute::getName( size_t buf_size, string& attr_name ) const
{
throw AttributeIException("Attribute::getName", "H5Aget_name failed");
}
- // otherwise, convert the C string attribute name and return
+ // otherwise, convert the C attribute name and return
attr_name = name_C;
delete name_C;
return( name_size );
@@ -241,14 +241,41 @@ string Attribute::getName() const
// Try with 256 characters for the name first, if the name's length
// returned is more than that then, read the name again with the
// appropriate space allocation
+ char* name_C = new char[256]; // temporary C-string for C API
+ ssize_t name_size = H5Aget_name(id, 255, name_C);
+
string attr_name;
- ssize_t name_size = getName(255, attr_name);
if (name_size >= 256)
name_size = getName(name_size, attr_name);
+
+ // otherwise, convert the C attribute name and return
+ else
+ attr_name = name_C;
+
+ delete name_C;
return( attr_name );
- // let caller catch exception if any
}
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+//--------------------------------------------------------------------------
+// Function: Attribute::p_close (private)
+// Purpose: Closes this attribute.
+// Exception H5::AttributeIException
+// Description
+// This function will be obsolete because its functionality
+// is recently handled by the C library layer. - May, 2004
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
+void Attribute::p_close() const
+{
+ herr_t ret_value = H5Aclose( id );
+ if( ret_value < 0 )
+ {
+ throw AttributeIException(0, "H5Aclose failed");
+ }
+}
+#endif // DOXYGEN_SHOULD_SKIP_THIS
+
//--------------------------------------------------------------------------
// Function: Attribute destructor
///\brief Properly terminates access to this attribute.
@@ -257,12 +284,12 @@ string Attribute::getName() const
Attribute::~Attribute()
{
// The attribute id will be closed properly
- try {
- decRefCount();
- }
- catch (Exception close_error) {
- cerr << "Attribute::~Attribute - " << close_error.getDetailMsg() << endl;
- }
+ try {
+ decRefCount();
+ }
+ catch (Exception close_error) {
+ cerr << "Attribute::~Attribute - " << close_error.getDetailMsg() << endl;
+ }
}
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5Attribute.h b/c++/src/H5Attribute.h
index 13e29ce..b18a6f0 100644
--- a/c++/src/H5Attribute.h
+++ b/c++/src/H5Attribute.h
@@ -22,24 +22,21 @@ namespace H5 {
class H5_DLLCPP Attribute : public AbstractDs {
public:
- // Writes data to this attribute.
- void write(const DataType& mem_type, const void *buf ) const;
- void write(const DataType& mem_type, const string& strg ) const;
-
- // Reads data from this attribute.
- void read( const DataType& mem_type, void *buf ) const;
- void read( const DataType& mem_type, string& strg ) const;
-
- // Gets a copy of the dataspace for this attribute.
- virtual DataSpace getSpace() const;
-
// Gets the name of this attribute.
ssize_t getName( size_t buf_size, string& attr_name ) const;
string getName( size_t buf_size ) const; // returns name, not its length
string getName() const; // returns name, no argument
- // do not inherit iterateAttrs from H5Object
- int iterateAttrs() { return 0; }
+ // Gets a copy of the dataspace for this attribute.
+ virtual DataSpace getSpace() const;
+
+ // Reads data from this attribute.
+ void read( const DataType& mem_type, void *buf ) const;
+ void read( const DataType& mem_type, string& strg ) const;
+
+ // Writes data to this attribute.
+ void write(const DataType& mem_type, const void *buf ) const;
+ void write(const DataType& mem_type, const string& strg ) const;
// Creates a copy of an existing attribute using the attribute id
Attribute( const hid_t attr_id );
@@ -47,6 +44,12 @@ class H5_DLLCPP Attribute : public AbstractDs {
// Copy constructor: makes a copy of an existing Attribute object.
Attribute( const Attribute& original );
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ // Used by the API to appropriately close an attribute
+ virtual void p_close() const;
+#endif // DOXYGEN_SHOULD_SKIP_THIS
+
+ // Destructor: properly terminates access to this attribute.
virtual ~Attribute();
private:
@@ -54,7 +57,10 @@ class H5_DLLCPP Attribute : public AbstractDs {
// getTypeClass and various API functions getXxxType
// defined in AbstractDs for generic datatype and specific
// sub-types
- virtual hid_t p_getType() const;
+ virtual hid_t p_get_type() const;
+
+ // do not inherit iterateAttrs from H5Object
+ int iterateAttrs() { return 0; }
// Default constructor
Attribute();
diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp
index d0dbbc5..f95c32f 100644
--- a/c++/src/H5CompType.cpp
+++ b/c++/src/H5CompType.cpp
@@ -215,7 +215,7 @@ H5T_class_t CompType::getMemberClass( int member_num ) const
// of the specified member. It provides the id to construct appropriate
// sub-types in the functions getMemberXxxType below, where Xxx indicates
// the sub-types.
-hid_t CompType::p_getMemberType( int member_num ) const
+hid_t CompType::p_get_member_type(int member_num) const
{
// get the id of the specified member first
hid_t member_type_id = H5Tget_member_type( id, member_num );
@@ -223,7 +223,7 @@ hid_t CompType::p_getMemberType( int member_num ) const
return( member_type_id );
else
{
- // p_getMemberType is private, use caller's function name for api
+ // p_get_member_type is private, use caller's function name for api
throw DataTypeIException("CompType::getMemberDataType",
"H5Tget_member_type failed");
}
@@ -240,8 +240,8 @@ hid_t CompType::p_getMemberType( int member_num ) const
//--------------------------------------------------------------------------
DataType CompType::getMemberDataType( int member_num ) const
{
- DataType datatype( p_getMemberType( member_num ));
- return( datatype );
+ DataType datatype(p_get_member_type(member_num));
+ return(datatype);
}
//--------------------------------------------------------------------------
@@ -255,8 +255,8 @@ DataType CompType::getMemberDataType( int member_num ) const
//--------------------------------------------------------------------------
EnumType CompType::getMemberEnumType( int member_num ) const
{
- EnumType enumtype( p_getMemberType( member_num ));
- return( enumtype );
+ EnumType enumtype(p_get_member_type(member_num));
+ return(enumtype);
}
//--------------------------------------------------------------------------
@@ -270,8 +270,8 @@ EnumType CompType::getMemberEnumType( int member_num ) const
//--------------------------------------------------------------------------
CompType CompType::getMemberCompType( int member_num ) const
{
- CompType comptype( p_getMemberType( member_num ));
- return( comptype );
+ CompType comptype(p_get_member_type(member_num));
+ return(comptype);
}
//--------------------------------------------------------------------------
@@ -285,8 +285,8 @@ CompType CompType::getMemberCompType( int member_num ) const
//--------------------------------------------------------------------------
IntType CompType::getMemberIntType( int member_num ) const
{
- IntType inttype( p_getMemberType( member_num ));
- return( inttype );
+ IntType inttype(p_get_member_type(member_num));
+ return(inttype);
}
//--------------------------------------------------------------------------
@@ -300,8 +300,8 @@ IntType CompType::getMemberIntType( int member_num ) const
//--------------------------------------------------------------------------
FloatType CompType::getMemberFloatType( int member_num ) const
{
- FloatType floatype( p_getMemberType( member_num ));
- return( floatype );
+ FloatType floatype(p_get_member_type(member_num));
+ return(floatype);
}
//--------------------------------------------------------------------------
@@ -315,9 +315,9 @@ FloatType CompType::getMemberFloatType( int member_num ) const
//--------------------------------------------------------------------------
StrType CompType::getMemberStrType( int member_num ) const
{
- StrType strtype( p_getMemberType( member_num ));
- return( strtype );
-}
+ StrType strtype(p_get_member_type(member_num));
+ return(strtype);
+}
/* old style of getMemberType - using overloads; new style above
returns the appropriate datatypes but has different named functions.
@@ -327,27 +327,27 @@ StrType CompType::getMemberStrType( int member_num ) const
// Several overloading of getMemberType are for different datatypes
void CompType::getMemberType( int member_num, EnumType& enumtype ) const
{
- p_getMemberType( member_num, enumtype );
+ p_get_member_type(member_num, enumtype);
}
void CompType::getMemberType( int member_num, CompType& comptype ) const
{
- p_getMemberType( member_num, comptype );
+ p_get_member_type(member_num, comptype);
}
void CompType::getMemberType( int member_num, IntType& inttype ) const
{
- p_getMemberType( member_num, inttype );
+ p_get_member_type(member_num, inttype);
}
void CompType::getMemberType( int member_num, FloatType& floatype ) const
{
- p_getMemberType( member_num, floatype );
+ p_get_member_type(member_num, floatype);
}
void CompType::getMemberType( int member_num, StrType& strtype ) const
{
- p_getMemberType( member_num, strtype );
+ p_get_member_type(member_num, strtype);
}
// end of overloading of getMemberType
*/
diff --git a/c++/src/H5CompType.h b/c++/src/H5CompType.h
index 02c83f1..0c530b1 100644
--- a/c++/src/H5CompType.h
+++ b/c++/src/H5CompType.h
@@ -31,11 +31,13 @@ class H5_DLLCPP CompType : public DataType {
// Gets the compound datatype of the specified dataset
CompType( const DataSet& dataset ); // H5Dget_type
- // Returns the number of members in this compound datatype.
- int getNmembers() const;
+ // Returns the type class of the specified member of this compound
+ // datatype. It provides to the user a way of knowing what type
+ // to create another datatype of the same class
+ H5T_class_t getMemberClass( int member_num ) const;
- // Returns the name of a member of this compound datatype.
- string getMemberName( int member_num ) const;
+ // Returns the dimensionality of the specified member.
+ int getMemberDims( int member_num, size_t* dims, int* perm ) const;
// Returns the index of a member in this compound data type.
int getMemberIndex(const char* name) const;
@@ -44,13 +46,12 @@ class H5_DLLCPP CompType : public DataType {
// Returns the offset of a member of this compound datatype.
size_t getMemberOffset( int memb_no ) const;
- // Returns the dimensionality of the specified member.
- int getMemberDims( int member_num, size_t* dims, int* perm ) const;
+ // Returns the name of a member of this compound datatype.
+ string getMemberName( int member_num ) const;
- // Returns the type class of the specified member of this compound
- // datatype. It provides to the user a way of knowing what type
- // to create another datatype of the same class
- H5T_class_t getMemberClass( int member_num ) const;
+ // Returns the compound datatype of the specified member in
+ // this compound datatype.
+ CompType getMemberCompType( int member_num ) const;
// Returns the generic datatype of the specified member in
// this compound datatype.
@@ -60,10 +61,6 @@ class H5_DLLCPP CompType : public DataType {
// this compound datatype.
EnumType getMemberEnumType( int member_num ) const;
- // Returns the compound datatype of the specified member in
- // this compound datatype.
- CompType getMemberCompType( int member_num ) const;
-
// Returns the integer datatype of the specified member in
// this compound datatype.
IntType getMemberIntType( int member_num ) const;
@@ -76,6 +73,9 @@ class H5_DLLCPP CompType : public DataType {
// this compound datatype.
StrType getMemberStrType( int member_num ) const;
+ // Returns the number of members in this compound datatype.
+ int getNmembers() const;
+
// Adds a new member to this compound datatype.
void insertMember( const string& name, size_t offset, const DataType& new_member ) const;
@@ -91,12 +91,13 @@ class H5_DLLCPP CompType : public DataType {
// Copy constructor - makes a copy of original object
CompType( const CompType& original );
+ // Noop destructor.
virtual ~CompType();
private:
// Contains common code that is used by the member functions
// getMemberXxxType
- hid_t p_getMemberType( int member_num ) const;
+ hid_t p_get_member_type(int member_num) const;
};
#ifndef H5_NO_NAMESPACE
}
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp
index 9e509ad..455888c 100644
--- a/c++/src/H5DataSet.cpp
+++ b/c++/src/H5DataSet.cpp
@@ -24,6 +24,7 @@
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Object.h"
+#include "H5PropList.h"
#include "H5DxferProp.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
@@ -38,7 +39,7 @@ namespace H5 {
//--------------------------------------------------------------------------
// Function: DataSet default constructor
-///\brief Default constructor: Creates a stub dataset.
+///\brief Default constructor: creates a stub DataSet.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSet::DataSet() : AbstractDs() {}
@@ -84,7 +85,7 @@ DataSpace DataSet::getSpace() const
// This private member function calls the C API to get the identifier
// of the datatype that is used by this dataset. It is used
// by the various AbstractDs functions to get the specific datatype.
-hid_t DataSet::p_getType() const
+hid_t DataSet::p_get_type() const
{
hid_t type_id = H5Dget_type( id );
if( type_id > 0 )
diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h
index 6730c94..83cb1ad 100644
--- a/c++/src/H5DataSet.h
+++ b/c++/src/H5DataSet.h
@@ -24,21 +24,29 @@ namespace H5 {
class H5_DLLCPP DataSet : public AbstractDs {
public:
- // Gets the dataspace of this dataset.
- virtual DataSpace getSpace() const;
+ // Extends the dataset with unlimited dimension.
+ void extend( const hsize_t* size ) const;
+
+ // Fills a selection in memory with a value
+ void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space);
+ // Fills a selection in memory with zero
+ void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space);
// Gets the creation property list of this dataset.
DSetCreatPropList getCreatePlist() const;
- // Gets the storage size of this dataset.
- hsize_t getStorageSize() const;
-
// Returns the address of this dataset in the file.
haddr_t getOffset() const;
+ // Gets the dataspace of this dataset.
+ virtual DataSpace getSpace() const;
+
// Determines whether space has been allocated for a dataset.
void getSpaceStatus(H5D_space_status_t& status) const;
+ // Gets the storage size of this dataset.
+ hsize_t getStorageSize() const;
+
// not yet implemented??
hsize_t getVlenBufSize( DataType& type, DataSpace& space ) const;
void vlenReclaim( DataType& type, DataSpace& space, DSetMemXferPropList& xfer_plist, void* buf ) const;
@@ -58,26 +66,18 @@ class H5_DLLCPP DataSet : public AbstractDs {
// Iterates the selected elements in the specified dataspace - not implemented in C++ style yet
int iterateElems( void* buf, const DataType& type, const DataSpace& space, H5D_operator_t op, void* op_data = NULL );
- // Extends the dataset with unlimited dimension.
- void extend( const hsize_t* size ) const;
-
- // Fills a selection in memory with a value
- void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space);
- // Fills a selection in memory with zero
- void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space);
+ // Retrieves the type of object that an object reference points to.
+ H5G_obj_t getObjType(void *ref, H5R_type_t ref_type) const;
- // Creates a reference to a named Hdf5 object in this object.
- void* Reference(const char* name) const;
+ // Retrieves a dataspace with the region pointed to selected.
+ DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
// Creates a reference to a named Hdf5 object or to a dataset region
// in this object.
void* Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const;
- // Retrieves the type of object that an object reference points to.
- H5G_obj_t getObjType(void *ref, H5R_type_t ref_type) const;
-
- // Retrieves a dataspace with the region pointed to selected.
- DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
+ // Creates a reference to a named Hdf5 object in this object.
+ void* Reference(const char* name) const;
// Creates a copy of an existing DataSet using its id.
DataSet(const hid_t existing_id);
@@ -88,6 +88,7 @@ class H5_DLLCPP DataSet : public AbstractDs {
// Copy constructor.
DataSet( const DataSet& original );
+ // Destructor: properly terminates access to this dataset.
virtual ~DataSet();
private:
@@ -95,7 +96,7 @@ class H5_DLLCPP DataSet : public AbstractDs {
// getTypeClass and various API functions getXxxType
// defined in AbstractDs for generic datatype and specific
// sub-types
- virtual hid_t p_getType() const;
+ virtual hid_t p_get_type() const;
};
#ifndef H5_NO_NAMESPACE
}
diff --git a/c++/src/H5DataSpace.cpp b/c++/src/H5DataSpace.cpp
index 6a119af..548e280 100644
--- a/c++/src/H5DataSpace.cpp
+++ b/c++/src/H5DataSpace.cpp
@@ -29,22 +29,16 @@ namespace H5 {
#endif
//--------------------------------------------------------------------------
-///\brief Constant for default dataspace
+///\brief Constant for default dataspace.
//--------------------------------------------------------------------------
const DataSpace DataSpace::ALL( H5S_ALL );
//--------------------------------------------------------------------------
-// Function: DataSpace default constructor
-///\brief Default constructor: Creates a stub datatype
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-DataSpace::DataSpace() : IdComponent() {}
-
-//--------------------------------------------------------------------------
-// Function: DataSpace overloaded constructor
-///\brief Creates a dataspace given a dataspace type.
+// Function: DataSpace constructor
+///\brief Creates a new dataspace given a dataspace type.
///\param type - IN: Type of the dataspace to be created, which
-/// currently can be either \c H5S_SCALAR or \c H5S_SIMPLE
+/// currently can be either \c H5S_SCALAR or \c H5S_SIMPLE;
+/// default to \c H5S_SCALAR.
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -59,7 +53,7 @@ DataSpace::DataSpace( H5S_class_t type ) : IdComponent()
//--------------------------------------------------------------------------
// Function: DataSpace overloaded constructor
-///\brief Creates a new simple dataspace and opens it for access.
+///\brief Creates a new simple dataspace.
///\param rank - IN: Number of dimensions of dataspace.
///\param dims - IN: An array of the size of each dimension.
///\param maxdims - IN: An array of the maximum size of each dimension.
@@ -77,7 +71,7 @@ DataSpace::DataSpace( int rank, const hsize_t * dims, const hsize_t * maxdims) :
//--------------------------------------------------------------------------
// Function: DataSpace overloaded constructor
-///\brief Creates an DataSpace object using the id of an existing
+///\brief Creates a DataSpace object using the id of an existing
/// dataspace.
///\param existing_id - IN: Id of an existing dataspace
///\exception H5::DataSpaceIException
@@ -88,7 +82,7 @@ DataSpace::DataSpace(const hid_t existing_id) : IdComponent(existing_id) {}
//--------------------------------------------------------------------------
// Function: DataSpace copy constructor
///\brief Copy constructor: makes a copy of the original DataSpace object.
-///\param original - IN: DataSpace instance to copy
+///\param original - IN: DataSpace object to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSpace::DataSpace( const DataSpace& original ) : IdComponent( original ) {}
@@ -102,16 +96,16 @@ DataSpace::DataSpace( const DataSpace& original ) : IdComponent( original ) {}
//--------------------------------------------------------------------------
void DataSpace::copy( const DataSpace& like_space )
{
- // reset the identifier of this instance - send 'this' in so that
- // H5Sclose can be called appropriately
- if( id != H5S_ALL ) { // not a constant, should call H5Sclose
- try {
- decRefCount();
- }
- catch (Exception close_error) {
- throw DataSpaceIException("DataSpace::copy", close_error.getDetailMsg());
- }
- }
+ // If this object has a valid id, appropriately decrement reference
+ // counter and close the id.
+ if( id != H5S_ALL ) {
+ try {
+ decRefCount();
+ }
+ catch (Exception close_error) {
+ throw DataSpaceIException("DataSpace::copy", close_error.getDetailMsg());
+ }
+ } // if
// call C routine to copy the dataspace
id = H5Scopy( like_space.getId() );
@@ -122,7 +116,7 @@ void DataSpace::copy( const DataSpace& like_space )
//--------------------------------------------------------------------------
// Function: DataSpace::operator=
-///\brief Assignment operator
+///\brief Assignment operator.
///\param rhs - IN: Reference to the existing dataspace
///\return Reference to DataSpace instance
///\exception H5::DataSpaceIException
@@ -140,7 +134,7 @@ DataSpace& DataSpace::operator=( const DataSpace& rhs )
//--------------------------------------------------------------------------
// Function: DataSpace::isSimple
///\brief Determines whether this dataspace is a simple dataspace.
-///\return true if the dataspace is a simple dataspace, and false,
+///\return \c true if the dataspace is a simple dataspace, and \c false,
/// otherwise
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
@@ -203,7 +197,7 @@ int DataSpace::getSimpleExtentDims ( hsize_t *dims, hsize_t *maxdims ) const
//--------------------------------------------------------------------------
// Function: DataSpace::getSimpleExtentNdims
-///\brief Determines the dimensionality of a dataspace.
+///\brief Returns the dimensionality of a dataspace.
///\return Number of dimensions
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
@@ -221,7 +215,7 @@ int DataSpace::getSimpleExtentNdims () const
//--------------------------------------------------------------------------
// Function: DataSpace::getSimpleExtentNpoints
-///\brief Determines the number of elements in a dataspace.
+///\brief Returns the number of elements in a dataspace.
///\return Number of elements
///\exception H5::DataSpaceIException
// Modification
@@ -245,7 +239,7 @@ hssize_t DataSpace::getSimpleExtentNpoints () const
//--------------------------------------------------------------------------
// Function: DataSpace::getSimpleExtentType
-///\brief Determine the current class of a dataspace.
+///\brief Returns the current class of a dataspace.
///\return Class of the dataspace
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
@@ -264,7 +258,7 @@ H5S_class_t DataSpace::getSimpleExtentType () const
//--------------------------------------------------------------------------
// Function: DataSpace::extentCopy
///\brief Copies the extent of a dataspace.
-///\param dest_space - IN: DataSpace to copy from
+///\param dest_space - IN: Dataspace to copy from
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -396,7 +390,7 @@ hssize_t DataSpace::getSelectElemNpoints () const
///\par Description
/// For more information, please refer to the C layer Reference
/// Manual at:
-/// http:
+/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectElemPointList
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSpace::getSelectElemPointlist ( hsize_t startpoint, hsize_t numpoints, hsize_t *buf ) const
@@ -495,8 +489,8 @@ void DataSpace::selectNone () const
// Function: DataSpace::selectValid
///\brief Verifies that the selection is within the extent of the
/// dataspace.
-///\return true if the selection is within the extent of the
-/// dataspace, and false, otherwise
+///\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
//--------------------------------------------------------------------------
@@ -525,8 +519,8 @@ bool DataSpace::selectValid () const
///\exception H5::DataSpaceIException
///\par Description
/// For more information, please refer to the C layer Reference
-/// Manual at:
-/// http:
+/// Manual at:
+/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectHyperslab
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSpace::selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hssize_t *start, const hsize_t *stride, const hsize_t *block ) const
@@ -547,15 +541,16 @@ void DataSpace::selectHyperslab( H5S_seloper_t op, const hsize_t *count, const h
//--------------------------------------------------------------------------
DataSpace::~DataSpace()
{
- // The dataspace id will be closed properly
- if( id != H5S_ALL ) { // not a constant, should call H5Sclose
- try {
- decRefCount();
- }
- catch (Exception close_error) {
- cerr << "DataSpace::~DataSpace - " << close_error.getDetailMsg() << endl;
- }
- }
+ // If this object has a valid id, appropriately decrement reference
+ // counter and close the id.
+ if( id != H5S_ALL ) {
+ try {
+ decRefCount();
+ }
+ catch (Exception close_error) {
+ throw DataSpaceIException("DataSpace::copy", close_error.getDetailMsg());
+ }
+ } // if
}
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h
index 1b231b0..5e20730 100644
--- a/c++/src/H5DataSpace.h
+++ b/c++/src/H5DataSpace.h
@@ -26,22 +26,37 @@ class H5_DLLCPP DataSpace : public IdComponent {
static const DataSpace ALL;
// Creates a dataspace object given the space type
- DataSpace( H5S_class_t type ); // H5Screate
+ DataSpace(H5S_class_t type = H5S_SCALAR);
// Creates a simple dataspace
- DataSpace( int rank, const hsize_t * dims, const hsize_t * maxdims = NULL); // H5Screate_simple
-
- // Makes copy of an existing dataspace.
- void copy( const DataSpace& like_space ); // H5Scopy
+ DataSpace(int rank, const hsize_t * dims, const hsize_t * maxdims = NULL);
// Assignment operator
DataSpace& operator=( const DataSpace& rhs );
- // Determines if this dataspace is a simple one.
- bool isSimple() const;
+ // Makes copy of an existing dataspace.
+ void copy(const DataSpace& like_space);
- // Sets the offset of this simple dataspace.
- void offsetSimple( const hssize_t* offset ) const;
+ // Copies the extent of this dataspace.
+ void extentCopy( DataSpace& dest_space ) const;
+
+ // Gets the bounding box containing the current selection.
+ void getSelectBounds( hssize_t* start, hssize_t* end ) const;
+
+ // Gets the number of element points in the current selection.
+ hssize_t getSelectElemNpoints() const;
+
+ // Retrieves the list of element points currently selected.
+ void getSelectElemPointlist( hsize_t startpoint, hsize_t numpoints, hsize_t *buf ) const;
+
+ // Gets the list of hyperslab blocks currently selected.
+ void getSelectHyperBlocklist( hsize_t startblock, hsize_t numblocks, hsize_t *buf ) const;
+
+ // Get number of hyperslab blocks.
+ hssize_t getSelectHyperNblocks() const;
+
+ // Gets the number of elements in this dataspace selection.
+ hssize_t getSelectNpoints() const;
// Retrieves dataspace dimension size and maximum size.
int getSimpleExtentDims( hsize_t *dims, hsize_t *maxdims = NULL ) const;
@@ -56,39 +71,21 @@ class H5_DLLCPP DataSpace : public IdComponent {
// Gets the current class of this dataspace.
H5S_class_t getSimpleExtentType() const;
- // Copies the extent of this dataspace.
- void extentCopy( DataSpace& dest_space ) const;
-
- // Sets or resets the size of this dataspace.
- void setExtentSimple( int rank, const hsize_t *current_size, const hsize_t *maximum_size = NULL ) const;
-
- // Removes the extent from this dataspace.
- void setExtentNone() const;
-
- // Gets the number of elements in this dataspace selection.
- hssize_t getSelectNpoints() const;
-
- // Get number of hyperslab blocks.
- hssize_t getSelectHyperNblocks() const;
-
- // Gets the list of hyperslab blocks currently selected.
- void getSelectHyperBlocklist( hsize_t startblock, hsize_t numblocks, hsize_t *buf ) const;
-
- // Gets the number of element points in the current selection.
- hssize_t getSelectElemNpoints() const;
+ // Determines if this dataspace is a simple one.
+ bool isSimple() const;
- // Retrieves the list of element points currently selected.
- void getSelectElemPointlist( hsize_t startpoint, hsize_t numpoints, hsize_t *buf ) const;
+ // Sets the offset of this simple dataspace.
+ void offsetSimple( const hssize_t* offset ) const;
- // Gets the bounding box containing the current selection.
- void getSelectBounds( hssize_t* start, hssize_t* end ) const;
+ // Selects the entire dataspace.
+ void selectAll() const;
// Selects array elements to be included in the selection for
// this dataspace.
void selectElements( H5S_seloper_t op, const size_t num_elements, const hssize_t *coord[ ] ) const;
- // Selects the entire dataspace.
- void selectAll() const;
+ // Selects a hyperslab region to add to the current selected region.
+ void selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hssize_t *start, const hsize_t *stride = NULL, const hsize_t *block = NULL ) const;
// Resets the selection region to include no elements.
void selectNone() const;
@@ -96,19 +93,24 @@ class H5_DLLCPP DataSpace : public IdComponent {
// Verifies that the selection is within the extent of the dataspace.
bool selectValid() const;
- // Selects a hyperslab region to add to the current selected region.
- void selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hssize_t *start, const hsize_t *stride = NULL, const hsize_t *block = NULL ) const;
+ // Removes the extent from this dataspace.
+ void setExtentNone() const;
- // Uses an existing dataspace identifier to make a DataSpace object
- // or uses a default id to create a default dataspace object
- DataSpace( const hid_t space_id );
+ // Sets or resets the size of this dataspace.
+ void setExtentSimple( int rank, const hsize_t *current_size, const hsize_t *maximum_size = NULL ) const;
- // Default constructor
- DataSpace();
+ // Creates a DataSpace object using an existing dataspace id.
+ DataSpace(const hid_t space_id);
// Copy constructor: makes a copy of the original DataSpace object.
- DataSpace( const DataSpace& original );
+ DataSpace(const DataSpace& original);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ // Used by the API to close the dataspace
+ void p_close() const;
+#endif // DOXYGEN_SHOULD_SKIP_THIS
+ // Destructor: properly terminates access to this dataspace.
virtual ~DataSpace();
};
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index 5bb8d6f..4fc7238 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -58,7 +58,7 @@ DataType::DataType(const hid_t existing_id, bool predefined) : H5Object(existing
///\brief Creates a object given its class and size
///\param type_class - IN: Class of datatype to create
///\param size - IN: Number of bytes in the datatype to create
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType::DataType( const H5T_class_t type_class, size_t size ) : H5Object(), is_predtype( false )
@@ -92,7 +92,7 @@ DataType::DataType(const DataType& original) : H5Object(original)
// Function: DataType::copy
///\brief Copies an existing datatype to this datatype object
///\param like_type - IN: Datatype to be copied
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::copy( const DataType& like_type )
@@ -120,7 +120,7 @@ void DataType::copy( const DataType& like_type )
///\brief Assignment operator
///\param rhs - IN: Reference to the existing datatype
///\return Reference to DataType instance
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Description
// Makes a copy of the type on the right hand side and stores
// the new id in the left hand side object.
@@ -163,7 +163,7 @@ bool DataType::operator==(const DataType& compared_type ) const
/// named datatype
///\param loc - IN: Either a file or a group
///\param name - IN: Name of the datatype
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::commit(CommonFG& loc, const char* name) const
@@ -195,7 +195,7 @@ void DataType::commit(CommonFG& loc, const string& name) const
///\brief Determines whether a datatype is a named type or a
/// transient type.
///\return true if the datatype is a named type, and false, otherwise.
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool DataType::committed() const
@@ -219,7 +219,7 @@ bool DataType::committed() const
///\param dest - IN: Destination datatype
///\param pcdata - IN: Pointer to type conversion data
///\return Pointer to a suitable conversion function
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_conv_t DataType::find( const DataType& dest, H5T_cdata_t **pcdata ) const
@@ -243,7 +243,7 @@ H5T_conv_t DataType::find( const DataType& dest, H5T_cdata_t **pcdata ) const
///\param background - IN: Optional backgroud buffer
///\param plist - IN: Dataset transfer property list
///\return Pointer to a suitable conversion function
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::convert( const DataType& dest, hsize_t nelmts, void *buf, void *background, PropList& plist ) const
@@ -264,7 +264,7 @@ void DataType::convert( const DataType& dest, hsize_t nelmts, void *buf, void *b
//--------------------------------------------------------------------------
// Function: DataType::lock
///\brief Locks a datatype, making it read-only and non-destructible.
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
///\par Descrition
/// This is normally done by the library for predefined data
/// types so the application doesn't inadvertently change or
@@ -288,7 +288,7 @@ void DataType::lock() const
// Function: DataType::getClass
///\brief Returns the datatype class identifier.
///\return Datatype class identifier
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_class_t DataType::getClass() const
@@ -308,7 +308,7 @@ H5T_class_t DataType::getClass() const
// Function: DataType::getSize
///\brief Returns the size of a datatype.
///\return Datatype size in bytes
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
size_t DataType::getSize() const
@@ -327,7 +327,7 @@ size_t DataType::getSize() const
// Function: DataType::getSuper
///\brief Returns the base datatype from which a datatype is derived.
///\return DataType object
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType DataType::getSuper() const
@@ -359,7 +359,7 @@ DataType DataType::getSuper() const
///\param dest - IN: Destination datatype.
///\param func - IN: Function to convert between source and
/// destination datatypes.
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
///\par Description
/// For more information, please see:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-Register
@@ -399,7 +399,7 @@ void DataType::registerFunc( H5T_pers_t pers, const string& name, const DataType
///\param dest - IN: Destination datatype.
///\param func - IN: Function to convert between source and
/// destination datatypes.
-///\exception H5::DataTypeIException
+///\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
@@ -431,7 +431,7 @@ void DataType::unregister( H5T_pers_t pers, const string& name, const DataType&
///\brief Tags an opaque datatype.
///\param tag - IN: Descriptive ASCII string with which the opaque
/// datatype is to be tagged.
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::setTag( const char* tag ) const
@@ -460,7 +460,7 @@ void DataType::setTag( const string& tag ) const
// Function: DataType::getTag
///\brief Gets the tag associated with an opaque datatype.
///\return Tag associated with the opaque datatype
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
string DataType::getTag() const
@@ -488,7 +488,7 @@ string DataType::getTag() const
/// datatype.
///\return true if this datatype contains or is the specified type,
/// and false, otherwise.
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
bool DataType::detectClass(H5T_class_t cls) const
@@ -510,7 +510,7 @@ bool DataType::detectClass(H5T_class_t cls) const
///\brief Check whether this datatype is a variable-length string.
///\return true if this datatype is a variable-length string, and
/// false, otherwise.
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
bool DataType::isVariableStr() const
@@ -595,8 +595,8 @@ DataSpace DataType::getRegion(void *ref, H5R_type_t ref_type) const
}
//--------------------------------------------------------------------------
-// Function: DataType destructor
-///\brief Properly terminates access to this datatype.
+// Function: DataType destructor
+///\brief Properly terminates access to this datatype.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType::~DataType()
diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp
index f95b043..ae98a79 100644
--- a/c++/src/H5DcreatProp.cpp
+++ b/c++/src/H5DcreatProp.cpp
@@ -28,36 +28,47 @@ namespace H5 {
#endif
//--------------------------------------------------------------------------
-///\brief Constant for default property
+///\brief Constant for dataset creation default property
//--------------------------------------------------------------------------
const DSetCreatPropList DSetCreatPropList::DEFAULT( H5P_DEFAULT );
//--------------------------------------------------------------------------
-// Function: Default Constructor
-///\brief Default Constructor: Creates a dataset creation property list
+// Function: DSetCreatPropList default constructor
+///\brief Default constructor: creates a stub dataset creation property list
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetCreatPropList::DSetCreatPropList() : PropList( H5P_DATASET_CREATE) {}
//--------------------------------------------------------------------------
-// Function: Copy Constructor
-///\brief Copy Constructor: Makes a copy of the original
+// Function: DSetCreatPropList copy constructor
+///\brief Copy constructor: makes a copy of the original
/// DSetCreatPropList object
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetCreatPropList::DSetCreatPropList( const DSetCreatPropList& orig ) : PropList( orig ) {}
//--------------------------------------------------------------------------
+// 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) : PropList( plist_id ) {}
+
+//--------------------------------------------------------------------------
// Function: DSetCreatPropList::setChunk
-///\brief Sets the size of the chunks used to store a chunked layout
+///\brief Sets the size of the chunks used to store a chunked layout
/// dataset.
-///\param ndims - IN: Number of dimensions of each chunk
+///\param ndims - IN: Number of dimensions of each chunk
///\param dim - IN: Array containing the size of each chunk
///\exception H5::PropListIException
///\par Description
/// The \a ndims parameter currently must have the same value as
-/// the rank of the dataset. The values of the \a dim array
-/// define the size of the chunks to store the dataset's raw
-/// data. As a side-effect, the layout of the dataset will be
+/// the rank of the dataset. The values of the \a dim array
+/// 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
{
@@ -70,11 +81,12 @@ void DSetCreatPropList::setChunk( int ndims, const hsize_t* dim ) const
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::getChunk
-///\brief Retrieves the size of the chunks used to store a chunked
+///\brief Retrieves the size of the chunks used to store a chunked
/// layout dataset.
-///\param max_ndims - IN: Size of \a dim array
+///\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
{
@@ -90,14 +102,14 @@ int DSetCreatPropList::getChunk( int max_ndims, hsize_t* dim ) const
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::setLayout
///\brief Sets the type of storage used store the raw data for a dataset.
-///\param plist - IN: Property list id, here by mistake, should be removed
-///\param layout - IN: Type of storage layout for raw data
+///\param layout - IN: Type of storage layout for raw data
///\exception H5::PropListIException
///\par Description
/// For information on setting layout type, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetLayout
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setLayout(hid_t plist, H5D_layout_t layout ) const
+void DSetCreatPropList::setLayout(H5D_layout_t layout) const
{
herr_t ret_value = H5Pset_layout( id, layout );
if( ret_value < 0 )
@@ -111,16 +123,17 @@ void DSetCreatPropList::setLayout(hid_t plist, H5D_layout_t layout ) const
// Function: DSetCreatPropList::getLayout
///\brief Retrieves the layout type of this property list
///\return Layout type, which can be:
-/// \li \c H5D_COMPACT - raw data is stored in the object
-/// header in the file.
+/// \li \c H5D_COMPACT - raw data is stored in the object
+/// header in the file.
/// \li \c H5D_CONTIGUOUS - raw data is stored separately from the
-/// object header in one contiguous chunk in
-/// the file.
-/// \li \c H5D_CHUNKED - raw data is stored separately from the
-/// object header in chunks in separate locations
-/// in the file.
+/// object header in one contiguous chunk in
+/// the file.
+/// \li \c H5D_CHUNKED - raw data is stored separately from the
+/// object header in chunks in separate locations
+/// in the file.
///\exception H5::PropListIException
///\par Description
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5D_layout_t DSetCreatPropList::getLayout() const
{
@@ -139,10 +152,11 @@ H5D_layout_t DSetCreatPropList::getLayout() const
///\param level - IN: Compression level, should [0..9], inclusive
///\exception H5::PropListIException
///\par Description
-/// The function sets the compression method for this property
-/// list to \c H5D_COMPRESS_DEFLATE and the compression level to
-/// \a level. Lower compression levels are faster but result in
+/// The function sets the compression method for this property
+/// 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
{
@@ -158,18 +172,19 @@ void DSetCreatPropList::setDeflate( int level ) const
// Function: DSetCreatPropList::setFillValue
///\brief Sets a dataset fill value
///\param fvalue_type - IN: Data type for the value passed via \a value
-///\param value - IN: Pointer to buffer containing the fill value
+///\param value - IN: Pointer to buffer containing the fill value
///\exception H5::PropListIException
///\par Description
/// The datatype may differ from that of the dataset, but it must
-/// be one that the HDF5 library is able to convert \a value to
+/// be one that the HDF5 library is able to convert \a value to
/// the dataset datatype when the dataset is created.
-/// The default fill value is 0 (zero,) which is interpreted
+/// The default fill value is 0 (zero,) which is interpreted
/// according to the actual dataset datatype.
-///\par
+///\par
/// For information on setting fill value, please refer to the
/// C layer Reference Manual at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFillValue
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setFillValue( const DataType& fvalue_type, const void* value ) const
{
@@ -185,13 +200,14 @@ void DSetCreatPropList::setFillValue( const DataType& fvalue_type, const void* v
// Function: DSetCreatPropList::getFillValue
///\brief Retrieves a dataset fill value
///\param fvalue_type - IN: Data type for the value passed via \a value
-///\param value - OUT: Pointer to buffer to hold the retrieved fill value
+///\param value - OUT: Pointer to buffer to hold the retrieved fill value
///\exception H5::PropListIException
///\par Description
-/// The fill value is returned through \a value pointer
-/// 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.
+/// The fill value is returned through \a value pointer
+/// 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
{
@@ -206,11 +222,12 @@ void DSetCreatPropList::getFillValue( const DataType& fvalue_type, void* value )
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::isFillValueDefined
///\brief Check if fill value has been defined for this property
-///\return
+///\return
/// \li \c H5D_FILL_VALUE_UNDEFINED =0,
/// \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()
{
@@ -227,22 +244,23 @@ H5D_fill_value_t DSetCreatPropList::isFillValueDefined()
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::setFilter
-///\brief Adds a filter to the filter pipeline
-///\param filter_id - IN: Filter to add
+///\brief Adds a filter to the filter pipeline
+///\param filter_id - IN: Filter to add
///\param flags - IN: Specifies general properties of the filter
///\param cd_nelmts - IN: Number of elements in cd_values
///\param cd_values - IN: Auxiliary data for the filter
///\exception H5::PropListIException
///\par Description
-/// The \a flags argument is a bit vector of the field:
-/// \c H5Z_FLAG_OPTIONAL(0x0001)
+/// The \a flags argument is a bit vector of the field:
+/// \c H5Z_FLAG_OPTIONAL(0x0001)
///\par
/// If this bit is set then the filter is optional. If the filter
-/// fails during a \c DataSet::write() operation then the filter
-/// is just excluded from the pipeline for the chunk for which it
-/// 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.
+/// fails during a \c DataSet::write() operation then the filter
+/// is just excluded from the pipeline for the chunk for which it
+/// 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, const unsigned int cd_values[] ) const
{
@@ -255,13 +273,14 @@ void DSetCreatPropList::setFilter( H5Z_filter_t filter_id, unsigned int flags, s
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::removeFilter
-///\brief Removes one or more filters
-///\param filter_id - IN: Filter to remove
+// Function: DSetCreatPropList::removeFilter
+///\brief Removes one or more filters
+///\param filter_id - IN: Filter to remove
///\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
//--------------------------------------------------------------------------
void DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const
{
@@ -274,10 +293,11 @@ void DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::getNfilters
-///\brief Returns the number of filters in the pipeline
+// Function: DSetCreatPropList::getNfilters
+///\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
{
@@ -292,9 +312,9 @@ int DSetCreatPropList::getNfilters() const
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::getFilter
+// Function: DSetCreatPropList::getFilter
///\brief Returns information about a filter in a pipeline
-///\param filter_number - IN: Filter to get, range [0..N-1], where
+///\param filter_number - IN: Filter to get, range [0..N-1], where
/// N is returned by H5Pget_nfilters()
///\param flags - OUT: General properties of the filter
///\param cd_nelmts - IN/OUT: Number of elements in \a cd_values /Number
@@ -325,10 +345,10 @@ H5Z_filter_t DSetCreatPropList::getFilter(int filter_number, unsigned int &flags
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::getFilterById
+// Function: DSetCreatPropList::getFilterById
///\brief Returns information about a filter in a pipeline given the
/// filter id
-///\param filter_id - IN: Filter to get
+///\param filter_id - IN: Filter to get
///\param flags - OUT: General properties of the filter
///\param cd_nelmts - IN/OUT: Number of elements in \a cd_values /Number
/// of values defined by the filter
@@ -357,19 +377,20 @@ void DSetCreatPropList::getFilterById(H5Z_filter_t filter_id, unsigned int &flag
///\param filter_id - IN: Filter to get
///\param flags - OUT: General properties of the filter
///\param cd_nelmts - IN: Number of elements in \a cd_values
-/// \n OUT: Number of values defined by the filter
+/// \n OUT: Number of values defined by the filter
///\param cd_values - OUT: Array to hold the data; allocated by the user
///\exception H5::PropListIException
///\par Description
-/// The \a flags argument is a bit vector of the field:
-/// \c H5Z_FLAG_OPTIONAL(0x0001)
+/// The \a flags argument is a bit vector of the field:
+/// \c H5Z_FLAG_OPTIONAL(0x0001)
///\par
/// If this bit is set then the filter is optional. If the filter
-/// fails during a DataSet::write() operation then the filter
-/// is just excluded from the pipeline for the chunk for which it
-/// 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.
+/// fails during a DataSet::write() operation then the filter
+/// is just excluded from the pipeline for the chunk for which it
+/// 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, const unsigned int cd_values[] ) const
{
@@ -382,12 +403,13 @@ void DSetCreatPropList::modifyFilter( H5Z_filter_t filter_id, unsigned int flags
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::allFiltersAvail
-///\brief Queries whether all the filters set in this property list
+// Function: DSetCreatPropList::allFiltersAvail
+///\brief Queries whether all the filters set in this property list
/// are available currently.
-///\return true if all filters available, and false if one or more
+///\return true if all filters available, and false if one or more
/// filters not currently available
-///\exception H5::PropListIException
+///\exception H5::PropListIException
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool DSetCreatPropList::allFiltersAvail()
{
@@ -403,13 +425,14 @@ bool DSetCreatPropList::allFiltersAvail()
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::setShuffle
-///\brief Sets method of the shuffle filter
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::setShuffle
+///\brief Sets method of the shuffle filter
+///\exception H5::PropListIException
///\par Description
/// Please refer to the Reference Manual of \c H5Pset_shuffle for
/// details.
-/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetShuffle
+/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetShuffle
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setShuffle()
{
@@ -422,17 +445,18 @@ void DSetCreatPropList::setShuffle()
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::getAllocTime
+// Function: DSetCreatPropList::getAllocTime
///\brief Get space allocation time for this property.
///\return Space allocation time.
///\exception H5::PropListIException
///\par Description
-/// The values of space allocation time can be one of the
+/// The values of space allocation time can be one of the
/// followings:
/// \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()
{
@@ -448,14 +472,15 @@ H5D_alloc_time_t DSetCreatPropList::getAllocTime()
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::getFillTime
-///\brief Gets fill value writing time.
+// Function: DSetCreatPropList::getFillTime
+///\brief Gets fill value writing time.
///\return Fill value writing time
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
-/// Valid values for fill value writing time include
-/// \li \c H5D_FILL_TIME_NEVER
+/// 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()
{
@@ -471,7 +496,7 @@ H5D_fill_time_t DSetCreatPropList::getFillTime()
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::setAllocTime
+// Function: DSetCreatPropList::setAllocTime
///\brief Sets space allocation time for dataset during creation.
///\param alloc_time - IN: Allocation time
///\exception H5::PropListIException
@@ -481,6 +506,7 @@ H5D_fill_time_t DSetCreatPropList::getFillTime()
/// \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)
{
@@ -493,14 +519,15 @@ void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time)
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::setFillTime
-///\brief Sets fill value writing time for dataset.
+// Function: DSetCreatPropList::setFillTime
+///\brief Sets fill value writing time for dataset.
///\return Fill value writing time
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
-/// Valid values for fill value writing time include
-/// \li \c H5D_FILL_TIME_NEVER
+/// 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)
{
@@ -513,9 +540,10 @@ void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time)
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::setFletcher32
-///\brief Sets Fletcher32 checksum of EDC for this property list.
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::setFletcher32
+///\brief Sets Fletcher32 checksum of EDC for this property list.
+///\exception H5::PropListIException
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setFletcher32()
{
@@ -528,19 +556,20 @@ void DSetCreatPropList::setFletcher32()
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::setExternal
-///\brief Adds an external file to the list of external files
+// Function: DSetCreatPropList::setExternal
+///\brief Adds an external file to the list of external files
///\param name - IN: Name of the external file
///\param offset - IN: Location where the data starts in the file
///\param size - IN: Number of bytes reserved in the file for the data
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// If a dataset is splitted across multiple files then the files
-/// should be defined in order. The total size of the dataset is
-/// the sum of the \a size arguments for all the external files. If
-/// 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).
+/// should be defined in order. The total size of the dataset is
+/// the sum of the \a size arguments for all the external files. If
+/// 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
//--------------------------------------------------------------------------
void DSetCreatPropList::setExternal( const char* name, off_t offset, hsize_t size ) const
{
@@ -553,10 +582,11 @@ void DSetCreatPropList::setExternal( const char* name, off_t offset, hsize_t siz
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::getExternalCount
-///\brief Returns the number of external files for a dataset
+// Function: DSetCreatPropList::getExternalCount
+///\brief Returns the number of external files for a dataset
///\return Number of external files
-///\exception H5::PropListIException
+///\exception H5::PropListIException
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int DSetCreatPropList::getExternalCount() const
{
@@ -573,23 +603,24 @@ int DSetCreatPropList::getExternalCount() const
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::getExternal
///\brief Returns information about an external file
-///\param idx - IN: Index of the external file, ranges [0-(N-1)]
-/// and returned by \c getExternalCount()
+///\param idx - IN: Index of the external file, ranges [0-(N-1)] and
+/// returned by getExternalCount()
///\param name_size - IN: Maximum length of \a name
-///\param name - IN: Name of the external file
-///\param offset - IN: Location to return an offset value
-///\param size - OUT: Location to return the size of the external file data
-///\exception H5::PropListIException
+///\param name - IN: Name of the external file
+///\param offset - IN: Location to return an offset value
+///\param size - OUT: Location to return the size of the external file data
+///\exception H5::PropListIException
///\par Description
/// The parameter \a idx ranges [0..N-1] where N is returned by
-/// getExternalCount(). At most \a name_size characters are copied
-/// into the name array. If the external file name is longer than
-/// name_size with the null terminator, the return value is not
-/// null terminated (similar to strncpy()).
-/// If \a name_size is zero or \a name is a null pointer, the
-/// external file name will not be returned. If \a offset or
-/// \a size are null pointers then the corresponding information
+/// getExternalCount(). At most \a name_size characters are copied
+/// into the name array. If the external file name is longer than
+/// name_size with the null terminator, the return value is not
+/// null terminated (similar to strncpy()).
+/// If \a name_size is zero or \a name is a null pointer, the
+/// 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
//--------------------------------------------------------------------------
void DSetCreatPropList::getExternal( int idx, size_t name_size, char* name, off_t& offset, hsize_t& size ) const
{
@@ -604,7 +635,7 @@ void DSetCreatPropList::getExternal( int idx, size_t name_size, char* name, off_
//--------------------------------------------------------------------------
// Function: DSetCreatPropList destructor
///\brief Noop destructor.
-// Programmer Binh-Minh Ribler - 2000
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetCreatPropList::~DSetCreatPropList () {}
diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h
index 6ae1b75..15a85e3 100644
--- a/c++/src/H5DcreatProp.h
+++ b/c++/src/H5DcreatProp.h
@@ -21,96 +21,96 @@ namespace H5 {
#endif
class H5_DLLCPP DSetCreatPropList : public PropList {
- public:
+ public:
+ // Default dataset creation property list.
static const DSetCreatPropList DEFAULT;
- // Creates a dataset creation property list
- DSetCreatPropList();
+ // Queries whether all the filters set in this property list are
+ // available currently.
+ bool allFiltersAvail();
- // Copy constructor: creates a copy of a DSetCreatPropList object;
- // often used by the compiler when passing by value occurs.
- DSetCreatPropList( const DSetCreatPropList& orig );
+ // Get space allocation time for this property.
+ H5D_alloc_time_t getAllocTime();
- // Sets the type of storage used to store the raw data for the
- // dataset that uses this property list
- void setLayout(hid_t plist, H5D_layout_t layout ) const;
+ // Set space allocation time for dataset during creation.
+ void setAllocTime(H5D_alloc_time_t alloc_time);
- // Gets the layout of the raw data storage of the data that uses this
- // property list
- H5D_layout_t getLayout() const;
+ // Retrieves the size of the chunks used to store a chunked layout dataset.
+ int getChunk( int max_ndims, hsize_t* dim ) const;
// Sets the size of the chunks used to store a chunked layout dataset.
void setChunk( int ndims, const hsize_t* dim ) const;
- // Retrieves the size of the chunks used to store a chunked layout dataset.
- int getChunk( int max_ndims, hsize_t* dim ) const;
+ // Returns information about an external file.
+ void getExternal( int idx, size_t name_size, char* name, off_t& offset, hsize_t& size ) const;
- // Sets compression method and compression level
- void setDeflate( int level ) const;
+ // Returns the number of external files for a dataset.
+ int getExternalCount() const;
- // Sets a dataset fill value
- void setFillValue( const DataType& fvalue_type, const void* value ) const;
+ // Gets fill value writing time.
+ H5D_fill_time_t getFillTime();
- // Retrieves a dataset fill value
- void getFillValue( const DataType& fvalue_type, void* value ) const;
+ // Sets fill value writing time for dataset.
+ void setFillTime(H5D_fill_time_t fill_time);
- // Checks if fill value has been defined for this property
- H5D_fill_value_t isFillValueDefined();
+ // Retrieves a dataset fill value.
+ void getFillValue( const DataType& fvalue_type, void* value ) const;
- // Adds a filter to the filter pipeline
- void setFilter( H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const;
+ // Sets a dataset fill value.
+ void setFillValue( const DataType& fvalue_type, const void* value ) const;
- // Remove one or all filters from the filter pipeline
- void removeFilter( H5Z_filter_t filter_id) const;
+ // Returns information about a filter in a pipeline.
+ H5Z_filter_t getFilter(int filter_number, unsigned int& flags, size_t& cd_nelmts, unsigned int* cd_values, size_t namelen, char name[], unsigned int &filter_config) const;
- // Returns the number of filters in the pipeline
- int getNfilters() const;
+ // Returns information about a filter in a pipeline given the filter id.
+ void getFilterById(H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts, unsigned int* cd_values, size_t namelen, char name[], unsigned int &filter_config) const;
- // Returns information about a filter in a pipeline
- H5Z_filter_t getFilter( int filter_number, unsigned int& flags, size_t& cd_nelmts, unsigned int* cd_values, size_t namelen, char name[], unsigned int &filter_config ) const;
+ // Gets the layout of the raw data storage of the data that uses this
+ // property list.
+ H5D_layout_t getLayout() const;
- // Returns information about a filter in a pipeline given the filter id
- void getFilterById(H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts, unsigned int* cd_values, size_t namelen, char name[], unsigned int &filter_config) const;
+ // Sets the type of storage used to store the raw data for the
+ // dataset that uses this property list.
+ void setLayout(H5D_layout_t layout) const;
- // Modifies the specified filter
- void modifyFilter( H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const;
+ // Returns the number of filters in the pipeline.
+ int getNfilters() const;
- // Queries whether all the filters set in this property list are
- // available currently.
- bool allFiltersAvail();
+ // Checks if fill value has been defined for this property.
+ H5D_fill_value_t isFillValueDefined();
- // Sets method of the shuffle filter
- void setShuffle();
+ // Modifies the specified filter.
+ void modifyFilter( H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const;
- // Get space allocation time for this property
- H5D_alloc_time_t getAllocTime();
+ // Remove one or all filters from the filter pipeline.
+ void removeFilter( H5Z_filter_t filter_id) const;
- // Gets fill value writing time
- H5D_fill_time_t getFillTime();
+ // Sets compression method and compression level.
+ void setDeflate( int level ) const;
- // Set space allocation time for dataset during creation
- void setAllocTime(H5D_alloc_time_t alloc_time);
+ // Adds an external file to the list of external files.
+ void setExternal( const char* name, off_t offset, hsize_t size ) const;
- // Sets fill value writing time for dataset
- void setFillTime(H5D_fill_time_t fill_time);
+ // Adds a filter to the filter pipeline.
+ void setFilter( H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const;
- // Sets Fletcher32 checksum of EDC for this property list
+ // Sets Fletcher32 checksum of EDC for this property list.
void setFletcher32();
- // Adds an external file to the list of external files
- void setExternal( const char* name, off_t offset, hsize_t size ) const;
+ // Sets method of the shuffle filter.
+ void setShuffle();
- // Returns the number of external files for a dataset
- int getExternalCount() const;
+ // Default constructor: creates a stub dataset creation property list.
+ DSetCreatPropList();
- // Returns information about an external file
- void getExternal( int idx, size_t name_size, char* name, off_t& offset, hsize_t& size ) const;
+ // Copy constructor: creates a copy of a DSetCreatPropList object.
+ DSetCreatPropList(const DSetCreatPropList& orig);
// Creates a copy of an existing dataset creation property list
- // using the property list id
- DSetCreatPropList( const hid_t plist_id ) : PropList( plist_id ) {}
+ // using the property list id.
+ DSetCreatPropList(const hid_t plist_id);
- // Default destructor
+ // Noop destructor.
virtual ~DSetCreatPropList();
};
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5DxferProp.cpp b/c++/src/H5DxferProp.cpp
index dda7ba0..602246a 100644
--- a/c++/src/H5DxferProp.cpp
+++ b/c++/src/H5DxferProp.cpp
@@ -25,29 +25,39 @@ namespace H5 {
#endif
//--------------------------------------------------------------------------
-///\brief Constant for default property
+///\brief Constant for default dataset memory and transfer property list.
//--------------------------------------------------------------------------
const DSetMemXferPropList DSetMemXferPropList::DEFAULT( H5P_DEFAULT );
//--------------------------------------------------------------------------
-// Function Default constructor
-///\brief Default constructor - Creates a stub dataset memory and
+// Function DSetMemXferPropList default constructor
+///\brief Default constructor: creates a stub dataset memory and
/// transfer property list object.
-// Programmer: Binh-Minh Ribler
+// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetMemXferPropList::DSetMemXferPropList() : PropList(H5P_DATASET_XFER) {}
//--------------------------------------------------------------------------
-// Function Copy constructor
-///\brief Copy constructor - makes a copy of the original
+// Function DSetMemXferPropList copy constructor
+///\brief Copy constructor: makes a copy of the original
/// DSetMemXferPropList object
///\param orig - IN: The original dataset memory and transfer property
/// list object to copy
-// Programmer: Binh-Minh Ribler
+// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetMemXferPropList::DSetMemXferPropList( const DSetMemXferPropList& orig ) : PropList( orig ) {}
//--------------------------------------------------------------------------
+// Function DSetMemXferPropList overloaded constructor
+///\brief Creates a DSetMemXferPropList object using the id of an
+/// 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) {}
+
+//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::setBuffer
///\brief Sets type conversion and background buffers.
///\param size - IN: Size, in bytes, of the type conversion and background buffers
@@ -203,7 +213,7 @@ void DSetMemXferPropList::getTypeConvCB( H5T_conv_except_func_t *op, void **user
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::setVlenMemManager
///\brief Sets the memory manager for variable-length datatype allocation.
-///\param alloc_func - IN: User's allocate routine
+///\param alloc_func - IN: User's allocate routine
///\param alloc_info - IN: User's allocation parameters
///\param free_func - IN: User's free routine
///\param free_info - IN: User's free parameters
@@ -236,7 +246,7 @@ void DSetMemXferPropList::setVlenMemManager() const
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::getVlenMemManager
///\brief Gets the memory manager for variable-length datatype allocation
-///\param alloc_func - OUT: User's allocate routine
+///\param alloc_func - OUT: User's allocate routine
///\param alloc_info - OUT: User's allocation parameters
///\param free_func - OUT: User's free routine
///\param free_info - OUT: User's free parameters
@@ -254,10 +264,10 @@ void DSetMemXferPropList::getVlenMemManager( H5MM_allocate_t& alloc_func, void**
}
//--------------------------------------------------------------------------
-// Function: DSetMemXferPropList::setMulti
-///\brief Sets the data transfer property list for the multi-file driver.
-///\param memb_dxpl - OUT: Array of data access property lists
-///\exception H5::PropListIException
+// Function: DSetMemXferPropList::setMulti
+///\brief Sets the data transfer property list for the multi-file driver.
+///\param memb_dxpl - OUT: Array of data access property lists
+///\exception H5::PropListIException
///\par Description
/// This function can only be used after the member map has
/// been set with FileAccPropList::setMulti (not done - BMR.)
@@ -274,10 +284,10 @@ void DSetMemXferPropList::setMulti(const hid_t *memb_dxpl)
}
//--------------------------------------------------------------------------
-// Function: DSetMemXferPropList::getMulti
-///\brief Returns multi-file data transfer property list information.
-///\param memb_dxpl - OUT: Array of data access property lists
-///\exception H5::PropListIException
+// Function: DSetMemXferPropList::getMulti
+///\brief Returns multi-file data transfer property list information.
+///\param memb_dxpl - OUT: Array of data access property lists
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void DSetMemXferPropList::getMulti(hid_t *memb_dxpl)
@@ -291,10 +301,10 @@ void DSetMemXferPropList::getMulti(hid_t *memb_dxpl)
}
//--------------------------------------------------------------------------
-// Function: DSetMemXferPropList::setSmallDataBlockSize
-///\brief Sets the size of a contiguous block reserved for small data.
-///\param size - IN: Maximum size, in bytes, of the small data block.
-///\exception H5::PropListIException
+// Function: DSetMemXferPropList::setSmallDataBlockSize
+///\brief Sets the size of a contiguous block reserved for small data.
+///\param size - IN: Maximum size, in bytes, of the small data block.
+///\exception H5::PropListIException
///\par Description
/// For detail, please refer to the C layer Reference Manual at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSmallData
@@ -311,7 +321,7 @@ void DSetMemXferPropList::setSmallDataBlockSize(hsize_t size)
}
//--------------------------------------------------------------------------
-// Function: DSetMemXferPropList::getSmallDataBlockSize
+// Function: DSetMemXferPropList::getSmallDataBlockSize
///\brief Returns the current small data block size setting.
///\return Size of the small data block, in bytes
///\exception H5::PropListIException
@@ -330,9 +340,9 @@ hsize_t DSetMemXferPropList::getSmallDataBlockSize()
}
//--------------------------------------------------------------------------
-// Function: DSetMemXferPropList::setHyperVectorSize
+// Function: DSetMemXferPropList::setHyperVectorSize
///\brief Sets number of I/O vectors to be read/written in hyperslab I/O.
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// For information, please refer to the C layer Reference
/// Manual at:
@@ -350,11 +360,11 @@ void DSetMemXferPropList::setHyperVectorSize(size_t vector_size)
}
//--------------------------------------------------------------------------
-// Function: DSetMemXferPropList::getSmallDataBlockSize
+// Function: DSetMemXferPropList::getSmallDataBlockSize
///\brief Returns the number of I/O vectors to be read/written in
/// hyperslab I/O.
///\return Number of I/O vectors
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
size_t DSetMemXferPropList::getHyperVectorSize()
@@ -370,12 +380,12 @@ size_t DSetMemXferPropList::getHyperVectorSize()
}
//--------------------------------------------------------------------------
-// Function: DSetMemXferPropList::setEDCCheck
+// Function: DSetMemXferPropList::setEDCCheck
///\brief Enables or disables error-detecting for a dataset reading
/// process.
///\param check - IN: Specifies whether error detection is enabled or
/// disabled
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// The error detection algorithm used is the algorithm previously
/// specified in the corresponding dataset creation property
@@ -398,10 +408,10 @@ void DSetMemXferPropList::setEDCCheck(H5Z_EDC_t check)
}
//--------------------------------------------------------------------------
-// Function: DSetMemXferPropList::getEDCCheck
+// Function: DSetMemXferPropList::getEDCCheck
///\brief Determines whether error-detection is enabled for dataset reads.
///\return \c H5Z_ENABLE_EDC or \c H5Z_DISABLE_EDC
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
H5Z_EDC_t DSetMemXferPropList::getEDCCheck()
diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h
index e457906..439bc3d 100644
--- a/c++/src/H5DxferProp.h
+++ b/c++/src/H5DxferProp.h
@@ -95,10 +95,10 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
H5Z_EDC_t getEDCCheck();
// Creates a copy of an existing dataset memory and transfer
- // property list using the property list id
- DSetMemXferPropList (const hid_t plist_id) : PropList( plist_id ) {}
+ // property list using the property list id.
+ DSetMemXferPropList (const hid_t plist_id);
- // Default destructor
+ // Noop destructor
virtual ~DSetMemXferPropList();
};
diff --git a/c++/src/H5EnumType.h b/c++/src/H5EnumType.h
index cca253a..4cb6cbd 100644
--- a/c++/src/H5EnumType.h
+++ b/c++/src/H5EnumType.h
@@ -27,24 +27,25 @@ class H5_DLLCPP EnumType : public DataType {
// integer type, whose size is given by size.
EnumType( size_t size );
- // Default constructor
- EnumType();
-
- // Creates an enumeration datatype using an existing id
- EnumType( const hid_t existing_id );
-
- // Copy constructor: makes a copy of the original EnumType object.
- EnumType( const EnumType& original );
-
// Gets the enum datatype of the specified dataset
EnumType( const DataSet& dataset ); // H5Dget_type
// Creates a new enum datatype based on an integer datatype
EnumType( const IntType& data_type ); // H5Tenum_create
+ // Returns the number of members in this enumeration datatype.
+ int getNmembers () const;
+
+ // Returns the index of a member in this enumeration data type.
+ int getMemberIndex(const char* name) const;
+ int getMemberIndex(const string& name) const;
+
+ // Returns the value of an enumeration datatype member
+ void getMemberValue( int memb_no, void *value ) const;
+
// Inserts a new member to this enumeration type.
- void insert( const string& name, void *value ) const;
void insert( const char* name, void *value ) const;
+ void insert( const string& name, void *value ) const;
// Returns the symbol name corresponding to a specified member
// of this enumeration datatype.
@@ -52,18 +53,17 @@ class H5_DLLCPP EnumType : public DataType {
// Returns the value corresponding to a specified member of this
// enumeration datatype.
- void valueOf( const string& name, void *value ) const;
void valueOf( const char* name, void *value ) const;
+ void valueOf( const string& name, void *value ) const;
- // Returns the index of a member in this enumeration data type.
- int getMemberIndex(const char* name) const;
- int getMemberIndex(const string& name) const;
+ // Default constructor
+ EnumType();
- // Returns the number of members in this enumeration datatype.
- int getNmembers () const;
+ // Creates an enumeration datatype using an existing id
+ EnumType( const hid_t existing_id );
- // Returns the value of an enumeration datatype member
- void getMemberValue( int memb_no, void *value ) const;
+ // Copy constructor: makes a copy of the original EnumType object.
+ EnumType( const EnumType& original );
virtual ~EnumType();
};
diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp
index fc1e0c7..3e8446a 100644
--- a/c++/src/H5FaccProp.cpp
+++ b/c++/src/H5FaccProp.cpp
@@ -30,21 +30,31 @@ namespace H5 {
const FileAccPropList FileAccPropList::DEFAULT( H5P_DEFAULT );
//--------------------------------------------------------------------------
-// Function: Default Constructor
-///\brief Default constructor: Creates a file access property list
+// Function: Default Constructor
+///\brief Default constructor: creates a file access property list
+// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileAccPropList::FileAccPropList() : PropList( H5P_FILE_ACCESS ) {}
//--------------------------------------------------------------------------
-// Function: Copy Constructor
-///\brief Copy Constructor: Makes a copy of the original
-/// FileAccPropList object
+// Function: FileAccPropList copy constructor
+///\brief Copy Constructor: makes a copy of the original
+/// FileAccPropList object.
+// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileAccPropList::FileAccPropList(const FileAccPropList& orig) : PropList(orig) {}
//--------------------------------------------------------------------------
+// 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) {}
+
+//--------------------------------------------------------------------------
// Function: FileAccPropList::setStdio
-///\brief Modifies this property list to use the \c H5FD_STDIO driver
+///\brief Modifies this property list to use the \c H5FD_STDIO driver.
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
@@ -58,14 +68,14 @@ void FileAccPropList::setStdio() const
}
//--------------------------------------------------------------------------
-// Function: FileAccPropList::getDriver
-///\brief Return the ID of the low-level file driver.
+// Function: FileAccPropList::getDriver
+///\brief Return the ID of the low-level file driver.
///\return A low-level driver ID which is the same ID used when the
/// driver was set for the property list. The driver ID is
/// only valid as long as the file driver remains registered.
/// Valid driver identifiers can be found at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-GetDriver
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
hid_t FileAccPropList::getDriver() const
@@ -79,13 +89,14 @@ hid_t 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
-///\exception H5::PropListIException
+// 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
+///\exception H5::PropListIException
///\par Description
-/// For a list of valid driver identifiers, please refer to
+/// For a list of valid driver identifiers, please see the C
+/// layer Reference Manual at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-GetDriver
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
@@ -115,10 +126,10 @@ void FileAccPropList::setFamilyOffset(hsize_t offset) const
}
//--------------------------------------------------------------------------
-// Function: FileAccPropList::getFamilyOffset
+// Function: FileAccPropList::getFamilyOffset
///\brief Get offset for family driver.
-///\return Offset for family driver
-///\exception H5::PropListIException
+///\return Offset for family driver
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
hsize_t FileAccPropList::getFamilyOffset() const
@@ -140,7 +151,7 @@ hsize_t FileAccPropList::getFamilyOffset() const
/// time more memory is needed, in bytes
///\param backing_store - IN: Indicating whether to write the file
/// contents to disk when the file is closed
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// For more details on the use of \c H5FD_CORE driver, please
/// refer to
@@ -162,7 +173,7 @@ void FileAccPropList::setCore (size_t increment, hbool_t backing_store) const
///\param increment - OUT: Size of memory increment, in bytes
///\param backing_store - OUT: Indicating whether to write the file
/// contents to disk when the file is closed
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::getCore (size_t& increment, hbool_t& backing_store) const
@@ -180,7 +191,7 @@ void FileAccPropList::getCore (size_t& increment, hbool_t& backing_store) const
///\param memb_size - IN: Size in bytes of each file member
///\param memb_plist - IN: File access property list to be used for
/// each family member
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// Note that \a memb_size is used only when creating a new file.
// Programmer: Binh-Minh Ribler - April, 2004
@@ -201,7 +212,7 @@ void FileAccPropList::setFamily( hsize_t memb_size, const FileAccPropList& memb_
///\param memb_size - OUT: Size in bytes of each file member
///\param memb_plist - OUT: Retrieved file access property list for each
/// file member
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::getFamily(hsize_t& memb_size, FileAccPropList& memb_plist) const
@@ -217,12 +228,12 @@ void FileAccPropList::getFamily(hsize_t& memb_size, FileAccPropList& memb_plist)
//--------------------------------------------------------------------------
// Function: FileAccPropList::getFamily
-///\brief This is an overloaded member function, provided for convenience.
+///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts and its return value.
///\param memb_size - OUT: Size in bytes of each file member
///\return The file access property list for each file member
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
FileAccPropList FileAccPropList::getFamily(hsize_t& memb_size) const
@@ -245,7 +256,7 @@ FileAccPropList FileAccPropList::getFamily(hsize_t& memb_size) const
///\param raw_plist - IN: File access plist for the raw data file
///\param meta_ext - IN: Metadata filename extension as \c char*
///\param raw_ext - IN: Raw data filename extension as \c char*
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// Temporary - For information, please refer to:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplSplit
@@ -264,14 +275,14 @@ void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& ra
//--------------------------------------------------------------------------
// Function: FileAccPropList::setSplit
-///\brief This is an overloaded member function, provided for convenience.
+///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts.
///\param meta_plist - IN: File access plist for the metadata file
///\param raw_plist - IN: File access plist for the raw data file
///\param meta_ext - IN: Metadata filename extension as \c string
///\param raw_ext - IN: Raw data filename extension as \c string
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist, const string& meta_ext, const string& raw_ext ) const
@@ -286,7 +297,7 @@ void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& ra
///\return The streaming I/O file access property list structure
/// For detail on this structure, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
H5FD_stream_fapl_t FileAccPropList::getStream() const
@@ -305,7 +316,7 @@ H5FD_stream_fapl_t FileAccPropList::getStream() const
///\brief Modifies this file access property list to use the Stream
/// driver.
///\param fapl - IN: The streaming I/O file access property list
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// For detail on \a fapl, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
@@ -326,7 +337,7 @@ void FileAccPropList::setStream(H5FD_stream_fapl_t &fapl) const
///\brief Returns the current settings for the data sieve buffer size
/// property from this property list.
///\return Data sieve buffer size, in bytes
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
size_t FileAccPropList::getSieveBufSize() const
@@ -344,7 +355,7 @@ size_t FileAccPropList::getSieveBufSize() const
// Function: FileAccPropList::setSieveBufSize
///\brief Sets the maximum size of the data sieve buffer.
///\param bufsize - IN: Maximum size, in bytes, of data sieve buffer
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// For detail on data sieving, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSieveBufSize
@@ -364,9 +375,9 @@ void FileAccPropList::setSieveBufSize(size_t bufsize) const
///\brief Sets the minimum size of metadata block allocations.
///\param block_size - IN: Minimum size, in bytes, of metadata
/// block allocations
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
-/// For more detail, please refer to
+/// For more detail, please see the C layer Reference Manual at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetMetaBlockSize
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
@@ -383,7 +394,7 @@ void FileAccPropList::setMetaBlockSize(hsize_t &block_size) const
// Function: FileAccPropList::getMetaBlockSize
///\brief Returns the current metadata block size setting.
///\return Metadata block size
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
hsize_t FileAccPropList::getMetaBlockSize() const
@@ -404,7 +415,7 @@ hsize_t FileAccPropList::getMetaBlockSize() const
///\param logfile - IN: Name of the log file
///\param flags - IN: Flags specifying the types of logging activity
///\param buf_size - IN: Size of the logging buffer
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// For detail on \a flags, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
@@ -438,7 +449,7 @@ void FileAccPropList::setLog(const string& logfile, unsigned flags, size_t buf_s
// Function: FileAccPropList::setSec2
///\brief Modifies this file access property list to use the sec2
/// driver.
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setSec2() const
@@ -455,7 +466,7 @@ void FileAccPropList::setSec2() const
///\brief Sets the alignment properties of this property list.
///\param threshold - IN: Threshold value for file object size
///\param alignment - IN: Alignment value
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// The parameter \a threshold must have a non-negative value.
/// Note that setting the threshold value to 0 (zero) has the
@@ -464,6 +475,7 @@ void FileAccPropList::setSec2() const
///
/// For detail on \a setting alignment, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetAlignment
+// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FileAccPropList::setAlignment( hsize_t threshold, hsize_t alignment ) const
{
@@ -480,7 +492,8 @@ void FileAccPropList::setAlignment( hsize_t threshold, hsize_t alignment ) const
/// this property list.
///\param threshold - OUT: Retrieved threshold value for file object size
///\param alignment - OUT: Retrieved alignment value
-///\exception H5::PropListIException
+///\exception H5::PropListIException
+// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FileAccPropList::getAlignment( hsize_t &threshold, hsize_t &alignment ) const
{
@@ -495,7 +508,7 @@ void FileAccPropList::getAlignment( hsize_t &threshold, hsize_t &alignment ) con
// Function: FileAccPropList::setMultiType
///\brief Sets data type for \c MULTI driver.
///\param dtype - IN: Type of data
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// More details and valid values for \a dtype can be found at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetMultiType
@@ -514,7 +527,7 @@ void FileAccPropList::setMultiType(H5FD_mem_t dtype) const
// Function: FileAccPropList::getMultiType
///\brief Returns the data type property for \c MULTI driver.
///\return The data type property
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// More details and possible returned values can be found at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-GetMultiType
@@ -538,7 +551,7 @@ H5FD_mem_t FileAccPropList::getMultiType() const
///\param rdcc_nelmts - IN: Number of elements in the raw data chunk cache
///\param rdcc_nbytes - IN: Total size of the raw data chunk cache, in bytes
///\param rdcc_w0 - IN: Preemption policy
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// The argument \a rdcc_w0 should hold a value between 0 and 1
/// inclusive. This value indicates how much chunks that have
@@ -546,6 +559,7 @@ H5FD_mem_t 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
{
@@ -563,7 +577,8 @@ void FileAccPropList::setCache( int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_
///\param rdcc_nelmts - OUT: Number of elements in the raw data chunk cache
///\param rdcc_nbytes - OUT: Total size of the raw data chunk cache, in bytes
///\param rdcc_w0 - OUT: Preemption policy
-///\exception H5::PropListIException
+///\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
{
@@ -578,7 +593,7 @@ void FileAccPropList::getCache( int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rd
// Function: FileAccPropList::setFcloseDegree
///\brief Sets the degree for the file close behavior.
///\param degree - IN:
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setFcloseDegree(H5F_close_degree_t degree)
@@ -594,7 +609,7 @@ void FileAccPropList::setFcloseDegree(H5F_close_degree_t degree)
// Function: FileAccPropList::getFcloseDegree
///\brief Returns the degree for the file close behavior.
///\return The degree for the file close behavior
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
H5F_close_degree_t FileAccPropList::getFcloseDegree()
@@ -613,10 +628,11 @@ H5F_close_degree_t FileAccPropList::getFcloseDegree()
///\brief Sets garbage collecting references flag.
///\param gc_ref - IN: Flag setting reference garbage collection to
/// on (1) or off (0).
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// For detail on \a fapl, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
+// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FileAccPropList::setGcReferences( unsigned gc_ref ) const
{
@@ -631,7 +647,8 @@ void FileAccPropList::setGcReferences( unsigned gc_ref ) const
// Function: FileAccPropList::getGcReferences
///\brief Returns the garbage collecting references setting.
///\return Garbage collecting references setting, 0 (off) or 1 (on)
-///\exception H5::PropListIException
+///\exception H5::PropListIException
+// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
unsigned FileAccPropList::getGcReferences() const
{
@@ -646,6 +663,11 @@ unsigned FileAccPropList::getGcReferences() const
return( gc_ref );
}
+//--------------------------------------------------------------------------
+// Function: FileAccPropList destructor
+///\brief Noop destructor
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
FileAccPropList::~FileAccPropList() {}
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h
index e10c7d0..6a447b0 100644
--- a/c++/src/H5FaccProp.h
+++ b/c++/src/H5FaccProp.h
@@ -25,12 +25,6 @@ class H5_DLLCPP FileAccPropList : public PropList {
public:
static const FileAccPropList DEFAULT;
- // Creates a file access property list.
- FileAccPropList();
-
- // Copy constructor: creates a copy of a FileAccPropList object
- FileAccPropList( const FileAccPropList& original );
-
// Modifies this property list to use the H5FD_STDIO driver
void setStdio() const;
@@ -125,11 +119,17 @@ class H5_DLLCPP FileAccPropList : public PropList {
// Returns garbage collecting references setting.
unsigned getGcReferences() const;
+ // Creates a file access property list.
+ FileAccPropList();
+
+ // Copy constructor: creates a copy of a FileAccPropList object.
+ FileAccPropList( const FileAccPropList& original );
+
// Creates a copy of an existing file access property list
- // using the property list id
- FileAccPropList (const hid_t plist_id) : PropList( plist_id ) {}
+ // using the property list id.
+ FileAccPropList (const hid_t plist_id);
- // Default destructor
+ // Noop destructor
virtual ~FileAccPropList();
};
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5FcreatProp.cpp b/c++/src/H5FcreatProp.cpp
index 657b04b..7d1d228 100644
--- a/c++/src/H5FcreatProp.cpp
+++ b/c++/src/H5FcreatProp.cpp
@@ -38,19 +38,29 @@ FileCreatPropList::FileCreatPropList() : PropList( H5P_FILE_CREATE ) {}
//--------------------------------------------------------------------------
// Function: FileCreatPropList copy constructor
-///\brief Copy constructor: makes a copy of the original FileCreatPropList object.
+///\brief Copy constructor: makes a copy of the original
+/// FileCreatPropList object.
///\param original - IN: FileCreatPropList instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileCreatPropList::FileCreatPropList( const FileCreatPropList& original ) : PropList( original ) {}
//--------------------------------------------------------------------------
+// Function: FileCreatPropList overloaded constructor
+///\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) {}
+
+//--------------------------------------------------------------------------
// Function: FileCreatPropList::getVersion
///\brief Retrieves version information for various parts of a file.
-///\param super - OUT: The file super block.
+///\param super - OUT: The file super block.
///\param freelist - OUT: The global free list.
-///\param stab - OUT: The root symbol table entry.
-///\param shhdr - OUT: Shared object headers.
+///\param stab - OUT: The root symbol table entry.
+///\param shhdr - OUT: Shared object headers.
///\exception H5::PropListIException
///\par Description
/// Any (or even all) of the output arguments can be null pointers.
diff --git a/c++/src/H5FcreatProp.h b/c++/src/H5FcreatProp.h
index 4ac4b10..7a11ede 100644
--- a/c++/src/H5FcreatProp.h
+++ b/c++/src/H5FcreatProp.h
@@ -25,12 +25,6 @@ class H5_DLLCPP FileCreatPropList : public PropList {
public:
static const FileCreatPropList DEFAULT;
- // Creates a file create property list.
- FileCreatPropList();
-
- // Copy constructor: creates a copy of a FileCreatPropList object
- FileCreatPropList( const FileCreatPropList& orig );
-
// Retrieves version information for various parts of a file.
void getVersion( unsigned& super, unsigned& freelist, unsigned& stab, unsigned& shhdr ) const;
@@ -61,11 +55,17 @@ class H5_DLLCPP FileCreatPropList : public PropList {
// Returns the 1/2 rank of an indexed storage B-tree.
unsigned getIstorek() const;
+ // Creates a file create property list.
+ FileCreatPropList();
+
+ // Copy constructor: creates a copy of a FileCreatPropList object.
+ FileCreatPropList(const FileCreatPropList& orig);
+
// Creates a copy of an existing file create property list
- // using the property list id
- FileCreatPropList (const hid_t plist_id) : PropList( plist_id ) {}
+ // using the property list id.
+ FileCreatPropList (const hid_t plist_id);
- // Default destructor
+ // Noop destructor
virtual ~FileCreatPropList();
};
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5FloatType.h b/c++/src/H5FloatType.h
index e9163cb..bdc2f6f 100644
--- a/c++/src/H5FloatType.h
+++ b/c++/src/H5FloatType.h
@@ -22,38 +22,23 @@ namespace H5 {
class H5_DLLCPP FloatType : public AtomType {
public:
- // default constructor
- FloatType();
-
- // Creates a floating-point datatype using an existing id
- FloatType( const hid_t existing_id );
-
// Creates a floating-point type using a predefined type
FloatType( const PredType& pred_type );
- // Copy constructor: makes a copy of the original FloatType object.
- FloatType( const FloatType& original );
-
// Gets the floating-point datatype of the specified dataset
FloatType( const DataSet& dataset );
- // Retrieves floating point datatype bit field information.
- void getFields( size_t& spos, size_t& epos, size_t& esize, size_t& mpos, size_t& msize ) const;
-
- // Sets locations and sizes of floating point bit fields.
- void setFields( size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize ) const;
-
// Retrieves the exponent bias of a floating-point type.
size_t getEbias() const;
// Sets the exponent bias of a floating-point type.
void setEbias( size_t ebias ) const;
- // Retrieves mantissa normalization of a floating-point datatype.
- H5T_norm_t getNorm( string& norm_string ) const;
+ // Retrieves floating point datatype bit field information.
+ void getFields( size_t& spos, size_t& epos, size_t& esize, size_t& mpos, size_t& msize ) const;
- // Sets the mantissa normalization of a floating-point datatype.
- void setNorm( H5T_norm_t norm ) const;
+ // Sets locations and sizes of floating point bit fields.
+ void setFields( size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize ) const;
// Retrieves the internal padding type for unused bits in floating-point datatypes.
H5T_pad_t getInpad( string& pad_string ) const;
@@ -61,6 +46,22 @@ class H5_DLLCPP FloatType : public AtomType {
// Fills unused internal floating point bits.
void setInpad( H5T_pad_t inpad ) const;
+ // Retrieves mantissa normalization of a floating-point datatype.
+ H5T_norm_t getNorm( string& norm_string ) const;
+
+ // Sets the mantissa normalization of a floating-point datatype.
+ void setNorm( H5T_norm_t norm ) const;
+
+ // Default constructor
+ FloatType();
+
+ // Creates a floating-point datatype using an existing id
+ FloatType( const hid_t existing_id );
+
+ // Copy constructor: makes a copy of the original FloatType object.
+ FloatType( const FloatType& original );
+
+ // Noop destructor.
virtual ~FloatType();
};
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp
index a1eef70..71b034e 100644
--- a/c++/src/H5Group.cpp
+++ b/c++/src/H5Group.cpp
@@ -42,7 +42,7 @@ namespace H5 {
//--------------------------------------------------------------------------
// Function: Group default constructor
-///\brief Default constructor: Creates a stub group
+///\brief Default constructor: creates a stub Group.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group::Group() : H5Object() {}
@@ -70,7 +70,6 @@ hid_t Group::getLocId() const
// Function: Group overloaded constructor
///\brief Creates a Group object using the id of an existing group.
///\param group_id - IN: Id of an existing group
-///\exception H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group::Group( const hid_t group_id ) : H5Object( group_id ) {}
@@ -78,9 +77,9 @@ Group::Group( const hid_t group_id ) : H5Object( group_id ) {}
//--------------------------------------------------------------------------
// Function: Group::Reference
///\brief Creates a reference to an HDF5 object or a dataset region.
-///\param name - IN: Name of the object to be referenced
+///\param name - IN: Name of the object to be referenced
///\param dataspace - IN: Dataspace with selection
-///\param ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION
+///\param ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION
///\return A reference
///\exception H5::ReferenceIException
// Programmer Binh-Minh Ribler - May, 2004
@@ -112,8 +111,8 @@ void* Group::Reference(const char* name) const
//--------------------------------------------------------------------------
// Function: Group::getObjType
///\brief Retrieves the type of object that an object reference points to.
-///\param ref - IN: Reference to query
-///\param ref_type - IN: Type of reference to query
+///\param ref - IN: Reference to query
+///\param ref_type - IN: Type of reference to query
// Return An object type, which can be one of the following:
// H5G_LINK Object is a symbolic link.
// H5G_GROUP Object is a group.
@@ -144,7 +143,7 @@ DataSpace Group::getRegion(void *ref, H5R_type_t ref_type) const
//--------------------------------------------------------------------------
// Function: Group::throwException
-///\brief Throws group exception - initially implemented for CommonFG
+///\brief Throws H5::GroupIException.
///\param func_name - Name of the function where failure occurs
///\param msg - Message describing the failure
///\exception H5::GroupIException
@@ -174,9 +173,10 @@ Group::~Group()
try {
decRefCount();
}
- catch (Exception close_error) {
+ catch (Exception close_error) { // thrown by p_close
cerr << "Group::~Group - " << close_error.getDetailMsg() << endl;
}
+
}
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5Group.h b/c++/src/H5Group.h
index 5935d49..0aece88 100644
--- a/c++/src/H5Group.h
+++ b/c++/src/H5Group.h
@@ -41,17 +41,17 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
// for CommonFG to get the file id.
virtual hid_t getLocId() const;
- // Default constructor
+ // default constructor
Group();
- // Copy constructor: makes a copy of the original object.
+ // Copy constructor: makes a copy of the original object
Group(const Group& original);
- // Destructor.
+ // Destructor
virtual ~Group();
- // Creates a copy of an existing Group using its id.
- Group(const hid_t group_id);
+ // Creates a copy of an existing group using its id.
+ Group( const hid_t group_id );
};
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5IntType.h b/c++/src/H5IntType.h
index 0cff95f..efbed39 100644
--- a/c++/src/H5IntType.h
+++ b/c++/src/H5IntType.h
@@ -21,21 +21,11 @@ namespace H5 {
#endif
class H5_DLLCPP IntType : public AtomType {
public:
-
- // default constructor
- IntType();
-
- // Creates a integer datatype using an existing id
- IntType( const hid_t existing_id );
-
// Creates a integer type using a predefined type
- IntType( const PredType& pred_type );
-
- // Copy constructor: makes copy of IntType object
- IntType( const IntType& original );
+ IntType(const PredType& pred_type);
// Gets the integer datatype of the specified dataset
- IntType( const DataSet& dataset );
+ IntType(const DataSet& dataset);
// Retrieves the sign type for an integer type
H5T_sign_t getSign() const;
@@ -43,6 +33,16 @@ class H5_DLLCPP IntType : public AtomType {
// Sets the sign proprety for an integer type.
void setSign( H5T_sign_t sign ) const;
+ // Default constructor
+ IntType();
+
+ // Creates a integer datatype using an existing id
+ IntType(const hid_t existing_id);
+
+ // Copy constructor: makes copy of IntType object
+ IntType(const IntType& original);
+
+ // Noop destructor.
virtual ~IntType();
};
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp
index 872a04c..c8af186 100644
--- a/c++/src/H5Library.cpp
+++ b/c++/src/H5Library.cpp
@@ -23,8 +23,10 @@
namespace H5 {
#endif
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
// This static variable will be set to true when dontAtExit is called
bool H5Library::need_cleanup = false;
+#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5Library::open
@@ -58,7 +60,7 @@ void H5Library::close()
//--------------------------------------------------------------------------
// Function: H5Library::dontAtExit
-///\brief Instructs library not to install atexit cleanup routine
+///\brief Instructs library not to install \c atexit cleanup routine.
///\exception H5::LibraryIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
diff --git a/c++/src/H5Library.h b/c++/src/H5Library.h
index 34b816b..4208cfb 100644
--- a/c++/src/H5Library.h
+++ b/c++/src/H5Library.h
@@ -20,15 +20,19 @@
namespace H5 {
#endif
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define NOTATEXIT (-10) // just in case the HDF5 library use more
// negative constants. Note: the solution used for the atexit/global
// destructors is not reliable, and desperately needs improvement
// It is not even working, inifiteloop message still printed when
// calling H5close
+#endif // DOXYGEN_SHOULD_SKIP_THIS
class H5_DLLCPP H5Library {
public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
static bool need_cleanup; // indicates if H5close should be called
+#endif // DOXYGEN_SHOULD_SKIP_THIS
// Initializes the HDF5 library.
static void open();
diff --git a/c++/src/H5PredType.cpp b/c++/src/H5PredType.cpp
index d80b531..a5233af 100644
--- a/c++/src/H5PredType.cpp
+++ b/c++/src/H5PredType.cpp
@@ -30,13 +30,7 @@
namespace H5 {
#endif
-//--------------------------------------------------------------------------
-// Function: PredType default constructor
-///\brief Default constructor: Creates a stub predefined datatype
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-PredType::PredType() : AtomType() {}
-
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: PredType overloaded constructor
///\brief Creates a PredType object using the id of an existing
@@ -53,29 +47,19 @@ PredType::PredType( const hid_t predtype_id ) : AtomType( predtype_id )
}
//--------------------------------------------------------------------------
-// Function: PredType copy constructor
-///\brief Copy constructor: makes a copy of the original PredType object.
-///\param original - IN: PredType instance to copy
+// Function: PredType default constructor
+///\brief Default constructor: Creates a stub predefined datatype
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-PredType::PredType( const PredType& original ) : AtomType( original ) {}
+PredType::PredType() : AtomType() {}
//--------------------------------------------------------------------------
-// Function: PredType::operator=
-///\brief Assignment operator.
-///\param rhs - IN: Reference to the predefined datatype
-///\return Reference to PredType instance
-///\exception H5::DataTypeIException
-// Description
-// Makes a copy of the type on the right hand side and stores
-// the new id in the left hand side object.
+// Function: PredType copy constructor
+///\brief Copy constructor: makes a copy of the original PredType object.
+///\param original - IN: PredType instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-PredType& PredType::operator=( const PredType& rhs )
-{
- copy(rhs);
- return(*this);
-}
+PredType::PredType( const PredType& original ) : AtomType( original ) {}
const PredType PredType::NotAtexit; // only for atexit/global dest. problem
@@ -224,6 +208,24 @@ const PredType PredType::NATIVE_INT_LEAST64( E_NATIVE_INT_LEAST64 );
const PredType PredType::NATIVE_UINT_LEAST64( E_NATIVE_UINT_LEAST64 );
const PredType PredType::NATIVE_INT_FAST64( E_NATIVE_INT_FAST64 );
const PredType PredType::NATIVE_UINT_FAST64( E_NATIVE_UINT_FAST64 );
+#endif // DOXYGEN_SHOULD_SKIP_THIS
+
+//--------------------------------------------------------------------------
+// Function: PredType::operator=
+///\brief Assignment operator.
+///\param rhs - IN: Reference to the predefined datatype
+///\return Reference to PredType instance
+///\exception H5::DataTypeIException
+// 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 )
+{
+ copy(rhs);
+ return(*this);
+}
//--------------------------------------------------------------------------
// Function: PredType::getId
@@ -502,6 +504,7 @@ hid_t PredType::getId() const
} // end switch
} // end of getId()
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
// These dummy functions do not inherit from DataType - they'll
// throw an DataTypeIException if invoked.
void PredType::commit( H5Object& loc, const char* name )
@@ -519,8 +522,14 @@ bool PredType::committed()
throw DataTypeIException("PredType::committed", "Error: Attempting to check for commit status on a predefined datatype." );
return (0);
}
+#endif // DOXYGEN_SHOULD_SKIP_THIS
// Default destructor
+//--------------------------------------------------------------------------
+// Function: PredType destructor
+///\brief Noop destructor.
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
PredType::~PredType() {}
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h
index 6529425..d75cdcc 100644
--- a/c++/src/H5PredType.h
+++ b/c++/src/H5PredType.h
@@ -27,15 +27,17 @@ namespace H5 {
class H5_DLLCPP PredType : public AtomType {
public:
- // Default destructor
- virtual ~PredType();
-
- // Copy constructor - makes copy of the original object
- PredType( const PredType& original );
+ // Makes a copy of the predefined type and stores the new
+ // id in the left hand side object.
+ PredType& operator=( const PredType& rhs );
+ // Returns the HDF5 predefined type id.
virtual hid_t getId() const;
- // Declaration of predefined types; their definition is in Predtype.C
+ // Noop destructor
+ virtual ~PredType();
+
+ // Declaration of predefined types; their definition is in H5PredType.cpp
static const PredType STD_I8BE;
static const PredType STD_I8LE;
static const PredType STD_I16BE;
@@ -173,11 +175,13 @@ class H5_DLLCPP PredType : public AtomType {
static const PredType NATIVE_INT_FAST64;
static const PredType NATIVE_UINT_FAST64;
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
// These dummy functions do not inherit from DataType - they'll
// throw a DataTypeIException if invoked.
void commit( H5Object& loc, const string& name );
void commit( H5Object& loc, const char* name );
bool committed();
+#endif // DOXYGEN_SHOULD_SKIP_THIS
private:
// added this to work around the atexit/global destructor problem
@@ -233,15 +237,18 @@ class H5_DLLCPP PredType : public AtomType {
};
protected:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Default constructor
PredType();
// Creates a pre-defined type using an HDF5 pre-defined constant
PredType( const hid_t predtype_id ); // used by the library only
- // Makes a copy of the predefined type and stores the new
- // id in the left hand side object.
- PredType& operator=( const PredType& rhs );
+ // Copy constructor - makes copy of the original object
+ PredType( const PredType& original );
+
+#endif // DOXYGEN_SHOULD_SKIP_THIS
+
};
#ifndef H5_NO_NAMESPACE
}
diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp
index d2fb66f..a9dd22a 100644
--- a/c++/src/H5PropList.cpp
+++ b/c++/src/H5PropList.cpp
@@ -29,15 +29,14 @@ namespace H5 {
#endif
//--------------------------------------------------------------------------
-///\brief Constant for default property
+///\brief Constant for default property.
//--------------------------------------------------------------------------
const PropList PropList::DEFAULT( H5P_DEFAULT );
//--------------------------------------------------------------------------
// Function Default constructor
-///\brief Default constructor - Creates a stub property list object.
-///\par Description
-/// The id of this property list is set to 0.
+///\brief Default constructor: creates a stub property list object.
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PropList::PropList() : IdComponent( 0 ) {}
@@ -45,6 +44,7 @@ PropList::PropList() : IdComponent( 0 ) {}
// Function: PropList copy constructor
///\brief Copy constructor
///\param original - IN: The original property list to copy
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PropList::PropList( const PropList& original ) : IdComponent( original ) {}
@@ -60,6 +60,7 @@ PropList::PropList( const PropList& original ) : IdComponent( original ) {}
// property's id to H5P_DEFAULT, otherwise, to the given id.
// Note: someone else added this code without comments and this
// description was what I came up with from reading the code.
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PropList::PropList( const hid_t plist_id ) : IdComponent(0)
{
@@ -81,9 +82,10 @@ PropList::PropList( const hid_t plist_id ) : IdComponent(0)
//--------------------------------------------------------------------------
// Function: PropList::copy
-///\brief Makes a copy of an existing property list
+///\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
//--------------------------------------------------------------------------
void PropList::copy( const PropList& like_plist )
{
@@ -105,12 +107,13 @@ void PropList::copy( const PropList& like_plist )
//--------------------------------------------------------------------------
// Function: PropList::operator=
-///\brief Assignment operator
+///\brief Assignment operator.
///\param rhs - IN: Reference to the existing property list
-///
+///\exception H5::PropListIException
// 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 )
{
@@ -124,6 +127,8 @@ PropList& PropList::operator=( const PropList& rhs )
///\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 char pointer
+///\exception H5::PropListIException
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void PropList::copyProp( PropList& dest, PropList& src, const char *name ) const
{
@@ -145,6 +150,7 @@ void 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 std::string
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void PropList::copyProp( PropList& dest, PropList& src, const string& name ) const
{
@@ -157,6 +163,7 @@ void PropList::copyProp( PropList& dest, PropList& src, const string& name ) con
///\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_NO_CLASS
///\exception H5::PropListIException
+// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
hid_t PropList::getClass() const
{
@@ -214,7 +221,7 @@ bool PropList::propExist(const string& name ) const
///\brief Close a property list class.
///\exception H5::PropListIException
///\par Description
-/// Releases memory and de-attaches a class from the property
+/// Releases memory and detaches a class from the property
/// list class hierarchy.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
@@ -234,8 +241,9 @@ void PropList::closeClass() const
///\param value - OUT: Pointer to the buffer for the property value
///\exception H5::PropListIException
///\par Description
-/// 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.
+/// 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
@@ -338,7 +346,7 @@ size_t PropList::getPropSize(const string& name) const
//--------------------------------------------------------------------------
// Function: PropList::getClassName
-///\brief Return the name of a generic property list class
+///\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
@@ -452,7 +460,7 @@ void PropList::setProperty(const string& name, string& strg) const
//--------------------------------------------------------------------------
// Function: PropList::isAClass
-///\brief Determines whether a property list is a certain class
+///\brief Determines whether a property list is a certain class.
///\param prop_class - IN: Property class to query
///\return true if the property list is a member of the property list
/// class, and false, otherwise.
@@ -475,7 +483,7 @@ bool PropList::isAClass(const PropList& prop_class) const
//--------------------------------------------------------------------------
// Function: PropList::removeProp
-///\brief Removes a property from a property list
+///\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
@@ -546,6 +554,9 @@ PropList 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 new ID
+// reference counting mechanisms by Quincey Koziol, June 1, 2004
//--------------------------------------------------------------------------
PropList::~PropList()
{
diff --git a/c++/src/H5PropList.h b/c++/src/H5PropList.h
index a8d276c..10d2bf9 100644
--- a/c++/src/H5PropList.h
+++ b/c++/src/H5PropList.h
@@ -26,63 +26,73 @@ class H5_DLLCPP PropList : public IdComponent {
static const PropList DEFAULT;
// Creates a property list of a given type or creates a copy of an
- // existing property list giving the property list id
- PropList( const hid_t plist_id );
+ // existing property list giving the property list id.
+ PropList(const hid_t plist_id);
- // Default constructor: creates a PropList object - this object
- // does not represent any property list yet.
- PropList();
+ // Make a copy of the given property list using assignment statement
+ PropList& operator=( const PropList& rhs );
- // Copy constructor: creates a copy of a PropList object.
- PropList( const PropList& original );
+ // Compares this property list or class against the given list or class.
+ bool operator==(const PropList& rhs) const;
+
+ // Close a property list class.
+ void closeClass() const;
// Makes a copy of the given property list.
void copy( const PropList& like_plist );
- // Make a copy of the given property list using assignment statement
- PropList& operator=( const PropList& rhs );
-
// Copies a property from one property list or property class to another
- void copyProp( PropList& dest, PropList& src, const string& name) const;
void copyProp( PropList& dest, PropList& src, const char* name) const;
+ void copyProp( PropList& dest, PropList& src, const string& name) const;
// Gets the class of this property list, i.e. H5P_FILE_CREATE,
// H5P_FILE_ACCESS, ...
hid_t getClass() const;
- /// Query the existance of a property in a property object.
- bool propExist(const char* name) const;
- bool propExist(const string& name) const;
+ // Return the name of a generic property list class.
+ string getClassName() const;
- void closeClass() const;
+ // Returns the parent class of a generic property class.
+ PropList getClassParent() const;
+
+ // Returns the number of properties in this property list or class.
+ size_t getNumProps() const;
+ // Query the value of a property in a property list.
void getProperty(const char* name, void* value) const;
string getProperty(const char* name) const;
void getProperty(const string& name, void* value) const;
string getProperty(const string& name) const;
- size_t getPropSize(const char *name) const;
- size_t getPropSize(const string& name) const;
-
- string getClassName() const;
-
- size_t getNumProps() const;
-
+ // Set a property's value in a property list.
void setProperty(const char* name, void* charptr) const;
void setProperty(const char* name, const char* value) const;
void setProperty(const char* name, string& strg) const;
void setProperty(const string& name, void* value) const;
void setProperty(const string& name, string& strg) const;
+ // Query the size of a property in a property list or class.
+ size_t getPropSize(const char *name) const;
+ size_t getPropSize(const string& name) const;
+
+ // Determines whether a property list is a certain class.
bool isAClass(const PropList& prop_class) const;
+ /// Query the existance of a property in a property object.
+ bool propExist(const char* name) const;
+ bool propExist(const string& name) const;
+
+ // Removes a property from a property list.
void removeProp(const char *name) const;
void removeProp(const string& name) const;
- bool operator==(const PropList& rhs) const;
+ // Default constructor: creates a stub PropList object.
+ PropList();
- PropList getClassParent() const;
+ // Copy constructor: creates a copy of a PropList object.
+ PropList(const PropList& original);
+ // Destructor: properly terminates access to this property list.
virtual ~PropList();
};
diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp
index 942f72f..ed011bd 100644
--- a/c++/src/H5StrType.cpp
+++ b/c++/src/H5StrType.cpp
@@ -105,11 +105,11 @@ StrType::StrType( const hid_t existing_id ) : AtomType( existing_id ) {}
StrType::StrType( const StrType& original ) : AtomType ( original ) {}
//--------------------------------------------------------------------------
-// Function: EnumType overloaded constructor
-///\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
+// Function: EnumType overloaded constructor
+///\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 ()
{
diff --git a/c++/src/H5StrType.h b/c++/src/H5StrType.h
index 6ee6025..9e4483e 100644
--- a/c++/src/H5StrType.h
+++ b/c++/src/H5StrType.h
@@ -22,39 +22,40 @@ namespace H5 {
class H5_DLLCPP StrType : public AtomType {
public:
- // default constructor
- StrType();
-
// Creates a string type using a predefined type
- StrType( const PredType& pred_type );
+ StrType(const PredType& pred_type);
// Creates a string type with specified length
- StrType( const size_t& size );
+ StrType(const size_t& size);
// Creates a string type with specified length - will be obsolete
- StrType( const PredType& pred_type, const size_t size );
-
- // Creates a string datatype using an existing id
- StrType( const hid_t existing_id );
-
- // Copy constructor - makes a copy of the original object
- StrType( const StrType& original );
+ StrType(const PredType& pred_type, const size_t size);
// Gets the string datatype of the specified dataset
- StrType( const DataSet& dataset );
+ StrType(const DataSet& dataset);
// Retrieves the character set type of this string datatype.
H5T_cset_t getCset() const;
// Sets character set to be used.
- void setCset( H5T_cset_t cset ) const;
+ void setCset(H5T_cset_t cset) const;
// Retrieves the string padding method for this string datatype.
H5T_str_t getStrpad() const;
// Defines the storage mechanism for character strings.
- void setStrpad( H5T_str_t strpad ) const;
+ void setStrpad(H5T_str_t strpad) const;
+
+ // default constructor
+ StrType();
+
+ // Creates a string datatype using an existing id
+ StrType(const hid_t existing_id);
+
+ // Copy constructor - makes a copy of the original object
+ StrType(const StrType& original);
+ // Noop destructor.
virtual ~StrType();
};
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5VarLenType.cpp b/c++/src/H5VarLenType.cpp
index 1cdf62e..ebe0e86 100644
--- a/c++/src/H5VarLenType.cpp
+++ b/c++/src/H5VarLenType.cpp
@@ -36,10 +36,10 @@ namespace H5 {
VarLenType::VarLenType() : DataType() {}
//--------------------------------------------------------------------------
-// Function: VarLenType overloaded constructor
-///\brief Creates an VarLenType object using an existing id.
-///\param existing_id - IN: Id of an existing datatype
-///\exception H5::DataTypeIException
+// Function: VarLenType overloaded constructor
+///\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) {}
@@ -56,7 +56,7 @@ VarLenType::VarLenType(const VarLenType& original) : DataType(original) {}
///\brief Creates a new variable-length datatype based on the specified
/// \a base_type.
///\param base_type - IN: Pointer to existing datatype
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Description
// DataType passed by pointer to avoid clashing with copy
// constructor.
diff --git a/c++/src/H5VarLenType.h b/c++/src/H5VarLenType.h
index 8a2572b..c31946a 100644
--- a/c++/src/H5VarLenType.h
+++ b/c++/src/H5VarLenType.h
@@ -28,10 +28,10 @@ class H5_DLLCPP VarLenType : public DataType {
// on the specified base type.
VarLenType(const DataType* base_type);
- // Copy constructor - makes copy of the original object
+ // Copy constructor: makes copy of the original object.
VarLenType( const VarLenType& original );
- // Default destructor
+ // Noop destructor
virtual ~VarLenType();
protected: