summaryrefslogtreecommitdiffstats
path: root/src/H5Tcset.c
Commit message (Expand)AuthorAgeFilesLines
* Merge pull request #426 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10 to hdf5...Larry Knox2017-04-251-6/+4
* [svn-r27768] Description:Quincey Koziol2015-09-141-26/+1
* [svn-r21919] Description:Quincey Koziol2012-02-091-3/+3
* [svn-r18031] Description:Quincey Koziol2009-12-171-4/+4
* [svn-r13253] Updated all C and C++ style source code files with the THG copyr...Albert Cheng2007-02-071-2/+3
* [svn-r13068] Ran bin/reconfigure. Some of the scripts have been changed or h...James Laird2006-12-181-2/+2
* [svn-r11245] Purpose:Quincey Koziol2005-08-131-6/+6
* [svn-r9857] Purpose: MaintenanceElena Pourmal2005-01-221-3/+0
* [svn-r9727] Purpose:Quincey Koziol2004-12-291-1/+1
* [svn-r9329] James Laird2004-09-281-13/+13
* [svn-r8731] Purpose:Quincey Koziol2004-06-231-7/+7
* [svn-r8415] Purpose:Quincey Koziol2004-04-241-12/+12
* [svn-r7917] Purpose:Quincey Koziol2003-12-061-1/+1
* [svn-r7438] Purpose:Quincey Koziol2003-09-021-10/+6
* [svn-r7434] Purpose:Quincey Koziol2003-08-311-9/+7
* [svn-r6828] Purpose: bug fixRaymond Lu2003-05-071-1/+1
* [svn-r6395] Purpose:Quincey Koziol2003-02-121-0/+159
de "H5Object.h" #include "H5DataType.h" #include "H5VarLenType.h" namespace H5 { //-------------------------------------------------------------------------- // Function: VarLenType default constructor ///\brief Default constructor: Creates a stub variable-length datatype. //-------------------------------------------------------------------------- VarLenType::VarLenType() : DataType() {} //-------------------------------------------------------------------------- // Function: VarLenType overloaded constructor ///\brief Creates an VarLenType object using an existing id. ///\param existing_id - IN: Id of an existing datatype ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- VarLenType::VarLenType(const hid_t existing_id) : DataType(existing_id) {} //-------------------------------------------------------------------------- // Function: VarLenType copy constructor ///\brief Copy constructor: same HDF5 object as \a original // Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- VarLenType::VarLenType(const VarLenType& original) : DataType(original) {} //-------------------------------------------------------------------------- // Function: VarLenType overloaded constructor ///\brief Deprecated - will be removed after 1.10.2 ///\param base_type - IN: Pointer to existing datatype ///\exception H5::DataTypeIException // Description // DataType passed by pointer to avoid clashing with copy // constructor. // Updated: this is unnecessary. // -BMR, Sep, 2017 // Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- VarLenType::VarLenType(const DataType* base_type) : DataType() { id = H5Tvlen_create(base_type->getId()); if (id < 0) { throw DataTypeIException("VarLenType constructor", "H5Tvlen_create returns negative value"); } } //-------------------------------------------------------------------------- // Function: VarLenType overloaded constructor ///\brief Creates a new variable-length datatype based on the specified /// \a base_type. ///\param base_type - IN: An existing datatype ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- VarLenType::VarLenType(const DataType& base_type) : DataType() { id = H5Tvlen_create(base_type.getId()); if (id < 0) { throw DataTypeIException("VarLenType constructor", "H5Tvlen_create returns negative value"); } } //-------------------------------------------------------------------------- // Function: VarLenType overloaded constructor ///\brief Creates an VarLenType instance by opening an HDF5 variable /// length datatype given its name, provided as a C char*. ///\param loc - IN: Location of the type ///\param dtype_name - IN: Variable length type name ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Dec 2016 // Description // In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openVarLenType(const char*) to // improve usability. // -BMR, Dec 2016 //-------------------------------------------------------------------------- VarLenType::VarLenType(const H5Location& loc, const char *dtype_name) : DataType() { id = p_opentype(loc, dtype_name); } //-------------------------------------------------------------------------- // Function: VarLenType overloaded constructor ///\brief Creates an VarLenType instance by opening an HDF5 variable /// length datatype given its name, provided as an \c H5std_string. ///\param loc - IN: Location of the type ///\param dtype_name - IN: Variable length type name ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Dec 2016 // Description // In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openVarLenType(const H5std_string&) // to improve usability. // -BMR, Dec 2016 //-------------------------------------------------------------------------- VarLenType::VarLenType(const H5Location& loc, const H5std_string& dtype_name) : DataType() { id = p_opentype(loc, dtype_name.c_str()); } //-------------------------------------------------------------------------- // Function: VarLenType::decode ///\brief Returns an VarLenType object via DataType* by decoding the /// binary object description of this type. ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- DataType* VarLenType::decode() const { hid_t encoded_vltype_id = H5I_INVALID_HID; try { encoded_vltype_id = p_decode(); } catch (DataTypeIException &err) { throw; } VarLenType *encoded_vltype = new VarLenType; encoded_vltype->p_setId(encoded_vltype_id); return(encoded_vltype); } //-------------------------------------------------------------------------- // Function: VarLenType destructor ///\brief Properly terminates access to this datatype. // Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- VarLenType::~VarLenType() {} } // end namespace