- OK
- NOSUCHFILE
- NOMEM
- OPENERR
- CLOSEERR
- READERR
- WRITEERR
number of physical blocks read/written
number of logical records read/written
name of file associated with I/O stream, if applicable
file descriptor associated with I/O stream, if applicable
The remaining arguments are the the logical record size and number
of records that make up a physical record followed by the
output stream that is used to write error messages to.
set the error message and error number for later recovery
The remaining arguments are the the logical record size and number
of records that make up a physical record followed by the
output stream that is used to write error messages to.
read the next logical record or first
skip N logical records and then read the next one.
(note it is not possible to skip a record without
reading a record).
The remaining arguments are the the logical record size and number
of records that make up a physical record followed by the
output stream that is used to write error messages to.
write the next logical record. The input must point
to a logical record
Synopsis
BlockIO is a low level base class that implements fixed-length
blocked sequential I/O. Its derived classes, BlockInput and BlockOutput
are used by the FitsInput and FitsOutput classes. Users will hardly ever
need to use this class directly.
To Do
Member Description
enum IOErrs
error return code
int err() const
int blockno() const
int recno() const
const char *fname() const
int fdes() const
BlockIO(const char *, int, int, int = 1, FITSErrorHandler errhandler = FITSError::defaultHandler)
Construction can be done either from a filename with open options
or from a file descriptor.
BlockIO(int, int, int = 1, FITSErrorHandler errhandler = FITSError::defaultHandler)
virtual ~BlockIO()
void errmsg(IOErrs, char *)
class BlockInput : public BlockIO
Interface
Description
Prerequisite
Member Description
BlockInput(const char *, int, int = 1, FITSErrorHandler errhandler = FITSError::defaultHandler)
Construction can be done either from a filename or from
a file descriptor.
BlockInput(int, int, int = 1, FITSErrorHandler errhandler = FITSError::defaultHandler)
virtual ~BlockInput()
virtual char *read()
virtual char *skip(int)
these functions return a pointer to an
internal record. The user must make sure that
after destruction of this class no dangling pointers
are left.
class BlockOutput : public BlockIO
Interface
Description
Prerequisite
Member Description
BlockOutput(const char *, int, int = 1, FITSErrorHandler errhandler = FITSError::defaultHandler)
Construction can be done either from a filename or from
a file descriptor.
BlockOutput(int, int, int = 1, FITSErrorHandler errhandler = FITSError::defaultHandler)
virtual ~BlockOutput()
virtual int write(char *)