casacore
|
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. More... | |
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. More... | |
HDF5DataType (Int, Int) | |
Create an HDF5 datatype object for an empty array. More... | |
~HDF5DataType () | |
The destructor closes the HDF5 data type object. More... | |
hid_t | getHidMem () const |
Get the HID for the data type in memory. More... | |
hid_t | getHidFile () const |
Get the HID for the data type in the file. More... | |
uInt | size () const |
Get the size in bytes of the data type. More... | |
Static Public Member Functions | |
static DataType | getDataType (hid_t) |
Get the Casacore data type for the given HDF5 data type. More... | |
Private Member Functions | |
HDF5DataType (const HDF5DataType &that) | |
Copy constructor cannot be used. More... | |
HDF5DataType & | operator= (const HDF5DataType &that) |
Assignment cannot be used. More... | |
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 65 of file HDF5DataType.h.
casacore::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.
Referenced by size().
casacore::HDF5DataType::HDF5DataType | ( | const uChar * | ) |
casacore::HDF5DataType::HDF5DataType | ( | const Short * | ) |
casacore::HDF5DataType::HDF5DataType | ( | const uShort * | ) |
casacore::HDF5DataType::HDF5DataType | ( | const Int * | ) |
casacore::HDF5DataType::HDF5DataType | ( | const uInt * | ) |
casacore::HDF5DataType::HDF5DataType | ( | const Int64 * | ) |
casacore::HDF5DataType::HDF5DataType | ( | const Float * | ) |
casacore::HDF5DataType::HDF5DataType | ( | const Double * | ) |
casacore::HDF5DataType::HDF5DataType | ( | const Complex * | ) |
casacore::HDF5DataType::HDF5DataType | ( | const DComplex * | ) |
casacore::HDF5DataType::HDF5DataType | ( | const String * | ) |
casacore::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.
casacore::HDF5DataType::~HDF5DataType | ( | ) |
The destructor closes the HDF5 data type object.
|
private |
Copy constructor cannot be used.
|
static |
Get the Casacore data type for the given HDF5 data type.
|
inline |
Get the HID for the data type in the file.
Definition at line 106 of file HDF5DataType.h.
References itsHidFile.
|
inline |
Get the HID for the data type in memory.
Definition at line 102 of file HDF5DataType.h.
References itsHidMem.
|
private |
Assignment cannot be used.
Referenced by size().
|
inline |
Get the size in bytes of the data type.
Note that the size of a string is variable, thus 0.
Definition at line 111 of file HDF5DataType.h.
References HDF5DataType(), itsSize, and operator=().
|
private |
Definition at line 123 of file HDF5DataType.h.
Referenced by getHidFile().
|
private |
Definition at line 122 of file HDF5DataType.h.
Referenced by getHidMem().
|
private |
Definition at line 124 of file HDF5DataType.h.
Referenced by size().