Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1TSMFile.html
Дата изменения: Unknown Дата индексирования: Mon Feb 14 20:55:39 2011 Кодировка: |
File object for Tiled Storage Manager. More...
#include <TSMFile.h>
Public Member Functions | |
TSMFile (const TiledStMan *stMan, uInt fileSequenceNr, const TSMOption &) | |
Create a TSMFile object (with corresponding file). | |
TSMFile (const String &fileName, Bool writable, const TSMOption &) | |
Create a TSMFile object for the given existing file. | |
TSMFile (const TiledStMan *stMan, AipsIO &ios, uInt seqnr, const TSMOption &) | |
Read the object back. | |
~TSMFile () | |
The destructor closes the file. | |
void | putObject (AipsIO &ios) const |
Write the object. | |
void | getObject (AipsIO &ios) |
Get the object. | |
void | open () |
Open the file if not open yet. | |
BucketFile * | bucketFile () |
Return the BucketFile object (to be used in the BucketCache). | |
Int64 | length () const |
Return the logical file length. | |
uInt | sequenceNumber () const |
Return the file sequence number. | |
void | extend (Int64 increment) |
Increment the logical file length. | |
Private Member Functions | |
TSMFile (const TSMFile &) | |
Forbid copy constructor. | |
TSMFile & | operator= (const TSMFile &) |
Forbid assignment. | |
Private Attributes | |
uInt | fileSeqnr_p |
The file sequence number. | |
BucketFile * | file_p |
The file object. | |
Int64 | length_p |
The (logical) length of the file. |
File object for Tiled Storage Manager.
Internal
TSMFile represents a data file for the Tiled Storage Manager.
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.
Encapsulate the Tiled Storage Manager file details.
Definition at line 80 of file TSMFile.h.
casa::TSMFile::TSMFile | ( | const TiledStMan * | stMan, | |
uInt | fileSequenceNr, | |||
const TSMOption & | ||||
) |
Create a TSMFile object (with corresponding file).
The sequence number gets part of the file name.
Create a TSMFile object for the given existing file.
casa::TSMFile::TSMFile | ( | const TiledStMan * | stMan, | |
AipsIO & | ios, | |||
uInt | seqnr, | |||
const TSMOption & | ||||
) |
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.
casa::TSMFile::~TSMFile | ( | ) |
The destructor closes the file.
casa::TSMFile::TSMFile | ( | const TSMFile & | ) | [private] |
Forbid copy constructor.
BucketFile * casa::TSMFile::bucketFile | ( | ) | [inline] |
Return the BucketFile object (to be used in the BucketCache).
Definition at line 149 of file TSMFile.h.
References file_p.
void casa::TSMFile::extend | ( | Int64 | increment | ) | [inline] |
void casa::TSMFile::getObject | ( | AipsIO & | ios | ) |
Get the object.
Int64 casa::TSMFile::length | ( | ) | const [inline] |
void casa::TSMFile::open | ( | ) | [inline] |
Open the file if not open yet.
Definition at line 152 of file TSMFile.h.
References file_p, and casa::BucketFile::open().
void casa::TSMFile::putObject | ( | AipsIO & | ios | ) | const |
Write the object.
uInt casa::TSMFile::sequenceNumber | ( | ) | const [inline] |
BucketFile* casa::TSMFile::file_p [private] |
uInt casa::TSMFile::fileSeqnr_p [private] |
Int64 casa::TSMFile::length_p [private] |