123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- #include "ncdispatch.h"
-
- int
- nc_def_enum(int ncid, nc_type base_typeid, const char *name, nc_type *typeidp)
- {
- NC* ncp;
- int stat = NC_check_id(ncid,&ncp);
- if(stat != NC_NOERR) return stat;
- return ncp->dispatch->def_enum(ncid,base_typeid,name,typeidp);
- }
- int
- nc_insert_enum(int ncid, nc_type xtype, const char *name,
- const void *value)
- {
- NC *ncp;
- int stat = NC_check_id(ncid, &ncp);
- if(stat != NC_NOERR) return stat;
- return ncp->dispatch->insert_enum(ncid, xtype, name,
- value);
- }
- int
- nc_inq_enum(int ncid, nc_type xtype, char *name, nc_type *base_nc_typep,
- size_t *base_sizep, size_t *num_membersp)
- {
- int class = 0;
- int stat = nc_inq_user_type(ncid, xtype, name, base_sizep,
- base_nc_typep, num_membersp, &class);
- if(stat != NC_NOERR) return stat;
- if(class != NC_ENUM) stat = NC_EBADTYPE;
- return stat;
- }
- int
- nc_inq_enum_member(int ncid, nc_type xtype, int idx, char *name,
- void *value)
- {
- NC *ncp;
- int stat = NC_check_id(ncid, &ncp);
- if(stat != NC_NOERR) return stat;
- return ncp->dispatch->inq_enum_member(ncid, xtype, idx, name, value);
- }
- int
- nc_inq_enum_ident(int ncid, nc_type xtype, long long value,
- char *identifier)
- {
- NC* ncp;
- int stat = NC_check_id(ncid,&ncp);
- if(stat != NC_NOERR) return stat;
- return ncp->dispatch->inq_enum_ident(ncid,xtype,value,identifier);
- }
-
|