WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
WXP::SfcFile Class Reference

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

#include "../include/SfcFile.h"

Public Types

enum  Type {
  UNK , WXP , NETCDF , XML ,
  XMLC , UNISYS
}
 

Public Member Functions

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

Static Public Member Functions

static int checkType (const char *filename)
 
static int getType (const char *type)
 

Detailed Description

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

Author
Dan Vietor

Constructor & Destructor Documentation

◆ SfcFile() [1/3]

SfcFile::SfcFile ( )

Constructor

◆ SfcFile() [2/3]

SfcFile::SfcFile ( const char *  filename)

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

Parameters
filenameFile to open

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

◆ SfcFile() [3/3]

SfcFile::SfcFile ( const char *  filename,
int  raccess,
int  rtype 
)

Constructor. Opens the surface data file

Parameters
filenameFile to open
raccessAccess type (FileAttr::READ, FileAttr::WRITE, FileAttr::APPEND)
rtypeType of file (WXP, NETCDF, UNISYS)

References open().

◆ ~SfcFile()

SfcFile::~SfcFile ( )

Destructor

References close().

Member Function Documentation

◆ checkType()

int SfcFile::checkType ( const char *  filename)
static

Checks the type of data in the file

Parameters
filenameFile to check

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

Referenced by open().

◆ close()

int SfcFile::close ( )

Closes the surface data file

References WXP::SfcCdfFile::close(), WXP::SfcWxpFile::close(), and WXP::SfcXmlFile::close().

Referenced by open(), and ~SfcFile().

◆ getDate()

int SfcFile::getDate ( Date rdate)

Gets the date of the file

Return values
rdateDate class to put date information

References WXP::SfcCdfFile::getDate(), WXP::SfcWxpFile::getDate(), and WXP::SfcXmlFile::getDate().

Referenced by WXP::SfcRaw::compute(), and WXP::SfcPlot::draw().

◆ open() [1/3]

int SfcFile::open ( const char *  filename)

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

Parameters
filenameFile to open

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

◆ open() [2/3]

int SfcFile::open ( const char *  filename,
int  raccess,
const char *  rtype 
)

Opens the surface data file

Parameters
filenameFile to open
raccessAccess type (FileAttr::READ, FileAttr::WRITE, FileAttr::APPEND)
rtypeType of file (WXP, NETCDF, XML, XMLC, UNISYS)

References open().

◆ open() [3/3]

int SfcFile::open ( const char *  filename,
int  raccess,
int  rtype 
)

◆ read()

int SfcFile::read ( SfcData data)

Reads a single report/station from the data file

Return values
dataSfcData class to put the data from the file

References WXP::SfcCdfFile::read(), WXP::SfcWxpFile::read(), and WXP::SfcXmlFile::read().

Referenced by WXP::SfcRaw::compute(), and WXP::SfcPlot::draw().

◆ rewind()

int SfcFile::rewind ( )

Rewinds the surface data file

References WXP::SfcWxpFile::rewind().

Referenced by WXP::SfcPlot::draw().

◆ setDate()

int SfcFile::setDate ( Date rdate)

Sets the date of the file

Parameters
rdateDate of file

References WXP::SfcCdfFile::setDate(), WXP::SfcWxpFile::setDate(), and WXP::SfcXmlFile::setDate().


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