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> 83 void map (
int fd,
const String& fileName);
97 virtual void write (
Int64 size,
const void* buf);
Int64 getFileSize() const
Get the file size.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
void flush()
Flush changed mapped data to the file.
virtual String fileName() const
Get the file name of the file attached.
int fd() const
Get the file descriptor.
SeekOption
Define the possible seek options.
Memory-mapped IO on a file.
const void * getReadPointer(Int64 offset) const
Get a read or write pointer to the given position in the mapped file.
MMapfdIO & operator=(const MMapfdIO &)
void * getWritePointer(Int64 offset)
Class for unbuffered IO on a file.
virtual void write(Int64 size, const void *buf)
Write the number of bytes from the seek position on.
virtual Int64 doSeek(Int64 offset, ByteIO::SeekOption)
Reset the position pointer to the given value.
bool Bool
Define the standard types used by Casacore.
MMapfdIO()
Default constructor.
virtual Int64 read(Int64 size, void *buf, Bool throwException=True)
Read size bytes from the File.
void map(int fd, const String &fileName)
Map the given file descriptor entirely into memory with read access.
String: the storage and methods of handling collections of characters.
void mapFile()
Map or remap the entire file.
void unmapFile()
Unmap the file.
this file contains all the compiler specific defines