Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

SFVFile Class Reference

A SFV file. More...

#include <sfvfile.hpp>

Inheritance diagram for SFVFile:

Inheritance graph
[legend]
Collaboration diagram for SFVFile:

Collaboration graph
[legend]
List of all members.

Public Member Functions

ChecksumgetChecksumCalculator () const
 Returns an instance of a class that permits to compute the CRC-32 value.

virtual wxString getFileType () const
 Returns the type of the file.

bool read (const wxFileName &fileName)
 Reads the checksums from a SFV file.

 SFVFile ()
 Default constructor.

bool write (const wxFileName &fileName)
 Writes the checksums in a file.


Static Public Member Functions

SumFilegetNewInstance ()
 Gets a new instance of this class.

bool IsValidChecksum (const wxString &checksum)
 Indicates if the given checksum is valid.


Protected Member Functions

void clone (const SFVFile &source)
 Clones the source instance in this instance.


Private Member Functions

virtual SFVFileoperator= (const SFVFile &source)
 Assignment operator.

 SFVFile (const SFVFile &source)
 Copy constructor.


Detailed Description

A SFV file.

Definition at line 38 of file sfvfile.hpp.


Constructor & Destructor Documentation

SFVFile::SFVFile const SFVFile source  )  [private]
 

Copy constructor.

Parameters:
source Source instance.

Definition at line 82 of file sfvfile.cpp.

References clone().

SFVFile::SFVFile  ) 
 

Default constructor.

Definition at line 57 of file sfvfile.cpp.

Referenced by getNewInstance().


Member Function Documentation

void SFVFile::clone const SFVFile source  )  [protected]
 

Clones the source instance in this instance.

Don't forget to call this method when cloning inherited classes.

Parameters:
source Source instance.

Definition at line 70 of file sfvfile.cpp.

References clone().

Referenced by clone(), operator=(), and SFVFile().

Checksum * SFVFile::getChecksumCalculator  )  const [virtual]
 

Returns an instance of a class that permits to compute the CRC-32 value.

The calling function is responsible of the deletion of the instance with the delete operator.

Returns:
An instance of a class that permits to compute the checksum value.

Implements SumFile.

Definition at line 111 of file sfvfile.cpp.

wxString SFVFile::getFileType  )  const [virtual]
 

Returns the type of the file.

Returns:
The type of the file.

Implements SumFile.

Definition at line 123 of file sfvfile.cpp.

SumFile * SFVFile::getNewInstance  )  [static]
 

Gets a new instance of this class.

The caller is responsible of the deletion of the instance with the delete operator.

Returns:
A new instance of this class.

Definition at line 423 of file sfvfile.cpp.

References SFVFile().

bool SFVFile::IsValidChecksum const wxString &  checksum  )  [static]
 

Indicates if the given checksum is valid.

Parameters:
checksum The checksum to check.

Definition at line 382 of file sfvfile.cpp.

References IsValidChecksum().

Referenced by IsValidChecksum(), and read().

SFVFile & SFVFile::operator= const SFVFile source  )  [private, virtual]
 

Assignment operator.

Parameters:
source Source instance.
Returns:
A reference on the instance.

Definition at line 95 of file sfvfile.cpp.

References clone(), and operator=().

Referenced by operator=().

bool SFVFile::read const wxFileName &  fileName  )  [virtual]
 

Reads the checksums from a SFV file.

After the reading of the file, the state of the file should be unmodified and on success, the checksum file name must be the given one (absolute path).

The paths of the files in the ChecksumData must be relative to the path of fileName.

Parameters:
fileName The file name from which the checksums are read.
Returns:
true if the file has been read successfully, false otherwise.

Implements SumFile.

Definition at line 144 of file sfvfile.cpp.

References AppPrefs::get(), IsValidChecksum(), read(), AppPrefs::readLong(), and SumFile::reset().

Referenced by openChecksumFile(), and read().

bool SFVFile::write const wxFileName &  fileName  )  [virtual]
 

Writes the checksums in a file.

After the writing of the file, the state of the file should be unmodified and the file name must be modified to fileName. The paths of the files in the ChecksumData must be relative to the path of fileName.

Parameters:
fileName The file name in which the checksums are written.
Returns:
true if the checksums have been written successfully, false otherwise.

Implements SumFile.

Definition at line 264 of file sfvfile.cpp.

References AppPrefs::get(), ChecksumData::getChecksum(), SumFile::getChecksumDataBegin(), SumFile::getChecksumDataBeginI(), SumFile::getChecksumDataEnd(), SumFile::getChecksumDataEndI(), ChecksumData::getFileName(), AppPrefs::readBool(), AppPrefs::readLong(), AppPrefs::readString(), ChecksumData::setFileName(), write(), wxCGetFileLength, and wxCOff_t.

Referenced by write().


The documentation for this class was generated from the following files:
Generated on Sun May 30 13:38:06 2004 for wxChecksums by doxygen 1.3.7