more changes for user-defined formats

This commit is contained in:
edwardhartnett 2019-08-03 18:33:43 -06:00
parent 83c6cd58a7
commit 3a9207d55c
3 changed files with 95 additions and 1 deletions

View File

@ -165,6 +165,13 @@ EXTERNL int NC_RO_set_fill(int ncid, int fillmode, int *old_modep);
* legacy functions. They return NC_ENOTNC3. */
EXTERNL int NC_NOTNC3_set_base_pe(int ncid, int pe);
EXTERNL int NC_NOTNC3_inq_base_pe(int ncid, int *pe);
EXTERNL int NC_NOTNC3_put_varm(int ncid, int varid, const size_t * start,
const size_t *edges, const ptrdiff_t *stride,
const ptrdiff_t *imapp, const void *value0,
nc_type memtype);
EXTERNL int NC_NOTNC3_get_varm(int ncid, int varid, const size_t *start,
const size_t *edges, const ptrdiff_t *stride,
const ptrdiff_t *imapp, void *value0, nc_type memtype);
/* These functions are for dispatch layers that don't implement the
* enhanced model. They return NC_ENOTNC4. */
@ -204,6 +211,8 @@ EXTERNL int NC_NOTNC4_inq_grp_full_ncid(int, const char *, int *);
EXTERNL int NC_NOTNC4_inq_varids(int, int *, int *);
EXTERNL int NC_NOTNC4_inq_dimids(int, int *, int *, int);
EXTERNL int NC_NOTNC4_inq_typeids(int, int *, int *);
EXTERNL int NC_NOTNC4_inq_user_type(int, nc_type, char *, size_t *,
nc_type *, size_t *, int *);
EXTERNL int NC_NOTNC4_inq_typeid(int, const char *, nc_type *);
#endif /* NETCDF_DISPATCH_H */

View File

@ -39,3 +39,49 @@ NC_NOTNC3_inq_base_pe(int ncid, int *pe)
return NC_ENOTNC3;
}
/**
* @internal This function only does anything for netcdf-3 files.
*
* @param ncid Ignored.
* @param varid Ignored.
* @param start Ignored.
* @param edges Ignored.
* @param stride Ignored.
* @param imapp Ignored.
* @param value0 Ignored.
* @param memtype Ignored.
*
* @return ::NC_ENOTNC3 Not a netCDF classic format file.
* @author Ed Hartnett
*/
int
NC_NOTNC3_get_varm(int ncid, int varid, const size_t *start,
const size_t *edges, const ptrdiff_t *stride,
const ptrdiff_t *imapp, void *value0, nc_type memtype)
{
return NC_ENOTNC4;
}
/**
* @internal This function only does anything for netcdf-3 files.
*
* @param ncid Ignored.
* @param varid Ignored.
* @param start Ignored.
* @param edges Ignored.
* @param stride Ignored.
* @param imapp Ignored.
* @param value0 Ignored.
* @param memtype Ignored.
*
* @return ::NC_ENOTNC3 Not a netCDF classic format file.
* @author Ed Hartnett
*/
int
NC_NOTNC3_put_varm(int ncid, int varid, const size_t * start,
const size_t *edges, const ptrdiff_t *stride,
const ptrdiff_t *imapp, const void *value0,
nc_type memtype)
{
return NC_ENOTNC4;
}

View File

@ -542,6 +542,7 @@ NC_NOTNC4_inq_varids(int ncid, int *nvars, int *varids)
}
/**
* @internal Not allowed for classic model.
*
* @param ncid Ignored.
* @param ndims Ignored.
@ -558,6 +559,7 @@ NC_NOTNC4_inq_dimids(int ncid, int *ndims, int *dimids, int include_parents)
}
/**
* @internal Not allowed for classic model.
*
* @param ncid Ignored.
* @param ntypes Ignored.
@ -571,3 +573,40 @@ NC_NOTNC4_inq_typeids(int ncid, int *ntypes, int *typeids)
{
return NC_ENOTNC4;
}
/**
* @internal Not allowed for classic model.
*
* @param ncid Ignored.
* @param typeid1 Ignored.
* @param name Ignored.
* @param size Ignored.
* @param base_nc_typep Ignored.
* @param nfieldsp Ignored.
* @param classp Ignored.
*
* @return ::NC_ENOTNC4 Not allowed for classic model.
* @author Ed Hartnett
*/
int
NC_NOTNC4_inq_user_type(int ncid, nc_type typeid1, char *name, size_t *size,
nc_type *base_nc_typep, size_t *nfieldsp, int *classp)
{
return NC_ENOTNC4;
}
/**
* @internal Get the id of a type from the name.
*
* @param ncid Ignored.
* @param name Ignored.
* @param typeidp Ignored.
*
* @return ::NC_ENOTNC4 Not allowed for classic model.
* @author Ed Hartnett
*/
int
NC_NOTNC4_inq_typeid(int ncid, const char *name, nc_type *typeidp)
{
return NC_ENOTNC4;
}