WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
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

Referenced by open().

◆ close()

int SfcFile::close ( )

Closes the surface data file

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

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 )

Opens the surface data file

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

References WXP::FileAttr::APPEND, checkType(), close(), WXP::FileAttr::READ, and WXP::FileAttr::WRITE.

Referenced by WXP::SfcRaw::compute(), open(), open(), SfcFile(), and SfcFile().

◆ 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

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

◆ rewind()

int SfcFile::rewind ( )

Rewinds the surface data file

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

◆ setDate()

int SfcFile::setDate ( Date & rdate)

Sets the date of the file

Parameters
rdateDate of file

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