![]() |
NetCDF
4.8.0
|
#include "nc4internal.h"#include "nc4dispatch.h"Go to the source code of this file.
Macros | |
| #define | NC_BYTE_LEN 1 |
| #define | NC_CHAR_LEN sizeof(char) |
| #define | NC_DOUBLE_LEN 8 |
| #define | NC_FLOAT_LEN 4 |
| #define | NC_INT64_LEN 8 |
| #define | NC_INT_LEN 4 |
| #define | NC_SHORT_LEN 2 |
| #define | NC_STRING_LEN sizeof(char *) |
Functions | |
| int | nc4_get_typeclass (const NC_FILE_INFO_T *h5, nc_type xtype, int *type_class) |
| int | NC4_inq_atomic_type (nc_type typeid1, char *name, size_t *size) |
| int | NC4_inq_compound_field (int ncid, nc_type typeid1, int fieldid, char *name, size_t *offsetp, nc_type *field_typeidp, int *ndimsp, int *dim_sizesp) |
| int | NC4_inq_compound_fieldindex (int ncid, nc_type typeid1, const char *name, int *fieldidp) |
| int | NC4_inq_enum_ident (int ncid, nc_type xtype, long long value, char *identifier) |
| int | NC4_inq_enum_member (int ncid, nc_type typeid1, int idx, char *identifier, void *value) |
| int | NC4_inq_type (int ncid, nc_type typeid1, char *name, size_t *size) |
| EXTERNL int | NC4_inq_typeid (int ncid, const char *name, nc_type *typeidp) |
| int | NC4_inq_typeids (int ncid, int *ntypes, int *typeids) |
| int | NC4_inq_user_type (int ncid, nc_type typeid1, char *name, size_t *size, nc_type *base_nc_typep, size_t *nfieldsp, int *classp) |
| int | NC4_lookup_atomic_type (const char *name, nc_type *idp, size_t *sizep) |
Variables | |
| const char * | nc4_atomic_name [NUM_ATOMIC_TYPES] |
| static const int | nc4_atomic_size [NUM_ATOMIC_TYPES] |
This file is part of netcdf-4, a netCDF-like interface for HDF5, or a HDF5 backend for netCDF, depending on your point of view.
This file handles the nc4 user-defined type functions (i.e. compound and opaque types).
Definition in file nc4type.c.
| int nc4_get_typeclass | ( | const NC_FILE_INFO_T * | h5, |
| nc_type | xtype, | ||
| int * | type_class | ||
| ) |
| int NC4_inq_atomic_type | ( | nc_type | typeid1, |
| char * | name, | ||
| size_t * | size | ||
| ) |
Get the name and size of an atomic type. For strings, 1 is returned.
| typeid1 | Type ID. |
| name | Gets the name of the type. |
| size | Gets the size of one element of the type in bytes. |
| int NC4_inq_compound_field | ( | int | ncid, |
| nc_type | typeid1, | ||
| int | fieldid, | ||
| char * | name, | ||
| size_t * | offsetp, | ||
| nc_type * | field_typeidp, | ||
| int * | ndimsp, | ||
| int * | dim_sizesp | ||
| ) |
Given the ncid, typeid and fieldid, get info about the field.
| ncid | File and group ID. |
| typeid1 | Type ID. |
| fieldid | Field ID. |
| name | Gets name of field. |
| offsetp | Gets offset of field. |
| field_typeidp | Gets field type ID. |
| ndimsp | Gets number of dims for this field. |
| dim_sizesp | Gets the dim sizes for this field. |
| int NC4_inq_compound_fieldindex | ( | int | ncid, |
| nc_type | typeid1, | ||
| const char * | name, | ||
| int * | fieldidp | ||
| ) |
Given the typeid and the name, get the fieldid.
| ncid | File and group ID. |
| typeid1 | Type ID. |
| name | Name of field. |
| fieldidp | Pointer that gets new field ID. |
| int NC4_inq_enum_ident | ( | int | ncid, |
| nc_type | xtype, | ||
| long long | value, | ||
| char * | identifier | ||
| ) |
Get enum name from enum value. Name size will be <= NC_MAX_NAME.
| ncid | File and group ID. |
| xtype | Type ID. |
| value | Value of enum. |
| identifier | Gets the identifier for this enum value. |
| int NC4_inq_enum_member | ( | int | ncid, |
| nc_type | typeid1, | ||
| int | idx, | ||
| char * | identifier, | ||
| void * | value | ||
| ) |
Get information about an enum member: an identifier and value. Identifier size will be <= NC_MAX_NAME.
| ncid | File and group ID. |
| typeid1 | Type ID. |
| idx | Enum member index. |
| identifier | Gets the identifier. |
| value | Gets the enum value. |
| int NC4_inq_type | ( | int | ncid, |
| nc_type | typeid1, | ||
| char * | name, | ||
| size_t * | size | ||
| ) |
Get the name and size of a type. For VLEN the base type len is returned.
| ncid | File and group ID. |
| typeid1 | Type ID. |
| name | Gets the name of the type. |
| size | Gets the size of one element of the type in bytes. |
Get the id of a type from the name.
| ncid | File and group ID. |
| name | Name of type. |
| typeidp | Pointer that will get the type ID. |
| int NC4_inq_typeids | ( | int | ncid, |
| int * | ntypes, | ||
| int * | typeids | ||
| ) |
Find all user-defined types for a location. This finds all user-defined types in a group.
| ncid | File and group ID. |
| ntypes | Pointer that gets the number of user-defined types. Ignored if NULL |
| typeids | Array that gets the typeids. Ignored if NULL. |
| int NC4_inq_user_type | ( | int | ncid, |
| nc_type | typeid1, | ||
| char * | name, | ||
| size_t * | size, | ||
| nc_type * | base_nc_typep, | ||
| size_t * | nfieldsp, | ||
| int * | classp | ||
| ) |
Find info about any user defined type.
| ncid | File and group ID. |
| typeid1 | Type ID. |
| name | Gets name of the type. |
| size | Gets size in bytes of one element of type. |
| base_nc_typep | Gets the base nc_type. |
| nfieldsp | Gets the number of fields. |
| classp | Gets the type class (NC_COMPOUND, NC_ENUM, NC_VLEN). |
| int NC4_lookup_atomic_type | ( | const char * | name, |
| nc_type * | idp, | ||
| size_t * | sizep | ||
| ) |
Get the id and size of an atomic type by name.
| name | [in] the name of the type. |
| size | [out] the size of one element of the type in bytes. |
| const char* nc4_atomic_name[NUM_ATOMIC_TYPES] |
|
static |