H5::DataType::DataType | ( | const H5T_class_t | type_class, | |
size_t | size | |||
) |
Creates a object given its class and size.
type_class | - IN: Class of datatype to create | |
size | - IN: Number of bytes in the datatype to create |
H5::DataTypeIException |
H5::DataType::DataType | ( | H5Object & | obj, | |
const void * | ref, | |||
H5R_type_t | ref_type = H5R_OBJECT | |||
) |
Given a reference, ref, to an hdf5 group, creates a DataType object.
obj | - IN: Specifying location referenced object is in | |
ref | - IN: Reference pointer | |
ref_type | - IN: Reference type - default to H5R_OBJECT |
H5::ReferenceException |
obj
can be DataSet, Group, or named DataType, that is a datatype that has been named by DataType::commit. References H5::Exception::getDetailMsg().
H5::DataType::DataType | ( | H5File & | h5file, | |
const void * | ref, | |||
H5R_type_t | ref_type = H5R_OBJECT | |||
) |
Given a reference, ref, to an hdf5 group, creates a DataType object.
h5file | - IN: Location referenced object is in | |
ref | - IN: Reference pointer | |
ref_type | - IN: Reference type - default to H5R_OBJECT |
H5::ReferenceException |
References H5::Exception::getDetailMsg().
H5::DataType::DataType | ( | Attribute & | attr, | |
const void * | ref, | |||
H5R_type_t | ref_type = H5R_OBJECT | |||
) |
Given a reference, ref, to an hdf5 group, creates a DataType object.
attr | - IN: Specifying location where the referenced object is in | |
ref | - IN: Reference pointer | |
ref_type | - IN: Reference type - default to H5R_OBJECT |
H5::ReferenceException |
References H5::Exception::getDetailMsg().
H5::DataType::DataType | ( | const hid_t | existing_id | ) |
Creates a datatype using an existing datatype's id.
existing_id | - IN: Id of the existing datatype |
void H5::DataType::close | ( | ) | [virtual] |
Closes the datatype if it is not a predefined type.
H5::DataTypeIException |
Implements H5::IdComponent.
References H5::IdComponent::getCounter(), and H5::IdComponent::inMemFunc().
Referenced by copy(), p_setId(), and ~DataType().
void H5::DataType::commit | ( | H5Object & | loc, | |
const char * | name | |||
) |
Commits a transient datatype to a file, creating a new named datatype.
loc | - IN: Either a group, dataset, named datatype, or attribute. | |
name | - IN: Name of the datatype |
H5::DataTypeIException |
Reimplemented in H5::PredType.
void H5::DataType::commit | ( | H5File & | loc, | |
const char * | name | |||
) |
Commits a transient datatype to a file, creating a new named datatype.
loc | - IN: A file | |
name | - IN: Name of the datatype |
H5::DataTypeIException |
Reimplemented in H5::PredType.
References H5::H5File::getLocId().
bool H5::DataType::committed | ( | ) | const |
Determines whether a datatype is a named type or a transient type.
true
if the datatype is a named type, and false
, otherwise. H5::DataTypeIException |
References H5::IdComponent::inMemFunc().
void H5::DataType::convert | ( | const DataType & | dest, | |
size_t | nelmts, | |||
void * | buf, | |||
void * | background, | |||
const PropList & | plist = PropList::DEFAULT | |||
) | const |
Converts data from this datatype to the specified datatypes.
dest | - IN: Destination datatype | |
nelmts | - IN: Size of array buf | |
buf | - IN/OUT: Array containing pre- and post-conversion values | |
background | - IN: Optional backgroud buffer | |
plist | - IN: Dataset transfer property list |
H5::DataTypeIException |
References H5::IdComponent::inMemFunc().
void H5::DataType::copy | ( | const DataSet & | dset | ) |
Copies the datatype of the given dataset to this datatype object.
dset | - IN: Dataset |
H5::DataTypeIException |
References close(), H5::Exception::getDetailMsg(), H5::DataSet::getId(), and H5::IdComponent::inMemFunc().
void H5::DataType::copy | ( | const DataType & | like_type | ) |
Copies an existing datatype to this datatype object.
like_type | - IN: Datatype to be copied |
H5::DataTypeIException |
References close(), H5::Exception::getDetailMsg(), and H5::IdComponent::inMemFunc().
Referenced by H5::FloatType::FloatType(), H5::IntType::IntType(), H5::PredType::operator=(), operator=(), and H5::StrType::StrType().
bool H5::DataType::detectClass | ( | H5T_class_t | cls | ) | const |
Checks whether a datatype contains (or is) a certain type of datatype.
H5::DataTypeIException |
References H5::IdComponent::inMemFunc().
H5T_conv_t H5::DataType::find | ( | const DataType & | dest, | |
H5T_cdata_t ** | pcdata | |||
) | const |
Finds a conversion function that can handle a conversion from this datatype to the specified datatype, dest.
dest | - IN: Destination datatype | |
pcdata | - IN: Pointer to type conversion data |
H5::DataTypeIException |
References H5::IdComponent::inMemFunc().
H5T_class_t H5::DataType::getClass | ( | ) | const |
Returns the datatype class identifier.
H5::DataTypeIException |
References H5::IdComponent::inMemFunc().
H5G_obj_t H5::DataType::getObjType | ( | void * | ref, | |
H5R_type_t | ref_type = H5R_OBJECT | |||
) | const |
Retrieves the type of object that an object reference points to.
ref | - IN: Reference to query | |
ref_type | - IN: Type of reference to query |
H5::DataTypeIException |
References H5::Exception::getDetailMsg(), and H5::IdComponent::inMemFunc().
DataSpace H5::DataType::getRegion | ( | void * | ref, | |
H5R_type_t | ref_type = H5R_DATASET_REGION | |||
) | const |
Retrieves a dataspace with the region pointed to selected.
ref | - IN: Reference to get region of | |
ref_type | - IN: Type of reference to get region of - default |
H5::DataTypeIException |
References H5::Exception::getDetailMsg(), and H5::IdComponent::inMemFunc().
size_t H5::DataType::getSize | ( | ) | const |
Returns the size of a datatype.
H5::DataTypeIException |
References H5::IdComponent::inMemFunc().
DataType H5::DataType::getSuper | ( | ) | const |
Returns the base datatype from which a datatype is derived.
H5::DataTypeIException |
References H5::IdComponent::inMemFunc().
H5std_string H5::DataType::getTag | ( | ) | const |
Gets the tag associated with an opaque datatype.
H5::DataTypeIException |
References H5::IdComponent::inMemFunc().
bool H5::DataType::isVariableStr | ( | ) | const |
Check whether this datatype is a variable-length string.
H5::DataTypeIException |
References H5::IdComponent::inMemFunc().
void H5::DataType::lock | ( | ) | const |
Locks a datatype, making it read-only and non-destructible.
H5::DataTypeIException |
Once a data type is locked it can never be unlocked unless the entire library is closed.
References H5::IdComponent::inMemFunc().
Assignment operator.
rhs | - IN: Reference to the existing datatype |
H5::DataTypeIException |
References copy().
bool H5::DataType::operator== | ( | const DataType & | compared_type | ) | const |
Compares this DataType against the given one to determines whether the two objects refer to the same actual datatype.
compared_type | - IN: Reference to the datatype to compare |
H5::DataTypeIException |
References H5::IdComponent::inMemFunc().
void H5::DataType::p_setId | ( | const hid_t | new_id | ) | [protected, virtual] |
Sets the identifier of this object to a new value.
H5::IdComponentException | when the attempt to close the HDF5 object fails |
Implements H5::IdComponent.
References close(), H5::Exception::getDetailMsg(), and H5::IdComponent::inMemFunc().
void H5::DataType::registerFunc | ( | H5T_pers_t | pers, | |
const char * | name, | |||
const DataType & | dest, | |||
H5T_conv_t | func | |||
) | const |
Registers the specified conversion function.
pers | - IN: Conversion option
| |
name | - IN: Name displayed in diagnostic output. | |
dest | - IN: Destination datatype. | |
func | - IN: Function to convert between source and destination datatypes. |
H5::DataTypeIException |
References H5::IdComponent::inMemFunc().
Referenced by registerFunc().
void H5::DataType::setTag | ( | const char * | tag | ) | const |
Tags an opaque datatype.
tag | - IN: Descriptive ASCII string with which the opaque datatype is to be tagged. |
H5::DataTypeIException |
References H5::IdComponent::inMemFunc().
Referenced by setTag().
void H5::DataType::unregister | ( | H5T_pers_t | pers, | |
const char * | name, | |||
const DataType & | dest, | |||
H5T_conv_t | func | |||
) | const |
Removes a conversion function from all conversion paths.
pers | - IN: Conversion option
| |
name | - IN: Name displayed in diagnostic output. | |
dest | - IN: Destination datatype. | |
func | - IN: Function to convert between source and destination datatypes. |
H5::DataTypeIException |
References H5::IdComponent::inMemFunc().
Referenced by unregister().