summaryrefslogtreecommitdiffstats
path: root/c++/src/H5DataSpace.h
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headers (#2184)Larry Knox2022-11-011-1/+0
| | | | | * Updated source file copyright headers to remove "Copyright by the Board of Trustees of the University of Illinois", which is kept in the top-level COPYING file.
* Replaces the H5_OVERRIDE macro with override (#773)Dana Robinson2021-06-231-5/+5
| | | The macro is no longer necessary now that we require C++11.
* Added more C++11 override keywords (#485)Sean McBride2021-04-211-1/+1
| | | | | | | | | | * Added more C++11 override keywords * Format updates in src/H5Tconv.c. * Committing clang-format changes Co-authored-by: Larry Knox <lrknox@hdfgroup.org> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Added C++11 override keyword where appropriate (#433)Sean McBride2021-03-101-4/+4
| | | Added H5_OVERRIDE macro for compatibility with both C++11 and older.
* Fixed many -Wreserved-id-macro warnings by fixing header guard spelling (#361)Sean McBride2021-02-231-3/+3
| | | | | | | | | | | | | | | | * Fixed many -Wreserved-id-macro warnings by fixing header guard spelling Removed leading underscore(s) from header guard spelling. Used 2 regexes: ` _H5(.*)_H` ` __H5(.*)_H` Applied case-insensitively to only .h files. * Modified scripts that generate header files to not use underscore prefix Interestingly, there was already no leading underscore in the trailing comment at the end of the file * Fixed remaining -Wreserved-id-macro warning not caught by regex
* Update license url part2 (#333)Larry Knox2021-02-171-1/+1
| | | | | | * Modify temporary rpath for testing in java example scripts. * Update URL in source file Copyright headers for web copy of COPYING file - files not in src or test.
* Clang-format of source filesAllen Byrne2020-09-301-79/+84
|
* Fixed documentationBinh-Minh Ribler2018-03-131-1/+1
| | | | | | | | Description: - Updated the description of copy constructor for clarification. - Removed unnecessary comments. Platforms tested: Linux/64 (jelly)
* Miscellaneous code cleanupBinh-Minh Ribler2017-09-151-2/+1
| | | | | | | | | | | | | Description: - Removed two inadvertently-added Group constructors in the header file. There was no implementation. - Removed deprecated H5Location and H5Object constructors that take an existing ID. - Miscellaneous improvements in comments, including updating URLs. Platforms tested: Linux/32 2.6 (jam) Linux/64 (jelly) Darwin (osx1010test)
* Merge pull request #426 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10 to ↵Larry Knox2017-04-251-6/+4
| | | | | | | | | | hdf5_1_10 * commit '54957d37f5aa73912763dbb6e308555e863c43f4': Commit copyright header change for src/H5PLpkg.c which was added after running script to make changes. Add new files in release_docs to MANIFEST. Cimmit changes to Makefile.in(s) and H5PL.c that resulted from running autogen.sh. Merge pull request #407 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10_1 to hdf5_1_10_1 Change copyright headers to replace url referring to file to be removed and replace it with new url for COPYING file.
* Description:Binh-Minh Ribler2017-03-171-2/+4
| | | | | | | Miscellaneous clean-up: format and comments Platforms tested: Linux/64 (jelly) Darwin (osx1010test)
* Description:Binh-Minh Ribler2017-03-031-76/+76
| | | | | | Only format changes: mostly tabs vs. spaces Platforms tested: Linux/64 (jelly) - very minor
* Description:Binh-Minh Ribler2016-10-191-4/+0
| | | | | | | | | | | | Removed obsolet macros from C++ API: H5_NO_NAMESPACE, H5_NO_STD, __cplusplus Leave OLD_HEADER_FILENAME because iostream.h might still be in use, until further checking is done. Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test) Jelly
* Purpose: Updated documentationBinh-Minh Ribler2016-09-271-1/+6
| | | | | | | | | Description: Revised class brief description and other comments for up-to-date info. Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* [svn-r30279] Purpose: Code improvement (HDFFR-9725)Binh-Minh Ribler2016-08-121-2/+2
| | | | | | | | | Description: Removed deprecated functions in previous releases due to missing const. Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* [svn-r27945] Purpose: Fix HDFFV-9529Binh-Minh Ribler2015-10-041-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 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 Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* [svn-r26655] Purpose: Fixed HDFFV-7947Binh-Minh Ribler2015-03-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Description: When copy constructor or constructor that takes an existing id is invoked, the C ref counter stays the same but there is an extra C++ object which later is destroyed and may cause the HDF5 id to be closed prematurely. The C++ library needs to increment the ref counter in these situations, so that the C library will not close the id when it is still being referenced. However, the incrementing of ref count left some objects opened at the end of the program, perhaps, due to compiler's optimization on cons/destructors. The constructor, that takes an existing id, needs to increment the counter but it seems that the matching destructor wasn't invoked. The workaround is to have a function for each class that has "id" that only sets the id and not increment the ref count for the library to use in these situations. These functions are "friend" and not public. The friend functions are: void f_Attribute_setId(Attribute *, hid_t) void f_DataSet_setId(DataSet *, hid_t) void f_DataSpace_setId(DataSpace *, hid_t) void f_DataType_setId(DataType *, hid_t) Platforms tested: Linux/64 (platypus) Linux/32 2.6 (jam gnu and Intel 15.0) SunOS 5.11 (emu)
* [svn-r25640] Purpose: Fixed HDFFV-4259Binh-Minh Ribler2014-09-301-6/+6
| | | | | | | | | | | | | | 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-r25061] Description:Binh-Minh Ribler2014-04-171-0/+2
| | | | | | | | | | | 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-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-3/+3
| | | | | | | | | - 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-r24189] Purpose: Fixed bug HDFFV-1060Binh-Minh Ribler2013-09-231-3/+3
| | | | | | | | Description: Changed header guards from single underscore to double underscore. Platforms tested: Linux/32 2.6 (jam) - very minor Linux/64 2.6 (koala)/PGI compilers
* [svn-r24143] Description:Binh-Minh Ribler2013-09-161-0/+3
| | | | | | | Fixed comments, documentation, and mis-matched DOXYGEN_SHOULD_SKIP_THIS pairs. Platforms tested: Linux/32 2.6 (jam) Regenerated and verified generated documentation.
* [svn-r22845] Purpose: Misc fixesBinh-Minh Ribler2012-09-281-1/+1
| | | | | | | | | | 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-r15407] Purpose: Fix bugBinh-Minh Ribler2008-07-251-1/+4
| | | | | | | | | | | | | | | | | 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-r15308] Purpose: Fixed bugsBinh-Minh Ribler2008-07-021-0/+7
| | | | | | | | | | | | | | | | 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-r14420] Description:Quincey Koziol2008-01-151-1/+1
| | | | | | | | Correct the prototype for H5Sselect_elements() to take an 'hsize_t *' for the coordinates, instead of 'hsize_t **'. Tested on: Mac OS X/32 10.5.1 (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-r12404] Purpose: Fix typos/formatsBinh-Minh Ribler2006-06-051-2/+2
| | | | | | | | | | 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-1/+1
| | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | 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-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-2/+2
| | | | | | | | | | | | | | | | | | | | 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-r11210] Purpose: Code improvementBinh-Minh Ribler2005-08-081-0/+3
| | | | | | | | | Description: Made use of IdComponent::inMemFunc in more classes. Platforms tested: Linux 2.4 (heping) SunOS 5.8 64-bit (sol)
* [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-r9727] Purpose:Quincey Koziol2004-12-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug Fix/Code Cleanup/Doc Cleanup/Optimization/Branch Sync :-) Description: Generally speaking, this is the "signed->unsigned" change to selections. However, in the process of merging code back, things got stickier and stickier until I ended up doing a big "sync the two branches up" operation. So... I brought back all the "infrastructure" fixes from the development branch to the release branch (which I think were actually making some improvement in performance) as well as fixed several bugs which had been fixed in one branch, but not the other. I've also tagged the repository before making this checkin with the label "before_signed_unsigned_changes". Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel & fphdf5 FreeBSD 4.10 (sleipnir) w/threadsafe FreeBSD 4.10 (sleipnir) w/backward compatibility Solaris 2.7 (arabica) w/"purify options" Solaris 2.8 (sol) w/FORTRAN & C++ AIX 5.x (copper) w/parallel & FORTRAN IRIX64 6.5 (modi4) w/FORTRAN Linux 2.4 (heping) w/FORTRAN & C++ Misc. update:
* [svn-r9133] Purpose: Clean up codeBinh-Minh Ribler2004-08-211-5/+0
| | | | | | | | | | | Description: The private function p_close was removed previously, but I inadvertently put it back in a few places, while transferring the changes from 1.6 branch. These are removed now. Platforms tested: SunOS 5.7 (arabica) Linux 2.4 (eirene)
* [svn-r9129] Purpose: Updating documentationBinh-Minh Ribler2004-08-201-43/+45
| | | | | | | | | | Description: Updated various function headers for the RM as reviewing progresses. Rearranged functions in header files for more sensible look of the RM. Platforms tested: SunOS 5.7 (arabica) Linux 2.4 (eirene)
* [svn-r8602] Purpose:Quincey Koziol2004-06-011-3/+0
| | | | | | | | | | | Code update Description: Update C++ wrappers to use new ID reference counting mechanisms. Platforms tested: FreeBSD 4.9 (sleipnir) w/C++ Too focused to require h5committest
* [svn-r6950] Purpose:Quincey Koziol2003-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | API tweak. Description: The H5Sget_select_bounds() API call was using hsize_t arrays for retrieving the 'start' and 'end' coordinates, which is counter to the rest of the dataspace API. Solution: Change the arrays to be hssize_t instead. Platforms tested: FreeBSD 4.8 (sleipnir) w/C++ FreeBSD 4.8 (sleipnir) w/parallel h5committested Misc. update: Updated all docs for this change. Added 1.4 compatibility #ifdef's
* [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)
* [svn-r5932] MuQun Yang2002-09-201-1/+1
| | | | | | | | | Purpose: use H5_DLLCPP to replacer __DLLCPP__ for c++ interfaces. Description: Solution: Platforms tested: linux 2.2.18smp, IRIX64, solaris 2.7, windows 2000
* [svn-r4977] Binh-Minh Ribler2002-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Purpose: Adding support for dll Description: Added __DLLCPP__ to all public classes and templates. Added #include "H5Include.h" to H5RefCounter.cpp because of the use of DLLCPP in .h file and it needs the following chain: H5Include.h/hdf5.h/H5public.h/H5api_adpt.h Added #pragma warning(disable: 4251) to H5Exception.h to eliminate this warning on private data members of type 'string.' This occurs because 'string' is not yet instantiated at compilation time; however, since the class is exported, the warning is harmless. Changed this member function's parameter to be passed as reference. from: void CompType::insertMember( const string name,... to: void CompType::insertMember( const string& name,... Platforms tested: Linux 6.2 (eirene) Windows 2000
* [svn-r4713] Binh-Minh Ribler2001-12-131-1/+1
| | | | | | | | | | | Purpose: Removing warnings Description: H5IdComponent::operator= shouldn't be virtual because the subclass' operator= have different type for the rhs argument. Removed virtual. Platforms tested: SunOS 5.7 (arabica) Linux 6.2 (eirene)
* [svn-r3707] Purpose: Bug fixes and code clean upBinh-Minh Ribler2001-03-251-17/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description and Solution: - Predefined type objects become outdated when the application calls H5close and then H5open to use the library again. Solution: + Reimplemented PredType using enum type to obtain up-to-date values for predefined types, i.e. H5T_xxx_yyy's, when they are used. + Added to PredType its own version of getId() to return the appropriate predefined type id according to the enum value. + Made IdComponent::getId() a virtual function - Since Albert already fixed the "multiply defined RcsId" problem, removed the now become unnessary "#undef RCSID" from H5Include.h - Added a check for func_name != NULL in one of the Exception constructors because seg. fault. might occur in some situations. - It is more convenient to make a copy of a datatype, dataspace, or property list by using assignment operator Solution: + Added assignment operator to DataType, DataSpace, and PropList so that they will invoke H5Tcopy, H5Scopy, and H5Pcopy, respectively, instead of just simply copying the data members as for other classes. So, now a type, space, or property list can be copied by either : mytype = original_type, or mytype.copy(original_type) Note that copy constructors are still just copying the data members. + Added an assignment operator to DataType that takes a predefined type. + Made IdComponent::operator= a virtual function Platforms tested: arabica (sparc-sun-solaris 2.7)
* [svn-r3540] Purpose:Binh-Minh Ribler2001-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | Feasibility improvement Description: - Some member functions in class Exception can be called without an Exception instance exits, but because they are not static, they cannot. - Many exception throwings don't provide any information to callers. Solution: - Add 'static' to several member functions in class Exception. - Added <class name::function name> to some exceptions thrown in H5File.cpp and H5FcreatProp.cpp. I'm trying this for users' comments. More information may be added later and to all exceptions. - Changed the comment line for emacs editor to: // C++ informative line for the emacs editor: -*- C++ -*- because... I'd rather not say that the code "may look like C" :-) Platforms tested: Linux (gcc version egcs-2.91.66)
* [svn-r3534] Purpose:Bill Wendling2001-03-021-0/+1
| | | | | | | | | Bug Fix Description: Added comments to the top of C++ files to indicate that it's a C++ file and not a C source code file. Also added a macro which makes emacs automagically enter c++-mode. (Recommended by Frank Schimmel fschimme@monsoon.CAPS.ou.edu)
* [svn-r3199] Binh-Minh Ribler2000-12-231-15/+6
| | | | | | | | | | | | | | | | | | Purpose: bug fix Description: I found a couple of places where virtual destructors were missing and could cause small memory leaks. Also, some destructors were not virtual when they should be. Solution: - added virtual destructors, which also free dynamically allocated memory - added virtual to several destructors - also, fixed several typos Platforms tested: Solaris 2.7 (arabica)
* [svn-r3079] Purpose: bug fix - by C APIBinh-Minh Ribler2000-12-061-1/+2
| | | | | | | | | | | | | | | | | Description: The prototype of two C API functions, H5Tget_offset and H5Sget_simple_extent_npoints was changed to fix bug #446, resulting in the need for updating the two corresponding C++ API functions. Solution: - Changed the return type of AtomType::getOffset from size_t to int, and the error return value from 0 to -1. - Changed the return type of DataSpace::getSimpleExtentNpoints from hsize_t to hssize_t, and the error value from 0 to -1. Platforms tested: arabica (sparc-sun-solaris 2.7)