Public Member Functions

H5::CompType Class Reference

List of all members.

Public Member Functions


Detailed Description

Examples:

compound.cpp.


Constructor & Destructor Documentation

H5::CompType::CompType ( size_t  size  ) 

Creates an empty compound datatype given a size, in bytes.

Parameters:
size - IN: Number of bytes in the datatype to create
Exceptions:
H5::DataTypeIException 
H5::CompType::CompType ( const DataSet dataset  ) 

Gets the compound datatype of the specified dataset.

Parameters:
dataset - IN: Dataset that this enum datatype associates with
Returns:
CompType instance
Exceptions:
H5::DataTypeIException 

References H5::DataSet::getId().

H5::CompType::CompType ( const hid_t  existing_id  ) 

Creates a CompType object using the id of an existing datatype.

Parameters:
existing_id - IN: Id of an existing compound datatype
H5::CompType::CompType ( const CompType original  ) 

Copy constructor: makes copy of the original CompType object.

Parameters:
original - IN: Original CompType instance

Member Function Documentation

ArrayType H5::CompType::getMemberArrayType ( unsigned  member_num  )  const

Returns the array datatype of the specified member in this compound datatype.

Parameters:
member_num - IN: Zero-based index of the member
Returns:
ArrayType instance
Exceptions:
H5::DataTypeIException 

References H5::Exception::getDetailMsg().

H5T_class_t H5::CompType::getMemberClass ( unsigned  member_num  )  const

Gets the type class of the specified member.

Parameters:
member_num - IN: Zero-based index of the member
Returns:
Type class of the member
Exceptions:
H5::DataTypeIException 
CompType H5::CompType::getMemberCompType ( unsigned  member_num  )  const

Returns the compound datatype of the specified member in this compound datatype.

Parameters:
member_num - IN: Zero-based index of the member
Returns:
CompType instance
Exceptions:
H5::DataTypeIException 

References H5::Exception::getDetailMsg().

DataType H5::CompType::getMemberDataType ( unsigned  member_num  )  const

Returns the generic datatype of the specified member in this compound datatype.

Parameters:
member_num - IN: Zero-based index of the member
Returns:
DataType instance
Exceptions:
H5::DataTypeIException 

References H5::Exception::getDetailMsg().

EnumType H5::CompType::getMemberEnumType ( unsigned  member_num  )  const

Returns the enumeration datatype of the specified member in this compound datatype.

Parameters:
member_num - IN: Zero-based index of the member
Returns:
EnumType instance
Exceptions:
H5::DataTypeIException 

References H5::Exception::getDetailMsg().

FloatType H5::CompType::getMemberFloatType ( unsigned  member_num  )  const

Returns the floating-point datatype of the specified member in this compound datatype.

Parameters:
member_num - IN: Zero-based index of the member
Returns:
FloatType instance
Exceptions:
H5::DataTypeIException 

References H5::Exception::getDetailMsg().

int H5::CompType::getMemberIndex ( const char *  name  )  const

Returns the index of a member in this compound datatype.

Parameters:
name - IN: Name of the member
Returns:
Index of member
Exceptions:
H5::DataTypeIException 
Description
Members are stored in no particular order with numbers 0 through N-1, where N is the value returned by the member function CompType::getNmembers.
IntType H5::CompType::getMemberIntType ( unsigned  member_num  )  const

Returns the integer datatype of the specified member in this compound datatype.

Parameters:
member_num - IN: Zero-based index of the member
Returns:
IntType instance
Exceptions:
H5::DataTypeIException 

References H5::Exception::getDetailMsg().

H5std_string H5::CompType::getMemberName ( unsigned  member_num  )  const

Returns the name of a member in this compound datatype.

Parameters:
member_num - IN: Zero-based index of the member
Returns:
Name of member
Exceptions:
H5::DataTypeIException 
size_t H5::CompType::getMemberOffset ( unsigned  member_num  )  const

Returns the byte offset of the beginning of a member with respect to the beginning of the compound data type datum.

Parameters:
member_num - IN: Zero-based index of the member
Returns:
Byte offset
Exceptions:
H5::DataTypeIException Members are stored in no particular order with numbers 0 through N-1, where N is the value returned by the member function CompType::getNmembers.
StrType H5::CompType::getMemberStrType ( unsigned  member_num  )  const

Returns the string datatype of the specified member in this compound datatype.

Parameters:
member_num - IN: Zero-based index of the member
Returns:
StrType instance
Exceptions:
H5::DataTypeIException 

References H5::Exception::getDetailMsg().

VarLenType H5::CompType::getMemberVarLenType ( unsigned  member_num  )  const

Returns the variable length datatype of the specified member in this compound datatype.

Parameters:
member_num - IN: Zero-based index of the member
Returns:
VarLenType instance
Exceptions:
H5::DataTypeIException 

References H5::Exception::getDetailMsg().

int H5::CompType::getNmembers (  )  const

Returns the number of members in this compound datatype.

Returns:
Number of members
Exceptions:
H5::DataTypeIException 
void H5::CompType::insertMember ( const H5std_string &  name,
size_t  offset,
const DataType new_member 
) const

Inserts a new member to this compound datatype.

Parameters:
name - IN: Name of the new member
offset - IN: Offset in memory structure of the field to insert
new_member - IN: New member to be inserted
Exceptions:
H5::DataTypeIException 
void H5::CompType::pack (  )  const

Recursively removes padding from within a compound datatype.

Exceptions:
H5::DataTypeIException