summaryrefslogtreecommitdiffstats
path: root/c++/src/H5Object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src/H5Object.cpp')
-rw-r--r--c++/src/H5Object.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp
index 8a0f3b1..3fd6561 100644
--- a/c++/src/H5Object.cpp
+++ b/c++/src/H5Object.cpp
@@ -262,7 +262,7 @@ void H5Object::removeAttr( const string& name ) const
}
//--------------------------------------------------------------------------
-// Function: H5Object::getNumAttrs
+// Function: H5Object::flush
///\brief Flushes all buffers associated with a file to disk.
///\param scope - IN: Specifies the scope of the flushing action,
/// which can be either of these values:
@@ -283,6 +283,26 @@ void H5Object::flush(H5F_scope_t scope ) const
}
//--------------------------------------------------------------------------
+// Function: H5Object::Reference
+///\brief Creates a reference.
+///\param name - IN: Name of the object to be referenced
+///\return A reference
+///\exception H5::ReferenceIException
+// Programmer Binh-Minh Ribler - May, 2004
+//--------------------------------------------------------------------------
+void* H5Object::Reference(const char* name, H5R_type_t ref_type, DataSpace& dataspace) const
+{
+ void *ref;
+ herr_t ret_value = H5Rcreate(ref, id, name, ref_type, dataspace.getId());
+ if (ret_value < 0)
+ {
+ throw AttributeIException("H5Object::getNumAttrs",
+ "H5Aget_num_attrs failed - returned negative number of attributes");
+ }
+ return(ref);
+}
+
+//--------------------------------------------------------------------------
// Function: H5Object destructor
///\brief Subclasses destructors will properly terminate access to
/// this H5 object.