libxcks  0.1.0.1
libxcks::XCKSReaderDefaultHandler Class Reference

Default handler for reading XCKS files. More...

#include <handlers.hpp>

Inheritance diagram for libxcks::XCKSReaderDefaultHandler:
Collaboration diagram for libxcks::XCKSReaderDefaultHandler:

Public Member Functions

virtual ~XCKSReaderDefaultHandler ()=default
 Destructor. More...
 
void onChecksumsFile (const std::string &version) override
 Called on read checksumsFile element. More...
 
void onGenerated (const std::string &by, const std::string &version, const std::time_t on) override
 Called on read generated element. More...
 
void onAlgorithm (const ChecksumAlgoId type) override
 Called on read algorithm element. More...
 
void onAlgorithmsStart () override
 Called on read algorithms start tag. More...
 
void onAlgorithmsEnd () override
 Called on read algorithms end tag. More...
 
void onAlgorithms (const ArrayChecksumAlgoId &types) override
 Called on read algorithms element. More...
 
void onLocalFilesStart () override
 Called on read localFiles start tag. More...
 
void onLocalFilesEnd () override
 Called on read localFiles end tag. More...
 
void onParentDirectoryStart () override
 Called on read parentDirectory start tag. More...
 
void onParentDirectoryStart (const std::filesystem::path &path) override
 Called on read parentDirectory start tag. More...
 
void onParentDirectoryEnd () override
 Called on read parentDirectory end tag. More...
 
void onDirectoryStart (const std::string name) override
 Called on read directory start tag. More...
 
void onDirectoryStart (const std::filesystem::path &path) override
 Called on read directory start tag. More...
 
void onDirectoryEnd () override
 Called on read directory end tag. More...
 
void onFileStart (const std::string name) override
 Called on read file start tag. More...
 
void onFileStart (const std::filesystem::path &path) override
 Called on read file start tag. More...
 
void onFileEnd () override
 Called on read file end tag. More...
 
void onFileInformation (const uintmax_t size=Invalid_File_Size, const time_t date=Invalid_DateTime) override
 Called on read information tag (for file). More...
 
void onFileChecksum (const ChecksumValue &value) override
 Called on read checksum element (for file). More...
 
void onFile (const std::filesystem::path &path, const ArrayChecksumValue &checksums, const uintmax_t size=Invalid_File_Size, const time_t date=Invalid_DateTime) override
 Called on read file element. More...
 
void onFatalError (const std::string &errorMessage, int line, int column) override
 Called on a non-recoverable error. More...
 
- Public Member Functions inherited from libxcks::XCKSReaderHandler
virtual ~XCKSReaderHandler ()=default
 Destructor. More...
 

Detailed Description

Default handler for reading XCKS files.

Definition at line 208 of file handlers.hpp.

Constructor & Destructor Documentation

◆ ~XCKSReaderDefaultHandler()

virtual libxcks::XCKSReaderDefaultHandler::~XCKSReaderDefaultHandler ( )
virtualdefault

Destructor.

Member Function Documentation

◆ onAlgorithm()

void libxcks::XCKSReaderDefaultHandler::onAlgorithm ( const ChecksumAlgoId  type)
inlineoverridevirtual

Called on read algorithm element.

Parameters
[in]typeThe algorithm of the checksum.

Implements libxcks::XCKSReaderHandler.

Definition at line 236 of file handlers.hpp.

◆ onAlgorithms()

void libxcks::XCKSReaderDefaultHandler::onAlgorithms ( const ArrayChecksumAlgoId types)
inlineoverridevirtual

Called on read algorithms element.

Parameters
[in]typesThe algorithms of the checksum.

Implements libxcks::XCKSReaderHandler.

Definition at line 253 of file handlers.hpp.

◆ onAlgorithmsEnd()

void libxcks::XCKSReaderDefaultHandler::onAlgorithmsEnd ( )
inlineoverridevirtual

Called on read algorithms end tag.

Implements libxcks::XCKSReaderHandler.

Definition at line 246 of file handlers.hpp.

◆ onAlgorithmsStart()

void libxcks::XCKSReaderDefaultHandler::onAlgorithmsStart ( )
inlineoverridevirtual

Called on read algorithms start tag.

Implements libxcks::XCKSReaderHandler.

Definition at line 241 of file handlers.hpp.

◆ onChecksumsFile()

void libxcks::XCKSReaderDefaultHandler::onChecksumsFile ( const std::string &  version)
inlineoverridevirtual

Called on read checksumsFile element.

Parameters
[in]versionThe version of the XCKS file.

Implements libxcks::XCKSReaderHandler.

Definition at line 219 of file handlers.hpp.

◆ onDirectoryEnd()

void libxcks::XCKSReaderDefaultHandler::onDirectoryEnd ( )
inlineoverridevirtual

Called on read directory end tag.

Implements libxcks::XCKSReaderHandler.

Definition at line 299 of file handlers.hpp.

◆ onDirectoryStart() [1/2]

void libxcks::XCKSReaderDefaultHandler::onDirectoryStart ( const std::filesystem::path &  path)
inlineoverridevirtual

Called on read directory start tag.

Parameters
[in]pathThe full path of the directory.

Implements libxcks::XCKSReaderHandler.

