code::NetcdfCartesianGrid2DFormatter Class Reference

Inheritance diagram for code::NetcdfCartesianGrid2DFormatter:

code::NetcdfFormatter List of all members.

Detailed Description

Constructs a CartesianGrid2D object from the netcdf file.

Author:
Lulin Song, Lakshman
See also:
NetcdfBuilder
Version:
Author
lakshman
Date
2009/06/02 20:17:37
RCSfile
code_NetcdfCartesianGrid2DFormatter.h,v


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 > &fileattrs)
 The way to obtain the object.
virtual ~NetcdfCartesianGrid2DFormatter ()
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 void introduceSelf ()
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.

Static Protected Member Functions

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


Member Enumeration Documentation

enum code::NetcdfFormatter::GlobalAttr [inherited]

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

Enumerator:
ncTypeName 
ncDataType 
ncConfigFile 
ncDataIdentifier 
ncNumGlobals 


Constructor & Destructor Documentation

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


Member Function Documentation

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

The way to obtain the object.

Parameters:
ncfile,: an open NetcdfFile object.
fileattrs,: file name is first param of vector<string>.

Implements code::NetcdfFormatter.

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

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

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

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, inherited]

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, inherited]

Use this to introduce new subclasses.

static void code::NetcdfCartesianGrid2DFormatter::introduceSelf (  )  [static]

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

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


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