h5gt 0.2.0
C++ wrapper for HDF5 library (based on HighFive project)
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
h5gt::Selection Class Reference

Selection: represent a view on a slice/part of a dataset. More...

#include <H5Selection.hpp>

Inheritance diagram for h5gt::Selection:
h5gt::SliceTraits< Selection >

Public Member Functions

 Selection (const DataSpace &space)
 public constructor is needed to create virtual datasets
 
DataSpace getSpace () const noexcept
 getSpace
 
DataSpace getMemSpace () const noexcept
 getMemSpace
 
DataSetgetDataset () noexcept
 getDataSet
 
const DataSetgetDataset () const noexcept
 
const DataType getDataType () const
 return the datatype of the selection
 
- Public Member Functions inherited from h5gt::SliceTraits< Selection >
Selection select (const std::vector< size_t > &offset, const std::vector< size_t > &count, const std::vector< size_t > &stride=std::vector< size_t >(), const std::vector< size_t > &block=std::vector< size_t >()) const
 Select a region in the current Slice/Dataset of count points at offset separated by stride. If strides are not provided they will default to 1 in all dimensions.
 
Selection select (const ElementSet &elements) const
 Select a region in the current Slice/Dataset out of a list of elements.
 
Selection select_rows (const std::vector< size_t > &ind, size_t offset=0, size_t count=0) const
 Select a set of rows in the first dimension of this dataset. NOTE: Selection is done in memory layout order (be careful with chunked dsets). Most likely the order of rows read will be mixed.
 
Selection select_cols (const std::vector< size_t > &ind, size_t offset=0, size_t count=0) const
 Select a set of columns in the last dimension of this dataset. NOTE: Selection is done in memory layout order (be careful with chunked dsets). Most likely the order of rows read will be mixed.
 
void read (T &array) const
 
void read (T *array, const DataType &dtype=DataType()) const
 SliceTraits::read DONT USE THIS WITH VARIABLE LENGTH STRING (i.e. with std::string or std::vector<std::string>) as you will need to manually free allocated const char * memory (using H5Treclaim())
 
void write (const T &buffer)
 
void write_raw (const T *buffer, const DataType &dtype=DataType())
 

Friends

template<typename Derivate >
class ::h5gt::SliceTraits
 

Detailed Description

Selection: represent a view on a slice/part of a dataset.

A Selection may exist with invalid parent dataset

Member Function Documentation

◆ getDataset()

DataSet & h5gt::Selection::getDataset ( )
inlinenoexcept

getDataSet

Returns
parent dataset of this selection

◆ getDataType()

const DataType h5gt::Selection::getDataType ( ) const
inline

return the datatype of the selection

Returns
return the datatype of the selection

◆ getMemSpace()

DataSpace h5gt::Selection::getMemSpace ( ) const
inlinenoexcept

getMemSpace

Returns
Dataspace associated with the memory representation of this selection

◆ getSpace()

DataSpace h5gt::Selection::getSpace ( ) const
inlinenoexcept

getSpace

Returns
Dataspace associated with this selection

The documentation for this class was generated from the following files: