HDF5 C++ API Reference Manual

 

 

H5::FloatType Class Reference

#include <H5FloatType.h>

Inheritance diagram for H5::FloatType:

H5::AtomType H5::DataType H5::H5Object H5::IdComponent List of all members.

Public Member Functions

 FloatType (const PredType &pred_type)
 Creates a floating-point datatype using a predefined type.
 FloatType (const DataSet &dataset)
 Gets the floating-point datatype of the specified dataset.
size_t getEbias () const
 Retrieves the exponent bias of a floating-point type.
void setEbias (size_t ebias) const
 Sets the exponent bias of a floating-point type.
void getFields (size_t &spos, size_t &epos, size_t &esize, size_t &mpos, size_t &msize) const
 Retrieves floating point datatype bit field information.
void setFields (size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize) const
 Sets locations and sizes of floating point bit fields.
H5T_pad_t getInpad (H5std_string &pad_string) const
 Retrieves the internal padding type for unused bits in this floating-point datatypes.
void setInpad (H5T_pad_t inpad) const
 Fills unused internal floating point bits.
H5T_norm_t getNorm (H5std_string &norm_string) const
 Retrieves mantissa normalization of a floating-point datatype.
void setNorm (H5T_norm_t norm) const
 Sets the mantissa normalization of a floating-point datatype.
virtual H5std_string fromClass () const
 Returns this class name.
 FloatType ()
 Default constructor: Creates a stub floating-point datatype.
 FloatType (const hid_t existing_id)
 Creates an FloatType object using the id of an existing datatype.
 FloatType (const FloatType &original)
 Copy constructor: makes a copy of the original FloatType object.
virtual ~FloatType ()
 Noop destructor.

Constructor & Destructor Documentation

H5::FloatType::FloatType ( const PredType pred_type  ) 

Creates a floating-point datatype using a predefined type.

Parameters:
pred_type - IN: Predefined datatype
Exceptions:
H5::DataTypeIException 

H5::FloatType::FloatType ( const DataSet dataset  ) 

Gets the floating-point datatype of the specified dataset.

Parameters:
dataset - IN: Dataset that this floating-point datatype associates with
Exceptions:
H5::DataTypeIException 

H5::FloatType::FloatType (  ) 

Default constructor: Creates a stub floating-point datatype.

H5::FloatType::FloatType ( const hid_t  existing_id  ) 

Creates an FloatType object using the id of an existing datatype.

Parameters:
existing_id - IN: Id of an existing datatype
Exceptions:
H5::DataTypeIException 

H5::FloatType::FloatType ( const FloatType original  ) 

Copy constructor: makes a copy of the original FloatType object.

H5::FloatType::~FloatType (  )  [virtual]

Noop destructor.


Member Function Documentation

size_t H5::FloatType::getEbias (  )  const

Retrieves the exponent bias of a floating-point type.

Returns:
Exponent bias
Exceptions:
H5::DataTypeIException 

void H5::FloatType::setEbias ( size_t  ebias  )  const

Sets the exponent bias of a floating-point type.

Parameters:
ebias - Exponent bias value
Exceptions:
H5::DataTypeIException 

void H5::FloatType::getFields ( size_t &  spos,
size_t &  epos,
size_t &  esize,
size_t &  mpos,
size_t &  msize 
) const

Retrieves floating point datatype bit field information.

Parameters:
spos - OUT: Retrieved floating-point sign bit
epos - OUT: Retrieved exponent bit-position
esize - OUT: Retrieved size of exponent, in bits
mpos - OUT: Retrieved mantissa bit-position
msize - OUT: Retrieved size of mantissa, in bits
Exceptions:
H5::DataTypeIException 

void H5::FloatType::setFields ( size_t  spos,
size_t  epos,
size_t  esize,
size_t  mpos,
size_t  msize 
) const

Sets locations and sizes of floating point bit fields.

Parameters:
spos - OUT: Sign position, i.e., the bit offset of the floating-point sign bit.
epos - OUT: Exponent bit position
esize - OUT: Size of exponent, in bits
mpos - OUT: Mantissa bit-position
msize - OUT: Size of mantissa, in bits
Exceptions:
H5::DataTypeIException 

H5T_pad_t H5::FloatType::getInpad ( H5std_string &  pad_string  )  const

Retrieves the internal padding type for unused bits in this floating-point datatypes.

Returns:
Internal padding type, which can be:
  • H5T_PAD_ZERO (0) - Set background to zeros
  • H5T_PAD_ONE (1) - Set background to ones
  • H5T_PAD_BACKGROUND (2) - Leave background alone
Exceptions:
H5::DataTypeIException 
Description
For your convenience, this function also provides the text string of the returned internal padding type, via parameter pad_string.

void H5::FloatType::setInpad ( H5T_pad_t  inpad  )  const

Fills unused internal floating point bits.

Parameters:
inpad - IN: Internal padding type
Exceptions:
H5::DataTypeIException 
Description
If any internal bits of a floating point type are unused (that is, those significant bits which are not part of the sign, exponent, or mantissa), then they will be filled according to the padding value provided by inpad.
Valid values for normalization type include:
  • H5T_PAD_ZERO (0) - Set background to zeros
  • H5T_PAD_ONE (1) - Set background to ones
  • H5T_PAD_BACKGROUND (2) - Leave background alone

H5T_norm_t H5::FloatType::getNorm ( H5std_string &  norm_string  )  const

Retrieves mantissa normalization of a floating-point datatype.

Parameters:
norm_string - OUT: Text string of the normalization type
Returns:
Valid normalization type, which can be:
  • H5T_NORM_IMPLIED (0) - MSB of mantissa is not stored
  • H5T_NORM_MSBSET (1) - MSB of mantissa is always 1
  • H5T_NORM_NONE (2) - Mantissa is not normalized
Exceptions:
H5::DataTypeIException 
Description
For your convenience, this function also provides the text string of the returned normalization type, via parameter norm_string.

void H5::FloatType::setNorm ( H5T_norm_t  norm  )  const

Sets the mantissa normalization of a floating-point datatype.

Parameters:
norm - IN: Mantissa normalization type
Exceptions:
H5::DataTypeIException 
Description
Valid values for normalization type include:
  • H5T_NORM_IMPLIED (0) - MSB of mantissa is not stored
  • H5T_NORM_MSBSET (1) - MSB of mantissa is always 1
  • H5T_NORM_NONE (2) - Mantissa is not normalized

virtual H5std_string H5::FloatType::fromClass (  )  const [inline, virtual]

Returns this class name.

Reimplemented from H5::AtomType.


Generated on Tue May 10 09:27:57 2011 by  doxygen 1.4.7