Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Next: , Previous: nc_def_opaque, Up: User Defined Data Types



5.26 Learn About an Opaque Type: nc_inq_opaque

Given a typeid, get the information about an opaque type.

Usage

     int nc_inq_opaque(int ncid, nc_type xtype, char *name, size_t *sizep);
ncid
The ncid for the group containing the opaque type.
xtype
The typeid for this opaque type, as returned by nc_def_compound, or nc_inq_var.
name
If non-NULL, the name of the opaque type will be copied here. It will be NC_MAX_NAME bytes or less.
sizep
If non-NULL, the size of the opaque type will be copied here.

Errors

NC_NOERR
No error.
NC_EBADTYPEID
Bad typeid.
NC_EBADFIELDID
Bad fieldid.
NC_EHDFERR
An error was reported by the HDF5 layer.

Example

This example is from test program libsrc4/tst_opaques.c:

           if (nc_def_opaque(ncid, BASE_SIZE, TYPE_NAME, &xtype)) ERR;
     
           if (nc_inq_opaque(ncid, xtype, name_in, &base_size_in)) ERR;
           if (strcmp(name_in, TYPE_NAME) || base_size_in != BASE_SIZE) ERR;
 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690