libpniio
Public Member Functions | Private Attributes
pni::io::nx::h5::selection Class Reference

describe a selection in an HDF5 file

#include <selection.hpp>

Collaboration diagram for pni::io::nx::h5::selection:
Collaboration graph
[legend]

Public Member Functions

 selection () noexcept
 default constructor More...
 
 selection (size_t n)
 constructor More...
 
const type_imp::index_vector_typeoffset () const noexcept
 get reference to offset vector More...
 
void offset (const type_imp::index_vector_type &offset)
 set offset vector More...
 
void offset (type_imp::index_type value) noexcept
 set offset vector More...
 
void offset (size_t index, size_t value)
 set offset More...
 
const type_imp::index_vector_typestride () const noexcept
 get refeference to stride vector More...
 
void stride (const type_imp::index_vector_type &value)
 set stride vector More...
 
void stride (type_imp::index_type value) noexcept
 set stride More...
 
void stride (size_t index, type_imp::index_type value)
 set stride More...
 
const type_imp::index_vector_typecount () const noexcept
 get reference to count vector More...
 
void count (const type_imp::index_vector_type &value)
 set count values More...
 
void count (type_imp::index_type value) noexcept
 set count values More...
 
void count (size_t index, type_imp::index_type value)
 set count value More...
 
void update (const type_imp::selection_vector_type &s)
 update selection More...
 

Private Attributes

type_imp::index_vector_type _offset
 buffer for offset values More...
 
type_imp::index_vector_type _stride
 buffer for stride values More...
 
type_imp::index_vector_type _count
 buffer for count values More...
 

Constructor & Destructor Documentation

pni::io::nx::h5::selection::selection ( )
noexcept
pni::io::nx::h5::selection::selection ( size_t  n)
Parameters
nnumber of dimensions of the original field

Member Function Documentation

const type_imp::index_vector_type & pni::io::nx::h5::selection::count ( ) const
noexcept
void pni::io::nx::h5::selection::count ( const type_imp::index_vector_type value)

Set count values from a user provided vector.

Exceptions
shape_mismatch_errorif vector size does not match selection rank
Parameters
valuevector with new count values
void pni::io::nx::h5::selection::count ( type_imp::index_type  value)
noexcept

Set all count entries to value.

Parameters
valuenew value for all count entries
void pni::io::nx::h5::selection::count ( size_t  index,
type_imp::index_type  value 
)

Set the count value for a particular dimension.

Exceptions
index_errorif dimension index exceeds the rank of the dimension
Parameters
indexdimension index
valuenew count value for the selected dimension
const type_imp::index_vector_type & pni::io::nx::h5::selection::offset ( ) const
noexcept
void pni::io::nx::h5::selection::offset ( const type_imp::index_vector_type offset)

Use offset data from an user provided vector.

Exceptions
shape_mismatch_errorif rank of selection an size of offset vector do not match
Parameters
offsetvector with new offset data
void pni::io::nx::h5::selection::offset ( type_imp::index_type  value)
noexcept

Set all elements of the offset vector to value.

Parameters
valuenew offset value
void pni::io::nx::h5::selection::offset ( size_t  index,
size_t  value 
)

Set offset value for dimension index to value.

Exceptions
index_errorif index exceeds the total rank of the selection
Parameters
indexdimension index for which to set the offset
valuenew offset value
const type_imp::index_vector_type & pni::io::nx::h5::selection::stride ( ) const
noexcept
void pni::io::nx::h5::selection::stride ( const type_imp::index_vector_type value)

Set the stride vector from a user provided vector.

Exceptions
shape_mismatch_errorif vector size does not match the total rank of the selection
Parameters
valuevector with new stride values
void pni::io::nx::h5::selection::stride ( type_imp::index_type  value)
noexcept

Set all stride components to value.

Parameters
valuenew value for all stride components
void pni::io::nx::h5::selection::stride ( size_t  index,
type_imp::index_type  value 
)

Set the stride value for a particular dimension.

Exceptions
index_errorif the dimension index exceeds the rank of the selection
Parameters
indexdimension index
valuestride value for the selected dimension
void pni::io::nx::h5::selection::update ( const type_imp::selection_vector_type s)

Set selection propertires from a vector of slices.

Exceptions
shape_mismatch_errorif vector size and selection length do not match
Parameters
sslice vector

Field Documentation

type_imp::index_vector_type pni::io::nx::h5::selection::_count
private
type_imp::index_vector_type pni::io::nx::h5::selection::_offset
private
type_imp::index_vector_type pni::io::nx::h5::selection::_stride
private

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