WXP C++ Library Version 6.74.9
|
This class opens and reads grid file data. More...
#include "../include/GridWxpFile.h"
Public Types | |
enum | Type { UNK , WXP , WXPB , WXPO } |
Public Member Functions | |
GridWxpFile () | |
GridWxpFile (const char *filename) | |
GridWxpFile (const char *filename, int access, int type) | |
~GridWxpFile () | |
int | init () |
int | open (const char *filename, int access, int type) |
int | open (const char *filename) |
int | setVer (int v) |
bool | isOpen () |
int | close () |
int | setFormat (const char *rform) |
int | read (Grid &grid) |
int | read (const char *filename, int type, Grid &grid) |
int | readHdr (Grid &grid) |
int | readData (Grid &grid) |
int | write (Grid &grid) |
int | write (const char *filename, int type, Grid &grid) |
This class opens and reads grid file data.
GridWxpFile::GridWxpFile | ( | ) |
Constructor. Initializes class data
GridWxpFile::GridWxpFile | ( | const char * | filename | ) |
Constructor. Initializes and opens specific file
filename | Name of file to open |
References open(), and WXP::FileAttr::READ.
GridWxpFile::GridWxpFile | ( | const char * | filename, |
int | access, | ||
int | type | ||
) |
Constructor. Initializes and opens files for read or write.
filename | Name of file to open |
access | Read or write access |
type | Type of file to create |
References open().
GridWxpFile::~GridWxpFile | ( | ) |
Destructor. Closes file
References WXP::File::close().
int GridWxpFile::close | ( | ) |
Closes the file
References WXP::File::close().
Referenced by WXP::GridFile::close(), and WXP::GridFile::~GridFile().
bool GridWxpFile::isOpen | ( | ) |
Returns true if file opened
Referenced by WXP::ImagePlot::draw(), WXP::ImagePlot::getDomain(), WXP::GridFile::open(), and WXP::GridFile::open().
int GridWxpFile::open | ( | const char * | filename | ) |
opens specific file
filename | Name of file to open |
References open(), and WXP::FileAttr::READ.
int GridWxpFile::open | ( | const char * | filename, |
int | raccess, | ||
int | rtype | ||
) |
Opens the grid file
filename | Filename to open |
raccess | File access to use (FileAttr::READ, FileAttr::WRITE) |
rtype | Type of file to open (GridWxpFile::WXP, GridWxpFile::WXPB, GridWxpFile::WXPO ) |
References WXP::File::isOpen(), WXP::File::open(), WXP::FileAttr::READ, and WXP::FileAttr::WRITE.
Referenced by WXP::ImagePlot::draw(), WXP::ImagePlot::getDomain(), GridWxpFile(), GridWxpFile(), open(), WXP::GridFile::open(), and WXP::GridFile::open().
int GridWxpFile::read | ( | Grid & | grid | ) |
Reads a grid from the grid file
grid | Grid class to put grid data |
References WXP::FileAttr::READ.
Referenced by WXP::ImagePlot::draw(), WXP::ImagePlot::getDomain(), WXP::GridFile::peek(), and WXP::GridFile::read().