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 ) constNcType type( void ) constncByte, ncChar, ncShort, ncInt,
ncFloat, or ncDouble.
NcBool is_valid( void ) constTRUE if the attribute is valid, FALSE otherwise.
long num_vals( void ) constNcBool rename( NcToken newname )NcValues* values( void ) constncbyte 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.
NcBool remove( void )is_valid() will
return FALSE.
~NcAtt( void )