Definition at line 294 of file handlers.hpp.

◆ onDirectoryStart() [2/2]

void libxcks::XCKSReaderDefaultHandler::onDirectoryStart ( const std::string  name)
inlineoverridevirtual

Called on read directory start tag.

Parameters
[in]nameThe name of the directory (without its path).

Implements libxcks::XCKSReaderHandler.

Definition at line 287 of file handlers.hpp.

◆ onFatalError()

void libxcks::XCKSReaderDefaultHandler::onFatalError ( const std::string &  errorMessage,
int  line,
int  column 
)
inlineoverridevirtual

Called on a non-recoverable error.

Note
If the error occurs before the parsing process has begun, the line and column have negative values.
Parameters
errorMessageThe error message.
lineThe line number the text where the error has occurred.
columnThe column number where the error has occurred.

Implements libxcks::XCKSReaderHandler.

Definition at line 359 of file handlers.hpp.

◆ onFile()

void libxcks::XCKSReaderDefaultHandler::onFile ( const std::filesystem::path &  path,
const ArrayChecksumValue checksums,
const uintmax_t  size = Invalid_File_Size,
const time_t  date = Invalid_DateTime 
)
inlineoverridevirtual

Called on read file element.

Parameters
[in]pathThe full path of the file.
[in]checksumsThe checksums associated to the file.
[in]sizeThe size of the file.
[in]dateThe date and time of the file.

Implements libxcks::XCKSReaderHandler.

Definition at line 344 of file handlers.hpp.

◆ onFileChecksum()

void libxcks::XCKSReaderDefaultHandler::onFileChecksum ( const ChecksumValue value)
inlineoverridevirtual

Called on read checksum element (for file).

Parameters
[in]valueThe type and the value of the checksum.

Implements libxcks::XCKSReaderHandler.

Definition at line 334 of file handlers.hpp.

◆ onFileEnd()

void libxcks::XCKSReaderDefaultHandler::onFileEnd ( )
inlineoverridevirtual

Called on read file end tag.

Implements libxcks::XCKSReaderHandler.

Definition at line 318 of file handlers.hpp.

◆ onFileInformation()

void libxcks::XCKSReaderDefaultHandler::onFileInformation ( const uintmax_t  size = Invalid_File_Size,
const time_t  date = Invalid_DateTime 
)
inlineoverridevirtual

Called on read information tag (for file).

Parameters
[in]sizeThe size of the file.
[in]dateThe date and time of the file.

Implements libxcks::XCKSReaderHandler.

Definition at line 326 of file handlers.hpp.

◆ onFileStart() [1/2]

void libxcks::XCKSReaderDefaultHandler::onFileStart ( const std::filesystem::path &  path)
inlineoverridevirtual

Called on read file start tag.

Parameters
[in]pathThe full path of the directory.

Implements libxcks::XCKSReaderHandler.

Definition at line 313 of file handlers.hpp.

◆ onFileStart() [2/2]

void libxcks::XCKSReaderDefaultHandler::onFileStart ( const std::string  name)
inlineoverridevirtual

Called on read file start tag.

Parameters
[in]nameThe name of the file (without its path).

Implements libxcks::XCKSReaderHandler.

Definition at line 306 of file handlers.hpp.

◆ onGenerated()

void libxcks::XCKSReaderDefaultHandler::onGenerated ( const std::string &  by,
const std::string &  version,
const std::time_t  on 
)
inlineoverridevirtual

Called on read generated element.

Parameters
[in]byThe name of the application that wrote the file.
[in]versionThe version of the application that wrote the file.
[in]onThe writing date and time of the file.

Implements libxcks::XCKSReaderHandler.

Definition at line 228 of file handlers.hpp.

◆ onLocalFilesEnd()

void libxcks::XCKSReaderDefaultHandler::onLocalFilesEnd ( )
inlineoverridevirtual

Called on read localFiles end tag.

Implements libxcks::XCKSReaderHandler.

Definition at line 263 of file handlers.hpp.

◆ onLocalFilesStart()

void libxcks::XCKSReaderDefaultHandler::onLocalFilesStart ( )
inlineoverridevirtual

Called on read localFiles start tag.

Implements libxcks::XCKSReaderHandler.

Definition at line 258 of file handlers.hpp.

◆ onParentDirectoryEnd()

void libxcks::XCKSReaderDefaultHandler::onParentDirectoryEnd ( )
inlineoverridevirtual

Called on read parentDirectory end tag.

Implements libxcks::XCKSReaderHandler.

Definition at line 280 of file handlers.hpp.

◆ onParentDirectoryStart() [1/2]

void libxcks::XCKSReaderDefaultHandler::onParentDirectoryStart ( )
inlineoverridevirtual

Called on read parentDirectory start tag.

Implements libxcks::XCKSReaderHandler.

Definition at line 268 of file handlers.hpp.

◆ onParentDirectoryStart() [2/2]

void libxcks::XCKSReaderDefaultHandler::onParentDirectoryStart ( const std::filesystem::path &  path)
inlineoverridevirtual

Called on read parentDirectory start tag.

Parameters
[in]pathThe full path of the directory.

Implements libxcks::XCKSReaderHandler.

Definition at line 275 of file handlers.hpp.


The documentation for this class was generated from the following file: