|
CARMA C++
|
Abstract Base clase for item- and file-level MIRIAD operations. More...
#include <carma/sdp/MiriadSDP.h>
Public Member Functions | |
| const std::string & | getFileName () const |
| Return name of dataset. More... | |
| int | getHandle () const |
| Return handle for dataset. More... | |
| bool | isOld () const |
| Is this an 'old' dataset? More... | |
| bool | isOpen () const |
| Is dataset open? More... | |
| bool | justGather () |
| Miriad () | |
| Constructor. More... | |
| const std::string & | name () const |
| Return name of dataset. More... | |
| void | setGather (const bool gather) |
| virtual | ~Miriad () |
| Destructor. More... | |
History file routines. | |
| virtual void | hisopen (const char *status=0)=0 |
| Opens history file. More... | |
| virtual void | hisclose ()=0 |
| Close history file. More... | |
| bool | isHistoryOpen () const |
| Is history files open? More... | |
| virtual bool | hisread (char *line, int linelength)=0 |
| Read one line from history file. More... | |
| virtual void | hiswrite (const char *line)=0 |
| Write one history line. More... | |
Low-level I/O. | |
| virtual void | hopen (const char *name, const char *status, int &iostat)=0 |
| Open a MIRIAD dataset. More... | |
| virtual void | hclose ()=0 |
| Close a MIRIAD dataset. More... | |
| virtual void | haccess (int &handle, const char *name, const char *status, int &iostat)=0 |
| Open a file as some part of a data set. More... | |
| virtual void | hreada (int handle, char *buf, int buflen, int &iostat)=0 |
| Read ascii string terminated by a newline. More... | |
| virtual void | hdaccess (int handle, int &iostat)=0 |
| Close file. More... | |
| virtual void | hwritea (int handle, const char *buf, int buflen, int &iostat)=0 |
| Write ASCII text. More... | |
Protected Member Functions | |
| void | mirclose () |
| Sets the isOpen_ and hisOpen flags to false and tno_ to -1. More... | |
| void | miropen (int tno, const std::string &name, bool isOld) |
| Sets various variables relating to an open dataset. More... | |
| void | setHistoryIsOpen (bool isopen) |
| Sets the flag indicating the history file status. More... | |
Abstract Base clase for item- and file-level MIRIAD operations.
Definition at line 26 of file MiriadSDP.h.
| carma::sdp::Miriad::Miriad | ( | ) |
Constructor.
|
virtual |
Destructor.
| const std::string& carma::sdp::Miriad::getFileName | ( | ) | const |
Return name of dataset.
Definition at line 42 of file MiriadSDP.h.
| int carma::sdp::Miriad::getHandle | ( | ) | const |
Return handle for dataset.
For binary files this is the MIRIAD tno argument.
Definition at line 47 of file MiriadSDP.h.
|
pure virtual |
Open a file as some part of a data set.
(eg. "vartable")
| name | name of file to open. |
| handle | Miriad file handle. |
| status | 'read', 'write', 'append' or 'scratch'. |
| iostat | 0 for OK. Non 0 values are system error codes. |
Implemented in carma::sdp::MiriadBin.
|
pure virtual |
Close a MIRIAD dataset.
Implemented in carma::sdp::MiriadBin.
|
pure virtual |
Close file.
Implemented in carma::sdp::MiriadBin.
|
pure virtual |
Close history file.
Implemented in carma::sdp::MiriadBin.
|
pure virtual |
Opens history file.
Status is "read", "write" or "append".
| status | is "read", "write" or "append". |
Implemented in carma::sdp::MiriadBin.
|
pure virtual |
Read one line from history file.
Returns true if eof found.
| line | buffer to get data. |
| linelength | length of buffer. |
Implemented in carma::sdp::MiriadBin.
|
pure virtual |
Write one history line.
Implemented in carma::sdp::MiriadBin.
|
pure virtual |
Open a MIRIAD dataset.
Implemented in carma::sdp::MiriadBin.
|
pure virtual |
Read ascii string terminated by a newline.
Implemented in carma::sdp::MiriadBin.
|
pure virtual |
Write ASCII text.
Implemented in carma::sdp::MiriadBin.
| bool carma::sdp::Miriad::isHistoryOpen | ( | ) | const |
Is history files open?
Definition at line 72 of file MiriadSDP.h.
| bool carma::sdp::Miriad::isOld | ( | ) | const |
Is this an 'old' dataset?
Definition at line 51 of file MiriadSDP.h.
| bool carma::sdp::Miriad::isOpen | ( | ) | const |
Is dataset open?
Definition at line 55 of file MiriadSDP.h.
|
protected |
Sets the isOpen_ and hisOpen flags to false and tno_ to -1.
|
protected |
Sets various variables relating to an open dataset.
Definition at line 126 of file MiriadSDP.h.
| const std::string& carma::sdp::Miriad::name | ( | ) | const |
Return name of dataset.
Definition at line 38 of file MiriadSDP.h.
|
protected |
Sets the flag indicating the history file status.
Definition at line 135 of file MiriadSDP.h.