summaryrefslogtreecommitdiffstats
path: root/c++/src
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src')
-rw-r--r--c++/src/H5AbstractDs.cpp4
-rw-r--r--c++/src/H5AbstractDs.h3
-rw-r--r--c++/src/H5AtomType.cpp4
-rw-r--r--c++/src/H5Attribute.cpp2
-rw-r--r--c++/src/H5CommonFG.cpp10
-rw-r--r--c++/src/H5CommonFG.h40
-rw-r--r--c++/src/H5DataSet.cpp4
-rw-r--r--c++/src/H5DataSpace.cpp14
-rw-r--r--c++/src/H5DcreatProp.cpp6
-rw-r--r--c++/src/H5DxferProp.cpp6
-rw-r--r--c++/src/H5File.cpp6
-rw-r--r--c++/src/H5File.h2
-rw-r--r--c++/src/H5FloatType.cpp2
-rw-r--r--c++/src/H5IdComponent.cpp4
-rw-r--r--c++/src/H5IdComponent.h3
-rw-r--r--c++/src/H5IntType.cpp2
-rw-r--r--c++/src/H5Object.cpp33
-rw-r--r--c++/src/H5Object.h16
-rw-r--r--c++/src/H5PredType.cpp43
19 files changed, 119 insertions, 85 deletions
diff --git a/c++/src/H5AbstractDs.cpp b/c++/src/H5AbstractDs.cpp
index 70b2963..185ce7c 100644
--- a/c++/src/H5AbstractDs.cpp
+++ b/c++/src/H5AbstractDs.cpp
@@ -165,8 +165,8 @@ StrType AbstractDs::getStrType() const
}
//--------------------------------------------------------------------------
-// Function: StrType destructor
-///\brief Default destructor
+// Function: AbstractDs destructor
+///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AbstractDs::~AbstractDs() {}
diff --git a/c++/src/H5AbstractDs.h b/c++/src/H5AbstractDs.h
index 12f873d..579fc18 100644
--- a/c++/src/H5AbstractDs.h
+++ b/c++/src/H5AbstractDs.h
@@ -62,9 +62,6 @@ class H5_DLLCPP AbstractDs : public H5Object {
private:
// This member function is implemented by DataSet and Attribute
virtual hid_t p_getType() const = 0;
-
- // This member function is implemented by DataSet and Attribute
- virtual void p_close() const = 0;
};
#ifndef H5_NO_NAMESPACE
}
diff --git a/c++/src/H5AtomType.cpp b/c++/src/H5AtomType.cpp
index d98f482..2ca0188 100644
--- a/c++/src/H5AtomType.cpp
+++ b/c++/src/H5AtomType.cpp
@@ -257,8 +257,8 @@ void AtomType::setPad( H5T_pad_t lsb, H5T_pad_t msb ) const
}
//--------------------------------------------------------------------------
-// Function: AtomType destructor
-///\brief Properly terminates access to this object.
+// Function: AtomType destructor
+///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::~AtomType() {}
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp
index c6c67a9..88160f6 100644
--- a/c++/src/H5Attribute.cpp
+++ b/c++/src/H5Attribute.cpp
@@ -58,7 +58,7 @@ Attribute::Attribute( const Attribute& original ) : AbstractDs( original ) {}
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Attribute::Attribute( const hid_t attr_id ) : AbstractDs( attr_id ) {}
+Attribute::Attribute(const hid_t existing_id) : AbstractDs(existing_id) {}
//--------------------------------------------------------------------------
// Function: Attribute::write
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index 97ce0a1..54009f3 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -216,7 +216,7 @@ DataSet CommonFG::openDataSet( const string& name ) const
//--------------------------------------------------------------------------
// Function: CommonFG::link
///\brief Creates a link of the specified type from \a new_name to
-/// \a curr_name;
+/// \a curr_name.
///\param link_type - IN: Link type; possible values are
/// \li \c H5G_LINK_HARD
/// \li \c H5G_LINK_SOFT
@@ -374,9 +374,9 @@ string CommonFG::getLinkval( const string& name, size_t size ) const
//--------------------------------------------------------------------------
// Function: CommonFG::setComment
-///\brief Sets the comment for an object specified by its name.
-///\param name - IN:
-///\param comment - IN: New comment;
+///\brief Sets or resets the comment for an object specified by its name.
+///\param name - IN: Name of the object
+///\param comment - IN: New comment
///\exception H5::FileIException or H5::GroupIException
///\par Description
/// If \a comment is an empty string or a null pointer, the comment
@@ -448,7 +448,7 @@ string CommonFG::getComment( const string& name, size_t bufsize ) const
//--------------------------------------------------------------------------
// Function: CommonFG::mount
-///\brief Mounts the file 'child' onto this group.
+///\brief Mounts the file \a child onto this group.
///\param name - IN: Name of the group
///\param child - IN: File to mount
///\param plist - IN: Property list to use
diff --git a/c++/src/H5CommonFG.h b/c++/src/H5CommonFG.h
index 0d20d77..a4ab762 100644
--- a/c++/src/H5CommonFG.h
+++ b/c++/src/H5CommonFG.h
@@ -29,91 +29,91 @@ class H5File;
class H5_DLLCPP CommonFG {
public:
// Creates a new group at this location which can be a file or another group.
- Group createGroup( const string& name, size_t size_hint = 0 ) const;
Group createGroup( const char* name, size_t size_hint = 0 ) const;
+ Group createGroup( const string& name, size_t size_hint = 0 ) const;
// Opens an existing group in a location which can be a file or another group
- Group openGroup( const string& name ) const;
Group openGroup( const char* name ) const;
+ Group openGroup( const string& name ) const;
// Creates a new dataset at this location.
- DataSet createDataSet( const string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT ) const;
DataSet createDataSet( const char* name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT ) const;
+ DataSet createDataSet( const string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT ) const;
// Opens an existing dataset at this location.
- DataSet openDataSet( const string& name ) const;
DataSet openDataSet( const char* name ) const;
+ DataSet openDataSet( const string& name ) const;
// Creates a link of the specified type from new_name to current_name;
// both names are interpreted relative to the specified location id
- void link( H5G_link_t link_type, const string& curr_name, const string& new_name ) const;
void link( H5G_link_t link_type, const char* curr_name, const char* new_name ) const;
+ void link( H5G_link_t link_type, const string& curr_name, const string& new_name ) const;
// Removes the specified name at this location.
- void unlink( const string& name ) const;
void unlink( const char* name ) const;
+ void unlink( const string& name ) const;
// Get id of the location, either group or file - pure virtual so
// the subclass can get the correct id
virtual hid_t getLocId() const = 0;
// Renames an object at this location.
- void move( const string& src, const string& dst ) const;
void move( const char* src, const char* dst ) const;
+ void move( const string& src, const string& dst ) const;
// Returns information about an HDF5 object, given by its name,
// at this location.
- void getObjinfo( const string& name, hbool_t follow_link, H5G_stat_t& statbuf ) const;
void getObjinfo( const char* name, hbool_t follow_link, H5G_stat_t& statbuf ) const;
+ void getObjinfo( const string& name, hbool_t follow_link, H5G_stat_t& statbuf ) const;
// Returns the name of the HDF5 object that the symbolic link points to.
- string getLinkval( const string& name, size_t size ) const;
string getLinkval( const char* name, size_t size ) const;
+ string getLinkval( const string& name, size_t size ) const;
// Sets the comment for an HDF5 object specified by its name
- void setComment( const string& name, const string& comment ) const;
void setComment( const char* name, const char* comment ) const;
+ void setComment( const string& name, const string& comment ) const;
// Retrieves comment for the HDF5 object specified by its name
- string getComment( const string& name, size_t bufsize ) const;
string getComment( const char* name, size_t bufsize ) const;
+ string getComment( const string& name, size_t bufsize ) const;
// Mounts the file 'child' onto this location
- void mount( const string& name, H5File& child, PropList& plist ) const;
void mount( const char* name, H5File& child, PropList& plist) const;
+ void mount( const string& name, H5File& child, PropList& plist ) const;
// Unmounts the file named 'name' from this parent location
- void unmount( const string& name ) const;
void unmount( const char* name ) const;
+ void unmount( const string& name ) const;
// Iterates over the elements of this group - not implemented in
// C++ style yet
- int iterateElems( const string& name, int *idx, H5G_iterate_t op, void *op_data );
int iterateElems( const char* name, int *idx, H5G_iterate_t op, void *op_data );
+ int iterateElems( const string& name, int *idx, H5G_iterate_t op, void *op_data );
// Opens a generic named datatype in this location
- DataType openDataType( const string& name ) const;
DataType openDataType( const char* name ) const;
+ DataType openDataType( const string& name ) const;
// Opens a named enumeration datatype in this location
- EnumType openEnumType( const string& name ) const;
EnumType openEnumType( const char* name ) const;
+ EnumType openEnumType( const string& name ) const;
// Opens a named compound datatype in this location
- CompType openCompType( const string& name ) const;
CompType openCompType( const char* name ) const;
+ CompType openCompType( const string& name ) const;
// Opens a named integer datatype in this location
- IntType openIntType( const string& name ) const;
IntType openIntType( const char* name ) const;
+ IntType openIntType( const string& name ) const;
// Opens a named floating-point datatype in this location
- FloatType openFloatType( const string& name ) const;
FloatType openFloatType( const char* name ) const;
+ FloatType openFloatType( const string& name ) const;
// Opens a named string datatype in this location
- StrType openStrType( const string& name ) const;
StrType openStrType( const char* name ) const;
+ StrType openStrType( const string& name ) const;
// for H5File and Group to throw appropriate exception
virtual void throwException(const string func_name, const string msg) const = 0;
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp
index 112b3fa..31931b3 100644
--- a/c++/src/H5DataSet.cpp
+++ b/c++/src/H5DataSet.cpp
@@ -227,7 +227,7 @@ void DataSet::vlenReclaim( DataType& type, DataSpace& space, DSetMemXferPropList
///\param file_space - IN: Dataset's dataspace in the file
///\param xfer_plist - IN: Transfer property list for this I/O operation
///\exception H5::DataSetIException
-///par Description
+///\par Description
/// This function reads raw data from this dataset into the
/// buffer \a buf, converting from file datatype and dataspace
/// to memory datatype \a mem_type and dataspace \a mem_space.
@@ -277,7 +277,7 @@ void DataSet::read( string& strg, const DataType& mem_type, const DataSpace& mem
///\param file_space - IN: Dataset's dataspace in the file
///\param xfer_plist - IN: Transfer property list for this I/O operation
///\exception H5::DataSetIException
-///par Description
+///\par Description
/// This function writes raw data from an application buffer
/// \a buf to a dataset, converting from memory datatype
/// \a mem_type and dataspace \a mem_space to file datatype
diff --git a/c++/src/H5DataSpace.cpp b/c++/src/H5DataSpace.cpp
index 63c4076..46ee18c 100644
--- a/c++/src/H5DataSpace.cpp
+++ b/c++/src/H5DataSpace.cpp
@@ -78,11 +78,11 @@ 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
/// dataspace.
-///\param existing_id - IN: Id of an existing datatype
+///\param existing_id - IN: Id of an existing dataspace
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataSpace::DataSpace( const hid_t space_id ) : IdComponent( space_id ) {}
+DataSpace::DataSpace(const hid_t existing_id) : IdComponent(existing_id) {}
//--------------------------------------------------------------------------
// Function: DataSpace copy constructor
@@ -282,9 +282,9 @@ void DataSpace::extentCopy ( DataSpace& dest_space ) const
//--------------------------------------------------------------------------
// Function: DataSpace::setExtentSimple
///\brief Sets or resets the size of an existing dataspace.
-///\param rank - IN:
-///\param current_size - IN:
-///\param maximum_size - IN:
+///\param rank - IN: Rank of the dataspace
+///\param current_size - IN: Array containing current size of dataspace
+///\param maximum_size - IN: Array containing maximum size of dataspace
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -421,7 +421,7 @@ void DataSpace::getSelectElemPointlist ( hsize_t startpoint, hsize_t numpoints,
///\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-SelectBounds
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSpace::getSelectBounds ( hssize_t* start, hssize_t* end ) const
@@ -447,7 +447,7 @@ void DataSpace::getSelectBounds ( hssize_t* start, hssize_t* end ) 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-SelectElements
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSpace::selectElements ( H5S_seloper_t op, const size_t num_elements, const hssize_t *coord[ ] ) const
diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp
index 6fc445f..d53ce7e 100644
--- a/c++/src/H5DcreatProp.cpp
+++ b/c++/src/H5DcreatProp.cpp
@@ -592,7 +592,11 @@ void DSetCreatPropList::getExternal( int idx, size_t name_size, char* name, off_
}
}
-// Default destructor
+//--------------------------------------------------------------------------
+// Function: DSetCreatPropList destructor
+///\brief Noop destructor.
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
DSetCreatPropList::~DSetCreatPropList () {}
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5DxferProp.cpp b/c++/src/H5DxferProp.cpp
index de4fb8f..ca8cb5f 100644
--- a/c++/src/H5DxferProp.cpp
+++ b/c++/src/H5DxferProp.cpp
@@ -338,7 +338,11 @@ H5Z_EDC_t DSetMemXferPropList::getEDCCheck()
return(check);
}
-// Default destructor
+//--------------------------------------------------------------------------
+// Function: DSetMemXferPropList destructor
+///\brief Noop destructor.
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
DSetMemXferPropList::~DSetMemXferPropList() {}
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index 74be4e9..634f8e5 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -80,7 +80,7 @@ H5File::H5File() : IdComponent() {}
//--------------------------------------------------------------------------
H5File::H5File( const string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : IdComponent()
{
- getFile( name.c_str(), flags, create_plist, access_plist );
+ p_get_file( name.c_str(), flags, create_plist, access_plist );
}
//--------------------------------------------------------------------------
@@ -99,7 +99,7 @@ H5File::H5File( const string& name, unsigned int flags, const FileCreatPropList&
//--------------------------------------------------------------------------
H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : IdComponent()
{
- getFile( name, flags, create_plist, access_plist );
+ p_get_file( name, flags, create_plist, access_plist );
}
//--------------------------------------------------------------------------
@@ -107,7 +107,7 @@ H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& c
// constructors taking a string or a char*
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void H5File::getFile( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist )
+void H5File::p_get_file( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist )
{
// These bits only set for creation, so if any of them are set,
// create the file.
diff --git a/c++/src/H5File.h b/c++/src/H5File.h
index c1720f3..b3edbb6 100644
--- a/c++/src/H5File.h
+++ b/c++/src/H5File.h
@@ -92,7 +92,7 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG {
private:
// This function is private and contains common code between the
// constructors taking a string or a char*
- void getFile( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist );
+ void p_get_file( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist );
};
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5FloatType.cpp b/c++/src/H5FloatType.cpp
index 1bb2ed9..010d8a3 100644
--- a/c++/src/H5FloatType.cpp
+++ b/c++/src/H5FloatType.cpp
@@ -277,7 +277,7 @@ void FloatType::setInpad( H5T_pad_t inpad ) const
//--------------------------------------------------------------------------
// Function: FloatType destructor
-///\brief Properly terminates access to this file.
+///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType::~FloatType() {}
diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp
index a9c3520..a3c5766 100644
--- a/c++/src/H5IdComponent.cpp
+++ b/c++/src/H5IdComponent.cpp
@@ -135,7 +135,7 @@ IdComponent& IdComponent::operator=( const IdComponent& rhs )
}
//--------------------------------------------------------------------------
-// Function: IdComponent::incRefCount
+// Function: IdComponent::setId
///\brief Sets the identifier of this object to a new value.
///\exception H5::IdComponentException when the attempt to close the HDF5
/// object fails
@@ -162,7 +162,7 @@ void IdComponent::setId( hid_t new_id )
}
//--------------------------------------------------------------------------
-// Function: IdComponent::incRefCount
+// Function: IdComponent::getId
///\brief Returns the id of this object
///\return HDF5 id
// Programmer Binh-Minh Ribler - 2000
diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h
index 81e95ac..7b6cbea 100644
--- a/c++/src/H5IdComponent.h
+++ b/c++/src/H5IdComponent.h
@@ -72,6 +72,9 @@ class H5_DLLCPP IdComponent {
// Default constructor
IdComponent();
+ // Gets the id of the H5 file in which the given object is located.
+ hid_t p_get_file_id();
+
// Creates a reference to an HDF5 object or a dataset region.
void* p_reference(const char* name, hid_t space_id, H5R_type_t ref_type) const;
diff --git a/c++/src/H5IntType.cpp b/c++/src/H5IntType.cpp
index 7dcd891..3986b3b 100644
--- a/c++/src/H5IntType.cpp
+++ b/c++/src/H5IntType.cpp
@@ -128,7 +128,7 @@ void IntType::setSign( H5T_sign_t sign ) const
//--------------------------------------------------------------------------
// Function: IntType destructor
-///\brief Properly terminates access to this integer datatype.
+///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType::~IntType() {}
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp
index 37d64a1..811ce75 100644
--- a/c++/src/H5Object.cpp
+++ b/c++/src/H5Object.cpp
@@ -187,9 +187,13 @@ Attribute H5Object::openAttribute( const unsigned int idx ) const
///\param user_op - IN: User's function to operate on each attribute
///\param idx - IN/OUT: Starting (IN) and ending (OUT) attribute indices
///\param op_data - IN: User's data to pass to user's operator function
-///\return Returned value of the last operator if it was non-zero, or
+///\return Returned value of the last operator if it was non-zero, or
/// zero if all attributes were processed
///\exception H5::AttributeIException
+///\par Description
+/// For information, please refer to the C layer Reference Manual
+/// at:
+/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5A.html#Annot-Iterate
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int H5Object::iterateAttrs( attr_operator_t user_op, unsigned * idx, void *op_data )
@@ -284,20 +288,18 @@ void H5Object::flush(H5F_scope_t scope ) const
//--------------------------------------------------------------------------
// Function: H5Object::Reference
-///\brief Creates a reference to an Hdf5 object.
+///\brief Creates a reference to an Hdf5 object or to a dataset region.
///\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
///\return A reference
///\exception H5::ReferenceIException
-///\par Description
-// This function passes H5R_OBJECT and -1 to the C API H5Rcreate
-// to create a reference to the named object. The next function
-// will create a reference to a dataset region.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-void* H5Object::Reference(const char* name) const
+void* H5Object::Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type) const
{
void *ref;
- herr_t ret_value = H5Rcreate(ref, id, name, H5R_OBJECT, -1);
+ herr_t ret_value = H5Rcreate(ref, id, name, ref_type, dataspace.getId());
if (ret_value < 0)
{
throw AttributeIException("H5Object::Reference",
@@ -308,18 +310,22 @@ void* H5Object::Reference(const char* name) const
//--------------------------------------------------------------------------
// Function: H5Object::Reference
-///\brief Creates a reference.
+///\brief This is an overloaded function, provided for your convenience.
+/// It differs from the above function in that it only creates
+/// a reference to an Hdf5 object, not to a dataset region.
///\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
///\return A reference
///\exception H5::ReferenceIException
+///\par Description
+// This function passes H5R_OBJECT and -1 to the C API H5Rcreate
+// to create a reference to the named object. The next function
+// will create a reference to a dataset region.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-void* H5Object::Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type) const
+void* H5Object::Reference(const char* name) const
{
void *ref;
- herr_t ret_value = H5Rcreate(ref, id, name, ref_type, dataspace.getId());
+ herr_t ret_value = H5Rcreate(ref, id, name, H5R_OBJECT, -1);
if (ret_value < 0)
{
throw AttributeIException("H5Object::Reference",
@@ -327,7 +333,6 @@ void* H5Object::Reference(const char* name, DataSpace& dataspace, H5R_type_t ref
}
return(ref);
}
-
//--------------------------------------------------------------------------
// Function: H5Object destructor
///\brief Noop destructor.
diff --git a/c++/src/H5Object.h b/c++/src/H5Object.h
index 6d1a752..b6577a2 100644
--- a/c++/src/H5Object.h
+++ b/c++/src/H5Object.h
@@ -46,31 +46,20 @@ class UserData4Aiterate { // user data for attribute iteration
class H5_DLLCPP H5Object : public IdComponent {
public:
- // Pure virtual function so appropriate close function can
- // be called by subclasses' for the corresponding HDF5 object
- //virtual void p_close() const = 0;
-
// Copy constructor: makes copy of an H5Object object.
H5Object( const H5Object& original );
// Flushes all buffers associated with this object to disk
void flush( H5F_scope_t scope ) const;
- // Assignment operator
- //H5Object& operator=( const H5Object& rhs );
-
- // Sets and gets H5Object's data member
- //void setId( hid_t new_id );
- //hid_t getId () const;
-
// Creates an attribute for a group, dataset, or named datatype.
// PropList is currently not used, so always be default.
Attribute createAttribute( const char* name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
Attribute createAttribute( const string& name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
// Opens an attribute given its name.
- Attribute openAttribute( const string& name ) const;
Attribute openAttribute( const char* name ) const;
+ Attribute openAttribute( const string& name ) const;
// Opens an attribute given its index.
Attribute openAttribute( const unsigned int idx ) const;
@@ -82,15 +71,14 @@ class H5_DLLCPP H5Object : public IdComponent {
int getNumAttrs() const;
// Removes the named attribute from this object.
- void removeAttr( const string& name ) const;
void removeAttr( const char* name ) const;
+ void removeAttr( const string& name ) const;
// Creates a reference to a named Hdf5 object in this object.
void* Reference(const char* name) const;
// Creates a reference to a dataset region in this object.
void* Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const;
-
virtual ~H5Object();
protected:
diff --git a/c++/src/H5PredType.cpp b/c++/src/H5PredType.cpp
index 5fab4a9..cba7a58 100644
--- a/c++/src/H5PredType.cpp
+++ b/c++/src/H5PredType.cpp
@@ -29,20 +29,47 @@
namespace H5 {
#endif
-// Default constructor
+//--------------------------------------------------------------------------
+// Function: PredType default constructor
+///\brief Default constructor: Creates a stub predefined datatype
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
PredType::PredType() : AtomType() {}
-// creates predefined datatype, so set DataType::is_predtype to true by default
+//--------------------------------------------------------------------------
+// Function: PredType overloaded constructor
+///\brief Creates a PredType object using the id of an existing
+/// predefined datatype.
+///\param predtype_id - IN: Id of a predefined datatype
+// Description
+// This constructor creates a predefined datatype, so it sets
+// DataType::is_predtype to true.
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
PredType::PredType( const hid_t predtype_id ) : AtomType( predtype_id )
{
is_predtype = true;
}
-// Copy constructor: makes a copy of this PredType 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( const PredType& original ) : AtomType( original ) {}
-// Makes a copy of the predefined type and stores the new
-// id in the left hand side object.
+//--------------------------------------------------------------------------
+// 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);
@@ -197,6 +224,12 @@ 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 );
+//--------------------------------------------------------------------------
+// Function: PredType::getId
+///\brief Returns the HDF5 predefined type id.
+///\return HDF5 predefined type id or INVALID
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
hid_t PredType::getId() const
{
switch( id ) {