mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-24 16:04:40 +08:00
Merge pull request #1441 from NetCDF-World-Domination-Council/ejh_dispatch_ro
move the prototypes for NC_RO_, NC_NOTNC3_, and NC_NOTNC4_* functions to netcdf_dispatch.h
This commit is contained in:
commit
e747166f90
@ -254,65 +254,4 @@ NCDISPATCH_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep,
|
||||
EXTERNL int
|
||||
NCDISPATCH_get_att(int ncid, int varid, const char* name, void* value, nc_type t);
|
||||
|
||||
/* Read-only dispatch layers can use these functions to return
|
||||
* NC_EPERM to all attempts to modify a file. */
|
||||
|
||||
EXTERNL int NC_RO_create(const char *path, int cmode, size_t initialsz, int basepe,
|
||||
size_t *chunksizehintp, void* parameters,
|
||||
const NC_Dispatch*, NC*);
|
||||
EXTERNL int NC_RO_redef(int ncid);
|
||||
EXTERNL int NC_RO__enddef(int ncid, size_t h_minfree, size_t v_align, size_t v_minfree,
|
||||
size_t r_align);
|
||||
EXTERNL int NC_RO_sync(int ncid);
|
||||
EXTERNL int NC_RO_def_var_fill(int, int, int, const void *);
|
||||
EXTERNL int NC_RO_rename_att(int ncid, int varid, const char *name,
|
||||
const char *newname);
|
||||
EXTERNL int NC_RO_del_att(int ncid, int varid, const char*);
|
||||
EXTERNL int NC_RO_put_att(int ncid, int varid, const char *name, nc_type datatype,
|
||||
size_t len, const void *value, nc_type);
|
||||
EXTERNL int NC_RO_def_var(int ncid, const char *name,
|
||||
nc_type xtype, int ndims, const int *dimidsp, int *varidp);
|
||||
EXTERNL int NC_RO_rename_var(int ncid, int varid, const char *name);
|
||||
EXTERNL int NC_RO_put_vara(int ncid, int varid,
|
||||
const size_t *start, const size_t *count,
|
||||
const void *value, nc_type);
|
||||
EXTERNL int NC_RO_def_dim(int ncid, const char *name, size_t len, int *idp);
|
||||
EXTERNL int NC_RO_rename_dim(int ncid, int dimid, const char *name);
|
||||
EXTERNL int NC_RO_set_fill(int ncid, int fillmode, int *old_modep);
|
||||
|
||||
/* These functions are for dispatch layers that don't implement these
|
||||
* 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);
|
||||
|
||||
/* These functions are for dispatch layers that don't implement the
|
||||
* enhanced model. They return NC_ENOTNC4. */
|
||||
EXTERNL int NC_NOTNC4_def_var_filter(int, int, unsigned int, size_t,
|
||||
const unsigned int*);
|
||||
EXTERNL int NC_NOTNC4_def_grp(int, const char *, int *);
|
||||
EXTERNL int NC_NOTNC4_rename_grp(int, const char *);
|
||||
EXTERNL int NC_NOTNC4_def_compound(int, size_t, const char *, nc_type *);
|
||||
EXTERNL int NC_NOTNC4_insert_compound(int, nc_type, const char *, size_t, nc_type);
|
||||
EXTERNL int NC_NOTNC4_insert_array_compound(int, nc_type, const char *, size_t,
|
||||
nc_type, int, const int *);
|
||||
EXTERNL int NC_NOTNC4_inq_typeid(int, const char *, nc_type *);
|
||||
EXTERNL int NC_NOTNC4_inq_compound_field(int, nc_type, int, char *, size_t *,
|
||||
nc_type *, int *, int *);
|
||||
EXTERNL int NC_NOTNC4_inq_compound_fieldindex(int, nc_type, const char *, int *);
|
||||
EXTERNL int NC_NOTNC4_def_vlen(int, const char *, nc_type base_typeid, nc_type *);
|
||||
EXTERNL int NC_NOTNC4_put_vlen_element(int, int, void *, size_t, const void *);
|
||||
EXTERNL int NC_NOTNC4_get_vlen_element(int, int, const void *, size_t *, void *);
|
||||
EXTERNL int NC_NOTNC4_def_enum(int, nc_type, const char *, nc_type *);
|
||||
EXTERNL int NC_NOTNC4_insert_enum(int, nc_type, const char *, const void *);
|
||||
EXTERNL int NC_NOTNC4_inq_enum_member(int, nc_type, int, char *, void *);
|
||||
EXTERNL int NC_NOTNC4_inq_enum_ident(int, nc_type, long long, char *);
|
||||
EXTERNL int NC_NOTNC4_def_opaque(int, size_t, const char *, nc_type *);
|
||||
EXTERNL int NC_NOTNC4_def_var_deflate(int, int, int, int, int);
|
||||
EXTERNL int NC_NOTNC4_def_var_fletcher32(int, int, int);
|
||||
EXTERNL int NC_NOTNC4_def_var_chunking(int, int, int, const size_t *);
|
||||
EXTERNL int NC_NOTNC4_def_var_endian(int, int, int);
|
||||
EXTERNL int NC_NOTNC4_set_var_chunk_cache(int, int, size_t, size_t, float);
|
||||
EXTERNL int NC_NOTNC4_get_var_chunk_cache(int, int, size_t *, size_t *, float *);
|
||||
EXTERNL int NC_NOTNC4_var_par_access(int, int, int);
|
||||
|
||||
#endif /* NC_DISPATCH_H */
|
||||
|
@ -15,6 +15,8 @@
|
||||
#ifndef NETCDF_DISPATCH_H
|
||||
#define NETCDF_DISPATCH_H
|
||||
|
||||
#include "netcdf.h"
|
||||
|
||||
/* This is the dispatch table, with a pointer to each netCDF
|
||||
* function. */
|
||||
struct NC_Dispatch
|
||||
@ -133,4 +135,65 @@ struct NC_Dispatch
|
||||
#endif /*USE_NETCDF4*/
|
||||
};
|
||||
|
||||
/* Read-only dispatch layers can use these functions to return
|
||||
* NC_EPERM to all attempts to modify a file. */
|
||||
|
||||
EXTERNL int NC_RO_create(const char *path, int cmode, size_t initialsz, int basepe,
|
||||
size_t *chunksizehintp, void* parameters,
|
||||
const NC_Dispatch*, NC*);
|
||||
EXTERNL int NC_RO_redef(int ncid);
|
||||
EXTERNL int NC_RO__enddef(int ncid, size_t h_minfree, size_t v_align, size_t v_minfree,
|
||||
size_t r_align);
|
||||
EXTERNL int NC_RO_sync(int ncid);
|
||||
EXTERNL int NC_RO_def_var_fill(int, int, int, const void *);
|
||||
EXTERNL int NC_RO_rename_att(int ncid, int varid, const char *name,
|
||||
const char *newname);
|
||||
EXTERNL int NC_RO_del_att(int ncid, int varid, const char*);
|
||||
EXTERNL int NC_RO_put_att(int ncid, int varid, const char *name, nc_type datatype,
|
||||
size_t len, const void *value, nc_type);
|
||||
EXTERNL int NC_RO_def_var(int ncid, const char *name,
|
||||
nc_type xtype, int ndims, const int *dimidsp, int *varidp);
|
||||
EXTERNL int NC_RO_rename_var(int ncid, int varid, const char *name);
|
||||
EXTERNL int NC_RO_put_vara(int ncid, int varid,
|
||||
const size_t *start, const size_t *count,
|
||||
const void *value, nc_type);
|
||||
EXTERNL int NC_RO_def_dim(int ncid, const char *name, size_t len, int *idp);
|
||||
EXTERNL int NC_RO_rename_dim(int ncid, int dimid, const char *name);
|
||||
EXTERNL int NC_RO_set_fill(int ncid, int fillmode, int *old_modep);
|
||||
|
||||
/* These functions are for dispatch layers that don't implement these
|
||||
* 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);
|
||||
|
||||
/* These functions are for dispatch layers that don't implement the
|
||||
* enhanced model. They return NC_ENOTNC4. */
|
||||
EXTERNL int NC_NOTNC4_def_var_filter(int, int, unsigned int, size_t,
|
||||
const unsigned int*);
|
||||
EXTERNL int NC_NOTNC4_def_grp(int, const char *, int *);
|
||||
EXTERNL int NC_NOTNC4_rename_grp(int, const char *);
|
||||
EXTERNL int NC_NOTNC4_def_compound(int, size_t, const char *, nc_type *);
|
||||
EXTERNL int NC_NOTNC4_insert_compound(int, nc_type, const char *, size_t, nc_type);
|
||||
EXTERNL int NC_NOTNC4_insert_array_compound(int, nc_type, const char *, size_t,
|
||||
nc_type, int, const int *);
|
||||
EXTERNL int NC_NOTNC4_inq_typeid(int, const char *, nc_type *);
|
||||
EXTERNL int NC_NOTNC4_inq_compound_field(int, nc_type, int, char *, size_t *,
|
||||
nc_type *, int *, int *);
|
||||
EXTERNL int NC_NOTNC4_inq_compound_fieldindex(int, nc_type, const char *, int *);
|
||||
EXTERNL int NC_NOTNC4_def_vlen(int, const char *, nc_type base_typeid, nc_type *);
|
||||
EXTERNL int NC_NOTNC4_put_vlen_element(int, int, void *, size_t, const void *);
|
||||
EXTERNL int NC_NOTNC4_get_vlen_element(int, int, const void *, size_t *, void *);
|
||||
EXTERNL int NC_NOTNC4_def_enum(int, nc_type, const char *, nc_type *);
|
||||
EXTERNL int NC_NOTNC4_insert_enum(int, nc_type, const char *, const void *);
|
||||
EXTERNL int NC_NOTNC4_inq_enum_member(int, nc_type, int, char *, void *);
|
||||
EXTERNL int NC_NOTNC4_inq_enum_ident(int, nc_type, long long, char *);
|
||||
EXTERNL int NC_NOTNC4_def_opaque(int, size_t, const char *, nc_type *);
|
||||
EXTERNL int NC_NOTNC4_def_var_deflate(int, int, int, int, int);
|
||||
EXTERNL int NC_NOTNC4_def_var_fletcher32(int, int, int);
|
||||
EXTERNL int NC_NOTNC4_def_var_chunking(int, int, int, const size_t *);
|
||||
EXTERNL int NC_NOTNC4_def_var_endian(int, int, int);
|
||||
EXTERNL int NC_NOTNC4_set_var_chunk_cache(int, int, size_t, size_t, float);
|
||||
EXTERNL int NC_NOTNC4_get_var_chunk_cache(int, int, size_t *, size_t *, float *);
|
||||
EXTERNL int NC_NOTNC4_var_par_access(int, int, int);
|
||||
|
||||
#endif /* NETCDF_DISPATCH_H */
|
||||
|
Loading…
Reference in New Issue
Block a user