summaryrefslogtreecommitdiffstats
path: root/c++/src/H5DxferProp.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [svn-r30272] Purpose: Code improvementBinh-Minh Ribler2016-08-091-9/+8
| | | | | | | | | | | 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. Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* [svn-r27945] Purpose: Fix HDFFV-9529Binh-Minh Ribler2015-10-041-11/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-r25020] Description:Binh-Minh Ribler2014-04-121-1/+1
| | | | | | | | | | - 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-r24938] Description:Binh-Minh Ribler2014-04-011-1/+0
| | | | | | | | | | | | | | | | | | | - Overloaded Atribute::getName to take a char* for the attribute name: ssize_t Attribute::getName(char* attr_name, size_t buf_size) - Switched the arguments in this function: ssize_t getName(size_t buf_size, H5std_string& attr_name) so it became: ssize_t getName(H5std_string& attr_name, size_t buf_size) The second argument is default to 0, and can be skipped. - Removed this function: H5std_string getName(size_t buf_size); it'll collide with the first function when that function takes a NULL for the first argument, and uses default value for the second argument. - Added more tests Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
* [svn-r24929] Description:Binh-Minh Ribler2014-03-311-4/+3
| | | | | | | | | Added proper deallocation/allocation to test. Revised incorrect comments. Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
* [svn-r24925] Purpose: Fix HDFFV-7907Binh-Minh Ribler2014-03-301-1/+128
| | | | | | | | | | | | | | | | | | | | | | Description: Added transform property list functions // Constructor creates a dataset transform property list. DSetMemXferPropList(const char* expression); // Sets data transform expression. void setDataTransform(const char* expression) const; void setDataTransform(const H5std_string& expression) const; // Gets data transform expression. ssize_t getDataTransform(char* exp, size_t buf_size=0) const; H5std_string getDataTransform() const; Added test file tdspl.cpp. Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
* [svn-r23366] Removed the H5Pset_dxpl_multi and H5Pget_dxpl_multi functions ↵Dana Robinson2013-03-181-37/+0
| | | | | | | | | | | | | | | from the library. The intended functionality for them was never fully implemented and they are fundamentally broken. The functions were removed from the C and C++ interfaces. They were not exported in the Fortran interface. Tested on: jam(c++/fortran/hl) I tested using check-vfd to ensure the multi VFD still works properly. There is no reason to test this on other machines or on parallel.
* [svn-r22235] Purpose: Fixed bugs HDFFV-2761 & HDFFV-7852Binh-Minh Ribler2012-04-021-2/+2
| | | | | | | | | | | | | | | | | | | | 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-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-6/+6
| | | | | | | | | | 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-r12185] Purpose: Code cleanupBinh-Minh Ribler2006-03-311-2/+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-3/+0
| | | | | | | | | | | 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-0/+5
| | | | | | | | | | | | | | | | | 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-12/+12
| | | | | | | | | | | | | | | | | | | | 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-r11060] Purpose: Fix bug (reported by user)Binh-Minh Ribler2005-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+2
| | | | | | | | | | | | | | 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-r9129] Purpose: Updating documentationBinh-Minh Ribler2004-08-201-30/+40
| | | | | | | | | | 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-r8837] Purpose: Update doc and fix minor bugBinh-Minh Ribler2004-07-081-20/+98
| | | | | | | | | | | 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-r8602] Purpose:Quincey Koziol2004-06-011-1/+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-r8595] Purpose:Binh-Minh Ribler2004-05-281-1/+5
| | | | | | | | | | | | | | 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-r8466] Binh-Minh Ribler2004-05-031-0/+24
| | | | | | | | | | | | | | | | Purpose: Correct my mistake Description: I inadvertently deleted the changes that Ray and Quincey put in these two files. Added them back. Platforms tested: SunOS 5.8-64 (sol) Linux 2.4 (eirene) Misc. update:
* [svn-r8465] Purpose:Binh-Minh Ribler2004-05-021-45/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add more C++ wrappers - incrementally check-in Description: Added wrapper for many C property list functions and added Doxygen documentation to existing C++ functions in these files. This is an incremental check-in to preserve the code, corresponding tests will follow in a few weeks. For H5PropList.h and H5PropList.cpp, added C++ wrappers for: H5Pexist H5Pclose_class H5Pget H5Pget_size H5Pget_class_name H5Pget_nprops H5Pset H5Pisa_class H5Premove H5Pequal H5Pget_class_parent For H5FaccProp.h and H5FaccProp.cpp, added C++ wrappers for: H5Ps[g]et_driver H5Ps[g]et_family_offset H5Ps[g]et_fapl_core H5Ps[g]et_fapl_family H5Ps[g]et_fapl_stream H5Ps[g]et_sieve_buf_size H5Ps[g]et_meta_block_size H5Ps[g]et_alignment H5Ps[g]et_multi_type H5Ps[g]et_fclose_degree H5Pset_fapl_stdio H5Pset_fapl_split H5Pset_fapl_log H5Pset_fapl_sec2 For H5FcreatProp.h and H5FcreatProp.cpp, added C++ wrappers for: H5Pfill_value_defined H5Premove_filter H5Pget_filter_by_id H5Pmodify_filter H5Pall_filters_avail H5Pset_shuffle H5Ps[g]et_alloc_time H5Ps[g]et_fill_time H5Pset_fletcher32 For H5DxferProp.h and H5DxferProp.cpp, added C++ wrappers for: H5Ps[g]et_dxpl_multi H5Ps[g]et_small_data_block_size H5Ps[g]et_hyper_vector_size H5Ps[g]et_edc_check Platforms: SunOS 5.7 (arabica) Linux 2.4 (eirene) SunOS 5.8-64 (sol)
* [svn-r8432] Purpose:Quincey Koziol2004-04-291-2/+2
| | | | | | | | | | | | Bug fix Description: Change C++ methods to match C prototypes for datatype overflow callback routines. Platforms tested: FreeBSD 4.9 (sleipnir) w/C++ too minor to require h5committest
* [svn-r8423] Purpose: New featureRaymond Lu2004-04-271-0/+24
| | | | | | | | | | | | Description: A new exception handler for datatype conversion(set through H5Pset_type_conv_cb) to replace the old overflow callback function(set through H5Tset_overflow). This new handler can deal with overflow, precision loss and fraction truncate during datatype conversion. Platforms tested: h5committest Misc. update: release_docs
* [svn-r7181] Purpose:Quincey Koziol2003-07-071-54/+0
| | | | | | | | | | | Version update Description: Removed 1.4 compatibility code in the library. Platforms tested: FreeBSD 4.8 (sleipnir) h5committest
* [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-r4680] Purpose:Quincey Koziol2001-12-061-0/+2
| | | | | | | | | | | | | Code cleanup Description: Property that H5P(g|s)et_hyper_cache uses is no longer in use inside the library. Solution: Removed H5P(g|s)et_hyper_cache API functions, except when backward compatibility is turned on. When backward compatibility is turned on, the property is defined by the library, but unused internally. Platforms tested: FreeBSD 4.4 (sleipnir)
* [svn-r4676] Purpose:Quincey Koziol2001-12-051-0/+25
| | | | | | | | | | | | | | | | Backward Compatibility Fix Description: One of H5P[gs]et_buffer's parameters changed between v1.4 and the development branch. Solution: Added v1.4 compat stuff around H5P[gs]et_buffer implementation and testing to allow v1.4.x users to continue to use their source code without modification. These changes are for everything except the FORTRAN wrappers - I spoke with Elena and she will make the FORTRAN wrapper changes. Platforms tested: FreeBSD 4.4 (hawkwind)
* [svn-r4583] Raymond Lu2001-11-021-1/+1
| | | | | | | | | Purpose: Switch from old property list to new generic property list. Description: Changed C++ according to the new generic property list. Platforms tested: FreeBSD, SunOS 5.7.
* [svn-r4482] Purpose:Quincey Koziol2001-09-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | Kludge Description: Since we're only about halfway through converting the internal use of property lists from the "old way" to the generic property lists, we turned off snapshots to avoid exposing lots of API changes to users, until the APIs settled down. Getting the snapshots rolling again seems to have become a priority, so some changes are going to have to be made now that were going to be postponed until we were completely finished with the conversion. This requires that the old API functions be able to deal with both the old and new property lists smoothly. Solution: Kludge together the property list code so that they can transparently handle dealing with both the old and new property lists Platforms tested: FreeBSD 4.4 (hawkwind)
* [svn-r4324] Purpose:Quincey Koziol2001-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | New Features! Description: Start migrating the internal use of property lists in the library from the older implementation to the new generic property lists. Currently, only the dataset transfer property lists are migrated to the new architecture, all the rest of the property list types are still using the older architecture. Also, the backward compatibility features are not implemented yet, so applications which use dataset transfer properties may need to make the following changes: H5Pcreate(H5P_DATASET_XFER) -> H5Pcreate_list(H5P_DATASET_XFER_NEW) and H5Pclose(<a dataset transfer property list>) -> H5Pclose_list(id) This still may have some bugs in it, especially with Fortran, but I should be wrapping up those later today. Platforms tested: FreeBSD 4.4 (hawkwind)
* [svn-r3602] Binh-Minh Ribler2001-03-101-14/+28
| | | | | | | | | | | | | | | | | | | | | Purpose: Usability enhancement Description: - Added more information about the failure to all the throw's, i.e, member function name and more detail about the failure, where appropriate. Also, added exception throws for private functions, such as p_close to provide more specific details. - Added two api functions: Exception::getFuncName() and Exception::getCFuncName() to provide the name of the member function where failure occurs. - Fixed some typos, one of which caused segn. fault in some situations (resetIdComponent was accidentally called twice in a couple of places :) Platforms: arabica (sparc-sun-solaris 2.7)
* [svn-r3199] Binh-Minh Ribler2000-12-231-9/+2
| | | | | | | | | | | | | | | | | | 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-r3080] Binh-Minh Ribler2000-12-071-0/+183
Purpose: Support portability Description: I forgot that source file extension .C will not work on Windows. Solution: Changed all source file from *.C to *.cpp for portability. Platforms tested: arabica (sparc-sun-solaris 2.7)