diff options
-rw-r--r-- | c++/src/H5AbstractDs.cpp | 1 | ||||
-rw-r--r-- | c++/src/H5ArrayType.cpp | 1 | ||||
-rw-r--r-- | c++/src/H5AtomType.cpp | 1 | ||||
-rw-r--r-- | c++/src/H5Attribute.cpp | 7 | ||||
-rw-r--r-- | c++/src/H5CommonFG.cpp | 1 | ||||
-rw-r--r-- | c++/src/H5CompType.cpp | 1 | ||||
-rw-r--r-- | c++/src/H5DataSet.cpp | 2 | ||||
-rw-r--r-- | c++/src/H5DataSpace.cpp | 2 | ||||
-rw-r--r-- | c++/src/H5DataType.cpp | 12 | ||||
-rw-r--r-- | c++/src/H5DcreatProp.cpp | 1 | ||||
-rw-r--r-- | c++/src/H5DxferProp.cpp | 1 | ||||
-rw-r--r-- | c++/src/H5EnumType.cpp | 1 | ||||
-rw-r--r-- | c++/src/H5Exception.cpp | 1 | ||||
-rw-r--r-- | c++/src/H5FaccProp.cpp | 1 | ||||
-rw-r--r-- | c++/src/H5FcreatProp.cpp | 1 | ||||
-rw-r--r-- | c++/src/H5File.cpp | 23 | ||||
-rw-r--r-- | c++/src/H5File.h | 3 | ||||
-rw-r--r-- | c++/src/H5FloatType.cpp | 1 | ||||
-rw-r--r-- | c++/src/H5Group.cpp | 2 | ||||
-rw-r--r-- | c++/src/H5IntType.cpp | 1 | ||||
-rw-r--r-- | c++/src/H5Library.cpp | 1 | ||||
-rw-r--r-- | c++/src/H5Object.cpp | 1 | ||||
-rw-r--r-- | c++/src/H5PredType.cpp | 8 | ||||
-rw-r--r-- | c++/src/H5PropList.cpp | 2 | ||||
-rw-r--r-- | c++/src/H5StrType.cpp | 1 | ||||
-rw-r--r-- | c++/src/H5VarLenType.cpp | 1 |
26 files changed, 41 insertions, 37 deletions
diff --git a/c++/src/H5AbstractDs.cpp b/c++/src/H5AbstractDs.cpp index 72af64a..3a0e9d3 100644 --- a/c++/src/H5AbstractDs.cpp +++ b/c++/src/H5AbstractDs.cpp @@ -13,7 +13,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <string> - #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp index ed8822f..97ac6e3 100644 --- a/c++/src/H5ArrayType.cpp +++ b/c++/src/H5ArrayType.cpp @@ -13,7 +13,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <string> - #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5AtomType.cpp b/c++/src/H5AtomType.cpp index ace1973..b41f2c3 100644 --- a/c++/src/H5AtomType.cpp +++ b/c++/src/H5AtomType.cpp @@ -13,7 +13,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <string> - #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp index 5f69aee..1117cfa 100644 --- a/c++/src/H5Attribute.cpp +++ b/c++/src/H5Attribute.cpp @@ -17,8 +17,8 @@ #else #include <iostream> #endif -#include <string> +#include <string> #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; @@ -80,7 +80,8 @@ Attribute::Attribute(const hid_t existing_id) : AbstractDs(existing_id) {} //-------------------------------------------------------------------------- void Attribute::write( const DataType& mem_type, const void *buf ) const { - herr_t ret_value = H5Awrite( id, mem_type.getId(), buf ); +cerr << "Attribute::write: mem_type.id = " << mem_type.getId() << endl; + herr_t ret_value = H5Awrite( id, mem_type.getId(), &buf ); if( ret_value < 0 ) { throw AttributeIException("Attribute::write", "H5Awrite failed"); @@ -102,7 +103,7 @@ void Attribute::write( const DataType& mem_type, const string& strg ) const const char* strg_C; strg_C = strg.c_str(); // strg_C refers to the contents of strg as a C-str - herr_t ret_value = H5Awrite( id, mem_type.getId(), strg_C ); + herr_t ret_value = H5Awrite( id, mem_type.getId(), &strg_C ); if( ret_value < 0 ) { throw AttributeIException("Attribute::write", "H5Awrite failed"); diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp index 774b05c..ebf6c8b 100644 --- a/c++/src/H5CommonFG.cpp +++ b/c++/src/H5CommonFG.cpp @@ -13,7 +13,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <string> - #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp index c7115db..24943ac 100644 --- a/c++/src/H5CompType.cpp +++ b/c++/src/H5CompType.cpp @@ -13,7 +13,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <string> - #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp index 50b6368..e764a64 100644 --- a/c++/src/H5DataSet.cpp +++ b/c++/src/H5DataSet.cpp @@ -17,8 +17,8 @@ #else #include <iostream> #endif -#include <string> +#include <string> #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5DataSpace.cpp b/c++/src/H5DataSpace.cpp index 34f5f20..d2cab3d 100644 --- a/c++/src/H5DataSpace.cpp +++ b/c++/src/H5DataSpace.cpp @@ -17,8 +17,8 @@ #else #include <iostream> #endif -#include <string> +#include <string> #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp index 09260fa..6299c5b 100644 --- a/c++/src/H5DataType.cpp +++ b/c++/src/H5DataType.cpp @@ -17,8 +17,8 @@ #else #include <iostream> #endif -#include <string> +#include <string> #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; @@ -160,8 +160,7 @@ bool DataType::operator==(const DataType& compared_type ) const return false; else { - throw DataTypeIException(inMemFunc("operator=="), - "H5Tequal returns negative value"); + throw DataTypeIException(inMemFunc("operator=="), "H5Tequal returns negative value"); } } @@ -530,8 +529,7 @@ string DataType::getTag() const } else { - throw DataTypeIException(inMemFunc("getTag"), - "H5Tget_tag returns NULL for tag"); + throw DataTypeIException(inMemFunc("getTag"), "H5Tget_tag returns NULL for tag"); } } @@ -554,7 +552,7 @@ bool DataType::detectClass(H5T_class_t cls) const else { throw DataTypeIException(inMemFunc("detectClass"), - "H5Tdetect_class returns negative value"); + "H5Tdetect_class returns negative value"); } } @@ -576,7 +574,7 @@ bool DataType::isVariableStr() const else { throw DataTypeIException(inMemFunc("isVariableStr"), - "H5Tis_variable_str returns negative value"); + "H5Tis_variable_str returns negative value"); } } diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp index 530fd9a..2c0e7af 100644 --- a/c++/src/H5DcreatProp.cpp +++ b/c++/src/H5DcreatProp.cpp @@ -13,7 +13,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <string> - #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5DxferProp.cpp b/c++/src/H5DxferProp.cpp index 83b78b2..46216d5 100644 --- a/c++/src/H5DxferProp.cpp +++ b/c++/src/H5DxferProp.cpp @@ -13,7 +13,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <string> - #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5EnumType.cpp b/c++/src/H5EnumType.cpp index 58c3b6c..0ba051e 100644 --- a/c++/src/H5EnumType.cpp +++ b/c++/src/H5EnumType.cpp @@ -13,7 +13,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <string> - #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5Exception.cpp b/c++/src/H5Exception.cpp index f45b548..9b42575 100644 --- a/c++/src/H5Exception.cpp +++ b/c++/src/H5Exception.cpp @@ -13,7 +13,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <string> - #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp index f2e1cef..2ca78be 100644 --- a/c++/src/H5FaccProp.cpp +++ b/c++/src/H5FaccProp.cpp @@ -13,7 +13,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <string> - #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5FcreatProp.cpp b/c++/src/H5FcreatProp.cpp index ab539c7..e21e5bc 100644 --- a/c++/src/H5FcreatProp.cpp +++ b/c++/src/H5FcreatProp.cpp @@ -13,7 +13,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <string> - #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp index 3457b04..7a4d107 100644 --- a/c++/src/H5File.cpp +++ b/c++/src/H5File.cpp @@ -17,8 +17,8 @@ #else #include <iostream> #endif -#include <string> +#include <string> #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; @@ -116,7 +116,7 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro { // These bits only set for creation, so if any of them are set, // create the file. - if( flags & (H5F_ACC_EXCL|H5F_ACC_TRUNC|H5F_ACC_DEBUG )) + if( flags & (H5F_ACC_CREAT|H5F_ACC_EXCL|H5F_ACC_TRUNC|H5F_ACC_DEBUG)) { hid_t create_plist_id = create_plist.getId(); hid_t access_plist_id = access_plist.getId(); @@ -148,6 +148,25 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro H5File::H5File( const H5File& original ) : IdComponent( original ) {} //-------------------------------------------------------------------------- +// Function: H5File::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: +/// \li \c H5F_SCOPE_GLOBAL - Flushes the entire virtual file +/// \li \c H5F_SCOPE_LOCAL - Flushes only the specified file +///\exception H5::FileIException +// Programmer Binh-Minh Ribler - Dec. 2005 +//-------------------------------------------------------------------------- +void H5File::flush(H5F_scope_t scope ) const +{ + herr_t ret_value = H5Fflush( id, scope ); + if( ret_value < 0 ) + { + throw FileIException("H5File::flush", "H5Fflush returned negative value"); + } +} + +//-------------------------------------------------------------------------- // Function: H5File::isHdf5 ///\brief Determines whether a file in HDF5 format. ///\param name - IN: Name of the file diff --git a/c++/src/H5File.h b/c++/src/H5File.h index d1d29bd..ea6b21e 100644 --- a/c++/src/H5File.h +++ b/c++/src/H5File.h @@ -33,6 +33,9 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG { // Close this file. virtual void close(); + // Flushes all buffers associated with this file to disk + void flush(H5F_scope_t scope) const; + // Gets the access property list of this file. FileAccPropList getAccessPlist() const; diff --git a/c++/src/H5FloatType.cpp b/c++/src/H5FloatType.cpp index 174284e..d56c4a7 100644 --- a/c++/src/H5FloatType.cpp +++ b/c++/src/H5FloatType.cpp @@ -13,7 +13,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <string> - #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp index 67a5b37..84cf6cf 100644 --- a/c++/src/H5Group.cpp +++ b/c++/src/H5Group.cpp @@ -17,8 +17,8 @@ #else #include <iostream> #endif -#include <string> +#include <string> #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5IntType.cpp b/c++/src/H5IntType.cpp index b9c4d4e..3b84832 100644 --- a/c++/src/H5IntType.cpp +++ b/c++/src/H5IntType.cpp @@ -13,7 +13,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <string> - #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp index 4f281c0..36711d9 100644 --- a/c++/src/H5Library.cpp +++ b/c++/src/H5Library.cpp @@ -13,7 +13,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <string> - #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index 9113d2e..3d0c6f5 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -13,7 +13,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <string> - #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5PredType.cpp b/c++/src/H5PredType.cpp index 40bb32b..570824a 100644 --- a/c++/src/H5PredType.cpp +++ b/c++/src/H5PredType.cpp @@ -13,7 +13,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <string> - #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; @@ -43,13 +42,13 @@ namespace H5 { /// 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. +// This constructor creates a PredType object by copying +// the provided HDF5 predefined datatype. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- PredType::PredType( const hid_t predtype_id ) : AtomType( predtype_id ) { - id = H5Tcopy(predtype_id); + id = H5Tcopy(predtype_id); } //-------------------------------------------------------------------------- @@ -72,6 +71,7 @@ const PredType PredType::NotAtexit; // only for atexit/global dest. problem // Definition of pre-defined types const PredType PredType::C_S1( H5T_C_S1 ); const PredType PredType::FORTRAN_S1( H5T_FORTRAN_S1 ); + const PredType PredType::STD_I8BE( H5T_STD_I8BE ); const PredType PredType::STD_I8LE( H5T_STD_I8LE ); const PredType PredType::STD_I16BE( H5T_STD_I16BE ); diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp index d8e379e..4f3c082 100644 --- a/c++/src/H5PropList.cpp +++ b/c++/src/H5PropList.cpp @@ -17,8 +17,8 @@ #else #include <iostream> #endif -#include <string> +#include <string> #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp index 81463c2..68b91fd 100644 --- a/c++/src/H5StrType.cpp +++ b/c++/src/H5StrType.cpp @@ -13,7 +13,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <string> - #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; diff --git a/c++/src/H5VarLenType.cpp b/c++/src/H5VarLenType.cpp index 2ff56fc..b8f2d32 100644 --- a/c++/src/H5VarLenType.cpp +++ b/c++/src/H5VarLenType.cpp @@ -13,7 +13,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <string> - #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD using std::string; |