libxcks  0.1.0.1
libxcks::XCKSReaderHandler Class Referenceabstract

Handler for reading XCKS files. More...

#include <handlers.hpp>

Inheritance diagram for libxcks::XCKSReaderHandler:

Public Member Functions

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

Detailed Description

Handler for reading XCKS files.

Definition at line 49 of file handlers.hpp.

Constructor & Destructor Documentation

◆ ~XCKSReaderHandler()

virtual libxcks::XCKSReaderHandler::~XCKSReaderHandler ( )
virtualdefault

Destructor.

Member Function Documentation

◆ onAlgorithm()

virtual void libxcks::XCKSReaderHandler::onAlgorithm ( const ChecksumAlgoId  type)
pure virtual

Called on read algorithm element.

Parameters
[in]typeThe algorithm of the checksum.

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onAlgorithms()

virtual void libxcks::XCKSReaderHandler::onAlgorithms ( const ArrayChecksumAlgoId types)
pure virtual

Called on read algorithms element.

Parameters
[in]typesThe algorithms of the checksum.

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onAlgorithmsEnd()

virtual void libxcks::XCKSReaderHandler::onAlgorithmsEnd ( )
pure virtual

Called on read algorithms end tag.

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onAlgorithmsStart()

virtual void libxcks::XCKSReaderHandler::onAlgorithmsStart ( )
pure virtual

Called on read algorithms start tag.

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onChecksumsFile()

virtual void libxcks::XCKSReaderHandler::onChecksumsFile ( const std::string &  version)
pure virtual

Called on read checksumsFile element.

Parameters
[in]versionThe version of the XCKS file.

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onDirectoryEnd()

virtual void libxcks::XCKSReaderHandler::onDirectoryEnd ( )
pure virtual

Called on read directory end tag.

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onDirectoryStart() [1/2]

virtual void libxcks::XCKSReaderHandler::onDirectoryStart ( const std::filesystem::path &  path)
pure virtual

Called on read directory start tag.

Parameters
[in]pathThe full path of the directory.

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onDirectoryStart() [2/2]

virtual void libxcks::XCKSReaderHandler::onDirectoryStart ( const std::string  name)
pure virtual

Called on read directory start tag.

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

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onFatalError()

virtual void libxcks::XCKSReaderHandler::onFatalError ( const std::string &  errorMessage,
int  line,
int  column 
)
pure virtual

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.

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onFile()

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

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.

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onFileChecksum()

virtual void libxcks::XCKSReaderHandler::onFileChecksum ( const ChecksumValue value)
pure virtual

Called on read checksum element (for file).

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

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onFileEnd()

virtual void libxcks::XCKSReaderHandler::onFileEnd ( )
pure virtual

Called on read file end tag.

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onFileInformation()

virtual void libxcks::XCKSReaderHandler::onFileInformation ( const uintmax_t  size = Invalid_File_Size,
const time_t  date = Invalid_DateTime 
)
pure virtual

Called on read information tag (for file).

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

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onFileStart() [1/2]

virtual void libxcks::XCKSReaderHandler::onFileStart ( const std::filesystem::path &  path)
pure virtual

Called on read file start tag.

Parameters
[in]pathThe full path of the directory.

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onFileStart() [2/2]

virtual void libxcks::XCKSReaderHandler::onFileStart ( const std::string  name)
pure virtual

Called on read file start tag.

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

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onGenerated()

virtual void libxcks::XCKSReaderHandler::onGenerated ( const std::string &  by,
const std::string &  version,
const std::time_t  on 
)
pure virtual

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.

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onLocalFilesEnd()

virtual void libxcks::XCKSReaderHandler::onLocalFilesEnd ( )
pure virtual

Called on read localFiles end tag.

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onLocalFilesStart()

virtual void libxcks::XCKSReaderHandler::onLocalFilesStart ( )
pure virtual

Called on read localFiles start tag.

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onParentDirectoryEnd()

virtual void libxcks::XCKSReaderHandler::onParentDirectoryEnd ( )
pure virtual

Called on read parentDirectory end tag.

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onParentDirectoryStart() [1/2]

virtual void libxcks::XCKSReaderHandler::onParentDirectoryStart ( )
pure virtual

Called on read parentDirectory start tag.

Implemented in libxcks::XCKSReaderDefaultHandler.

◆ onParentDirectoryStart() [2/2]

virtual void libxcks::XCKSReaderHandler::onParentDirectoryStart ( const std::filesystem::path &  path)
pure virtual

Called on read parentDirectory start tag.

Parameters
[in]pathThe full path of the directory.

Implemented in libxcks::XCKSReaderDefaultHandler.


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