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