Loading...
Searching...
No Matches
dcompound.c
Go to the documentation of this file.
#include "ncdispatch.h"
/* All these functions are part of this named group... */
int
nc_def_compound(int ncid, size_t size, 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_compound(ncid,size,name,typeidp);
}
int
nc_insert_compound(int ncid, nc_type xtype, const char *name,
size_t offset, nc_type field_typeid)
{
NC *ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
return ncp->dispatch->insert_compound(ncid, xtype, name,
offset, field_typeid);
}
int
nc_insert_array_compound(int ncid, nc_type xtype, const char *name,
size_t offset, nc_type field_typeid,
int ndims, const int *dim_sizes)
{
NC* ncp;
int stat = NC_check_id(ncid,&ncp);
if(stat != NC_NOERR) return stat;
return ncp->dispatch->insert_array_compound(ncid,xtype,name,offset,field_typeid,ndims,dim_sizes);
}
int
nc_inq_compound(int ncid, nc_type xtype, char *name,
size_t *sizep, size_t *nfieldsp)
{
int class = 0;
int stat = nc_inq_user_type(ncid,xtype,name,sizep,NULL,nfieldsp,&class);
if(stat != NC_NOERR) return stat;
if(class != NC_COMPOUND) stat = NC_EBADTYPE;
return stat;
}
int
nc_inq_compound_name(int ncid, nc_type xtype, char *name)
{
return nc_inq_compound(ncid,xtype,name,NULL,NULL);
}
int
nc_inq_compound_size(int ncid, nc_type xtype, size_t *sizep)
{
return nc_inq_compound(ncid,xtype,NULL,sizep,NULL);
}
int
nc_inq_compound_nfields(int ncid, nc_type xtype, size_t *nfieldsp)
{
return nc_inq_compound(ncid,xtype,NULL,NULL,nfieldsp);
}
int
nc_inq_compound_field(int ncid, nc_type xtype, int fieldid,
char *name, size_t *offsetp,
nc_type *field_typeidp, int *ndimsp,
int *dim_sizesp)
{
NC* ncp;
int stat = NC_check_id(ncid,&ncp);
if(stat != NC_NOERR) return stat;
return ncp->dispatch->inq_compound_field(ncid, xtype, fieldid,
name, offsetp, field_typeidp,
ndimsp, dim_sizesp);
}
int
nc_inq_compound_fieldname(int ncid, nc_type xtype, int fieldid,
char *name)
{
NC* ncp;
int stat = NC_check_id(ncid,&ncp);
if(stat != NC_NOERR) return stat;
return ncp->dispatch->inq_compound_field(ncid, xtype, fieldid,
name, NULL, NULL, NULL,
NULL);
}
int
nc_inq_compound_fieldoffset(int ncid, nc_type xtype, int fieldid,
size_t *offsetp)
{
NC* ncp;
int stat = NC_check_id(ncid,&ncp);
if(stat != NC_NOERR) return stat;
return ncp->dispatch->inq_compound_field(ncid,xtype,fieldid,NULL,offsetp,NULL,NULL,NULL);
}
int
nc_inq_compound_fieldtype(int ncid, nc_type xtype, int fieldid,
nc_type *field_typeidp)
{
NC* ncp;
int stat = NC_check_id(ncid,&ncp);
if(stat != NC_NOERR) return stat;
return ncp->dispatch->inq_compound_field(ncid,xtype,fieldid,NULL,NULL,field_typeidp,NULL,NULL);
}
int
nc_inq_compound_fieldndims(int ncid, nc_type xtype, int fieldid,
int *ndimsp)
{
NC* ncp;
int stat = NC_check_id(ncid,&ncp);
if(stat != NC_NOERR) return stat;
return ncp->dispatch->inq_compound_field(ncid,xtype,fieldid,NULL,NULL,NULL,ndimsp,NULL);
}
int
nc_inq_compound_fielddim_sizes(int ncid, nc_type xtype, int fieldid,
int *dim_sizesp)
{
NC *ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
return ncp->dispatch->inq_compound_field(ncid, xtype, fieldid,
NULL, NULL, NULL, NULL,
dim_sizesp);
}
int
nc_inq_compound_fieldindex(int ncid, nc_type xtype, const char *name,
int *fieldidp)
{
NC* ncp;
int stat = NC_check_id(ncid,&ncp);
if(stat != NC_NOERR) return stat;
return ncp->dispatch->inq_compound_fieldindex(ncid,xtype,name,fieldidp);
}
/* End of named group ...*/
nc_inq_compound_fieldtype
int nc_inq_compound_fieldtype(int ncid, nc_type xtype, int fieldid, nc_type *field_typeidp)
Get information about one of the fields of a compound type.
Definition dcompound.c:383
nc_inq_compound
int nc_inq_compound(int ncid, nc_type xtype, char *name, size_t *sizep, size_t *nfieldsp)
Learn about a compound type.
Definition dcompound.c:175
nc_insert_compound
int nc_insert_compound(int ncid, nc_type xtype, const char *name, size_t offset, nc_type field_typeid)
Insert a named field into a compound type.
Definition dcompound.c:99
nc_inq_compound_name
int nc_inq_compound_name(int ncid, nc_type xtype, char *name)
Learn the name of a compound type.
Definition dcompound.c:203
nc_inq_compound_field
int nc_inq_compound_field(int ncid, nc_type xtype, int fieldid, char *name, size_t *offsetp, nc_type *field_typeidp, int *ndimsp, int *dim_sizesp)
Get information about one of the fields of a compound type.
Definition dcompound.c:287
nc_inq_compound_fielddim_sizes
int nc_inq_compound_fielddim_sizes(int ncid, nc_type xtype, int fieldid, int *dim_sizesp)
Get information about one of the fields of a compound type.
Definition dcompound.c:443
nc_def_compound
int nc_def_compound(int ncid, size_t size, const char *name, nc_type *typeidp)
Create a compound type.
Definition dcompound.c:63
nc_inq_compound_fieldindex
int nc_inq_compound_fieldindex(int ncid, nc_type xtype, const char *name, int *fieldidp)
Learn the Index of a Named Field in a Compound Type.
Definition dcompound.c:475
nc_inq_compound_fieldndims
int nc_inq_compound_fieldndims(int ncid, nc_type xtype, int fieldid, int *ndimsp)
Get information about one of the fields of a compound type.
Definition dcompound.c:413
nc_inq_compound_nfields
int nc_inq_compound_nfields(int ncid, nc_type xtype, size_t *nfieldsp)
Learn the number of fields in a compound type.
Definition dcompound.c:249
nc_insert_array_compound
int nc_insert_array_compound(int ncid, nc_type xtype, const char *name, size_t offset, nc_type field_typeid, int ndims, const int *dim_sizes)
Insert a named array field into a compound type.
Definition dcompound.c:141
nc_inq_compound_fieldoffset
int nc_inq_compound_fieldoffset(int ncid, nc_type xtype, int fieldid, size_t *offsetp)
Get information about one of the fields of a compound type.
Definition dcompound.c:353
nc_inq_compound_fieldname
int nc_inq_compound_fieldname(int ncid, nc_type xtype, int fieldid, char *name)
Get information about one of the fields of a compound type.
Definition dcompound.c:321
nc_inq_compound_size
int nc_inq_compound_size(int ncid, nc_type xtype, size_t *sizep)
Learn the size of a compound type.
Definition dcompound.c:226
nc_inq_user_type
EXTERNL int nc_inq_user_type(int ncid, nc_type xtype, char *name, size_t *size, nc_type *base_nc_typep, size_t *nfieldsp, int *classp)
Learn about a user defined type.
Definition dtype.c:146
NC_EBADTYPE
#define NC_EBADTYPE
Not a netcdf data type.
Definition netcdf.h:420
NC_COMPOUND
#define NC_COMPOUND
compound types
Definition netcdf.h:56
NC_NOERR
#define NC_NOERR
No Error.
Definition netcdf.h:378
nc_type
int nc_type
The nc_type type is just an int.
Definition netcdf.h:25