6 #ifndef ECHELON_DATASET_HPP 7 #define ECHELON_DATASET_HPP 9 #include <echelon/object.hpp> 10 #include <echelon/type.hpp> 11 #include <echelon/object_reference.hpp> 12 #include <echelon/slice.hpp> 13 #include <echelon/range.hpp> 14 #include <echelon/attribute_repository.hpp> 15 #include <echelon/dataset_dimensions.hpp> 16 #include <echelon/utility/macros.hpp> 18 #include <echelon/hdf5/dataset.hpp> 19 #include <echelon/hdf5/group.hpp> 24 #include <type_traits> 57 sink.dataset_handle_ <<= source;
71 sink <<= source.dataset_handle_;
75 friend void operator<<=(const hdf5::array_slice<T>& sink,
const dataset& source)
77 sink <<= source.dataset_handle_;
88 template<
typename Container>
89 void extend_along(std::size_t dimension_index,
const Container& container)
91 dataset_handle_.
extend_along(dimension_index, container);
96 std::vector<hsize_t>
shape()
const;
100 std::size_t
rank()
const;
161 template <
typename... Args>
164 return slice(dataset_handle_(args...));
177 explicit operator bool()
const;
echelon's core namespace
Definition: attribute.cpp:10
Accessor class for the dimensions of a dataset.
Definition: dataset_dimensions.hpp:75
Attribute manager, which should be embedded into a parent object, which supports attributes.
Definition: attribute_repository.hpp:27
A handle to an HDF5 dataset.
Definition: hdf5/dataset.hpp:62
type datatype() const
The value type of the dataset.
Definition: dataset.cpp:35
native_handle_type native_handle() const
The underlying HDF5 low-level handle.
Definition: dataset.cpp:45
A handle to an HDF5 type.
Definition: type.hpp:21
void extend_along(std::size_t dimension_index, const Container &container)
Extends the dataset along a given dimension.
Definition: dataset.hpp:89
slice operator()(Args...args) const
Slices the dataset.
Definition: dataset.hpp:162
friend void operator<<=(T &sink, const dataset &source)
Reads the content of the dataset into a data sink.
Definition: dataset.hpp:69
A handle to an HDF5 group object.
Definition: hdf5/group.hpp:161
attribute_repository< dataset > attributes() const
The attributes, which are attached to the dataset.
Definition: dataset.cpp:55
std::size_t rank() const
The rank of the dataset.
Definition: dataset.cpp:30
friend void operator<<=(dataset &sink, const T &source)
Writes the content of a data source into the dataset.
Definition: dataset.hpp:55
void extend_along(std::size_t dimension_index, const Container &container) const
Extends the dataset along a given dimension.
Definition: hdf5/dataset.hpp:210
dataset_dimensions dimensions() const
The dimensions of the dataset.
Definition: dataset.cpp:60
std::vector< hsize_t > shape() const
The shape of the dataset.
Definition: dataset.cpp:25
A slice (rectangular portion) of an HDF5 dataset.
Definition: slice.hpp:22
A reference to an HDF5 object.
Definition: object_reference.hpp:24
A handle to an echelon dataset.
Definition: dataset.hpp:33
object_reference ref() const
A echelon object reference to this dataset.
Definition: dataset.cpp:40
dataset()=default
Initializes the handle with its null state.