#include <checksumutil.hpp>
Inheritance diagram for ChecksumCalculator:
Public Types | |
enum | State { Ok = 0, Invalid, ReadError, FileNotFound, CantOpenFile, CanceledByUser } |
States that can be returned by the calculate or the check method. More... | |
Public Member Functions | |
State | calculate (wxInputStream &in, const ArrayChecksum &checksums, wxArrayString &sumValues) |
Calculates the checksums from the given stream. | |
State | calculate (wxInputStream &in, wxString &sumValue) |
Calculates the checksum from the given stream. | |
State | check (wxInputStream &in, const wxString &value) |
Checks the checksum from the given stream. | |
Checksum * | getChecksum () const |
Gets the checksum's instance use to calculate the checksums. | |
ChecksumProgress * | getChecksumProgress () const |
Gets the progress handler used to show the progression. | |
Checksum * | setChecksum (Checksum *checksum) |
Sets the checksum's instance use to calculate the checksums. | |
ChecksumProgress * | setChecksumProgress (ChecksumProgress *progressHandler) |
Sets the progress handler used to show the progression. | |
Protected Member Functions | |
ChecksumCalculator (Checksum *checksum, ChecksumProgress *progressHandler=NULL) | |
Constructor with a checksum instance to use and an optional progress handler. | |
ChecksumCalculator () | |
Default constructor. | |
size_t | getBufferSize () const |
Gets the size of the buffer to use for reading in the input stream. | |
size_t | setBufferSize (const size_t bufSize) |
Sets the size of the buffer to use for reading in the input stream. | |
Protected Attributes | |
size_t | bufferSize |
The size of the buffer to use for reading in the input stream. | |
ArrayChecksum | checksumCalc |
Checksum's instance use to calculate the checksums. | |
ChecksumProgress * | progress |
The progress handler used to show the progression. |
Provides an interface for showing the progression.
Don't pass this class by value and don't use the assignment operator on it.
Please note that all the pointers passed to this class are not freed, it is the responsability to the users of this class to free them.
Definition at line 60 of file checksumutil.hpp.
|
States that can be returned by the calculate or the check method.
Definition at line 64 of file checksumutil.hpp. Referenced by calculate(), and check(). |
|
Default constructor.
Definition at line 58 of file checksumutil.cpp. References checksumCalc, setBufferSize(), and setChecksumProgress(). |
|
Constructor with a checksum instance to use and an optional progress handler.
Definition at line 75 of file checksumutil.cpp. References checksumCalc, setBufferSize(), and setChecksumProgress(). |
|
Calculates the checksums from the given stream.
Definition at line 208 of file checksumutil.cpp. References calculate(), getBufferSize(), getChecksumProgress(), State, and ChecksumProgress::update(). |
|
Calculates the checksum from the given stream.
Definition at line 180 of file checksumutil.cpp. References calculate(), checksumCalc, and State. Referenced by calculate(), and check(). |
|
Checks the checksum from the given stream.
Definition at line 294 of file checksumutil.cpp. References calculate(), check(), and State. Referenced by check(). |
|
Gets the size of the buffer to use for reading in the input stream.
Definition at line 91 of file checksumutil.cpp. References bufferSize. Referenced by calculate(). |
|
Gets the checksum's instance use to calculate the checksums.
Definition at line 118 of file checksumutil.cpp. References checksumCalc. Referenced by setChecksum(). |
|
Gets the progress handler used to show the progression.
Definition at line 145 of file checksumutil.cpp. References progress. Referenced by calculate(), and setChecksumProgress(). |
|
Sets the size of the buffer to use for reading in the input stream.
Definition at line 104 of file checksumutil.cpp. References bufferSize, and setBufferSize(). Referenced by ChecksumCalculator(), and setBufferSize(). |
|
Sets the checksum's instance use to calculate the checksums.
Definition at line 131 of file checksumutil.cpp. References checksumCalc, getChecksum(), and setChecksum(). Referenced by setChecksum(). |
|
Sets the progress handler used to show the progression.
Definition at line 158 of file checksumutil.cpp. References getChecksumProgress(), progress, and setChecksumProgress(). Referenced by dlgBatchCreation::batchCreation(), ChecksumCalculator(), and setChecksumProgress(). |
|
The size of the buffer to use for reading in the input stream.
Definition at line 77 of file checksumutil.hpp. Referenced by getBufferSize(), and setBufferSize(). |
|
Checksum's instance use to calculate the checksums.
Definition at line 75 of file checksumutil.hpp. Referenced by calculate(), ChecksumCalculator(), getChecksum(), and setChecksum(). |
|
The progress handler used to show the progression.
Definition at line 76 of file checksumutil.hpp. Referenced by getChecksumProgress(), and setChecksumProgress(). |