Previous: Class NcVar, Up: NetCDF Classes
NcAtt
is derived from NcTypedComponent
, and represents a netCDF
attribute. A netCDF attribute has a name and a type, and may be either
a scalar attribute or a vector attribute. Scalar attributes have one
value and vector attributes have multiple values. In addition, each
attribute is attached to a specific netCDF variable or is global to an
entire netCDF file. Because attributes are only associated with open
netCDF files, there are no public constructors for this class. Use
member functions of NcFile
and NcVar
to get netCDF
attributes or add new attributes. Most of the useful member functions
for NcAtt
are
inherited from class NcTypedComponent
.
NcToken name( void ) const
NcType type( void ) const
ncByte
, ncChar
, ncShort
, ncInt
,
ncFloat
, or ncDouble
.
NcBool is_valid( void ) const
TRUE
if the attribute is valid, FALSE
otherwise.
long num_vals( void ) const
NcBool rename( NcToken newname )
NcValues* values( void ) const
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.
NcBool remove( void )
is_valid()
will
return FALSE
.
~NcAtt( void )