mcDBputSetslice — Write slice of dataset to database
#include <memcom.h> int mcDBputSetslice(int handle, const char* name, const char* type, int nsdim, const mcSlice* sl, int ndim, const mcOff* dim, void* buffer);
mcDBputSetslice
stores a slice of a
dataset to a MemCom database. The dataset
must exist already. If completed successfully, the function returns
0. Otherwise, a negative value indicating the
MemCom error number is returned. A slice
has a number of dimensions which is between 1 and the number of
dimensions of the dataset. For each dimension, the start and end
position, as well as the position increment (step) define the
slice.
handle
Database handle (input).
name
Dataset name (input).
type
Dataset type (input).
nsdim
Number of slice dimensions (input).
sl
Pointer to array of slices (input). The size of the
array must be equal to nsdim
. Each slice
contains the start index, end index, and step for the
dimension. The start index indicates the starting position
(beginning from 1), the end index indicates the last
position. The step is the increment of the index between
start and end.
ndim
Number of dimensions of the dataset (input). If this
parameter is set to 0, the actual dimensions of the dataset
are taken, and the parameter dim
is
ignored. If ndim
is non-zero, then the
dataset dimensions are assumed to be as indicated by
ndim
and dim
.
dim
Pointer to dimension array (input). If
ndim
is 0, this argument is ignored.
Otherwise the size of the array must be equal to
ndim
and re-defines the dimensions of the
dataset for this operation.
buffer
Pointer to memory region where the data should be copied from (input). Note that this buffer must not be constant, since MemCom may perform conversion in-place. However, the data in the buffer is always reset to the original state before the function returns.