15 #ifndef __H5DataType_H
16 #define __H5DataType_H
31 DataType(
const H5T_class_t type_class,
size_t size);
51 void copy(
const DataType& like_type);
64 H5T_class_t getClass()
const;
68 void commit(
const H5Location& loc,
const char* name);
69 void commit(
const H5Location& loc,
const H5std_string& name);
78 bool committed()
const;
82 H5T_conv_t find(
const DataType& dest, H5T_cdata_t **pcdata)
const;
91 bool operator==(
const DataType& compared_type)
const;
94 bool operator!=(
const DataType& compared_type)
const;
100 size_t getSize()
const;
107 void registerFunc(H5T_pers_t pers,
const char* name,
const DataType& dest, H5T_conv_t func)
const;
108 void registerFunc(H5T_pers_t pers,
const H5std_string& name,
const DataType& dest, H5T_conv_t func)
const;
111 void unregister(H5T_pers_t pers,
const char* name,
const DataType& dest, H5T_conv_t func)
const;
112 void unregister(H5T_pers_t pers,
const H5std_string& name,
const DataType& dest, H5T_conv_t func)
const;
115 void setTag(
const char* tag)
const;
116 void setTag(
const H5std_string& tag)
const;
119 H5std_string getTag()
const;
122 bool detectClass(H5T_class_t cls)
const;
123 static bool detectClass(
const PredType& pred_type, H5T_class_t cls);
126 bool isVariableStr()
const;
132 virtual H5std_string
fromClass ()
const {
return(
"DataType"); }
141 bool hasBinaryDesc()
const;
144 virtual hid_t getId()
const;
150 #ifndef DOXYGEN_SHOULD_SKIP_THIS
155 hid_t p_decode()
const;
158 virtual void p_setId(
const hid_t new_id);
161 hid_t p_opentype(
const H5Location& loc,
const char* dtype_name)
const;
163 #endif // DOXYGEN_SHOULD_SKIP_THIS
168 unsigned char *encoded_buf;
172 friend void f_DataType_setId(
DataType* dtype, hid_t new_id);
174 void p_commit(hid_t loc_id,
const char* name);
179 #endif // __H5DataType_H
bool operator!=(const DataType &compared_type) const
Compares this DataType against the given one to determines whether the two objects refer to different...
Definition: H5DataType.cpp:411
Exception provides wrappers of HDF5 error handling functions.
Definition: H5Exception.h:32
virtual hid_t getId() const
Get the id of this datatype.
Definition: H5DataType.cpp:898
H5std_string getTag() const
Gets the tag associated with an opaque datatype.
Definition: H5DataType.cpp:776
DataType()
Default constructor: Creates a stub datatype.
Definition: H5DataType.cpp:53
void copy(const DataType &like_type)
Copies an existing datatype to this datatype object.
Definition: H5DataType.cpp:208
void incRefCount() const
Increment reference counter for the id of this object.
Definition: H5IdComponent.cpp:53
Class DataSet operates on HDF5 datasets.
Definition: H5DataSet.h:28
Definition: H5Exception.h:116
DataType getSuper() const
Returns the base datatype from which a datatype is derived.
Definition: H5DataType.cpp:642
void setTag(const char *tag) const
Tags an opaque datatype.
Definition: H5DataType.cpp:747
void registerFunc(H5T_pers_t pers, const char *name, const DataType &dest, H5T_conv_t func) const
Registers the specified conversion function.
Definition: H5DataType.cpp:678
void lock() const
Locks a datatype, making it read-only and non-destructible.
Definition: H5DataType.cpp:588
void unregister(H5T_pers_t pers, const char *name, const DataType &dest, H5T_conv_t func) const
Removes a conversion function from all conversion paths.
Definition: H5DataType.cpp:715
void encode()
Creates a binary object description of this datatype.
Definition: H5DataType.cpp:309
Class PredType holds the definition of all the HDF5 predefined datatypes.
Definition: H5PredType.h:28
H5T_conv_t 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...
Definition: H5DataType.cpp:535
virtual void close()
Closes the datatype if it is not a predefined type.
Definition: H5DataType.cpp:957
virtual hid_t getId() const
Get the id of this dataset.
Definition: H5DataSet.cpp:704
DataType & operator=(const DataType &rhs)
Assignment operator.
Definition: H5DataType.cpp:369
H5std_string getDetailMsg() const
Returns the detailed message set at the time the exception is thrown.
Definition: H5Exception.cpp:256
H5T_class_t getClass() const
Returns the datatype class identifier.
Definition: H5DataType.cpp:605
virtual DataType * decode() const
Returns a DataType instance by decoding the binary object description of this datatype.
Definition: H5DataType.cpp:288
PropList getCreatePlist() const
Returns a copy of the property list, which is for datatype creation.
Definition: H5DataType.cpp:872
void 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.
Definition: H5DataType.cpp:559
static const PropList & DEFAULT
Default property list.
Definition: H5PropList.h:28
size_t getSize() const
Returns the size of a datatype.
Definition: H5DataType.cpp:624
virtual hid_t getId() const
Get the id of this property list.
Definition: H5PropList.cpp:292
Class H5Object is a bridge between H5Location and DataSet, DataType, and Group.
Definition: H5Object.h:69
void setId(const hid_t new_id)
Sets the identifier of this object to a new value.
Definition: H5IdComponent.cpp:307
Definition: H5AbstractDs.cpp:34
bool operator==(const DataType &compared_type) const
Compares this DataType against the given one to determines whether the two objects refer to the same ...
Definition: H5DataType.cpp:387
bool isVariableStr() const
Check whether this datatype is a variable-length string.
Definition: H5DataType.cpp:847
void commit(const H5Location &loc, const char *name)
Commits a transient datatype to a file, creating a new named datatype.
Definition: H5DataType.cpp:447
bool hasBinaryDesc() const
Determines whether this datatype has a binary object description.
Definition: H5DataType.cpp:342
bool committed() const
Determines whether a datatype is a named type or a transient type.
Definition: H5DataType.cpp:511
Class DataType provides generic operations on HDF5 datatypes.
Definition: H5DataType.h:28
virtual H5std_string fromClass() const
Returns this class name.
Definition: H5DataType.h:132
H5Location is an abstract base class, added in version 1.8.12.
Definition: H5Location.h:31
Class PropList inherits from IdComponent and provides wrappers for the HDF5 generic property list.
Definition: H5PropList.h:25
bool detectClass(H5T_class_t cls) const
Checks whether a datatype contains (or is) a certain type of datatype.
Definition: H5DataType.cpp:803
virtual ~DataType()
Properly terminates access to this datatype.
Definition: H5DataType.cpp:996
The HDF Group Help Desk:
| |
Copyright by
The HDF Group
and the Board of Trustees of the University of Illinois
|