Public Member Functions

H5::EnumType Class Reference

List of all members.

Public Member Functions


Constructor & Destructor Documentation

H5::EnumType::EnumType ( size_t  size  ) 

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

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

Gets the enum datatype of the specified dataset.

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

References H5::DataSet::getId().

H5::EnumType::EnumType ( const IntType data_type  ) 

Creates a new enum datatype based on an integer datatype.

Parameters:
data_type - IN: Base datatype
Exceptions:
H5::DataTypeIException 
H5::EnumType::EnumType ( const hid_t  existing_id  ) 

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

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

Member Function Documentation

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

Returns the index of a member in this enumeration datatype.

Parameters:
name - IN: Name of the queried member
Returns:
Index of the member if it exists. Index will have the value between 0 and N-1, where N is the value returned by the member function EnumType::getNmembers.
Exceptions:
H5::DataTypeIException 

Referenced by getMemberIndex().

void H5::EnumType::getMemberValue ( unsigned  memb_no,
void *  value 
) const

Retrieves the value of a member in this enumeration datatype, given the member's index.

Parameters:
memb_no - IN: Index of the queried member
value - OUT: Pointer to the retrieved value
Exceptions:
H5::DataTypeIException 
int H5::EnumType::getNmembers (  )  const

Returns the number of members in this enumeration datatype.

Returns:
Number of members
Exceptions:
H5::DataTypeIException 
void H5::EnumType::insert ( const char *  name,
void *  value 
) const

Inserts a new member to this enumeration datatype.

Parameters:
name - IN: Name of the new member
value - IN: Pointer to the value of the new member
Exceptions:
H5::DataTypeIException 

Referenced by insert().

H5std_string H5::EnumType::nameOf ( void *  value,
size_t  size 
) const

Returns the symbol name corresponding to a specified member of this enumeration datatype.

Parameters:
value - IN: Pointer to the value of the enum datatype
size - IN: Size for the name
Exceptions:
H5::DataTypeIException 
void H5::EnumType::valueOf ( const char *  name,
void *  value 
) const

Retrieves the value corresponding to a member of this enumeration datatype, given the member's name.

Parameters:
name - IN: Name of the queried member
value - OUT: Pointer to the retrieved value
Exceptions:
H5::DataTypeIException 

Referenced by valueOf().