28 #ifndef CASA_BUCKETFILE_H 29 #define CASA_BUCKETFILE_H 32 #include <casacore/casa/aips.h> 33 #include <casacore/casa/IO/ByteIO.h> 34 #include <casacore/casa/IO/MMapfdIO.h> 35 #include <casacore/casa/IO/FilebufIO.h> 36 #include <casacore/casa/BasicSL/String.h> 37 #include <casacore/casa/Utilities/CountedPtr.h> 149 virtual void close();
152 virtual void remove();
155 virtual void fsync();
159 virtual void setRW();
File object for BucketCache.
void deleteMapBuf()
Delete the possible mapped or buffered file object.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
FilebufIO * bufferedFile_p
The optional buffered file.
virtual void fsync()
Fsync the file (i.e.
Class for buffered IO on a file.
virtual uInt read(void *buffer, uInt length)
Read bytes from the file.
virtual void open()
Open the file if not open yet.
Abstract base class to combine multiple files in a single one.
virtual void close()
Close the file (if open).
Bool isWritable_p
The (logical) writability of the file.
MMapfdIO * mappedFile_p
The optional mapped file.
virtual ~BucketFile()
The destructor closes the file (if open).
Memory-mapped IO on a file.
BucketFile(const String &fileName, uInt bufSizeFile=0, Bool mappedFile=False, MultiFileBase *mfile=0)
Create a BucketFile object for a new file.
MMapfdIO * mappedFile()
Get the mapped file object.
Bool isWritable() const
Has the file logically been indicated as writable?
virtual const String & name() const
Get the file name.
FilebufIO * bufferedFile()
Get the buffered file object.
MultiFileBase * mfile_p
The possibly used MultiFileBase.
Referenced counted pointer for constant data.
virtual uInt write(const void *buffer, uInt length)
Write bytes into the file.
LatticeExprNode length(const LatticeExprNode &expr, const LatticeExprNode &axis)
2-argument function to get the length of an axis.
BucketFile & operator=(const BucketFile &)
Forbid assignment.
bool Bool
Define the standard types used by Casacore.
virtual Int64 fileSize() const
Get the (physical) size of the file.
virtual void setRW()
Set the file to read/write access.
virtual CountedPtr< ByteIO > makeFilebufIO(uInt bufferSize)
Make a (temporary) buffered IO object for this file.
String name_p
The file name.
CountedPtr< ByteIO > file_p
The unbuffered file.
Bool isCached() const
Is the file cached, mapped, or buffered?
String: the storage and methods of handling collections of characters.
void createMapBuf()
Create the mapped or buffered file object.
this file contains all the compiler specific defines
virtual void seek(Int64 offset)
Seek in the file.