XCKS file version 1 handler.
More...
#include <xcksfilereader_1.hpp>
|
enum class | XMLTags : int16_t {
BAD_TAG = INT16_MIN
, SEQ_BEGIN = INT16_MIN / 2
, CHECKSUMSFILE = 0x001
, GENERATED = 0x100
,
ALGORITHMS = 0x300
, ALGORITHM = 0x201
, LOCALFILES = 0x500
, PARENTDIRECTORY = 0x510
,
DIRECTORY = 0x520
, FILE = 0x530
, INFORMATION = 0x531
, CHECKSUM = 0x532
} |
| Known XML tags. More...
|
|
|
static const std::string | parentDir = ".." |
| Parent directory on Unix and windows. More...
|
|
XCKS file version 1 handler.
Definition at line 54 of file xcksfilereader_1.hpp.
◆ XMLTags
Known XML tags.
Enumerator |
---|
BAD_TAG | Bad or unknown tag.
|
SEQ_BEGIN | Beginning of a sequence.
|
CHECKSUMSFILE | checksumsFile element
|
GENERATED | generated element
|
ALGORITHMS | algorithms element
|
ALGORITHM | algorithm element
|
LOCALFILES | localFiles element
|
PARENTDIRECTORY | parentDirectory element
|
DIRECTORY | directory element
|
FILE | file element
|
INFORMATION | information element
|
CHECKSUM | checksum element
|
Definition at line 58 of file xcksfilereader_1.hpp.
◆ XCKS1FileHandler() [1/3]
libxcks::XCKS1FileHandler::XCKS1FileHandler |
( |
| ) |
|
|
delete |
Deleted default constructor.
◆ XCKS1FileHandler() [2/3]
Deleted copy constructor.
◆ XCKS1FileHandler() [3/3]
libxcks::XCKS1FileHandler::XCKS1FileHandler |
( |
XCKSReaderHandler & |
handler, |
|
|
const std::filesystem::path & |
baseDir |
|
) |
| |
Constructor.
- Parameters
-
handler | The XCKS file reader handler. |
baseDir | The base directory of the (Z)XCKS file to read. Must be an absolute path name. |
Definition at line 93 of file xcksfilereader_1.cpp.
◆ ~XCKS1FileHandler()
libxcks::XCKS1FileHandler::~XCKS1FileHandler |
( |
| ) |
|
|
virtual |
◆ characters()
void libxcks::XCKS1FileHandler::characters |
( |
const std::string & |
chars | ) |
|
|
overridevirtualnoexcept |
◆ endElement()
void libxcks::XCKS1FileHandler::endElement |
( |
const std::string & |
name | ) |
|
|
overridevirtualnoexcept |
◆ endFileElement()
void libxcks::XCKS1FileHandler::endFileElement |
( |
| ) |
|
|
inlineprotectednoexcept |
Receives notification of the end of a "file" element.
- Parameters
-
atts | The attributes attached to the element. |
Definition at line 690 of file xcksfilereader_1.cpp.
◆ fatalError()
void libxcks::XCKS1FileHandler::fatalError |
( |
XML_Error |
errorCode, |
|
|
const std::string & |
errorMessage, |
|
|
int |
line, |
|
|
int |
column |
|
) |
| |
|
overridevirtualnoexcept |
Receive notification of a non-recoverable error.
- Parameters
-
errorCode | The error code. |
errorMessage | The error message. |
line | The line number the text where the error has occurred. |
column | The column number where the error has occurred. |
Reimplemented from libxcks::XMLParserDefaultHandler.
Definition at line 838 of file xcksfilereader_1.cpp.
◆ operator=()
Deleted copy assignment operator.
◆ startAlgorithmElement()
Receives notification of the beginning of a "algorithm" element.
- Parameters
-
atts | The attributes attached to the element. |
Definition at line 236 of file xcksfilereader_1.cpp.
◆ startAlgorithmsElement()
Receives notification of the beginning of a "algorithms" element.
- Parameters
-
atts | The attributes attached to the element. |
Definition at line 207 of file xcksfilereader_1.cpp.
◆ startChecksumElement()
Receives notification of the beginning of a "checksum" element.
- Parameters
-
atts | The attributes attached to the element. |
Definition at line 546 of file xcksfilereader_1.cpp.
◆ startDirectoryElement()
Receives notification of the beginning of a "directory" element.
- Parameters
-
atts | The attributes attached to the element. |
Definition at line 371 of file xcksfilereader_1.cpp.
◆ startElement()
void libxcks::XCKS1FileHandler::startElement |
( |
const std::string & |
name, |
|
|
const XMLParserAttributes & |
atts |
|
) |
| |
|
overridevirtualnoexcept |
◆ startFileElement()
Receives notification of the beginning of a "file" element.
- Parameters
-
atts | The attributes attached to the element. |
Definition at line 427 of file xcksfilereader_1.cpp.
◆ startGeneratedElement()
Receives notification of the beginning of a "generated" element.
- Parameters
-
atts | The attributes attached to the element. |
- Todo:
- Make a full ISO8601 parser
Definition at line 156 of file xcksfilereader_1.cpp.
◆ startInformationElement()
Receives notification of the beginning of a "information" element.
- Parameters
-
atts | The attributes attached to the element. |
- Todo:
- Make a full ISO8601 parser
Definition at line 487 of file xcksfilereader_1.cpp.
◆ startLocalFilesElement()
Receives notification of the beginning of a "localFiles" element.
- Parameters
-
atts | The attributes attached to the element. |
Definition at line 294 of file xcksfilereader_1.cpp.
◆ startParentDirectoryElement()
void libxcks::XCKS1FileHandler::startParentDirectoryElement |
( |
const XMLParserAttributes & |
atts | ) |
|
|
inlineprotectednoexcept |
Receives notification of the beginning of a "parentDirectory" element.
- Parameters
-
atts | The attributes attached to the element. |
Definition at line 323 of file xcksfilereader_1.cpp.
◆ stringToXMLTags()
Gets a XML tag identifier from a string.
- Parameters
-
- Returns
- The XML tag identifier corresponding to
str
content or BAD_TAG
if str
contains an unknown tag.
Definition at line 123 of file xcksfilereader_1.cpp.
◆ algosToRead
◆ baseDirectory
const std::filesystem::path libxcks::XCKS1FileHandler::baseDirectory |
|
protected |
◆ baseDirectoryDirs
const std::vector<std::filesystem::path> libxcks::XCKS1FileHandler::baseDirectoryDirs |
|
protected |
◆ curBaseDirectoryDir
ssize_t libxcks::XCKS1FileHandler::curBaseDirectoryDir |
|
protected |
Current directory in the base directory of the checksums' file name.
Definition at line 79 of file xcksfilereader_1.hpp.
◆ currentRelativeDirectory
ArrayString libxcks::XCKS1FileHandler::currentRelativeDirectory |
|
protected |
◆ fileLength
uintmax_t libxcks::XCKS1FileHandler::fileLength |
|
protected |
◆ fileName
std::string libxcks::XCKS1FileHandler::fileName |
|
protected |
◆ lastFileModicationTime
time_t libxcks::XCKS1FileHandler::lastFileModicationTime |
|
protected |
◆ namesInDirectories
std::stack<StringSet> libxcks::XCKS1FileHandler::namesInDirectories |
|
protected |
◆ parentDir
const string libxcks::XCKS1FileHandler::parentDir = ".." |
|
staticprotected |
◆ possibleSumsAlgosName
const StringSet libxcks::XCKS1FileHandler::possibleSumsAlgosName |
|
protected |
◆ readChecksumsValues
◆ readerHandler
◆ readTags
std::stack<XMLTags> libxcks::XCKS1FileHandler::readTags |
|
protected |
◆ sumsAlgos
◆ tagInChecksumsFileTag
XMLTags libxcks::XCKS1FileHandler::tagInChecksumsFileTag |
|
protected |
◆ tagInFileTag
XMLTags libxcks::XCKS1FileHandler::tagInFileTag |
|
protected |
The documentation for this class was generated from the following files: