WXP::SfcCdfFile Class Reference

This class reads in surface data from a WXP formatted file from file. More...

#include "../include/SfcCdfFile.h"

List of all members.

Public Member Functions

 SfcCdfFile ()
 SfcCdfFile (const char *filename)
 SfcCdfFile (const char *filename, int access)
 ~SfcCdfFile ()
bool isOpen ()
int open (const char *filename, int access)
int rewind ()
int close ()
int setDate (Date &rdate)
int getDate (Date &rdate)
int read (SfcData &data)
int write (SfcData &data)

Static Public Member Functions

static int checkType (const char *filename)

Detailed Description

This class reads in surface data from a WXP formatted file from file.

Author:
Dan Vietor

Constructor & Destructor Documentation

SfcCdfFile::SfcCdfFile (  ) 

Constructor

SfcCdfFile::SfcCdfFile ( const char *  filename  ) 

Constructor. Opens the surface data file (access=READ, type=UNK)

Parameters:
filename File to open

References open(), and WXP::FileAttr::READ.

SfcCdfFile::SfcCdfFile ( const char *  filename,
int  raccess 
)

Constructor. Opens the surface data file

Parameters:
filename File to open
raccess Access type (FileAttr::READ, FileAttr::WRITE, FileAttr::APPEND)

References open().

SfcCdfFile::~SfcCdfFile (  ) 

Destructor


Member Function Documentation

int SfcCdfFile::checkType ( const char *  filename  )  [static]

Checks the type of data in the file

Parameters:
filename File to check

References WXP::File::isOpen(), and WXP::File::scanf().

int SfcCdfFile::close (  ) 

Closes the surface data file

Referenced by WXP::SfcFile::close().

int SfcCdfFile::getDate ( Date rdate  ) 

Gets the date of the file

Return values:
rdate Date class to put date information

Referenced by WXP::SfcFile::getDate().

int SfcCdfFile::open ( const char *  filename,
int  raccess 
)
int SfcCdfFile::read ( SfcData data  ) 

Reads a single report/station from the data file

Return values:
data SfcData class to put the data from the file

References WXP::Convert::CtoF(), WXP::WxTool::getWmoWeather(), WXP::SfcData::init(), WXP::Convert::KMtoSM(), WXP::Convert::MBtoIN(), WXP::Const::MISS, WXP::Convert::MMtoIN(), WXP::Convert::MPStoKT(), and WXP::Convert::MtoFT().

Referenced by WXP::SfcFile::read().

int SfcCdfFile::rewind (  ) 

Rewinds the surface data file

References WXP::FileAttr::READ.

int SfcCdfFile::setDate ( Date rdate  ) 

Sets the date of the file

Return values:
rdate Date class containing date information

Referenced by WXP::SfcFile::setDate().


The documentation for this class was generated from the following files:

Generated on 8 Jan 2010 for WXP C++ Library by  doxygen 1.6.1