h5cpp  0.5.2
A modern C++ wrapper for the HDF5 C library
hdf5::dataspace::Selection Class Referenceabstract

selection base class

#include <selection.hpp>

Inheritance diagram for hdf5::dataspace::Selection:

Public Types

using UniquePointer = std::unique_ptr< Selection >
 pointer for selection stacks More...
 
using SharedPointer = std::shared_ptr< Selection >
 

Public Member Functions

 Selection ()=default
 default constructor More...
 
 Selection (const Selection &)=default
 copy constructor More...
 
virtual ~Selection ()
 destructor More...
 
virtual void apply (const Dataspace &space, SelectionOperation ops) const =0
 apply a selection onto a dataspace More...
 
virtual Dimensions dimensions () const =0
 get current dimensions More...
 
virtual size_t size () const =0
 get the selection size More...
 
virtual SelectionType type () const =0
 get the selection type More...
 

Member Typedef Documentation

◆ SharedPointer

◆ UniquePointer

As selections use virtual functions for being applied we have to

Constructor & Destructor Documentation

◆ Selection() [1/2]

hdf5::dataspace::Selection::Selection ( )
default

Use the compiler provided default implementation.

◆ Selection() [2/2]

hdf5::dataspace::Selection::Selection ( const Selection )
default

Use the compiler provided default implementation.

◆ ~Selection()

virtual hdf5::dataspace::Selection::~Selection ( )
virtual

The destructor has to be virtual to inherit from this class.

Member Function Documentation

◆ apply()

virtual void hdf5::dataspace::Selection::apply ( const Dataspace space,
SelectionOperation  ops 
) const
pure virtual

The current selection will be applied to dataspace space using the operator determined by ops.

Exceptions
std::runtime_errorin case of a failure
Parameters
spacereference to the dataspace onto which to apply the selection
opsoperator for the selection

Implemented in hdf5::dataspace::Points, and hdf5::dataspace::Hyperslab.

◆ dimensions()

virtual Dimensions hdf5::dataspace::Selection::dimensions ( ) const
pure virtual

Get a number of elements along each dimension a selection spans this is particularly useful in the case of a Hyperslab

Exceptions
std::runtime_errorin case of a failure
Returns
the selection dimentsions

Implemented in hdf5::dataspace::Points, and hdf5::dataspace::Hyperslab.

◆ size()

virtual size_t hdf5::dataspace::Selection::size ( ) const
pure virtual

Get the total number of elements adressed by an individual selection

Exceptions
std::runtime_errorin case of a failure
Returns
the selection type enumerator

Implemented in hdf5::dataspace::Points, and hdf5::dataspace::Hyperslab.

◆ type()

virtual SelectionType hdf5::dataspace::Selection::type ( ) const
pure virtual

Get the type of the selection

Returns
the selection type enumerator

Implemented in hdf5::dataspace::Points, and hdf5::dataspace::Hyperslab.


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