XCKS file writer.
More...
#include <xckswriter.hpp>
|
| | XCKSWriter ()=delete |
| | Deleted default constructor. More...
|
| |
| | XCKSWriter (const XCKSWriter &)=delete |
| | Deleted copy constructor. More...
|
| |
| XCKSWriter & | operator= (const XCKSWriter &)=delete |
| | Deleted copy assignment operator. More...
|
| |
| | XCKSWriter (XCKSWriterHandler &xcksWriterHandler, XCKSWriterChecksumProvider &checksumProvider, const XCKSWriterOptions &options, const Version version, const ArrayChecksumAlgoId &algoIds, const ChecksumFormatter::ConfigurationProvider &ckftConfProvider) |
| | Constructor. More...
|
| |
| virtual | ~XCKSWriter () |
| | Destructor. More...
|
| |
| bool | write (std::ostream &os, const std::filesystem::path &basePath, const ArrayPath &relativePaths) |
| | Writes an XCKS file to an output stream. More...
|
| |
| bool | write (const std::filesystem::path &fileFullPath, const ArrayPath &relativePaths) |
| | Writes an XCKS file to a file. More...
|
| |
| bool | write (const std::filesystem::path &filePath, const std::filesystem::path &basePath, const ArrayPath &relativePaths) |
| | Writes an XCKS file to a file with a different base path. More...
|
| |
|
| virtual bool | doWrite (std::ostream &os, const std::filesystem::path &basePath, const ArrayPath &relativePaths) |
| | Writes an XCKS file to an output stream. More...
|
| |
XCKS file writer.
Definition at line 46 of file xckswriter.hpp.
◆ XCKSWriter() [1/3]
| libxcks::XCKSWriter::XCKSWriter |
( |
| ) |
|
|
delete |
Deleted default constructor.
◆ XCKSWriter() [2/3]
| libxcks::XCKSWriter::XCKSWriter |
( |
const XCKSWriter & |
| ) |
|
|
delete |
Deleted copy constructor.
◆ XCKSWriter() [3/3]
Constructor.
- Parameters
-
| xcksWriterHandler | The XCKS file reader handler. |
| checksumProvider | The provider of checksums values from an array of of wanted algorithms of checksums. |
| options | Options of the XCKS writer. |
| version | The wanted version of XCKS specification file. |
| algoIds | The algorithms to compute for each file. Each algorithm must appears only once in the array. |
| ckftConfProvider | Configuration provider for ChecksumFormatter. |
Definition at line 55 of file xckswriter.cpp.
◆ ~XCKSWriter()
| libxcks::XCKSWriter::~XCKSWriter |
( |
| ) |
|
|
virtual |
◆ doWrite()
| bool libxcks::XCKSWriter::doWrite |
( |
std::ostream & |
os, |
|
|
const std::filesystem::path & |
basePath, |
|
|
const ArrayPath & |
relativePaths |
|
) |
| |
|
protectedvirtual |
Writes an XCKS file to an output stream.
Call this method only after checkBaseDirAndPathList().
- Note
- Errors must be handled in
XCKSWriterHandler::onFatalError, XCKSWriterHandler::onFileGetChecksumsError, XCKSWriterHandler::onFileGetChecksumError and XCKSWriterHandler::onFileReadError (the provided XCKS file writer's handler).
- Parameters
-
| [in,out] | os | The output stream. |
| [in] | basePath | The base path of the written XCKS file. This path must be an absolute path of a directory and must ends with a path separator. |
| [in] | relativePaths | Relative paths (to basePath) of files to add in the XCKS file. |
- Returns
true if the XCKS file has been successfully written to the given stream, false otherwise.
Reimplemented in libxcks::ZXCKSWriter.
Definition at line 190 of file xckswriter.cpp.
◆ operator=()
Deleted copy assignment operator.
◆ write() [1/3]
| bool libxcks::XCKSWriter::write |
( |
const std::filesystem::path & |
fileFullPath, |
|
|
const ArrayPath & |
relativePaths |
|
) |
| |
◆ write() [2/3]
| bool libxcks::XCKSWriter::write |
( |
const std::filesystem::path & |
filePath, |
|
|
const std::filesystem::path & |
basePath, |
|
|
const ArrayPath & |
relativePaths |
|
) |
| |
Writes an XCKS file to a file with a different base path.
- Note
- Errors must be handled in
XCKSWriterHandler::onFatalError, XCKSWriterHandler::onFileGetChecksumsError, XCKSWriterHandler::onFileGetChecksumError and XCKSWriterHandler::onFileReadError (the provided XCKS file writer's handler).
- Parameters
-
| [in] | filePath | The path of the XCKS file to write. This path can be an absolute path or relative path. |
| [in] | basePath | The base path of the written XCKS file. This path must be an absolute path of a directory and must ends with a path separator. |
| [in] | relativePaths | Relative paths (to basePath) of files to add in the XCKS file. |
- Returns
true if the XCKS file has been successfully written in the given file, false otherwise.
Definition at line 129 of file xckswriter.cpp.
◆ write() [3/3]
| bool libxcks::XCKSWriter::write |
( |
std::ostream & |
os, |
|
|
const std::filesystem::path & |
basePath, |
|
|
const ArrayPath & |
relativePaths |
|
) |
| |
Writes an XCKS file to an output stream.
- Note
- Errors must be handled in
XCKSWriterHandler::onFatalError, XCKSWriterHandler::onFileGetChecksumsError, XCKSWriterHandler::onFileGetChecksumError and XCKSWriterHandler::onFileReadError (the provided XCKS file writer's handler).
- Parameters
-
| [in,out] | os | The output stream. |
| [in] | basePath | The base path of the written XCKS file. This path must be an absolute path of a directory and must ends with a path separator. |
| [in] | relativePaths | Relative paths (to basePath) of files to add in the XCKS file. |
- Returns
true if the XCKS file has been successfully written to the given stream, false otherwise.
Definition at line 84 of file xckswriter.cpp.
◆ ckfConfProvider
◆ ckProvider
◆ sumsAlgos
Type of algorithms' checksums to write for each file.
Definition at line 53 of file xckswriter.hpp.
◆ version
| const Version libxcks::XCKSWriter::version |
|
protected |
Version of the (Z)XCKS file to write.
Definition at line 52 of file xckswriter.hpp.
◆ writerHandler
◆ writerOptions
The documentation for this class was generated from the following files: