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::SfcXmlFile Class Reference

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

#include "../include/SfcXmlFile.h"

Public Types

enum  { UNK , NORM , COMPRESS }
 

Public Member Functions

 SfcXmlFile ()
 
 SfcXmlFile (const char *filename)
 
 SfcXmlFile (const char *filename, int access)
 
 SfcXmlFile (const char *filename, int access, int rtype)
 
 ~SfcXmlFile ()
 
bool isOpen ()
 
int open (const char *filename, int access, int rtype)
 
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

◆ SfcXmlFile() [1/4]

SfcXmlFile::SfcXmlFile ( )

Constructor

◆ SfcXmlFile() [2/4]

SfcXmlFile::SfcXmlFile ( const char *  filename)

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

Parameters
filenameFile to open

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

◆ SfcXmlFile() [3/4]

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

Constructor. Opens the surface data file

Parameters
filenameFile to open
raccessAccess type (FileAttr::READ, FileAttr::WRITE, FileAttr::APPEND)

References open().

◆ SfcXmlFile() [4/4]

SfcXmlFile::SfcXmlFile ( 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)
rtypeFile type (NORMAL, COMPRESS)

References open().

◆ ~SfcXmlFile()

SfcXmlFile::~SfcXmlFile ( )

Destructor

References close().

Member Function Documentation

◆ checkType()

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

Checks the type of data in the file

Parameters
filenameFile to check

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

Referenced by open().

◆ close()

int SfcXmlFile::close ( )

Closes the surface data file

References WXP::FileAttr::WRITE.

Referenced by WXP::SfcFile::close(), and ~SfcXmlFile().

◆ getDate()

int SfcXmlFile::getDate ( Date rdate)

Gets the date of the file

Return values
rdateDate class to put date information

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

◆ open()

int SfcXmlFile::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)
rtypeFile type (NORMAL, COMPRESS)

References checkType(), WXP::DateTool::createLabel(), WXP::DateTool::decode(), WXP::StrLib::equal(), WXP::String::get(), WXP::FileAttr::READ, and WXP::FileAttr::WRITE.

Referenced by WXP::SfcFile::open(), SfcXmlFile(), SfcXmlFile(), and SfcXmlFile().

◆ read()

int SfcXmlFile::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::Date::adjustMinute(), WXP::StrLib::copy(), WXP::StrLib::equal(), WXP::Convert::FtoC(), and WXP::SfcData::init().

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

◆ rewind()

int SfcXmlFile::rewind ( )

Rewinds the surface data file

References WXP::FileAttr::READ.

◆ setDate()

int SfcXmlFile::setDate ( Date rdate)

Sets the date of the file

Return values
rdateDate class containing date information

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


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