summaryrefslogtreecommitdiffstats
path: root/c++/src/H5Attribute.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2012-09-27 23:26:16 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2012-09-27 23:26:16 (GMT)
commit5fcec401bd019aa0928e11c3d4cff62ea064c1ef (patch)
treeebd883ef4019a33ef8e5b4b34bf53e815067a7cb /c++/src/H5Attribute.cpp
parente488529430ae2f90f9d327959a4610d5786a3350 (diff)
downloadhdf5-5fcec401bd019aa0928e11c3d4cff62ea064c1ef.zip
hdf5-5fcec401bd019aa0928e11c3d4cff62ea064c1ef.tar.gz
hdf5-5fcec401bd019aa0928e11c3d4cff62ea064c1ef.tar.bz2
[svn-r22836] Purpose: Fix bug HDFFV-533 and add other missing functions
Description: In this bug, H5File doesn't have the ability to create attribute. The following changes will provide that functionality and several others that were also missing: - Added an abstract class H5Location in between IdComponent and H5Object. - New class structure of IdComponent, H5Location, H5Object, H5File IdComponent | H5Location / \ H5Object H5File - Wrappers in H5Object were moved to H5Location because the related C functions take either file, group, dataset, or named datatype ID. - Added wrapper for H5Rget_obj_type2 - Added tests for file attributes and H5Rget_obj_type2 wrapper Platforms tested: Linux/32 2.6 (jam) Linux/64 2.6 (koala) SunOS 5.10 (linew)
Diffstat (limited to 'c++/src/H5Attribute.cpp')
-rw-r--r--c++/src/H5Attribute.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp
index 226ae5c..120ed39 100644
--- a/c++/src/H5Attribute.cpp
+++ b/c++/src/H5Attribute.cpp
@@ -385,6 +385,31 @@ hsize_t Attribute::getStorageSize() const
}
//--------------------------------------------------------------------------
+// Function: Attribute::flush
+///\brief Flushes all buffers associated with a file specified by
+/// this attribute, to disk.
+///\param scope - IN: Specifies the scope of the flushing action,
+/// which can be either of these values:
+/// \li \c H5F_SCOPE_GLOBAL - Flushes the entire virtual file
+/// \li \c H5F_SCOPE_LOCAL - Flushes only the specified file
+///\exception H5::AttributeIException
+///\par Description
+/// This attribute is used to identify the file to be flushed.
+// Programmer Binh-Minh Ribler - 2012
+// Modification
+// Sep 2012 - BMR
+// Duplicated from H5Location
+//--------------------------------------------------------------------------
+void Attribute::flush(H5F_scope_t scope) const
+{
+ herr_t ret_value = H5Fflush(getId(), scope);
+ if( ret_value < 0 )
+ {
+ throw AttributeIException("Attribute::flush", "H5Fflush failed");
+ }
+}
+
+//--------------------------------------------------------------------------
// Function: Attribute::getId
// Purpose: Get the id of this attribute
// Description: