summaryrefslogtreecommitdiffstats
path: root/c++/src/H5Group.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src/H5Group.cpp')
-rw-r--r--c++/src/H5Group.cpp89
1 files changed, 8 insertions, 81 deletions
diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp
index 6ec2dbb..d0231e3 100644
--- a/c++/src/H5Group.cpp
+++ b/c++/src/H5Group.cpp
@@ -99,33 +99,9 @@ Group::Group(const hid_t existing_id) : H5Object()
/// is a datatype that has been named by DataType::commit.
// Programmer Binh-Minh Ribler - Oct, 2006
//--------------------------------------------------------------------------
-Group::Group(H5Object& obj, const void* ref, H5R_type_t ref_type) : H5Object()
+Group::Group(const H5Location& loc, const void* ref, H5R_type_t ref_type) : H5Object(), id(0)
{
- try {
- id = p_dereference(obj.getId(), ref, ref_type);
- } catch (ReferenceException deref_error) {
- throw ReferenceException("Group constructor - located by an H5Object",
- deref_error.getDetailMsg());
- }
-}
-
-//--------------------------------------------------------------------------
-// Function: Group overload constructor - dereference
-///\brief Given a reference, ref, to an hdf5 group, creates a Group object
-///\param h5file - IN: Location referenced object is in
-///\param ref - IN: Reference pointer
-///\param ref_type - IN: Reference type - default to H5R_OBJECT
-///\exception H5::ReferenceException
-// Programmer Binh-Minh Ribler - Oct, 2006
-//--------------------------------------------------------------------------
-Group::Group(H5File& h5file, const void* ref, H5R_type_t ref_type) : H5Object()
-{
- try {
- id = p_dereference(h5file.getId(), ref, ref_type);
- } catch (ReferenceException deref_error) {
- throw ReferenceException("Group constructor - located by an H5File",
- deref_error.getDetailMsg());
- }
+ id = H5Location::p_dereference(loc.getId(), ref, ref_type, "constructor - by dereference");
}
//--------------------------------------------------------------------------
@@ -137,66 +113,15 @@ Group::Group(H5File& h5file, const void* ref, H5R_type_t ref_type) : H5Object()
///\exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
//--------------------------------------------------------------------------
-Group::Group(Attribute& attr, const void* ref, H5R_type_t ref_type) : H5Object()
-{
- try {
- id = p_dereference(attr.getId(), ref, ref_type);
- } catch (ReferenceException deref_error) {
- throw ReferenceException("Group constructor - located by an Attribute",
- deref_error.getDetailMsg());
- }
-}
-
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-//--------------------------------------------------------------------------
-// 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, valid values are:
-/// \li \c H5R_OBJECT - Reference is an object reference.
-/// \li \c H5R_DATASET_REGION - Reference is a dataset region reference.
-///\return An object type, which can be one of the following:
-/// \li \c H5G_LINK (0) - Object is a symbolic link.
-/// \li \c H5G_GROUP (1) - Object is a group.
-/// \li \c H5G_DATASET (2) - Object is a dataset.
-/// \li \c H5G_TYPE (3) - Object is a named datatype
-///\exception H5::GroupIException
-// Programmer Binh-Minh Ribler - May, 2004
-//--------------------------------------------------------------------------
-H5G_obj_t Group::getObjType(void *ref, H5R_type_t ref_type) const
-{
- try {
- return(p_get_obj_type(ref, ref_type));
- }
- catch (IdComponentException E) {
- throw GroupIException("Group::getObjType", E.getDetailMsg());
- }
-}
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
-//--------------------------------------------------------------------------
-// Function: Group::getRegion
-///\brief Retrieves a dataspace with the region pointed to selected.
-///\param ref - IN: Reference to get region of
-///\param ref_type - IN: Type of reference to get region of - default
-///\return DataSpace instance
-///\exception H5::GroupIException
-// Programmer Binh-Minh Ribler - May, 2004
-//--------------------------------------------------------------------------
-DataSpace Group::getRegion(void *ref, H5R_type_t ref_type) const
+Group::Group(const Attribute& attr, const void* ref, H5R_type_t ref_type) : H5Object(), id(0)
{
- try {
- DataSpace dataspace(p_get_region(ref, ref_type));
- return(dataspace);
- }
- catch (IdComponentException E) {
- throw GroupIException("Group::getRegion", E.getDetailMsg());
- }
+ id = H5Location::p_dereference(attr.getId(), ref, ref_type, "constructor - by dereference");
}
//--------------------------------------------------------------------------
// Function: Group::getId
-// Purpose: Get the id of this attribute
+///\brief Get the id of this group
+///\return Group identifier
// Modification:
// May 2008 - BMR
// Class hierarchy is revised to address bugzilla 1068. Class
@@ -210,6 +135,7 @@ hid_t Group::getId() const
return(id);
}
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: Group::p_setId
///\brief Sets the identifier of this object to a new value.
@@ -234,6 +160,7 @@ void Group::p_setId(const hid_t new_id)
// reset object's id to the given id
id = new_id;
}
+#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: Group::close