h5cpp  0.6.0
A modern C++ wrapper for the HDF5 C library
hdf5::datatype Namespace Reference

Classes

class  TypeTrait< datatype::EBool >
 
class  TypeTrait< std::array< T, N > >
 
class  TypeTrait< std::complex< T > >
 
class  TypeTrait< std::string >
 
class  TypeTrait< std::basic_string< CharT > >
 
class  TypeTrait< std::vector< T > >
 
class  Array
 array datatype More...
 
class  VLengthArray
 variable length array type More...
 
class  Compound
 compound data type More...
 
class  Datatype
 base class for all data types More...
 
class  Enum
 compound data type More...
 
class  DatatypeHolder
 data type object holder More...
 
class  Float
 
class  float16_t
 
class  Integer
 HDF5 integer datatype. More...
 
class  String
 string datatype More...
 
class  TypeTrait
 trait to create HDF5 datatypes More...
 
class  TypeTrait< char >
 
class  TypeTrait< unsigned char >
 
class  TypeTrait< signed char >
 
class  TypeTrait< short >
 
class  TypeTrait< unsigned short >
 
class  TypeTrait< int >
 
class  TypeTrait< unsigned int >
 
class  TypeTrait< long >
 
class  TypeTrait< unsigned long >
 
class  TypeTrait< long long >
 
class  TypeTrait< unsigned long long >
 
class  TypeTrait< datatype::float16_t >
 
class  TypeTrait< float >
 
class  TypeTrait< double >
 
class  TypeTrait< long double >
 
class  TypeTrait< bool >
 
class  TypeTrait< ArrayAdapter< T > >
 datatype type trait for array adapters
 

Enumerations

enum  EBool : int8_t { False = 0 , True = 1 }
 enumeration bool type More...
 
enum class  Class : std::underlying_type< H5T_class_t >::type {
  None = H5T_NO_CLASS , Integer = H5T_INTEGER , Float = H5T_FLOAT , Time = H5T_TIME ,
  String = H5T_STRING , BitField = H5T_BITFIELD , Opaque = H5T_OPAQUE , Compound = H5T_COMPOUND ,
  Reference = H5T_REFERENCE , Enum = H5T_ENUM , VarLength = H5T_VLEN , Array = H5T_ARRAY
}
 
enum class  Order : std::underlying_type< H5T_order_t >::type { LE = H5T_ORDER_LE , BE = H5T_ORDER_BE , Vax = H5T_ORDER_VAX , None = H5T_ORDER_NONE }
 enumeration type for byte order More...
 
enum class  Sign : std::underlying_type< H5T_sign_t >::type { TwosComplement = H5T_SGN_2 , Unsigned = H5T_SGN_NONE }
 enumeration for sign More...
 
enum class  Norm : std::underlying_type< H5T_norm_t >::type { Implied = H5T_NORM_IMPLIED , MSBSet = H5T_NORM_MSBSET , None = H5T_NORM_NONE }
 enumeration describes mantissa norm More...
 
enum class  Pad : std::underlying_type< H5T_pad_t >::type { Zero = H5T_PAD_ZERO , One = H5T_PAD_ONE , Background = H5T_PAD_BACKGROUND }
 enumeration for floating point padding More...
 
enum class  StringPad : std::underlying_type< H5T_str_t >::type { NullTerm = H5T_STR_NULLTERM , NullPad = H5T_STR_NULLPAD , SpacePad = H5T_STR_SPACEPAD }
 enumeration determining string padding More...
 
enum class  Direction : std::underlying_type< H5T_direction_t >::type { Ascend = H5T_DIR_ASCEND , Descend = H5T_DIR_DESCEND }
 
enum class  CharacterEncoding : std::underlying_type< H5T_cset_t >::type { ASCII = H5T_CSET_ASCII , UTF8 = H5T_CSET_UTF8 }
 character set encoding More...
 

Functions

bool is_bool (const Enum &etype)
 check if Enum is EBool More...
 
bool operator== (const Datatype &lhs, const Datatype &rhs)
 equality check for datatypes More...
 
bool operator!= (const Datatype &lhs, const Datatype &rhs)
 inequality check for datatypes More...
 
template<typename T >
TypeTrait< typename std::remove_const< T >::type >::TypeClass create (const T &v=T{})
 factory function for creating data types More...
 
template<typename T >
const Datatypeget (const T &v=T{})
 factory function for getting reference of data types More...
 
std::ostream & operator<< (std::ostream &stream, const Class &c)
 stream output operator for the Class enumeration More...
 
std::ostream & operator<< (std::ostream &stream, const Order &o)
 output stream operator for the Order enumeration More...
 
std::ostream & operator<< (std::ostream &stream, const Sign &s)
 output stream for Sign enumeration More...
 
std::ostream & operator<< (std::ostream &stream, const Norm &n)
 stream output operator for the Norm enumeration More...
 
std::ostream & operator<< (std::ostream &stream, const Pad &p)
 stream output operator for Pad enumerations More...
 
std::ostream & operator<< (std::ostream &stream, const StringPad &pad)
 stream output operator for StringPad enumerations More...
 
std::ostream & operator<< (std::ostream &stream, const Direction &d)
 stream output operator for Direction enumerations More...
 
std::ostream & operator<< (std::ostream &stream, const CharacterEncoding &enc)
 stream output operator for CharacterEncoding enumerations More...
 

Variables

