Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Multifile::Subfile Class Reference

List of all members.

Public Member Functions

 Subfile ()
bool operator< (const Subfile &other) const
streampos read_index (istream &read, streampos fpos, Multifile *multfile)
 Reads the index record for the Subfile from the indicated istream.

streampos write_index (ostream &write, streampos fpos, Multifile *multifile)
 Writes the index record for the Subfile to the indicated ostream.

streampos write_data (ostream &write, istream *read, streampos fpos)
 Writes the data record for the Subfile to the indicated ostream: the actual contents of the Subfile.

void rewrite_index_data_start (ostream &write, Multifile *multifile)
 Seeks within the indicate fstream back to the index record and rewrites just the _data_start and _data_length part of the index record.

void rewrite_index_flags (ostream &write)
 Seeks within the indicate fstream back to the index record and rewrites just the _flags part of the index record.

bool is_deleted () const
 Returns true if the Subfile indicates it has been deleted (removed from the index), false otherwise.

bool is_index_invalid () const
 Returns true if there was some problem reading the index record for this Subfile from the Multifile.

bool is_data_invalid () const
 Returns true if there was some problem reading the data contents of this Subfile, particularly when copying into the Multifile.


Public Attributes

string _name
streampos _index_start
streampos _data_start
size_t _data_length
size_t _uncompressed_length
istream * _source
Filename _source_filename
int _flags
int _compression_level

Constructor & Destructor Documentation

Multifile::Subfile::Subfile  )  [inline]
 

Definition at line 175 of file multifile.I.

References _flags, and INLINE.


Member Function Documentation

bool Multifile::Subfile::is_data_invalid  )  const [inline]
 

Returns true if there was some problem reading the data contents of this Subfile, particularly when copying into the Multifile.

Definition at line 246 of file multifile.I.

bool Multifile::Subfile::is_deleted  )  const [inline]
 

Returns true if the Subfile indicates it has been deleted (removed from the index), false otherwise.

This should never be true of Subfiles that currently appear in either the _subfiles or _new_subfiles lists.

Definition at line 214 of file multifile.I.

bool Multifile::Subfile::is_index_invalid  )  const [inline]
 

Returns true if there was some problem reading the index record for this Subfile from the Multifile.

Definition at line 229 of file multifile.I.

bool Multifile::Subfile::operator< const Subfile &  other  )  const [inline]
 

Definition at line 193 of file multifile.I.

streampos Multifile::Subfile::read_index istream &  read,
streampos  fpos,
Multifile multfile
 

Reads the index record for the Subfile from the indicated istream.

Assumes the istream has already been positioned to the indicated stream position, fpos, the start of the index record. Returns the position within the file of the next index record.

Definition at line 1492 of file multifile.cxx.

void Multifile::Subfile::rewrite_index_data_start ostream &  write,
Multifile multifile
 

Seeks within the indicate fstream back to the index record and rewrites just the _data_start and _data_length part of the index record.

Definition at line 1748 of file multifile.cxx.

void Multifile::Subfile::rewrite_index_flags ostream &  write  ) 
 

Seeks within the indicate fstream back to the index record and rewrites just the _flags part of the index record.

Definition at line 1778 of file multifile.cxx.

Referenced by Multifile::read_subfile().

streampos Multifile::Subfile::write_data ostream &  write,
istream *  read,
streampos  fpos
 

Writes the data record for the Subfile to the indicated ostream: the actual contents of the Subfile.

Assumes the istream has already been positioned to the indicated stream position, fpos, the start of the data record, and that this is the effective end of the file. Returns the position within the file of the next data record.

The _data_start, _data_length, and _uncompressed_length members are updated by this operation.

If the "read" pointer is non-NULL, it is the readable istream of a Multifile in which the Subfile might already be packed. This is used for reading the contents of the Subfile during a repack() operation.

Definition at line 1645 of file multifile.cxx.

streampos Multifile::Subfile::write_index ostream &  write,
streampos  fpos,
Multifile multifile
 

Writes the index record for the Subfile to the indicated ostream.

Assumes the istream has already been positioned to the indicated stream position, fpos, the start of the index record, and that this is the effective end of the file. Returns the position within the file of the next index record.

The _index_start member is updated by this operation.

Definition at line 1567 of file multifile.cxx.


Member Data Documentation

int Multifile::Subfile::_compression_level
 

Definition at line 130 of file multifile.h.

size_t Multifile::Subfile::_data_length
 

Definition at line 125 of file multifile.h.

streampos Multifile::Subfile::_data_start
 

Definition at line 124 of file multifile.h.

int Multifile::Subfile::_flags
 

Definition at line 129 of file multifile.h.

Referenced by Subfile().

streampos Multifile::Subfile::_index_start
 

Definition at line 123 of file multifile.h.

string Multifile::Subfile::_name
 

Definition at line 122 of file multifile.h.

Referenced by Multifile::streampos_to_word().

istream* Multifile::Subfile::_source
 

Definition at line 127 of file multifile.h.

Referenced by Multifile::open_read_subfile().

Filename Multifile::Subfile::_source_filename
 

Definition at line 128 of file multifile.h.

size_t Multifile::Subfile::_uncompressed_length
 

Definition at line 126 of file multifile.h.


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:52:29 2003 for Panda by doxygen1.3