NetCDF
4.3.2
|
00001 00007 #include "ncdispatch.h" 00008 /* All these functions are part of this named group... */ 00012 00042 int 00043 nc_def_enum(int ncid, nc_type base_typeid, const char *name, nc_type *typeidp) 00044 { 00045 NC* ncp; 00046 int stat = NC_check_id(ncid,&ncp); 00047 if(stat != NC_NOERR) return stat; 00048 return ncp->dispatch->def_enum(ncid,base_typeid,name,typeidp); 00049 } 00050 00070 int 00071 nc_insert_enum(int ncid, nc_type xtype, const char *name, 00072 const void *value) 00073 { 00074 NC *ncp; 00075 int stat = NC_check_id(ncid, &ncp); 00076 if(stat != NC_NOERR) return stat; 00077 return ncp->dispatch->insert_enum(ncid, xtype, name, 00078 value); 00079 } 00080 00106 int 00107 nc_inq_enum(int ncid, nc_type xtype, char *name, nc_type *base_nc_typep, 00108 size_t *base_sizep, size_t *num_membersp) 00109 { 00110 int class = 0; 00111 int stat = nc_inq_user_type(ncid, xtype, name, base_sizep, 00112 base_nc_typep, num_membersp, &class); 00113 if(stat != NC_NOERR) return stat; 00114 if(class != NC_ENUM) stat = NC_EBADTYPE; 00115 return stat; 00116 } 00117 00139 int 00140 nc_inq_enum_member(int ncid, nc_type xtype, int idx, char *name, 00141 void *value) 00142 { 00143 NC *ncp; 00144 int stat = NC_check_id(ncid, &ncp); 00145 if(stat != NC_NOERR) return stat; 00146 return ncp->dispatch->inq_enum_member(ncid, xtype, idx, name, value); 00147 } 00148 00167 int 00168 nc_inq_enum_ident(int ncid, nc_type xtype, long long value, 00169 char *identifier) 00170 { 00171 NC* ncp; 00172 int stat = NC_check_id(ncid,&ncp); 00173 if(stat != NC_NOERR) return stat; 00174 return ncp->dispatch->inq_enum_ident(ncid,xtype,value,identifier); 00175 } /* End of named group ...*/