code::NetcdfFormatter Class Reference

Inheritance diagram for code::NetcdfFormatter:

code::NetcdfCartesianGrid2DFormatter code::NetcdfCartesianGrid3DFormatter code::NetcdfContourDataFormatter code::NetcdfFieldDataFormatter code::NetcdfLatLonGridFormatter code::NetcdfLatLonHeightGridFormatter code::NetcdfRadialSetFormatter code::NetcdfWindFieldFormatter List of all members.

Detailed Description

The base class of all Netcdf formatters.

This is similar to the Formatter found in wdssii, but it does not have the same interface.

Author:
Lakshman
Version:
Id
code_NetcdfFormatter.h,v 1.13 2009/06/02 20:17:38 lakshman Exp


Public Types

 ncTypeName
 ncDataType
 ncConfigFile
 ncDataIdentifier
 ncNumGlobals
enum  GlobalAttr {
  ncTypeName, ncDataType, ncConfigFile, ncDataIdentifier,
  ncNumGlobals
}
 The global string attributes we expect to see in every file. More...

Public Member Functions

virtual SmartPtr< DataTypecreateObject (const NetcdfFile &ncfile, const std::vector< std::string > &prms)=0
 The way to obtain the object.
virtual ~NetcdfFormatter ()
void setAttributes (DataType &dt, const NetcdfFile &)
 The builder will pass in the DataType and ask to fill attributes via this method.

Static Public Member Functions

static SmartPtr< NetcdfFormattergetFormatter (const std::string &type)
 Returns the appropriate formatter given the type encoded in the netcdf file.
static std::string getAttrVal (const NetcdfFile &ncfile, const std::string &attr_name)
 Returns the value for a global string attribute of this name.
static int getGlobalAttr (const NetcdfFile &ncfile, std::vector< std::string > *all_attr, SpaceTimeRef *stref, SentinelDouble *FILE_MISSING_DATA, SentinelDouble *FILE_RANGE_FOLDED)
 Fills in all the global attributes expected by CODE in a netcdf file.

Protected Member Functions

 NetcdfFormatter ()
 Only subclasses should try to construct a Formatter --> others should use getFormatter().

Static Protected Member Functions

static void introduce (const std::string &dataType, SmartPtr< NetcdfFormatter > new_subclass)
 Use this to introduce new subclasses.

Friends

class NetcdfIndexWriter


Member Enumeration Documentation

enum code::NetcdfFormatter::GlobalAttr

The global string attributes we expect to see in every file.

Enumerator:
ncTypeName 
ncDataType 
ncConfigFile 
ncDataIdentifier 
ncNumGlobals 


Constructor & Destructor Documentation

virtual code::NetcdfFormatter::~NetcdfFormatter (  )  [virtual]

code::NetcdfFormatter::NetcdfFormatter (  )  [inline, protected]

Only subclasses should try to construct a Formatter --> others should use getFormatter().


Member Function Documentation

virtual SmartPtr<DataType> code::NetcdfFormatter::createObject ( const NetcdfFile ncfile,
const std::vector< std::string > &  prms 
) [pure virtual]

The way to obtain the object.

ncfile An open NetcdfFile object. prms Additional information needed by some data types

Implemented in code::NetcdfCartesianGrid2DFormatter, code::NetcdfCartesianGrid3DFormatter, code::NetcdfContourDataFormatter, code::NetcdfFieldDataFormatter, code::NetcdfLatLonGridFormatter, code::NetcdfLatLonHeightGridFormatter, code::NetcdfRadialSetFormatter, and code::NetcdfWindFieldFormatter.

static std::string code::NetcdfFormatter::getAttrVal ( const NetcdfFile ncfile,
const std::string &  attr_name 
) [static]

Returns the value for a global string attribute of this name.

static SmartPtr<NetcdfFormatter> code::NetcdfFormatter::getFormatter ( const std::string &  type  )  [static]

Returns the appropriate formatter given the type encoded in the netcdf file.

Returns:
invalid smart pointer if we don't know about this type.

static int code::NetcdfFormatter::getGlobalAttr ( const NetcdfFile ncfile,
std::vector< std::string > *  all_attr,
SpaceTimeRef stref,
SentinelDouble FILE_MISSING_DATA,
SentinelDouble FILE_RANGE_FOLDED 
) [static]

Fills in all the global attributes expected by CODE in a netcdf file.

Returns:
NumGlobals on success -ve on failure

static void code::NetcdfFormatter::introduce ( const std::string &  dataType,
SmartPtr< NetcdfFormatter new_subclass 
) [static, protected]

Use this to introduce new subclasses.

void code::NetcdfFormatter::setAttributes ( DataType dt,
const NetcdfFile  
)

The builder will pass in the DataType and ask to fill attributes via this method.


Friends And Related Function Documentation

friend class NetcdfIndexWriter [friend]


Generated on Fri May 4 13:40:12 2012 for WDSS-IIw2 by  doxygen 1.4.7