Verifier class
#include <verify.hpp>
Interface: perform a verification.
A verification is performed by matching actual checksums against some reference checksums. A Verifier declares the interface for this matching process. The actual checksums are passed as constructor arguments in the concrete subclasses. Some Verifier types may return nullptr for their actual_id().
Function perform() does the match against the reference checksums passed as an argument.
Any Verifier can be either strict or not strict. A strict Verifier will produce a verified result only iff there is at least one block in the ChecksumSource that is identical to the list of actual Checksums. Iff the Verifier is not strict, its result will qualify as verified already iff every actual Checksum occurred at least in one block of the ChecksumSource.
Any Verifier is strict() by default.
Derived classes
- class AlbumVerifier final
- Verifier for a list of checksums accompanied by a ToC.
- class TracksetVerifier final
- Verifier for a set of checksums without a ToC.
Constructors, destructors, conversion operators
- ~Verifier() defaulted virtual noexcept
- Virtual default destructor.
Public functions
- auto actual_checksums() const -> const Checksums* noexcept
- Actual Checksums.
- auto actual_id() const -> const ARId* noexcept
- Actual ARId.
- auto clone() const -> std::unique_ptr<Verifier>
- Returns a deep copy of the instance.
- auto perform(const ChecksumSource& ref_sums) const -> std::unique_ptr<VerificationResult>
- Perform a verification.
- auto perform(const DBAR& ref_sums) const -> std::unique_ptr<VerificationResult>
- Perform a verification.
- void set_strict(const bool strict) noexcept
- Activate or deactivate strict verification.
- auto strict() const -> bool noexcept
- TRUE iff verification is peformed by a strict policy.
Function documentation
const Checksums* arcstk:: Verifier:: actual_checksums() const noexcept
Actual Checksums.
| Returns | Actual Checksums. |
|---|
std::unique_ptr<VerificationResult> arcstk:: Verifier:: perform(const ChecksumSource& ref_sums) const
Perform a verification.
| Parameters | |
|---|---|
| ref_sums in | Reference checksums to match against |
| Returns | The verification result |
std::unique_ptr<VerificationResult> arcstk:: Verifier:: perform(const DBAR& ref_sums) const
Perform a verification.
| Parameters | |
|---|---|
| ref_sums in | Reference checksums to match against |
| Returns | The verification result |
void arcstk:: Verifier:: set_strict(const bool strict) noexcept
Activate or deactivate strict verification.
| Parameters | |
|---|---|
| strict in | Activate strict verification by TRUE. |
bool arcstk:: Verifier:: strict() const noexcept
TRUE iff verification is peformed by a strict policy.
| Returns | TRUE iff verification is peformed by a strict policy. |
|---|