casa
$Rev:20696$
|
A class representing an HDF5 data type. More...
#include <HDF5DataType.h>
Public Member Functions | |
HDF5DataType (const Bool *) | |
Create an HDF5 datatype object for the given fixed length type. | |
HDF5DataType (const uChar *) | |
HDF5DataType (const Short *) | |
HDF5DataType (const uShort *) | |
HDF5DataType (const Int *) | |
HDF5DataType (const uInt *) | |
HDF5DataType (const Int64 *) | |
HDF5DataType (const Float *) | |
HDF5DataType (const Double *) | |
HDF5DataType (const Complex *) | |
HDF5DataType (const DComplex *) | |
HDF5DataType (const String *) | |
HDF5DataType (const String &value) | |
Create an HDF5 datatype object for a scalar string. | |
HDF5DataType (Int, Int) | |
Create an HDF5 datatype object for an empty array. | |
~HDF5DataType () | |
The destructor closes the HDF5 data type object. | |
hid_t | getHidMem () const |
Get the HID for the data type in memory. | |
hid_t | getHidFile () const |
Get the HID for the data type in the file. | |
uInt | size () const |
Get the size in bytes of the data type. | |
Static Public Member Functions | |
static DataType | getDataType (hid_t) |
Get the AIPS++ data type for the given HDF5 data type. | |
Private Member Functions | |
HDF5DataType (const HDF5DataType &that) | |
Copy constructor cannot be used. | |
HDF5DataType & | operator= (const HDF5DataType &that) |
Assignment cannot be used. | |
Private Attributes | |
hid_t | itsHidMem |
hid_t | itsHidFile |
uInt | itsSize |
A class representing an HDF5 data type.
Internal
This class wraps the HDF5 functions to create a data type. It creates a data type for the datas in memory and for the file.
It was overkill to use the HDF5 C++ interface. Instead little wrappers have been written. HDF5DataType can be embedded in a shared pointer making it possible to share an HDF5 data type amongst various HDF5Array objects and close (i.e. destruct) the HDF5 data type object when needed.
Definition at line 64 of file HDF5DataType.h.
casa::HDF5DataType::HDF5DataType | ( | const Bool * | ) |
Create an HDF5 datatype object for the given fixed length type.
It uses the corresponding native HDF5 data type. Only for Bool it uses a uchar, because the HDF5 bool type is a uint. For the complex types it makes a compound HDF5 data type. The String type is meant for an array of strings.
casa::HDF5DataType::HDF5DataType | ( | const uChar * | ) |
casa::HDF5DataType::HDF5DataType | ( | const Short * | ) |
casa::HDF5DataType::HDF5DataType | ( | const uShort * | ) |
casa::HDF5DataType::HDF5DataType | ( | const Int * | ) |
casa::HDF5DataType::HDF5DataType | ( | const uInt * | ) |
casa::HDF5DataType::HDF5DataType | ( | const Int64 * | ) |
casa::HDF5DataType::HDF5DataType | ( | const Float * | ) |
casa::HDF5DataType::HDF5DataType | ( | const Double * | ) |
casa::HDF5DataType::HDF5DataType | ( | const Complex * | ) |
casa::HDF5DataType::HDF5DataType | ( | const DComplex * | ) |
casa::HDF5DataType::HDF5DataType | ( | const String * | ) |
casa::HDF5DataType::HDF5DataType | ( | const String & | value | ) |
Create an HDF5 datatype object for a scalar string.
The length of the string is part of the type.
Create an HDF5 datatype object for an empty array.
The destructor closes the HDF5 data type object.
casa::HDF5DataType::HDF5DataType | ( | const HDF5DataType & | that | ) | [private] |
Copy constructor cannot be used.
static DataType casa::HDF5DataType::getDataType | ( | hid_t | ) | [static] |
Get the AIPS++ data type for the given HDF5 data type.
hid_t casa::HDF5DataType::getHidFile | ( | ) | const [inline] |
Get the HID for the data type in the file.
Definition at line 105 of file HDF5DataType.h.
References itsHidFile.
hid_t casa::HDF5DataType::getHidMem | ( | ) | const [inline] |
Get the HID for the data type in memory.
Definition at line 101 of file HDF5DataType.h.
References itsHidMem.
HDF5DataType& casa::HDF5DataType::operator= | ( | const HDF5DataType & | that | ) | [private] |
Assignment cannot be used.
uInt casa::HDF5DataType::size | ( | ) | const [inline] |
Get the size in bytes of the data type.
Note that the size of a string is variable, thus 0.
Definition at line 110 of file HDF5DataType.h.
References itsSize.
hid_t casa::HDF5DataType::itsHidFile [private] |
Definition at line 122 of file HDF5DataType.h.
Referenced by getHidFile().
hid_t casa::HDF5DataType::itsHidMem [private] |
Definition at line 121 of file HDF5DataType.h.
Referenced by getHidMem().
uInt casa::HDF5DataType::itsSize [private] |
Definition at line 123 of file HDF5DataType.h.
Referenced by size().