27 #ifndef FITS_BLOCKIO_H 28 #define FITS_BLOCKIO_H 31 #include <casacore/casa/aips.h> 43 #include <casacore/fits/FITS/FITSError.h> 106 BlockIO(
const char *,
int,
int,
int = 1,
165 virtual char *read();
166 virtual char *skip(
int);
194 virtual int write(
char *);
const char * fname() const
name of file associated with I/O stream, if applicable
int iosize() const
get the total bytes of data in m_buffer
fitsfile * getfptr() const
get the fitsfile pointer
int close_file(fitsfile *fptr, int *status)
fits_close_file() does not work for reasons that the file pointer does not have the knowledge of chdu...
int blockno() const
number of physical blocks read/written
void reset_iosize()
reset the m_iosize data member
fixed-length blocked sequential output base class
fitsfile * m_fptr
using fitsfile structure from cfitsio of NASA
int current() const
get the current read position within m_buffer
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.
int recno() const
number of logical records read/written
void(* FITSErrorHandler)(const char *errMessage, FITSError::ErrorLevel severity)
Define a typedef for the handler function signature for convenience.
void setfptr(fitsfile *ffp)
int m_iosize
size of record in buffer
int fdes() const
file descriptor associated with I/O stream, if applicable
this file contains all the compiler specific defines
char * buffer() const
get m_buffer
void errmsg(IOErrs, const char *)
set the error message and error number for later recovery
static void defaultHandler(const char *errMessage, ErrorLevel severity)
The default error handler.