TSMFile.h
Classes
- TSMFile -- File object for Tiled Storage Manager. (full description)
Interface
- Public Members
- TSMFile (const TiledStMan* stMan, uInt fileSequenceNr)
- TSMFile (const String& fileName, Bool writable=False)
- TSMFile (const TiledStMan* stMan, AipsIO& ios, uInt seqnr)
- ~TSMFile()
- void putObject (AipsIO& ios) const
- void getObject (AipsIO& ios)
- void open()
- BucketFile* bucketFile()
- Int64 length() const
- uInt sequenceNumber() const
- void extend (Int64 increment)
- Private Members
- TSMFile (const TSMFile&)
- TSMFile& operator= (const TSMFile&)
Prerequisite
Etymology
TSMFile represents a data file for the Tiled Storage Manager.
Synopsis
A TSMFile object represents a data file. Currently it is meant
for the TiledStMan classes, but it can easily be turned into
a more general storage manager file class.
Creation of a TSMFile object does not open the file.
An explicit open call has to be given before the file can be used.
Underneath it uses a BucketFile to access the file.
In this way the IO details are well encapsulated.
Motivation
Encapsulate the Tiled Storage Manager file details.
Member Description
TSMFile (const TiledStMan* stMan, uInt fileSequenceNr)
Create a TSMFile object (with corresponding file).
The sequence number gets part of the file name.
TSMFile (const String& fileName, Bool writable=False)
Create a TSMFile object for the given existing file.
Read the object back.
The file is not opened until the first access,
thus until the file descriptor is asked for the first time.
It checks if the sequence number matches the expected one.
The destructor closes the file.
Write the object.
Get the object.
Open the file if not open yet.
Return the BucketFile object (to be used in the BucketCache).
Int64 length() const
Return the logical file length.
Return the file sequence number.
void extend (Int64 increment)
Increment the logical file length.
TSMFile (const TSMFile&)
Forbid copy constructor.
TSMFile& operator= (const TSMFile&)
Forbid assignment.