casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
casa::HDF5DataType Class Reference

A class representing an HDF5 data type. More...

#include <HDF5DataType.h>

List of all members.

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.
HDF5DataTypeoperator= (const HDF5DataType &that)
 Assignment cannot be used.

Private Attributes

hid_t itsHidMem
hid_t itsHidFile
uInt itsSize

Detailed Description

A class representing an HDF5 data type.

Intended use:

Internal

Review Status

Test programs:
tHDF5DataType

Prerequisite

Synopsis

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.

Motivation

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.


Constructor & Destructor Documentation

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 Complex *  )
casa::HDF5DataType::HDF5DataType ( const DComplex *  )

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.


Member Function Documentation

static DataType casa::HDF5DataType::getDataType ( hid_t  ) [static]

Get the AIPS++ data type for the given HDF5 data type.

Get the HID for the data type in the file.

Definition at line 105 of file HDF5DataType.h.

References itsHidFile.

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.


Member Data Documentation

Definition at line 122 of file HDF5DataType.h.

Referenced by getHidFile().

Definition at line 121 of file HDF5DataType.h.

Referenced by getHidMem().

Definition at line 123 of file HDF5DataType.h.

Referenced by size().


The documentation for this class was generated from the following file: