NcTypedComponent Class Reference

#include <netcdfcpp.h>

Inheritance diagram for NcTypedComponent:

Inheritance graph
[legend]
Collaboration diagram for NcTypedComponent:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual NcToken name (void) const =0
virtual NcType type (void) const =0
virtual NcBool is_valid (void) const =0
virtual long num_vals (void) const =0
virtual NcBool rename (NcToken newname)=0
virtual NcValuesvalues (void) const =0
virtual ncbyte as_ncbyte (long n) const
virtual char as_char (long n) const
virtual short as_short (long n) const
virtual int as_int (long n) const
virtual int as_nclong (long n) const
virtual long as_long (long n) const
virtual float as_float (long n) const
virtual double as_double (long n) const
virtual char * as_string (long n) const

Protected Member Functions

 NcTypedComponent (NcFile *)
virtual NcValuesget_space (long numVals=0) const

Protected Attributes

NcFilethe_file

Detailed Description

Definition at line 178 of file netcdfcpp.h.


Constructor & Destructor Documentation

NcTypedComponent::NcTypedComponent NcFile  )  [protected]
 

Definition at line 501 of file netcdf.cpp.

00502         : the_file(nc)
00503 {}


Member Function Documentation

virtual char NcTypedComponent::as_char long  n  )  const [virtual]
 

virtual double NcTypedComponent::as_double long  n  )  const [virtual]
 

virtual float NcTypedComponent::as_float long  n  )  const [virtual]
 

virtual int NcTypedComponent::as_int long  n  )  const [virtual]
 

virtual long NcTypedComponent::as_long long  n  )  const [virtual]
 

virtual ncbyte NcTypedComponent::as_ncbyte long  n  )  const [virtual]
 

virtual int NcTypedComponent::as_nclong long  n  )  const [virtual]
 

virtual short NcTypedComponent::as_short long  n  )  const [virtual]
 

virtual char* NcTypedComponent::as_string long  n  )  const [virtual]
 

NcValues * NcTypedComponent::get_space long  numVals = 0  )  const [protected, virtual]
 

Definition at line 505 of file netcdf.cpp.

References ncByte, ncChar, ncDouble, ncFloat, ncInt, ncNoType, ncShort, num_vals(), and type().

Referenced by NcVar::get_rec(), NcAtt::values(), and NcVar::values().

00506 {
00507     NcValues* valp;
00508     if (numVals < 1)
00509         numVals = num_vals();
00510     switch (type()) {
00511       case ncFloat:
00512         valp = new NcValues_float(numVals);
00513         break;
00514       case ncDouble:
00515         valp = new NcValues_double(numVals);
00516         break;
00517       case ncInt:
00518         valp = new NcValues_int(numVals);
00519         break;
00520       case ncShort:
00521         valp = new NcValues_short(numVals);
00522         break;
00523       case ncByte:
00524       case ncChar:
00525         valp = new NcValues_char(numVals);
00526         break;
00527       case ncNoType:
00528       default:
00529         valp = 0;
00530     }
00531     return valp;
00532 }

virtual NcBool NcTypedComponent::is_valid void   )  const [pure virtual]
 

Implemented in NcVar, and NcAtt.

virtual NcToken NcTypedComponent::name void   )  const [pure virtual]
 

Implemented in NcVar, and NcAtt.

virtual long NcTypedComponent::num_vals void   )  const [pure virtual]
 

Implemented in NcVar, and NcAtt.

Referenced by get_space().

virtual NcBool NcTypedComponent::rename NcToken  newname  )  [pure virtual]
 

Implemented in NcVar, and NcAtt.

virtual NcType NcTypedComponent::type void   )  const [pure virtual]
 

Implemented in NcVar, and NcAtt.

Referenced by get_space().

virtual NcValues* NcTypedComponent::values void   )  const [pure virtual]
 

Implemented in NcVar, and NcAtt.


Member Data Documentation

NcFile* NcTypedComponent::the_file [protected]
 

Definition at line 203 of file netcdfcpp.h.

Referenced by NcVar::add_att(), NcVar::attnum(), NcVar::get_att(), NcVar::get_dim(), NcVar::get_rec(), NcAtt::is_valid(), NcVar::is_valid(), NcVar::NcVar(), NcVar::num_atts(), NcVar::num_dims(), NcAtt::num_vals(), NcAtt::remove(), NcAtt::rename(), NcVar::sync(), NcAtt::type(), NcVar::type(), NcAtt::values(), and NcVar::values().


The documentation for this class was generated from the following files:
Generated on Thu Mar 16 18:17:41 2006 for nco by  doxygen 1.4.4