summaryrefslogtreecommitdiffstats
path: root/c++/src/H5File.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [svn-r29322] Purpose: Remove obsoletesBinh-Minh Ribler2016-03-071-8/+10
| | | | | | | | | | Description: Removed obsolete functions from the documentation. They are still in the code, however, until the next two releases, just in case. Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* [svn-r28027] Purpose: Fix memory leaksBinh-Minh Ribler2015-10-111-42/+42
| | | | | | | | | | | | | Description: - Removed H5Library::instance because it is unnecessary. All H5Library's methods are static. This, in turn, removed the memory leaks by H5Library::instance not being deleted. - Added ObjCreatPropList::deleteConstants to atexist() list - Cleaned up comments and format inconsistencies with 1.8 Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* [svn-r27961] Purpose: Partial fix of issues HDFFV-9169 and HDFFV-9167Binh-Minh Ribler2015-10-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | Description: Added wrappers for H5P[s/g]et_attr_phase_change and H5P[s/g]et_attr_creation_order // Sets attribute storage phase change thresholds. void setAttrPhaseChange(unsigned max_compact = 8, unsigned min_dense = 6) // Gets attribute storage phase change thresholds. void getAttrPhaseChange(unsigned& max_compact, unsigned& min_dense) // Sets tracking and indexing of attribute creation order. void setAttrCrtOrder(unsigned crt_order_flags) // Gets tracking and indexing settings for attribute creation order. unsigned getAttrCrtOrder() Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* [svn-r26986] Removed H5F_ACC_DEBUG and H5FD_DEBUG functionality.Dana Robinson2015-04-301-17/+14
| | | | | | | | | | | | The H5F_ACC_DEBUG symbol remains but has been defined to zero and has been listed as deprecated. Fixes: HDFFV-1074 Tested on: h5committest 32-bit Linux w/ C++ and Fortran and multi VFD 32-bit Linux w/ C++ and Fortran and multi VFD (no deprec symbols)
* [svn-r26695] Purpose: Fixed HDFFV-7947 (cont.)Binh-Minh Ribler2015-04-011-19/+0
| | | | | | | | | | | | Description: - Put back the UNUSED parameters in dsets test because the change to remove the warning last time caused failure in setting filter, in turn, caused failure in the test with such obscure/unrelated errors! - Added incRefCount() to other constructors that missed from last time. Platforms tested: Linux/64 (platypus) Linux/32 2.6 (jam) SunOS 5.11 (emu)
* [svn-r26667] Purpose: Fixed HDFFV-8766Binh-Minh Ribler2015-03-301-0/+26
| | | | | | | | | | | | Description: Per user Jason Newton request, the following constructor is added: H5File(hid_t existing_id); Also, fixed H5File::openFile to close current file first before re-using the object. Platforms tested: Linux/64 (platypus) Linux/32 2.6 (jam gnu and Intel 15.0) SunOS 5.11 (emu)
* [svn-r26454] Purpose: Fix warnings HDFFV-8658Binh-Minh Ribler2015-03-151-4/+4
| | | | | | | | | | | Description: Missing initializing one of the base classes in multiple inheritance. Added CommonFG() to constructors' prototype. Platforms tested: Linux/64 (platypus) Linux/32 2.6 (jam) SunOS 5.11 (emu)
* [svn-r25640] Purpose: Fixed HDFFV-4259Binh-Minh Ribler2014-09-301-4/+4
| | | | | | | | | | | | | | Description: - Used H5I_INVALID_HID instead of 0 to initialized member "id" in classes that represent HDF5 objects. For PropList, H5P_DEFAULT has to be used instead of H5I_INVALID_HID. - Added try/catch block to some dynamically allocating memory code and re-throw the bad_alloc exception with a message informing the location of the failure. Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
* [svn-r25632] Purpose: Fixed HDFFV-8852Binh-Minh Ribler2014-09-291-1/+9
| | | | | | | | | | | | | | | | Description: H5F_ACC_CREAT was included in the C++ API while the C library doesn't allow it yet. Possibly, in the future, but not now. In addition, the two flags H5F_ACC_RDONLY and H5F_ACC_RDWR were missing from the documentation, causing confusion that appending is not supported. Solution: - Removed H5F_ACC_CREAT from the function until the C library support it - Added H5F_ACC_RDONLY and H5F_ACC_RDWR to the comments to update the documentation Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
* [svn-r25061] Description:Binh-Minh Ribler2014-04-171-0/+17
| | | | | | | | | | | Put back overloaded functions for backward compatibility: - were replaced by better prototyped versions, such as Attribute::getName. - were modified to add const to constant arguments. Added notes for future removal in documentation. Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
* [svn-r25020] Description:Binh-Minh Ribler2014-04-121-13/+13
| | | | | | | | | | - Fixed a few comments that Doxygen gave warnings on. - Removed stylesheet from configuration so Doxygen will use the default stylesheet and removed the CLANG-related lines to eliminate another error since we're not using that feature, so the lines should not present. (from cpp_doc_config) Platforms tested: Linux/32 2.6 (jam) - only changing comments
* [svn-r24991] Purpose: Fixed HDFFV-3384Binh-Minh Ribler2014-04-091-1/+1
| | | | | | | | | | Description: - Added const to const arguments - Fixed miscellaneous comments Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
* [svn-r24291] Description:Binh-Minh Ribler2013-10-151-15/+15
| | | | | | | | | - Added a lot of documentation to classes for Reference Manual. - Fixed some format inconsistencies Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) Linux/64 2.6 (koala)/PGI compilers
* [svn-r24188] Purpose: Fixed bug introduced in r24163Binh-Minh Ribler2013-09-231-2/+2
| | | | | | | | | | | | | Description: - The failure in daily test was caused by missing initialization of member "id" in a few constructors. This is now fixed. - Added two overloaded H5Location::setComment - Improved some error reporting in H5Location - Improved error reporting in tests Platforms tested: Linux/32 2.6 (jam) SunOS 5.11 (emu) Linux/64 2.6 (koala)/PGI compilers
* [svn-r24143] Description:Binh-Minh Ribler2013-09-161-2/+7
| | | | | | | Fixed comments, documentation, and mis-matched DOXYGEN_SHOULD_SKIP_THIS pairs. Platforms tested: Linux/32 2.6 (jam) Regenerated and verified generated documentation.
* [svn-r23428] Description:Binh-Minh Ribler2013-03-221-3/+3
| | | | | | Fixed bug HDFFV-4272. Just typos in documentation. Platform tested: Jam
* [svn-r23427] Purpose: Fix bug HDFFV-8067Binh-Minh Ribler2013-03-221-2/+16
| | | | | | | | | | | | | | | | | | | | | | Description: + The C++ test failed with the new PGI compilers versions 12.4 and 12.5 + An exception thrown by an internal function, which was called by a constructor, was not propagating to the test program during the stack unwinding, so it couldn't be caught by the test and the program terminated. + Various trials and errors indicated that the problem is where an STD string converted to a char* being passed to the internal function, but confirmation has not been found yet. It could be a compiler bug. Solution: + Added a try/catch in the constructor around the internal function and re-throw the exception when it is caught. This is a workaround. + Unrelated minor fixes: removed unused variables and MESSAGE's; commented out tvlstr.cpp/test_read_vl_string_attribute because it may be redundant, and commented out H5Tpkg.h inclusion because TEST_ALIGNMENT is not added yet and probably not necessary in the C++ API. Platforms tested: Linux/32 2.6 (jam) with PGI compilers Linux/32 2.6 (jam) with GNU compilers Linux/64 2.6 (koala)
* [svn-r22845] Purpose: Misc fixesBinh-Minh Ribler2012-09-281-73/+9
| | | | | | | | | | Description: Fixed miscellaneous inconsistencies and typos, which also took care of the failure in Packet Table test on daily test today. Platforms tested: Linux/32 2.6 (jam) Linux/64 2.6 (koala) Mac Lion (duck)
* [svn-r22836] Purpose: Fix bug HDFFV-533 and add other missing functionsBinh-Minh Ribler2012-09-271-153/+4
| | | | | | | | | | | | | | | | | | | | | | 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)
* [svn-r22235] Purpose: Fixed bugs HDFFV-2761 & HDFFV-7852Binh-Minh Ribler2012-04-021-13/+13
| | | | | | | | | | | | | | | | | | | | Description: - Replaced PredType::NotAtexit() with PredType::AtExit(H5CPP_EXITED); and used PredType::AtExit as a flag to detect when all predefined types have been destroyed. Then, H5close will be called to terminate the library after its being re-initiated when the PredType destructors were activated. This change removed the memory leaks shown by the user's sample program. - Added H5CPP_EXITED for PredType::AtExit to use as a flag - Updated some inaccurate comments - Removed stream functions from FileAccPropList - Replaced H5_VMS with appropriate macro in H5IdComponent.cpp - Corrected many URLs (hdfgroup vs. ncsa) in comments - Replaced std::string with H5std_string in comments Platforms tested: Linux/32 2.6 (jam) Linux/64 2.6 (amani) SunOS 5.10 (linew)
* [svn-r19395] Purpose: Fixed bug 1903Binh-Minh Ribler2010-09-161-4/+2
| | | | | | | | | | | Description: After a C++ API object is closed, its id should be reset regardless of the reference count of the underlying HDF5 object. User reported the bug for Group, but it's applicable to all other objects. Fixed. Platforms tested: Linux/32 2.6 (jam) FreeBSD/64 6.3 (liberty) SunOS 5.10 (linew)
* [svn-r15704] I changed the return values of H5Fget_obj_ids and ↵Raymond Lu2008-09-261-6/+6
| | | | | | | | H5Fget_obj_count to ssize_t and modified C++ and Fortran API functions. This is for bug #1245. Tested on smirom, linew, and kagiso.
* [svn-r15407] Purpose: Fix bugBinh-Minh Ribler2008-07-251-3/+3
| | | | | | | | | | | | | | | | | Description: Changed all subclasses' setId to protected p_setId and put back setId in IdComponent. p_setId is used in the library where the id provided by a C API passed on to user's application in the form of a C++ API object, which will be destroyed properly, and so p_setId does not call incRefCount. On the other hand, the public version setId is used by other applications, in which the id passed to setId needs to be closed properly by the application, so setId must call incRefCount for the new object to prevent prematurely closing of the id. Platforms tested: Linux 2.6 (kagiso) SunOS 5.10 (linew) FreeBSD (duty)
* [svn-r15395] When an attribute was opened twice and data was written with ↵Raymond Lu2008-07-221-17/+8
| | | | | | | | | | | one of the handles, the file didn't have the data. It happened because each handle had its own object structure, and the empty one overwrote the data with fill value. This is fixed by making some attribute information like the data be shared in the attribute structure. Tested on smirom, kagiso, and linew.
* [svn-r15309] Purpose: Fixed bugsBinh-Minh Ribler2008-07-021-52/+189
| | | | | | | | | | | | | | | | Description: The class hierarchy was revised to address the problem reported in bugzilla #1068. Classes AbstractDS and Attribute are moved out of H5Object. Class Attribute now multiply inherits from IdComponent and AbstractDs and class DataSet from H5Object and AbstractDs. In addition, data member IdComponent::id was moved into subclasses: Attribute, DataSet, DataSpace, DataType, H5File, Group, and PropList. Platforms tested: SunOS 5.10 (linew) Linux 2.6 (kagiso) FreeBSD (duty)
* [svn-r14148] Description:Quincey Koziol2007-09-141-0/+2
| | | | | | | | | | | | | | | | Add H5Rget_obj_type() to the API versioning and switch internal routines to use H5Rget_obj_type2() Misc. other code cleanups, etc. Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (kagiso) Linux/64 2.6 (smirom) AIX/32 5.3 (copper) Solaris/32 2.10 (linew) Mac OS X/32 10.4.10 (amazon)
* [svn-r13253] Updated all C and C++ style source code files with the THG ↵Albert Cheng2007-02-071-2/+3
| | | | | | | | | copyright notice. Tested platform: Kagiso only since it is only a comment block change. If it works in one machine, it should work in all, I hope. Still need to check the parallel build on copper.
* [svn-r12795] Purpose: Fixing bugBinh-Minh Ribler2006-10-221-30/+20
| | | | | | | | | | | | | | | | | | | | | | | | | Description: Wrappers of H5Rcreate had incorrect prototypes. Solution: Added these overloaded functions for H5Rcreate wrapper to IdComponent: void reference(void* ref, const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const; void reference(void* ref, const char* name) const; void reference(void* ref, const H5std_string& name) const; Added these overloaded functions for H5Rdereference: void dereference(IdComponent& obj, void* ref); DataSet(IdComponent& obj, void* ref); Group(IdComponent& obj, void* ref); DataType(IdComponent& obj, void* ref); The incorrect wrappers will be removed after announcing. Platform tested: Linux 2.4 (heping) AIX 5.1 (copper) SunOS 5.8 64-bit (sol)
* [svn-r12404] Purpose: Fix typos/formatsBinh-Minh Ribler2006-06-051-10/+8
| | | | | | | | | | Description: Fixed typos and re-arranged some functions to be in sync with 1.6. Platforms tested: Linux 2.4 (heping) SunOS 5.9 (shanti) AIX 5.1 (copper)
* [svn-r12368] Purpose: Fixed bugBinh-Minh Ribler2006-05-231-14/+16
| | | | | | | | | | | | | | | | | Description: Shanti compiler destroy unnamed objects later than others, which caused some reference counting test fail. Revised the test so that destructors are called at the same time, regardless the differences of compiler implementation. Revised some constructors, close, operator=, and destructors to make sure that all the object ids are handled properly. Platforms tested: Linux 2.4 (heping) SunOS 5.9 (shanti) HPUX 11.00 (kelgia) AIX 5.1 (copper)
* [svn-r12200] Purpose: MaintenanceBinh-Minh Ribler2006-04-051-7/+7
| | | | | | | | | | | | Description: Changed to alias string instead of std, i.e. H5std_string instead of H5std, because the old way wasn't working when std didn't exist. Platforms tested: Linux 2.4 (heping) SunOS 5.8 64-bit (sol) HPUX 11.00 (kelgia) - this was the problematic platform but I wasn't able to test before.
* [svn-r12185] Purpose: Code cleanupBinh-Minh Ribler2006-03-311-3/+0
| | | | | | | | Description: Removed an empty #ifdef block that was left by mistake. Platforms tested: Linux 2.4 (heping) - very minor
* [svn-r12180] Purpose: MaintenanceBinh-Minh Ribler2006-03-301-10/+7
| | | | | | | | | | | Description: Added alias H5_std so either the global or std namespace can be used, depending on H5_NO_STD. Platforms tested: Linux 2.4 (heping) SunOS 5.8 64-bit (sol) AIX 5.1 (copper)
* [svn-r11845] Purpose: Adding another wrapper/Fixing typosBinh-Minh Ribler2005-12-291-1/+20
| | | | | | | | | | | Description: Added missing member function H5File::flush Fixed parameters passed to H5Awrite Other typos Platforms tested: Linux 2.4 (heping) SunOS 5.8 64-bit (sol)
* [svn-r11762] Purpose: Adding more wrappersBinh-Minh Ribler2005-12-051-1/+44
| | | | | | | | | | | | | | | | | Description: Added member function H5File::openFile and overloaded for convenience. Added overloaded getObjinfo to skip the middle parameter. Changed StrType(const size_t& size); to StrType(const int dummy, const size_t& size); because the first one clashed with StrType(const hid_t existing_id); Platforms tested: Linux 2.4 (heping) SunOS 5.8 64-bit (sol) HPUX 11.00 (kelgia)
* [svn-r11755] Purpose: Code improvementBinh-Minh Ribler2005-12-031-2/+9
| | | | | | | | | | | | | | | | | Description: There was a workaround for predefined types, in the C++ library, implemented when the C++ library was handling the reference counting of the object ids on its own. Currently, the C++ library is using the available APIs from the C library for that purpose, and there were bugs reported involving that part of the C++ library. So, I decided to remove the workaround completely. Also, improved the use of std members. Platforms tested: Linux 2.4 (heping) SunOS 5.8 64-bit (sol) Linux 2.4 w/PGI (colonelk)
* [svn-r11487] Purpose:Quincey Koziol2005-10-011-12/+12
| | | | | | | | | | | Code cleanup Description: Tweak copyright on C++ source files to reduce whining by copyright checking script. Platforms tested: FreeBSD 4.11 (sleipnir) w/C++
* [svn-r11264] Purpose: Additional code improvementBinh-Minh Ribler2005-08-181-0/+3
| | | | | | | | | | Description: Used "using" declaration and directive better to reduce namespace pollution. Platforms tested: Linux 2.4 (heping) SunOS 5.8 64-bit (sol)
* [svn-r11245] Purpose:Quincey Koziol2005-08-131-62/+62
| | | | | | | | | | | | | | | | | | | | Code cleanup Description: Trim trailing whitespace, which is making 'diff'ing the two branches difficult. Solution: Ran this script in each directory: foreach f (*.[ch] *.cpp) sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f end Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
* [svn-r11206] Purpose: Additional wrapper/Code improvementBinh-Minh Ribler2005-08-081-6/+44
| | | | | | | | | | | | | | | | Description: Added wrapper for H5Iget_type. Added try/catch to many APIs that call private functions so that more specific information can be provided at failure. Added IdComponent::inMemFunc to help providing specific info. Added const to parameters of several functions that missed that. Platforms tested: Linux 2.4 (heping) SunOS 5.8 64-bit (sol) AIX 5.1 (copper) IRIX64 with -n32 (modi4) HPUX 11.00 (kelgia)
* [svn-r11151] Purpose: Fix bugzilla #407 and #408Binh-Minh Ribler2005-07-251-3/+3
| | | | | | | | | | | | | | | | | | | | Description: PropList::copyProp has incorrect prototype; although it works, it does cause users inconvenience. Solution: Added another overloaded function with correct prototype. The old version will be removed in a future release. In the meantime, "Obsolete" will be displayed in its RM page. Also, changed several checks on the returned value of a C API from non-positive to negative because id = 0 is no longer significant, now that the C++ reference counting had been removed. Platforms tested: Linux 2.4 (heping) IRIX64 with -n32 (modi4) Linux 2.4 w/PGI (colonelk)
* [svn-r11060] Purpose: Fix bug (reported by user)Binh-Minh Ribler2005-07-101-30/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description: The use of FileCreatPropList::DEFAULT sometimes caused failure in the reference counting area. This occurs to all the default property lists, which also include FileAccPropList::DEFAULT, DSetCreatPropList::DEFAULT, and DSetMemXferPropList::DEFAULT. H5P_DEFAULT was used to create these default prop lists and because its value is 0, the id of these prop lists are 0, which is rejected by the H5I functions during the reference counting. Solution: The main action to fix the above problem was to use H5P_FILE_CREATE H5P_FILE_ACCESS H5P_DATASET_CREATE H5P_DATASET_XFER to define the default property lists accordingly. Yet, when this fix was applied, some bug in reference counting was revealed. It appeared that some ids were not incremented but were passed in for decrementing. The following actions were then taken to fix and improve the current use of reference counting H5I functions. * added private func IdComponent::p_valid_id to verify that the id is a valid id and can be passed into an H5I function * used p_valid_id to validate an id before calling an H5I functions in the reference-counting member functions incRefCount, decRefCount, and getCounter * changed to use member function incRefCount, decRefCount, and getCounter instead of the C APIs H5Iinc_ref, H5Idec_ref, and H5Iget_ref throughout IdComponent. In addition, overloadings were added for incRefCount, decRefCount, and getCounter to take an id different than the id of the current instance; they can be convenient during debugging. Platforms tested: Linux 2.4 (heping) SunOS 5.8 64-bit (sol) AIX 5.1 (copper)
* [svn-r10825] Purpose: Fix RM bugBinh-Minh Ribler2005-05-291-19/+26
| | | | | | | | | | | | | | Description: Doxygen 1.4.2 has a bug that when an \exception immediately follows a \brief, the exception will be displayed prominently in the brief section. Solution: Temporarily added /// to after \brief to work around this problem and notified the Doxygen's author. Platforms tested: Linux 2.4 (heping) - only in documentation sections
* [svn-r10212] Purpose: Added more wrappersBinh-Minh Ribler2005-03-141-0/+17
| | | | | | | | | | | | | | | Description: Added the following to the C++ library + overloaded functions: string CommonFG::getObjnameByIdx(hsize_t idx) H5T_order_t AtomType::getOrder() + wrappers for H5*close + wrappers for H5Arename, H5Aget_storage_size, and H5Dget_storage_size Platforms tested: Linux 2.4 (heping) AIX 5.1 (copper) SunOS 5.8 64-bit (sol)
* [svn-r10050] Purpose: Fix bugzilla #241Binh-Minh Ribler2005-02-201-2/+10
| | | | | | | | | | | Description: Checked return value from C API for failure condition. Added/Modified some comments appropriately. Platforms tested: Linux 2.4 (heping) AIX 5.1 (copper) - tests passed but there were some old warnings about duplicate symbols on std::string; I'll check on that.
* [svn-r9127] Purpose: Adding wrapper for new C API and other updatesBinh-Minh Ribler2004-08-201-47/+70
| | | | | | | | | | | | | Description: Added wrappers for H5Fget_name: H5File::getFileName H5Object::getFileName Moved some functions from Group into the base class CommonFG for H5File too. Platforms tested: SunOS 5.7 (arabica) Linux 2.4 (eirene)
* [svn-r9049] Purpose: Clean up codeBinh-Minh Ribler2004-08-071-18/+0
| | | | | | | | | | | | | Description: Removed private functions p_close, that were left over from the removal of the reference counting mechanism. Platforms tested: SunOS 5.7 (arabica) Linux 2.4 (eirene) Misc. update: release_docs/RELEASE will be updated soon.
* [svn-r8849] Purpose: Adding documentation with doxygen and fixing minor bugBinh-Minh Ribler2004-07-091-3/+4
| | | | | | | | | | | | Description: Added function headers with doxygen. Changed H5File::getFileSize according to C library. Platforms tested: Linux 2.4 (eirene) FreeBSD 4.10 (sleipnir) Misc. update:
* [svn-r8837] Purpose: Update doc and fix minor bugBinh-Minh Ribler2004-07-081-8/+8
| | | | | | | | | | | Description: H5IdComponent.cpp: initialized a pointer to NULL H5Object.cpp: removed functions being added by mistake Update function headers for the rest. Platforms tested: SunOS 5.7 (arabica) Linux 2.4 (eirene)
* [svn-r8820] Purpose: Bug fixRaymond Lu2004-07-071-3/+5
| | | | | | | Description: After changing H5Fget_filesize, forgot to update C++. Platforms tested: Tested for 1.6