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 ) const
NcType type( void ) const
ncByte
, ncChar
, ncShort
, ncInt
,
ncFloat
, or ncDouble
.
NcBool is_valid( void ) const
TRUE
if the component is valid, FALSE
otherwise.
long num_vals( void ) const
NcBool rename( NcToken newname )
NcValues* values( void ) const
values
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 ) const
char as_char( int n ) const
short as_short( int n ) const
int as_int( int n ) const
nclong as_nclong( int n ) const // deprecated
long as_long( int n ) const
float as_float( int n ) const
double as_double( int n ) const
char* as_string( int n ) const
as_string
method.