Next: Class NcVar, Previous: Class NcDim, Up: NetCDF Classes
NcTypedComponent is an abstract base class for NcVar and
NcAtt that captures the similarities between netCDF variables and
attributes. We list here the member functions that variables and
attributes inherit from NcTypedComponent, but these member
functions are also documented under the NcVar and NcAtt
classes for convenience.
NcToken name( void ) constNcType type( void ) constncByte, ncChar, ncShort, ncInt,
ncFloat, or ncDouble.
NcBool is_valid( void ) constTRUE if the component is valid, FALSE otherwise.
long num_vals( void ) constNcBool rename( NcToken newname )NcValues* values( void ) constvalues method. Note that this is not a good way to read
selected values of a variable; use the get member function
instead, to get single values or selected cross-sections of values.
ncbyte as_ncbyte( int n ) constchar as_char( int n ) constshort as_short( int n ) constint as_int( int n ) constnclong as_nclong( int n ) const // deprecatedlong as_long( int n ) constfloat as_float( int n ) constdouble as_double( int n ) constchar* as_string( int n ) constas_string method.