25 #ifndef INC_CKFACTORY_HPP_BD675BE3_CCFF_4396_B7D2_C9BBC2529A71
26 #define INC_CKFACTORY_HPP_BD675BE3_CCFF_4396_B7D2_C9BBC2529A71
54 using ChecksumEntries = std::map<ChecksumAlgoId, ChecksumEntry>;
56 static ChecksumEntries checksumAlgorithms;
69 static void initialise();
72 static void cleanUp();
78 static Checksum* getNewInstance(
const std::string& name,
const bool lookInAltNames =
true);
84 static ChecksumValue getNullValue(
const std::string& name,
const bool lookInAltNames =
true);
90 static size_t getSize(
const std::string& name,
const bool lookInAltNames =
true);
96 static bool exists(
const std::string& name,
const bool lookInAltNames =
true);
99 static bool existsNoCase(
const std::string& name,
const bool lookInAltNames =
true);
108 static int getAlgorithmsCount();
111 static bool getAlgorithmId(
ChecksumAlgoId&
id,
const std::string& name,
const bool lookInAltNames =
true);
114 static bool getAlgorithmIdNoCase(
ChecksumAlgoId&
id,
const std::string& name,
const bool lookInAltNames =
true);
117 static bool getAlgorithmName(std::string& name,
const ChecksumAlgoId id);
120 static bool getAlgorithmName(std::string& name,
const std::string& altName);
126 static bool getAlgorithmAltNames(
ArrayString& altNames,
const std::string& name,
const bool nameCouldBeAlt =
true,
const bool giveName =
false);
129 static std::string getAlgorithmDescription(
const ChecksumAlgoId id);
132 static std::string getAlgorithmDescription(
const std::string& name,
const bool lookInAltNames =
true);
Interface for classes that compute checksums.
Stores the value of a checksum.
Represents an entry of the checksum or hash algorithms that the application knows.
Generates new instances of the subclasses of the Checksum class that the application knows.
ChecksumFactory & operator=(const ChecksumFactory &)=delete
Deleted assignment operator.
ChecksumFactory(const ChecksumFactory &)=delete
Deleted copy constructor.
Stores the value of a checksum.
Computes a checksum from a byte stream.
std::vector< ChecksumAlgoId > ArrayChecksumAlgoId
Array of ids of algorithms of checksums.
ChecksumAlgoId
Ids of algorithms of checksums.
std::vector< std::string > ArrayString
Array of strings.