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

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)
 

Detailed Description

This class opens and reads grid file data.

Author
Dan Vietor

Constructor & Destructor Documentation

◆ GridWxpFile() [1/3]

GridWxpFile::GridWxpFile ( )

Constructor. Initializes class data

◆ GridWxpFile() [2/3]

GridWxpFile::GridWxpFile ( const char *  filename)

Constructor. Initializes and opens specific file

Parameters
filenameName of file to open

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

◆ GridWxpFile() [3/3]

GridWxpFile::GridWxpFile ( const char *  filename,
int  access,
int  type 
)

Constructor. Initializes and opens files for read or write.

Parameters
filenameName of file to open
accessRead or write access
typeType of file to create

References open().

◆ ~GridWxpFile()

GridWxpFile::~GridWxpFile ( )

Destructor. Closes file

References WXP::File::close().

Member Function Documentation

◆ close()

int GridWxpFile::close ( )

Closes the file

References WXP::File::close().

Referenced by WXP::GridFile::close(), and WXP::GridFile::~GridFile().

◆ isOpen()

bool GridWxpFile::isOpen ( )

Returns true if file opened

Returns
True if file open

Referenced by WXP::ImagePlot::draw(), WXP::ImagePlot::getDomain(), WXP::GridFile::open(), and WXP::GridFile::open().

◆ open() [1/2]

int GridWxpFile::open ( const char *  filename)

opens specific file

Parameters
filenameName of file to open

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

◆ open() [2/2]

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

Opens the grid file

Parameters
filenameFilename to open
raccessFile access to use (FileAttr::READ, FileAttr::WRITE)
rtypeType 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().

◆ read()

int GridWxpFile::read ( Grid grid)

Reads a grid from the grid file

Return values
gridGrid class to put grid data
Returns
1=successful read, 0=unsuccessful

References WXP::FileAttr::READ.

Referenced by WXP::ImagePlot::draw(), WXP::ImagePlot::getDomain(), WXP::GridFile::peek(), and WXP::GridFile::read().


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