#include <md5file.hpp>
Inheritance diagram for MD5File:
Public Member Functions | |
virtual Checksum * | getChecksumCalculator () const |
Returns an instance of a class that permits to compute the MD5 value. | |
virtual wxString | getFileType () const |
Returns the type of the file. | |
MD5File () | |
Default constructor. | |
virtual bool | read (const wxFileName &fileName) |
Reads the checksums from a MD5 file. | |
virtual bool | write (const wxFileName &fileName) |
Writes the checksums in a file. | |
Static Public Member Functions | |
SumFile * | getNewInstance () |
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 MD5File &source) |
Clones the source instance in this instance. | |
Private Member Functions | |
MD5File (const MD5File &source) | |
Copy constructor. | |
virtual MD5File & | operator= (const MD5File &source) |
Assignment operator. |
Definition at line 38 of file md5file.hpp.
|
Copy constructor.
Definition at line 82 of file md5file.cpp. References clone(). |
|
Default constructor.
Definition at line 57 of file md5file.cpp. Referenced by getNewInstance(). |
|
Clones the source instance in this instance. Don't forget to call this method when cloning inherited classes.
Definition at line 70 of file md5file.cpp. References clone(). Referenced by clone(), MD5File(), and operator=(). |
|
Returns an instance of a class that permits to compute the MD5 value.
The calling function is responsible of the deletion of the instance with the
Implements SumFile. Definition at line 111 of file md5file.cpp. |
|
Returns the type of the file.
Implements SumFile. Definition at line 123 of file md5file.cpp. |
|
Gets a new instance of this class.
The caller is responsible of the deletion of the instance with the
Definition at line 425 of file md5file.cpp. References MD5File(). |
|
Indicates if the given checksum is valid.
Definition at line 384 of file md5file.cpp. References IsValidChecksum(). Referenced by IsValidChecksum(), and read(). |
|
Assignment operator.
Definition at line 95 of file md5file.cpp. References clone(), and operator=(). Referenced by operator=(). |
|
Reads the checksums from a MD5 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 The information about the type of the file (text or binary) is skipped, wxChecksums always reads files in binary mode.
Implements SumFile. Definition at line 147 of file md5file.cpp. References AppPrefs::get(), IsValidChecksum(), read(), AppPrefs::readLong(), and SumFile::reset(). Referenced by openChecksumFile(), and read(). |
|
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 As wxChecksums always reads files in binary mode, all the file are marked as binary files.
Implements SumFile. Definition at line 269 of file md5file.cpp. References AppPrefs::get(), getAppName(), ChecksumData::getChecksum(), SumFile::getChecksumDataBegin(), SumFile::getChecksumDataBeginI(), SumFile::getChecksumDataEnd(), SumFile::getChecksumDataEndI(), ChecksumData::getFileName(), AppPrefs::readBool(), AppPrefs::readLong(), ChecksumData::setFileName(), write(), wxCGetFileLength, and wxCOff_t. Referenced by write(). |