6 #ifndef ECHELON_HDF5_TYPE_HPP 7 #define ECHELON_HDF5_TYPE_HPP 9 #include <echelon/hdf5/precursor/type.hpp> 100 std::size_t size()
const;
116 explicit operator bool()
const;
118 hdf5::precursor::type type_wrapper_;
140 bool operator==(
const type& lhs,
const type& rhs);
157 bool operator!=(
const type& lhs,
const type& rhs);
176 : name(std::move(name)), type_(type.
clone()), offset(offset)
210 elements_.emplace_back(name, element_type, offset);
215 typedef std::vector<element>::const_iterator
iterator;
224 return begin(elements_);
234 return end(elements_);
245 std::vector<element> elements_;
echelon's core namespace
Definition: attribute.cpp:10
hdf5::precursor::type native_handle_type
Type of the underlying HDF5 low-level handle.
Definition: hdf5/type.hpp:28
type clone() const
Clones the type.
Definition: hdf5/type.cpp:103
static type short_()
Returns a handle to the primitive type 'short'.
Definition: hdf5/type.cpp:17
Description of a compound type's internal structure.
Definition: hdf5/type.hpp:161
static type float_()
Returns a handle to the primitive type 'float'.
Definition: hdf5/type.cpp:62
static type object_reference()
Returns a handle to the primitive type 'object reference'.
Definition: hdf5/type.cpp:77
static type long_long()
Returns a handle to the primitive type 'long long'.
Definition: hdf5/type.cpp:32
static type uchar()
Returns a handle to the primitive type 'unsigned char'.
Definition: hdf5/type.cpp:37
static type string()
Returns a handle to the primitive type 'string'.
Definition: hdf5/type.cpp:72
std::size_t offset
offset of the member within the compound type in bytes
Definition: hdf5/type.hpp:190
iterator begin() const
Definition: hdf5/type.hpp:220
std::size_t size() const
Definition: hdf5/type.hpp:239
static type double_()
Returns a handle to the primitive type 'double'.
Definition: hdf5/type.cpp:67
static type int_()
Returns a handle to the primitive type 'int'.
Definition: hdf5/type.cpp:22
static type ulong_long()
Returns a handle to the primitive type 'unsigned long long'.
Definition: hdf5/type.cpp:57
std::string name
name of the member
Definition: hdf5/type.hpp:182
iterator end() const
Definition: hdf5/type.hpp:230
std::vector< element >::const_iterator iterator
Definition: hdf5/type.hpp:215
const native_handle_type & native_handle() const
The underlying HDF5 low-level handle.
Definition: hdf5/type.cpp:108
Tuple containing a name, a type and an offset, which are used to describe a single element of a compo...
Definition: hdf5/type.hpp:167
static type ushort()
Returns a handle to the primitive type 'unsigned short'.
Definition: hdf5/type.cpp:42
type_layout(std::size_t size_)
Constructs an empty layout for a compound type with a given total size.
Definition: hdf5/type.hpp:198
A handle to an HDF5 type.
Definition: hdf5/type.hpp:23
static type long_()
Returns a handle to the primitive type 'long'.
Definition: hdf5/type.cpp:27
element(std::string name, const type &type, std::size_t offset)
Constructs a new element.
Definition: hdf5/type.hpp:175
static type uint()
Returns a handle to the primitive type 'unsigned int'.
Definition: hdf5/type.cpp:47
static type char_()
Returns a handle to the primitive type 'char'.
Definition: hdf5/type.cpp:12
static type ulong()
Returns a handle to the primitive type 'unsigned long'.
Definition: hdf5/type.cpp:52
type()=default
Initializes the handle with its null state.
void add_element(std::string name, const type &element_type, std::size_t offset)
Adds a new member to the compound type.
Definition: hdf5/type.hpp:208
type type_
type of the member
Definition: hdf5/type.hpp:186
static type compound_type(const type_layout &layout)
Creates a new compound type using a given layout.
Definition: hdf5/type.cpp:82