h5cpp
0.5.2
A modern C++ wrapper for the HDF5 C library
|
adapter for C-style arrays More...
#include <array_adapter.hpp>
Public Member Functions | |
ArrayAdapter () | |
default constructor More... | |
ArrayAdapter (T *data, size_t size) | |
constructor More... | |
ArrayAdapter (const ArrayAdapter< T > &adapter) | |
copy constructor More... | |
ArrayAdapter (ArrayAdapter< T > &&adapter) | |
move constructor More... | |
ArrayAdapter< T > & | operator= (const ArrayAdapter< T > &adapter) |
copy assignment More... | |
ArrayAdapter< T > & | operator= (ArrayAdapter< T > &&adapter) |
move assignment More... | |
size_t | size () const noexcept |
T * | data () noexcept |
const T * | data () const noexcept |
In order to work read or write data from and to C-style arrays a special adapter is required. A native C-array does not carry all the information required to construct a dataspace for HDF5 IO. It lacks the size information. A dataspace and a datatype trait exist for this adapter template.
The ArrayAdapter<T> template does not hold ownership of the array it references. So all resource management has to be done by the calling instance.
T | data type of the pointer |
|
inline |
|
inline |
data | pointer to the data data to which to read or write data |
size | number of elements referenced by the pointer |
hdf5::ArrayAdapter< T >::ArrayAdapter | ( | const ArrayAdapter< T > & | adapter | ) |
hdf5::ArrayAdapter< T >::ArrayAdapter | ( | ArrayAdapter< T > && | adapter | ) |
|
inlinenoexcept |
|
inlinenoexcept |
ArrayAdapter< T > & hdf5::ArrayAdapter< T >::operator= | ( | ArrayAdapter< T > && | adapter | ) |
ArrayAdapter< T > & hdf5::ArrayAdapter< T >::operator= | ( | const ArrayAdapter< T > & | adapter | ) |
|
inlinenoexcept |