#include <fimex/SliceBuilder.h>
MetNoFimex::SliceBuilder::SliceBuilder |
( |
const CDM & |
cdm, |
|
|
const std::string & |
varName, |
|
|
bool |
setUnlimited = false |
|
) |
| |
Create a new slice builder for variable varName. The default will give a slice of full size.
- Parameters
-
cdm | |
varName | variable name |
setUnlimited | enable enlarging of unlimited dimensions |
- Exceptions
-
Simple interface to create a slicebuilder. No checks are made if the created object is useful with any reader.
- Parameters
-
dimNames | names of dimensions |
dimSize | maximum size of the dimensions |
virtual MetNoFimex::SliceBuilder::~SliceBuilder |
( |
| ) |
|
|
virtual |
const std::vector<size_t>& MetNoFimex::SliceBuilder::getDimensionSizes |
( |
| ) |
const |
|
inline |
const std::vector<size_t>& MetNoFimex::SliceBuilder::getDimensionStartPositions |
( |
| ) |
const |
|
inline |
- Returns
- vector with start-positions of shape-size and order of the variable
size_t MetNoFimex::SliceBuilder::getDimPos |
( |
const std::string & |
dimName | ) |
const |
|
protected |
const std::vector<size_t>& MetNoFimex::SliceBuilder::getMaxDimensionSizes |
( |
| ) |
const |
|
inline |
void MetNoFimex::SliceBuilder::getStartAndSize |
( |
const std::string & |
dimName, |
|
|
std::size_t & |
start, |
|
|
std::size_t & |
size |
|
) |
| const |
get the start position and the size of the slice of that dimension
- Parameters
-
dimName | name of the dimension to restrict |
start | output, starting point of slice (starts at 0) |
size | output, size of the slice |
- Exceptions
-
CDMException | if dimName not part of the dimensions of variable |
out_of_range | depending on startPos or size |
void MetNoFimex::SliceBuilder::setAll |
( |
const std::string & |
dimName | ) |
|
Set the start to 0 and the size to the maximum size. Though this is the default this function will reset prevous reduced dimensions and it will mark the dimension as 'set' and not return it in getUnsetDimensionNames.
- Parameters
-
dimName | axis name of the dimension to restrict |
- Examples:
- coordinateSystem.cpp.
void MetNoFimex::SliceBuilder::setAll |
( |
const boost::shared_ptr< const CoordinateAxis > & |
axis | ) |
|
Set the start to 0 and the size to the maximum size. Though this is the default this function will reset prevous reduced dimensions and it will mark the dimension as 'set' and not return it in getUnsetDimensionNames.
- Parameters
-
axis | name of the dimension to restrict, ignored if NULL |
void MetNoFimex::SliceBuilder::setStartAndSize |
( |
const std::string & |
dimName, |
|
|
size_t |
start, |
|
|
size_t |
size |
|
) |
| |
set the start position and the size of the slice of that dimension
- Parameters
-
dimName | name of the dimension to restrict |
start | starting point of slice (starts at 0) |
size | size of the slice |
- Exceptions
-
CDMException | if dimName not part of the dimensions of variable |
out_of_range | depending on startPos or size |
- Examples:
- coordinateSystem.cpp, and parallelRead.cpp.
void MetNoFimex::SliceBuilder::setStartAndSize |
( |
const boost::shared_ptr< const CoordinateAxis > & |
axis, |
|
|
size_t |
start, |
|
|
size_t |
size |
|
) |
| |
set the start position and the size of the slice of that dimension
- Parameters
-
axis | name of the dimension to restrict, ignored if NULL |
start | starting point of slice (starts at 0) |
size | size of the slice |
- Exceptions
-
CDMException | if axis not part of the dimensions of the variable |
out_of_range | depending on startPos or size |
The documentation for this class was generated from the following file: