summaryrefslogtreecommitdiffstats
path: root/c++/test/ttypes.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Trim trailing whitespaceQuincey Koziol2020-04-201-2/+2
|
* Code improvementBinh-Minh Ribler2018-07-211-5/+4
| | | | | | | | | | | Description: Moved the new H5Object::getInfo member functions to H5Location and made them overloaded with the existing H5Location::getObjinfo. This way is cleaner than the previous approach. Platforms tested: Linux/64 (jelly) Linux/32 (jam) Darwin (osx1010test)
* Fixed EED-319Binh-Minh Ribler2018-07-181-3/+12
| | | | | | | | | Description: - Fixed doc issue Added an html version for the C++ function mapping table and removed the single web page version. Updated cpp_doc_config to use the html file. - Added a couple more minor tests
* Fixed HDFFV-10472Binh-Minh Ribler2018-07-171-0/+81
| | | | | | | | | | Description: Added operator!= to DataType bool operator!=(const DataType& compared_type) Platforms tested: Linux/64 (jelly) Linux/32 (jam) Darwin (osx1010test)
* Various code cleanupBinh-Minh Ribler2017-12-041-37/+14
| | | | | | | | | | | Description: - Replaced H5Location::exists with H5Location::nameExists and marked H5Location::exists as deprecated. - Miscellaneous test cleanup for consistency. Platforms tested: Linux/32 2.6 (jam) Linux/64 (jelly) Darwin (osx1010test)
* New overloaded functions and testsBinh-Minh Ribler2017-09-121-0/+276
| | | | | | | | | | | | | | | Description: - Added VarLenType::VarLenType(const DataType& base_type) - Marked VarLenType::VarLenType(const DataType* base_type) deprecated - Added a static wrapper for H5Tdetect_class for PredType static bool DataType::detectClass(const PredType& pred_type, ...) - Removed the deprecated function Exception::printError() from code - Miscellaneous improvements in comments - Added test functions test_detect_type_class() and test_vltype() Platforms tested: Linux/32 2.6 (jam) Linux/64 (jelly) Darwin (osx1010test)
* Adding new C++ wrappersBinh-Minh Ribler2017-09-041-18/+234
| | | | | | | | | | | | | | | | | | | | | | | | | Description: Added wrappers for H5Tencode to class DataType and H5Tdecode to classes DataType and its subclasses. // Creates a binary object description of this datatype. void DataType::encode() // Returns the decoded type from the binary object description. virtual DataType* DataType::decode() const; virtual DataType* ArrayType::decode() const; virtual DataType* CompType::decode() const; virtual DataType* DataType::decode() const; virtual DataType* EnumType::decode() const; virtual DataType* FloatType::decode() const; virtual DataType* IntType::decode() const; virtual DataType* StrType::decode() const; virtual DataType* VarLenType::decode() const; Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) 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-211-2/+1
| | | | | | | | | Fixed typos and missing items in function headers, that were revealed by Doxygen, and revised various comments. Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* Purpose: Add new C++ wrappersBinh-Minh Ribler2017-03-141-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description: Added wrappers for H5Iis_valid, H5Ps/get_nlinks, H5Tget_create_plist, H5Oopen, H5Oclose and H5Pset_virtual // 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 getObjId(const char* name,...); hid_t getObjId(const H5std_string& name,...); // Closes an object opened by getObjId(). void closeObjId(hid_t obj_id) const; // Maps elements of a virtual dataset to elements of the source dataset. void setVirtual(const DataSpace& vspace, const char *src_fname,...); void setVirtual(const DataSpace& vspace, const H5std_string src_fname,...); Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* Description:Binh-Minh Ribler2017-03-031-311/+311
| | | | | | Only format changes: mostly tabs vs. spaces Platforms tested: Linux/64 (jelly) - very minor
* Purpose: Add more testsBinh-Minh Ribler2017-01-031-7/+14
| | | | | | | | | Description: Added more tests for the new constructors that replaced openXxxType() Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* Description:Binh-Minh Ribler2016-10-191-17/+5
| | | | | | | | | | | | 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
* [svn-r29759] Purpose: Code improvementsBinh-Minh Ribler2016-04-221-11/+17
| | | | | | | | | | | | Description: - Changed object in catch statements to reference - Replaced old-style casts or reinterpret_cast with static_cast - Removed unused name H5Library::need_cleanup - Removed Exception::printError from documentation Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* [svn-r28905] Purpose: Fix user reported problemBinh-Minh Ribler2016-01-151-1/+0
| | | | | | | | | | | | | | | | Description: User Adam Rosenberger reported a failure when using the member function AbstractDs::getArrayType(). This problem was caused by missing initialization of the ArrayType's members in some cases. Solution: - Added ArrayType::setArrayInfo() to retrieve rank and dimensions of an array and store them in memory for easy access. - Re-factored a few functions to use the new function. - We'll give him 1.8.16 patch Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* [svn-r27768] Description:Quincey Koziol2015-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | Complete revamp of package initialization/shutdown mechanism in the library. Each package now has a single init/term routine. This new way should avoid packages being re-initialized during library shutdown and is also be _much_ more proactive about giving feedback for resource leaks internal to the library. Introduces a new "module" header file for packages in the library (e.g src/H5Fmodule.h) which sets up some necessary package configuration macros for the FUNC_ENTER/LEAVE macros. (The VFL drivers have their own slightly modified version of this header, src/H5FDdrvr_module.h) Also cleaned up a bunch of resources leaks all across the library and tests, along with addressing many warnings, as I encountered them. Tested on: MacOSX/64 10.10.5 (amazon) w/serial & parallel Linux/64 3.10.x (kituo) w/serial & parallel Linux/64 2.6.x (ostrich) w/serial
* [svn-r26655] Purpose: Fixed HDFFV-7947Binh-Minh Ribler2015-03-301-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-r26458] Purpose: Fix warnings HDFFV-8658Binh-Minh Ribler2015-03-151-1/+1
| | | | | | | | | Description: Fixed many type conversion warnings and unused variables. Platforms tested: Linux/64 (platypus) 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-r24912] Purpose: Fix HDFFV-8642Binh-Minh Ribler2014-03-271-6/+6
| | | | | | | | | | Description: Added CompType::setSize(size_t size) to set size for compound data type as H5Tset_size had been changed. Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
* [svn-r23427] Purpose: Fix bug HDFFV-8067Binh-Minh Ribler2013-03-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | 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-r20052] Description:Quincey Koziol2011-02-061-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up Coverity warnings, and fix some style issues: r19735: Fix for memory leak in test/mf found by valgrind. r19736: Fix memory leak in h5repack. The buffer in copy_objects, when copying the entire dataset at once, was not checked for the presence of a vlen, and vlen storage was never reclaimed. Added check and call to H5D_vlen_reclaim(). r19772: Change H5assert() to if (H5T_VLEN != src->shared->type || H5T_VLEN != dst->shared->type) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a H5T_VLEN datatype") r19774: removed unused priv. r19775: removed unused variables r19778: Fix memory leak comparing for variable length data types. r19834: Fixed memory leaks found by valgrind. Memory errors remain for another day. Tested on: Mac OS X/32 10.6.6 (amazon) w/debug & production (h5committested on branch)
* [svn-r18335] Description:Binh-Minh Ribler2010-02-261-1/+1
| | | | | | | | | | Removed header file testhdf5.h from C++ tests to eliminate a non-standard problem on OpenVMS. It wasn't essential. Platforms tested: Linux/32 2.6 (jam) FreeBSD/64 6.3 (liberty) Ray agreed to test on OpenVMS.
* [svn-r15628] Description:Quincey Koziol2008-09-161-13/+13
| | | | | | | | | | | | | Remove trailing whitespace from C/C++ source files, with the following script: foreach f (*.[ch] *.cpp) sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f end Tested on: Mac OS X/32 10.5.5 (amazon) No need for h5committest, just whitespace changes...
* [svn-r15502] Description:Quincey Koziol2008-08-211-1/+1
| | | | | | | | Clean up warnings. Tested on: Mac OS X/32 10.5.4 (amazon) Too minor to require h5committest
* [svn-r14903] Undoing change committed in r14902.Scot Breitenfeld2008-04-301-5/+0
|
* [svn-r14902] Merged fortran_1_8 branch changes r14505:14901 into the trunk. ↵Scot Breitenfeld2008-04-301-0/+5
| | | | New fortran wrappers added.
* [svn-r14593] Purpose: Removing warningsBinh-Minh Ribler2008-02-181-5/+0
| | | | | | | | Description: Removed several warnings of unused terms. Platforms tested: Linux 2.6 (smirom) - very minor
* [svn-r13536] Added source files to Windows C++ test project files. Both ↵Scott Wegner2007-03-221-1/+1
| | | | | | | | | | | | | | | | testhdf5_cpp.dsp and testhdf5_cppdll.dsp received: ./c++/test/tcompound.cpp ./c++/test/ttypes.cpp ./c++/test/tfilter.cpp ./c++/test/tvlstr.cpp Also, fixed a declaration in ttypes.cpp that was causing a compile error in MSVS6.0. Tested: Visual Studio 6.0 on WinXP kagiso too minor for h5committest
* [svn-r13524] Purpose: Cleanup testsBinh-Minh Ribler2007-03-171-334/+85
| | | | | | | | | | | Description: Added extern "C" to cleanup functions as well, forgot last time. Cleaned up/Added comments to some of the newly added tests. Platforms tested AIX 5.1 (copper) Linux 2.6 (kagiso) SunOS 5.8 64-bit (sol)
* [svn-r13474] Purpose: Fixed bugsBinh-Minh Ribler2007-03-081-0/+3
| | | | | | | | | | | | | | | | | Description: VMS revealed a problem in calling C++ test functions from C AddTest. Solution: Per Quincey's suggestion, added #ifdef __cplusplus extern "C" #endif to the called C++ functions. Platforms tested AIX 5.1 (copper) Linux 2.6 (kagiso) On pending: waiting for Elena to test on VMS when she comes back.
* [svn-r13463] Syntax fix.Albert Cheng2007-03-051-1/+1
| | | | | | | | | | The copyright notices have errors in the closing comment lines that C++ compilers complain about. Fixed the comment line. Tested platform: In smirom using disable-production, enable-debug, disable-shared option. (other combinations would ended in build or test failures. Pretty sure they were caused by my changes.)
* [svn-r13447] Cleaned up more warnings on VMSElena Pourmal2007-03-031-1/+2
|
* [svn-r13253] Updated all C and C++ style source code files with the THG ↵Albert Cheng2007-02-071-3/+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-r13201] Purpose: Adding testBinh-Minh Ribler2007-01-261-0/+810
Description: Added * tests for some generic datatype operations * tests for compound datatype operations These tests are checked in now to make sure they're safe! They can use some more comments and minor cleanups. Will do very soon. Fixed few minor typos. Platforms tested AIX 5.1 (copper) SunOS 5.8 64-bit (sol) HPUX 11.00 (kelgia)