NetCDF  4.3.2
dvlen.c
Go to the documentation of this file.
00001 
00007 #include "ncdispatch.h"
00008  /* All these functions are part of this named group... */
00013 
00030 int
00031 nc_free_vlen(nc_vlen_t *vl)
00032 {
00033    free(vl->p);
00034    return NC_NOERR;
00035 }
00036 
00051 int
00052 nc_free_vlens(size_t len, nc_vlen_t vlens[])
00053 {
00054    int ret;
00055    size_t i;
00056 
00057    for(i = 0; i < len; i++) 
00058       if ((ret = nc_free_vlen(&vlens[i])))
00059          return ret;
00060 
00061    return NC_NOERR;
00062 }
00063 
00089 int
00090 nc_def_vlen(int ncid, const char *name, nc_type base_typeid, nc_type *xtypep)
00091 {
00092     NC* ncp;
00093     int stat = NC_check_id(ncid,&ncp);
00094     if(stat != NC_NOERR) return stat;
00095     return ncp->dispatch->def_vlen(ncid,name,base_typeid,xtypep);
00096 }
00097 
00117 int
00118 nc_inq_vlen(int ncid, nc_type xtype, char *name, size_t *datum_sizep, nc_type *base_nc_typep)
00119 {
00120     int class = 0;
00121     int stat = nc_inq_user_type(ncid,xtype,name,datum_sizep,base_nc_typep,NULL,&class);
00122     if(stat != NC_NOERR) return stat;
00123     if(class != NC_VLEN) stat = NC_EBADTYPE;
00124     return stat;
00125 }  /* End of named group ...*/
00127 
00147 int
00148 nc_put_vlen_element(int ncid, int typeid1, void *vlen_element, size_t len, const void *data)
00149 {
00150     NC* ncp;
00151     int stat = NC_check_id(ncid,&ncp);
00152     if(stat != NC_NOERR) return stat;
00153     return ncp->dispatch->put_vlen_element(ncid,typeid1,vlen_element,len,data);
00154 }
00155 
00175 int
00176 nc_get_vlen_element(int ncid, int typeid1, const void *vlen_element, 
00177                     size_t *len, void *data)
00178 {
00179     NC *ncp;
00180     int stat = NC_check_id(ncid,&ncp);
00181     if(stat != NC_NOERR) return stat;
00182     return ncp->dispatch->get_vlen_element(ncid, typeid1, vlen_element, 
00183                                            len, data);
00184 }
 All Data Structures Files Functions Variables Typedefs Defines