decltype(H5T_VARIABLE) const kVariable = H5T_VARIABLE
 

Enumeration Type Documentation

◆ CharacterEncoding

enum hdf5::datatype::CharacterEncoding : std::underlying_type< H5T_cset_t >::type
strong

Enumeration type determining the character encoding used by string types and links.

Enumerator
ASCII 

ASCII.

UTF8 

UTF8.

◆ Class

enum hdf5::datatype::Class : std::underlying_type< H5T_class_t >::type
strong

data type class

Enumeration type describing the class a particular data type belongs to.

Enumerator
None 

indicates a non-type

Integer 

indicates an integer type

Float 

indicates a float type

Time 

indicates a time type

String 

indicates a string type

BitField 

indicates a bitfield type

Opaque 

indicates an opaque type

Compound 

indicates a compound type

Reference 

indicates a reference type

Enum 

indicates an enumeration type

VarLength 

indicates a variable length type

Array 

indicates an array type

◆ Direction

enum hdf5::datatype::Direction : std::underlying_type< H5T_direction_t >::type
strong
Enumerator
Ascend 
Descend 

◆ EBool

enum hdf5::datatype::EBool : int8_t
Enumerator
False 

indicates a false value

True 

indicates a true value

◆ Norm

enum hdf5::datatype::Norm : std::underlying_type< H5T_norm_t >::type
strong
Enumerator
Implied 
MSBSet 
None 

◆ Order

enum hdf5::datatype::Order : std::underlying_type< H5T_order_t >::type
strong
Enumerator
LE 

littlen endian type

BE 

big endian type

Vax 
None 

◆ Pad

enum hdf5::datatype::Pad : std::underlying_type< H5T_pad_t >::type
strong
Enumerator
Zero 
One 
Background 

◆ Sign

enum hdf5::datatype::Sign : std::underlying_type< H5T_sign_t >::type
strong
Enumerator
TwosComplement 

indicates a signed type

Unsigned 

indicates an unsigned type

◆ StringPad

enum hdf5::datatype::StringPad : std::underlying_type< H5T_str_t >::type
strong
Enumerator
NullTerm 

indicates a null terminated string type

NullPad 

indicates a null padded string type

SpacePad 

indicates a space padded string type

Function Documentation

◆ create()

template<typename T >
TypeTrait<typename std::remove_const<T>::type>::TypeClass hdf5::datatype::create ( const T &  v = T{})

◆ get()

template<typename T >
const Datatype& hdf5::datatype::get ( const T &  v = T{})

◆ is_bool()

bool hdf5::datatype::is_bool ( const Enum etype)
Parameters
etypeobject
Returns
if Enum is EBool flag

◆ operator!=()

bool hdf5::datatype::operator!= ( const Datatype lhs,
const Datatype rhs 
)

Returns true if both datatypes do not represent the same types.

Parameters
lhsreference to the left hand-side Datatype instance
rhsreference to the right hand-side Datatype instance
Returns
true if datatypes are not equal, false otherwise

◆ operator<<() [1/8]

std::ostream& hdf5::datatype::operator<< ( std::ostream &  stream,
const CharacterEncoding enc 
)
Parameters
streamreference to an output stream
encreference to a CharacterEncoding enumeration instance
Returns
modified output stream

◆ operator<<() [2/8]

std::ostream& hdf5::datatype::operator<< ( std::ostream &  stream,
const Class c 
)
Parameters
streamreference to the output stream
creference to the class enumeration
Returns
modified output stream

◆ operator<<() [3/8]

std::ostream& hdf5::datatype::operator<< ( std::ostream &  stream,
const Direction d 
)
Parameters
streamreference to an output stream
dreference to a Direction enumeration instance
Returns
modified output stream

◆ operator<<() [4/8]

std::ostream& hdf5::datatype::operator<< ( std::ostream &  stream,
const Norm n 
)
Parameters
streamreference to the output stream
nrefernece to a Norm enumeration instance
Returns
modified ouput stream

◆ operator<<() [5/8]

std::ostream& hdf5::datatype::operator<< ( std::ostream &  stream,
const Order o 
)
Parameters
streamreference to the output stream
oreference to an Order enumeration instance
Returns
modified output stream

◆ operator<<() [6/8]

std::ostream& hdf5::datatype::operator<< ( std::ostream &  stream,
const Pad p 
)
Parameters
streamreference to the output stream
preference to a Pad enumeratino instance
Returns
modified output stream

◆ operator<<() [7/8]

std::ostream& hdf5::datatype::operator<< ( std::ostream &  stream,
const Sign s 
)
Parameters
streamreference to the output stream
sreference to the Sign enumeration
Returns
modified output stream

◆ operator<<() [8/8]

std::ostream& hdf5::datatype::operator<< ( std::ostream &  stream,
const StringPad pad 
)
Parameters
streamreference to an output stream
padreference to a StringPad enumeration instance
Returns
modified output stream

◆ operator==()

bool hdf5::datatype::operator== ( const Datatype lhs,
const Datatype rhs 
)

Returns if two datatypes are equal. Datatypes are considered equal if they represent the same type.

Parameters
lhsreference to the left handside Datatype instance
rhsreference to the right handside Datatype instance
Returns
true if instances are considered equal, false otherwise

Variable Documentation

◆ kVariable

decltype(H5T_VARIABLE) const hdf5::datatype::kVariable = H5T_VARIABLE