Go to the documentation of this file.
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>
virtual void remove()
Remove the file (and close it if needed).
virtual uInt write(const void *buffer, uInt length)
Write bytes into the file.
Bool isCached() const
Is the file cached, mapped, or buffered?
String name_p
The file name.
Referenced counted pointer for constant data.
BucketFile & operator=(const BucketFile &)
Forbid assignment.
CountedPtr< ByteIO > file_p
The unbuffered file.
virtual CountedPtr< ByteIO > makeFilebufIO(uInt bufferSize)
Make a (temporary) buffered IO object for this file.
BucketFile(const BucketFile &)
Forbid copy constructor.
virtual void seek(Int64 offset)
Seek in the file.
virtual const String & name() const
Get the file name.
virtual void open()
Open the file if not open yet.
void deleteMapBuf()
Delete the possible mapped or buffered file object.
Abstract base class to combine multiple files in a single one.
virtual ~BucketFile()
The destructor closes the file (if open).
virtual uInt read(void *buffer, uInt length)
Read bytes from the file.
void createMapBuf()
Create the mapped or buffered file object.
BucketFile(const String &fileName, Bool writable, uInt bufSizeFile=0, Bool mappedFile=False, MultiFileBase *mfile=0)
Create a BucketFile object for an existing file.
Bool isWritable_p
The (logical) writability of the file.
FilebufIO * bufferedFile_p
The optional buffered file.
MMapfdIO * mappedFile_p
The optional mapped file.
this file contains all the compiler specific defines
LatticeExprNode length(const LatticeExprNode &expr, const LatticeExprNode &axis)
2-argument function to get the length of an axis.
Bool isWritable() const
Has the file logically been indicated as writable?
virtual void fsync()
Fsync the file (i.e.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
virtual void close()
Close the file (if open).
String: the storage and methods of handling collections of characters.
BucketFile(const String &fileName, uInt bufSizeFile=0, Bool mappedFile=False, MultiFileBase *mfile=0)
Create a BucketFile object for a new file.
virtual Int64 fileSize() const
Get the (physical) size of the file.
bool Bool
Define the standard types used by Casacore.
MMapfdIO * mappedFile()
Get the mapped file object.
MultiFileBase * mfile_p
The possibly used MultiFileBase.
virtual void setRW()
Set the file to read/write access.
FilebufIO * bufferedFile()
Get the buffered file object.