summaryrefslogtreecommitdiffstats
path: root/c++/src/H5File.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #537 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_8 to hdf5_1_8Larry Knox2017-05-251-6/+4
|\ | | | | | | | | | | | | * commit '2fb535ceff613dfd2a02b5b78ba7c3b5df95424b': Remove The HDF Group copyright header from 3rd party file. Remove java/COPYING file - no java directory in this branch. Update text in COPYING files in subdirectories to match changes to copyright notices in source files. Update Copyright notices in acsite.m4 and bin/yodconfigure that were overlooked by chkcopyright. Remove broken and unnecessary urls from comments in hl/fortran/src/H5IMcc.c and hl/src/H5IM.c. Commit bin/reconfigure changes to generated files. Change copyright headers to replace url referring to file to be removed and replace it with new url for COPYING file.
| * Change copyright headers to replace url referring to file to belrknox2017-05-161-6/+4
| | | | | | | | removed and replace it with new url for COPYING file.
* | Purpose: Add new C++ wrappers (HDFFV-10156)Binh-Minh Ribler2017-05-181-0/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description: Added wrappers for H5Iis_valid, H5Ps/get_nlinks, H5Tget_create_plist, H5Oopen, and H5Oclose // Checks if the given ID is valid. static bool isValid(hid_t an_id); // Sets the number of soft or user-defined links that can be // traversed before a failure occurs. void setNumLinks(size_t nlinks) const; // Gets the number of soft or user-defined link traversals allowed size_t getNumLinks() const; // Returns a copy of the creation property list of a datatype. PropList getCreatePlist() const; // Opens an object within a group or a file, i.e., root group. hid_t openObjId(const char* name,...); hid_t openObjId(const H5std_string& name,...); // Closes an object opened by getObjId(). void closeObjId(hid_t obj_id) const; // Gets general information about this file. void getFileInfo(H5F_info2_t& file_info) const; Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* Fixed a comment.Binh-Minh Ribler2017-05-081-1/+1
|
* Code improvementBinh-Minh Ribler2017-05-081-2/+8
| | | | | | | | | | | | Description: - Moved class H5File to inherit from class Group because an HDF5 file is a root group - Cleanup header file inclusion and class forward declaration - Revised comments Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* Format changes only.Binh-Minh Ribler2017-04-231-7/+7
| | | | | Platforms tested: Linux/32 2.6 (jam) - very minor
* Miscellaneous clean-up: format and commentsBinh-Minh Ribler2017-04-131-4/+4
| | | | | Platforms tested: Linux/64 (jelly) - very minor
* Description:Binh-Minh Ribler2017-04-111-61/+61
| | | | | | Only format changes: mostly tabs vs. spaces Platforms tested: Linux/64 (jelly)
* Purpose: Fix HDFFV-9532Binh-Minh Ribler2016-10-231-4/+0
| | | | | | | | | | | | | Description: Removed obsolete macros from C++ API library and tests: H5_NO_NAMESPACE and __cplusplus Leave OLD_HEADER_FILENAME because iostream.h might still be in use, until further checking is done. Leave H5_NO_STD to consider retiring H5std_string first. Platforms tested: Linux/32 2.6 (jam) Linux/64 (jelly) Darwin (osx1010test)
* [svn-r30280] Purpose: Code improvement (HDFFR-9725)Binh-Minh Ribler2016-08-121-0/+1
| | | | | | | | | | | | | Description: - Added "const" to arguments that should be const - Added "const" to const functions, i.e., function that don't change the objects they operate on. - Removed deprecated functions in previous releases due to missing const. Merged from trunk: 30272 and 30279 Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* [svn-r29764] Purpose: Code cleanupBinh-Minh Ribler2016-04-221-1/+0
| | | | | | | | | | Description: Removed obsolete overloaded functions which had parameters that should be const but were not. They have been replaced by the correct version since 2014. Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* [svn-r27983] Description:Binh-Minh Ribler2015-10-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merged from trunk r27945, which was merged from hdf5_CppAPI_Constants, including the revisions listed below. Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test) +++ Log message when merged from hdf5_CppAPI_Constants to trunk, r27945 +++ Purpose: Fix HDFFV-9529 Description: Merged from hdf5_CppAPI_Constants r27942: ------ Description: - Added H5dont_atexit() to getPredType and all the getConstant's to prevent the C library from terminating before the C++ library cleanup. - More cleanup and added more comments k r27923: ------ - Updated more comments and moved some things around for consistency - Removed check for "new" failure, exceptions would be thrown r27922: ------ Description: Added function headers and more comments for clarity. r27917: ------ Description: The C++ library has several types of global constants from different classes, such as PropList, PredType, DataSpace, etc... Previously, these global constants were declared statically and the C++ library used a constant, called PredType::AtExit, to detect when all the global contants are destroyed then close the C library (H5close). This method relied on the order of the constants being created and destroyed and that PredType constants be the last to be destroyed. In September 2015, it was recognized that the order in which the global constants were created and destroyed was actually undefined, thus can be different between different compilers. This resulted in failure when compilers destroy PredType constants before others because when PredType::AtExit was destroyed, the C library was closed, so when the constants of other classes such as PropList or DataSpace were being deleted, the C library would not be available. Solution: The static approach is changed to dynamic. In order to avoid an impact on existing applications, the static global constants are changed to constant references to the dynamically allocated objects. A detailed explanation of the new method and a description of the changes are in a Design Notes at the end of the file H5PredType.cpp. New functions added to support the new methods are listed below. class H5Library: // Returns a singleton H5Library to initialize the global // constants, invoked in IdComponent default constructor static H5Library* getInstance(); // public // Registers cleanup and terminating functions with atexit(), // called in IdComponent default constructor static void initH5cpp(void); // public // Calls H5close to terminate the library, registered with // atexit(), as the last thing to be done. static void termH5cpp(void); // public class PredType: // Creates the constants static void makePredTypes(); // private // Calls makePredTypes to create the constants and returns // the dummy constant PREDTYPE_CONST; static PredType* getPredTypes(); // private class DataSpace: // Creates the constant static DataSpace* getConstant(); // private class PropList: // Creates the constant static PropList* getConstant(); // private class DSetCreatPropList: // Creates the constant static DSetCreatPropList* getConstant(); // private class DSetMemXferPropList: // Creates the constant static DSetMemXferPropList* getConstant(); // private class FileCreatPropList: // Creates the constant static FileCreatPropList* getConstant(); // private class FileAccPropList: // Creates the constant static FileAccPropList* getConstant(); // private This function is added to PredType, DataSpace, PropList, and the four subclasses of PropList: // Deletes the constant static void deleteConstants(); // public
* [svn-r26742] Purpose: Fixed HDFFV-7947 (cont.)Binh-Minh Ribler2015-04-061-2/+1
| | | | | | | | | | Description: - Added incRefCount() to other constructors that missed from last time. - Added default value for H5File::getObjCount and removed its extra version Platforms tested: Linux/64 (platypus) Linux/32 2.6 (jam) SunOS 5.11 (emu)
* [svn-r26741] Description:Binh-Minh Ribler2015-04-061-0/+3
| | | | | | | | | | | 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) SunOS 5.11 (emu)
* [svn-r25062] Description:Binh-Minh Ribler2014-04-181-1/+2
| | | | | | | | | | | | Put back overloaded functions for backward compatibility: - were replaced by better prototyped versions, such as Attribute::getNam. - were modified to add const to constant arguments. Added notes for future removal in documentation. (Elena approved.) Merged from trunk r25061. Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
* [svn-r25029] Purpose: Fixed HDFFV-3384Binh-Minh Ribler2014-04-121-1/+1
| | | | | | | | | | | Description: - Added const to const arguments - Fixed miscellaneous comments (merged from trunk-24991) Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
* [svn-r24870] Description:Binh-Minh Ribler2014-03-231-7/+7
| | | | | | | | | | | | | | | - Added another overload for char* argument: ssize_t getComment(const char* name, const size_t buf_size, char* comment) - Changed default value to 0 for the other two getComment methods - Added HDmemset to after every char string allocation to clear the buffer - Added a null terminator to the comment returned from the C call, in getComment methods - Some minor cleanup Merged from trunk: -r24865 -r24867 Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
* [svn-r24290] Description:Binh-Minh Ribler2013-10-141-4/+12
| | | | | | | | | - 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-r24216] Purpose: Merged changes from trunkBinh-Minh Ribler2013-09-291-39/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description from trunk, r22836 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 Description from trunk, r22845 Fixed miscellaneous inconsistencies and typos, which also took care of the failure in Packet Table test on daily test today. Description from trunk, r24143 Fixed comments, documentation, and mis-matched DOXYGEN_SHOULD_SKIP_THIS pairs. Description from trunk, r24188 - 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 Description from trunk, r24189 Changed header guards from single underscore to double underscore. Platforms tested: SunOS 5.11 (emu) Linux/32 2.6 (jam) Linux/64 2.6 (koala)/PGI compilers
* [svn-r15998] Description:Binh-Minh Ribler2008-10-301-1/+1
| | | | | | | Fixed various comments/headers to update the C++ reference manual. Platforms tested: Linux 2.6 (kagiso) - to make certain no typo introduced
* [svn-r15707] I changed the return values of H5Fget_obj_ids and ↵Raymond Lu2008-09-261-3/+3
| | | | | | | | H5Fget_obj_count to ssize_t and modified C++ and Fortran API functions. This is for bug #1245. Tested on kagiso - I've tested the same change using h5committest.
* [svn-r15404] Purpose: Code correctionBinh-Minh Ribler2008-07-251-2/+5
| | | | | | | | | | | Description: Accidentally left p_setId in public section in the previous checkin. Moved it to "protected:" section. Platforms tested: Linux 2.6 (kagiso) SunOS 5.10 (linew) FreeBSD (duty)
* [svn-r15401] Purpose: Fix bugBinh-Minh Ribler2008-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | Description: Changed all subclasses' setId to 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) Still on going with these two platforms, but needed to check in before daily tests start. SunOS 5.10 (linew) FreeBSD (duty)
* [svn-r15058] Purpose: Code cleanupBinh-Minh Ribler2008-05-211-5/+0
| | | | | | | | | | Description: Removed an unnecessary member function, H5File::dereference. Platforms tested: SunOS 5.10 (linew) Linux 2.6 (kagiso) FreeBSD (duty)
* [svn-r15046] Purpose: Fixed bugsBinh-Minh Ribler2008-05-201-4/+29
| | | | | | | | | | | | | | | | | | | 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. Also fixed bugzilla 1045: revised Attribute::write and Attribute::read wrappers to handle memory allocation/deallocation properly. (bugzilla 1045) 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-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | 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-5/+5
| | | | | | | | | | 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-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-r12180] Purpose: MaintenanceBinh-Minh Ribler2006-03-301-7/+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-0/+3
| | | | | | | | | | | 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-0/+6
| | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | 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-r11245] Purpose:Quincey Koziol2005-08-131-3/+3
| | | | | | | | | | | | | | | | | | | | 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-0/+4
| | | | | | | | | | | | | | | | 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-r10212] Purpose: Added more wrappersBinh-Minh Ribler2005-03-141-0/+3
| | | | | | | | | | | | | | | 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-r9127] Purpose: Adding wrapper for new C API and other updatesBinh-Minh Ribler2004-08-201-29/+33
| | | | | | | | | | | | | 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-3/+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-1/+1
| | | | | | | | | | | | 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-6/+7
| | | | | | | | | | | 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-1/+1
| | | | | | | Description: After changing H5Fget_filesize, forgot to update C++. Platforms tested: Tested for 1.6
* [svn-r8765] Purpose: New feature and its test.Raymond Lu2004-06-301-1/+1
| | | | | | | | | | | Description: Added new API H5Fget_name and new test program called filename.c. This function returns the name of the file by object ID(file, group, dataset, named datatype, and attribute) which belongs to the file. Platforms tested: h5committest and fuss. Misc. update: MANIFEST and RELEASE.txt
* [svn-r8739] Purpose: New feature and Bug fixRaymond Lu2004-06-241-0/+3
| | | | | | | | | | | | Description: 1. Added H5Fget_filesize and test(in file_handle.c) which returns the actual file size of an opened file. Also added to C++ API and test. 2. The error tests were messed up in test/Makefile.in. Solution: 1. Call H5FDget_eof to return file size. 2. Corrected. Platforms tested: h5committest Misc. update: RELEASE.txt
* [svn-r8595] Purpose:Binh-Minh Ribler2004-05-281-1/+1
| | | | | | | | | | | | | | Add/Improve documentation Description Added doxygen documentation to H5PredType.cpp and made minor changes to the others for either correction or clarification. Platforms: SunOS 5.7 (arabica) Linux 2.4 (eirene) Misc. update:
* [svn-r8588] Purpose:Binh-Minh Ribler2004-05-271-6/+19
| | | | | | | | | | | | | | | | | | | Add C++ wrappers - incrementally check-in Description Added wrapper for these C APIs: H5Rcreate H5Rget_obj_type H5Rget_region This is an incremental check-in to preserve the code, corresponding tests will follow in a few weeks. Platforms: Linux 2.4 (eirene) I'm checking the code out and test on arabica too. Misc. update:
* [svn-r8526] Purpose:Binh-Minh Ribler2004-05-141-2/+17
| | | | | | | | | | | | | | | | | | | | Add more C++ wrappers - incrementally check-in Description: Added more wrappers for C H5F functions and added Doxygen documentation to existing member functions of H5File. This is an incremental check-in to preserve the code, corresponding tests will follow in a few weeks. Newly added wrappers are for: H5Fget_freespace H5Fget_obj_count H5Fget_obj_ids H5Fget_vfd_handle Platforms: SunOS 5.7 (arabica) Linux 2.4 (eirene) Windows 2000
* [svn-r8269] Purpose:Binh-Minh Ribler2004-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | Cleaning up warnings Description: Many exception constructors have warnings about reference to temporary location because of the parameter initialization, for example, "const string& var = 0." Solution: Changed "string&" parameters to pass by value for these constructors. Consequently, passing string by value also takes care of char pointers so the overloaded constructors for char pointers are then removed. Also, instead of setting Exception::detailMessage to null string, I set it to DEFAULT_MSG ("No detailed information provided") by default. Platforms: SunOS 5.7 (arabica) Linux 2.4 (eirene) IA-64 (titan)
* [svn-r6236] Purpose: CopyrightBinh-Minh Ribler2003-01-071-0/+14
| | | | | | | | | Description: Added copyright notice to C++ API files, including *.h, *.cpp, and Makefile.in Platforms: Linux 6.2 (eirene)