WXP::BufrFile Class Reference

This class reads in BUFR data from a file. More...

#include "../include/BufrFile.h"

List of all members.

Public Types

enum  FileType { NONE, WXP, LDM, RAW }

Public Member Functions

 BufrFile ()
int init ()
int open (const char *filename)
bool isOpen ()
int close ()
int readHeader ()
int readPDB ()
int readData (BufrData &data)
int getParamInd ()
int getLoop ()
int getLoopNum ()
int getLoopInd ()
int getLoopBeg ()
int getLoopEnd ()
int getNumSubsets ()
int nextDataset ()
int printParams ()
int printCodes ()
int print ()

Static Public Member Functions

static int checkType (const char *filename)

Detailed Description

This class reads in BUFR data from a file.

Author:
Dan Vietor

Constructor & Destructor Documentation

BufrFile::BufrFile (  ) 

Constructor


Member Function Documentation

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

Attempts to determine the file type by parsing start of file.

Parameters:
filename The filename to check
Returns:
The type of file (WXP, LDM, RAW)

References WXP::File::close(), WXP::StrLib::equal(), WXP::File::isOpen(), WXP::File::open(), and WXP::File::read().

Referenced by open().

int BufrFile::close (  ) 

Closes the file

References WXP::File::close().

Referenced by open().

int WXP::BufrFile::getLoop (  )  [inline]

Get index into parameter list

int WXP::BufrFile::getLoopBeg (  )  [inline]

Get current count in loop

int WXP::BufrFile::getLoopEnd (  )  [inline]

Parameter index of start of loop

int WXP::BufrFile::getLoopInd (  )  [inline]

Get number of times to go through the loop

int WXP::BufrFile::getLoopNum (  )  [inline]

Get loop index

int WXP::BufrFile::getNumSubsets (  )  [inline]

Parameter index of end of loop

bool BufrFile::isOpen (  ) 

Returns open status

Returns:
True if file opened
int WXP::BufrFile::nextDataset (  )  [inline]

Get number of data subsets

int BufrFile::open ( const char *  filename  ) 
int BufrFile::print (  ) 

Print object data

int BufrFile::printCodes (  ) 

Prints the code list

Referenced by readPDB().

int BufrFile::printParams (  ) 

Move to next dataset

Prints the parameter list

Referenced by readPDB().

int BufrFile::readData ( BufrData data  ) 

Reads in the BUFR data

Return values:
data Output data
Returns:
0 if end of data

References WXP::StrLib::copy(), WXP::Const::MISS, and WXP::Wxp::outDebug().

int BufrFile::readHeader (  ) 

Reads in the product header and positions at the front of the BUFR data. This is dependent on the type of datafile and how the BUFR data is encapsulated.

References WXP::StrLib::equal(), WXP::File::getLine(), WXP::Wxp::outDebug(), WXP::File::skipLine(), and WXP::File::tell().

int BufrFile::readPDB (  ) 

Reads in the BUFR product definition block

References WXP::Wxp::isDebug(), WXP::Wxp::outDebug(), WXP::Wxp::outMessage(), printCodes(), and printParams().


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