HighFive 2.10.0
HighFive - Header-only C++ HDF5 interface
|
Class representing the space (dimensions) of a DataSet. More...
#include <H5DataSpace.hpp>
Public Types | |
enum | DataspaceType { dataspace_scalar , dataspace_null } |
An enum to create scalar and null DataSpace with DataSpace::DataSpace(DataspaceType dtype). More... | |
Public Member Functions | |
DataSpace (const std::vector< size_t > &dims) | |
Create a DataSpace of N-dimensions from a std::vector<size_t>. | |
template<size_t N> | |
DataSpace (const std::array< size_t, N > &dims) | |
Create a DataSpace of N-dimensions from a std::array<size_t, N>. | |
DataSpace (const std::initializer_list< size_t > &dims) | |
Create a DataSpace of N-dimensions from an initializer list. | |
template<typename... Args> | |
DataSpace (size_t dim1, Args... dims) | |
Create a DataSpace of N-dimensions from direct values. | |
template<typename IT , typename = typename std::enable_if<!std::is_integral<IT>::value, IT>::type> | |
DataSpace (const IT begin, const IT end) | |
Create a DataSpace from a pair of iterators. | |
DataSpace (const std::vector< size_t > &dims, const std::vector< size_t > &maxdims) | |
Create a resizable N-dimensional DataSpace. | |
DataSpace (DataspaceType space_type) | |
Create a scalar or a null DataSpace. | |
DataSpace | clone () const |
Create a copy of the DataSpace which will have different id. | |
size_t | getNumberDimensions () const |
Returns the number of dimensions of a DataSpace. | |
std::vector< size_t > | getDimensions () const |
Returns the size of the dataset in each dimension. | |
size_t | getElementCount () const |
Return the number of elements in this DataSpace. | |
std::vector< size_t > | getMaxDimensions () const |
Returns the maximum size of the dataset in each dimension. | |
Public Member Functions inherited from HighFive::Object | |
Object (Object &&other) noexcept | |
~Object () | |
bool | isValid () const noexcept |
isValid | |
hid_t | getId () const noexcept |
getId | |
ObjectInfo | getInfo () const |
Retrieve several infos about the current object (address, dates, etc) | |
ObjectType | getType () const |
Gets the fundamental type of the object (dataset, group, etc) | |
bool | operator== (const Object &other) const noexcept |
Static Public Member Functions | |
static DataSpace | Scalar () |
Create a scalar DataSpace. | |
static DataSpace | Null () |
Create a null DataSpace. | |
template<typename T > | |
static DataSpace | From (const T &value) |
Automatically deduce the DataSpace from a container/value. | |
template<std::size_t N, std::size_t Width> | |
static DataSpace | FromCharArrayStrings (const char(&string_array)[N][Width]) |
Create a DataSpace from a value of type string array. | |
Static Public Attributes | |
static const ObjectType | type = ObjectType::DataSpace |
static const size_t | UNLIMITED = SIZE_MAX |
Magic value to specify that a DataSpace can grow without limit. | |
Protected Member Functions | |
DataSpace ()=default | |
Protected Member Functions inherited from HighFive::Object | |
Object () | |
Object (const Object &other) | |
Object (hid_t) | |
Object & | operator= (const Object &other) |
Static Protected Member Functions | |
static DataSpace | fromId (hid_t hid) |
Friends | |
class | Attribute |
class | File |
class | DataSet |
Additional Inherited Members | |
Protected Attributes inherited from HighFive::Object | |
hid_t | _hid |
Class representing the space (dimensions) of a DataSet.
An enum to create scalar and null DataSpace with DataSpace::DataSpace(DataspaceType dtype).
This enum is needed otherwise we will not be able to distringuish between both with normal constructors. Both have a dimension of 0.
Enumerator | |
---|---|
dataspace_scalar | Value to create scalar DataSpace. |
dataspace_null | Value to create null DataSpace. |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
|
inlineexplicit |
|
inline |
|
inlineexplicit |
Create a resizable N-dimensional DataSpace.
dims | Initial size of dataspace |
maxdims | Maximum size of the dataspace |
|
inlineexplicit |
Create a scalar or a null DataSpace.
This overload enables creating scalar or null data spaces, both have dimension 0.
space_type | The value from the enum |
|
protecteddefault |
|
inline |
|
inlinestatic |
Automatically deduce the DataSpace from a container/value.
Certain containers and scalar values are fully supported by HighFive. For these containers, HighFive can deduce the dimensions from value
.
|
inlinestatic |
Create a DataSpace from a value of type string array.
string_array | An C-array of C-string (null-terminated). |
|
inlinestaticprotected |
|
inline |
Returns the size of the dataset in each dimension.
For zero-dimensional datasets (e.g. scalar or null datasets) an empty vector is returned.
|
inline |
|
inline |
Returns the maximum size of the dataset in each dimension.
This is the maximum size a dataset can be extended to, which may be different from the current size of the dataset.
|
inline |
|
inlinestatic |
Create a null DataSpace.
|
inlinestatic |
Create a scalar DataSpace.
|
friend |
|
friend |
|
friend |
|
static |
|
static |
Magic value to specify that a DataSpace can grow without limit.
This value should be used with DataSpace::DataSpace(const std::vector<size_t>& dims, const std::vector<size_t>& maxdims);