29 #ifndef CASA_MMAPFDIO_H
30 #define CASA_MMAPFDIO_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/casa/IO/FiledesIO.h>
35 #include <casacore/casa/OS/RegularFile.h>
SeekOption
Define the possible seek options.
int fd() const
Get the file descriptor.
virtual String fileName() const
Get the file name of the file attached.
MMapfdIO(const MMapfdIO &)
Forbid copy constructor and assignment.
virtual Int64 read(Int64 size, void *buf, Bool throwException=True)
Read size bytes from the File.
Int64 getFileSize() const
Get the file size.
MMapfdIO(int fd, const String &fileName)
Map the given file descriptor entirely into memory with read access.
virtual void write(Int64 size, const void *buf)
Write the number of bytes from the seek position on.
void map(int fd, const String &fileName)
Map the given file descriptor entirely into memory with read access.
MMapfdIO & operator=(const MMapfdIO &)
MMapfdIO()
Default constructor.
void * getWritePointer(Int64 offset)
void unmapFile()
Unmap the file.
virtual Int64 doSeek(Int64 offset, ByteIO::SeekOption)
Reset the position pointer to the given value.
void flush()
Flush changed mapped data to the file.
void mapFile()
Map or remap the entire file.
const void * getReadPointer(Int64 offset) const
Get a read or write pointer to the given position in the mapped file.
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
bool Bool
Define the standard types used by Casacore.