libxcks  0.1.0.1
libxcks::ZXCKSReader Class Referencefinal

ZXCKS file reader. More...

#include <xcksreader.hpp>

Inheritance diagram for libxcks::ZXCKSReader:
Collaboration diagram for libxcks::ZXCKSReader:

Public Member Functions

 ZXCKSReader ()=delete
 Deleted default constructor. More...
 
 ZXCKSReader (const ZXCKSReader &)=delete
 Deleted copy constructor. More...
 
ZXCKSReaderoperator= (const ZXCKSReader &)=delete
 Deleted copy assignment operator. More...
 
 ZXCKSReader (XCKSReaderHandler &xcksReaderHandler)
 Constructor. More...
 
virtual ~ZXCKSReader ()
 Destructor. More...
 
bool parse (std::istream &is, const std::filesystem::path &basePath) override
 Parses an ZXCKS file from an input stream. More...
 
virtual bool parse (std::istream &is, const std::filesystem::path &basePath)
 Parses an XCKS file from an input stream. More...
 
virtual bool parse (const std::filesystem::path &fileFullPath)
 Parses an XCKS file from a file. More...
 
virtual bool parse (const std::filesystem::path &filePath, const std::filesystem::path &basePath)
 Parses an XCKS file from a file and a base path. More...
 
- Public Member Functions inherited from libxcks::XCKSReader
 XCKSReader ()=delete
 Deleted default constructor. More...
 
 XCKSReader (const XCKSReader &)=delete
 Deleted copy constructor. More...
 
XCKSReaderoperator= (const XCKSReader &)=delete
 Deleted copy assignment operator. More...
 
 XCKSReader (XCKSReaderHandler &xcksReaderHandler)
 Constructor. More...
 
virtual ~XCKSReader ()
 Destructor. More...
 
virtual bool parse (const std::filesystem::path &fileFullPath)
 Parses an XCKS file from a file. More...
 
virtual bool parse (const std::filesystem::path &filePath, const std::filesystem::path &basePath)
 Parses an XCKS file from a file and a base path. More...
 

Static Public Member Functions

static bool parseZXCKS (XCKSReaderHandler &xcksReaderHandler, std::istream &is, const std::filesystem::path &basePath)
 Convenience method for parsing an ZXCKS file from an input stream. More...
 
static bool parseZXCKS (XCKSReaderHandler &xcksReaderHandler, const std::filesystem::path &fileFullPath)
 Convenience method for parsing an ZXCKS file from a file. More...
 
static bool parseZXCKS (XCKSReaderHandler &xcksReaderHandler, const std::filesystem::path &filePath, const std::filesystem::path &basePath)
 Convenience method for parsing an ZXCKS file from a file and a base path. More...
 
- Static Public Member Functions inherited from libxcks::XCKSReader
static bool parseXCKS (XCKSReaderHandler &xcksReaderHandler, std::istream &is, const std::filesystem::path &basePath)
 Convenience method for parsing an XCKS file from an input stream. More...
 
static bool parseXCKS (XCKSReaderHandler &xcksReaderHandler, const std::filesystem::path &fileFullPath)
 Convenience method for parsing an XCKS file from a file. More...
 
static bool parseXCKS (XCKSReaderHandler &xcksReaderHandler, const std::filesystem::path &filePath, const std::filesystem::path &basePath)
 Convenience method for parsing an XCKS file from a file and a base path. More...
 

Additional Inherited Members

- Protected Attributes inherited from libxcks::XCKSReader
XCKSReaderHandlerreaderHandler
 The XCKS file reader handler. More...
 

Detailed Description

ZXCKS file reader.

Definition at line 175 of file xcksreader.hpp.

Constructor & Destructor Documentation

◆ ZXCKSReader() [1/3]

libxcks::ZXCKSReader::ZXCKSReader ( )
delete

Deleted default constructor.

◆ ZXCKSReader() [2/3]

libxcks::ZXCKSReader::ZXCKSReader ( const ZXCKSReader )
delete

Deleted copy constructor.

◆ ZXCKSReader() [3/3]

libxcks::ZXCKSReader::ZXCKSReader ( XCKSReaderHandler xcksReaderHandler)

Constructor.

Parameters
[in]xcksReaderHandlerThe XCKS file reader handler.

Definition at line 185 of file xcksreader.cpp.

◆ ~ZXCKSReader()

libxcks::ZXCKSReader::~ZXCKSReader ( )
virtual

Destructor.

Definition at line 195 of file xcksreader.cpp.

Member Function Documentation

◆ operator=()

ZXCKSReader& libxcks::ZXCKSReader::operator= ( const ZXCKSReader )
delete

Deleted copy assignment operator.

◆ parse() [1/4]

bool libxcks::XCKSReader::parse

Parses an XCKS file from a file.

Note
Errors must be handled in XCKSReaderHandler::onFatalError (the provided XCKS file reader's handler).
Parameters
[in]fileFullPathThe path of the file to parse. This path must be an absolute path.
Returns
true if the XCKS file has been successfully read from the given file, false otherwise.

Definition at line 96 of file xcksreader.cpp.

◆ parse() [2/4]

bool libxcks::XCKSReader::parse

Parses an XCKS file from a file and a base path.

Note
Errors must be handled in XCKSReaderHandler::onFatalError (the provided XCKS file reader's handler).
Parameters
[in]filePathThe path of the file to parse. This path can be an absolute path or relative path.
[in]basePathThe base path of the read XCKS file. It is independent from filePath. This path must be an absolute path of a directory and must ends with a path separator.
Returns
true if the XCKS file has been successfully read from the given file and base path, false otherwise.

Definition at line 113 of file xcksreader.cpp.

◆ parse() [3/4]

bool libxcks::XCKSReader::parse

Parses an XCKS file from an input stream.

Note
Errors must be handled in XCKSReaderHandler::onFatalError (the provided XCKS file reader's handler).
Parameters
[in,out]isThe input stream.
[in]basePathThe base path of the read XCKS file. This path must be an absolute path of a directory and must ends with a path separator.
Returns
true if the XCKS file has been successfully read from the given stream, false otherwise.

Definition at line 83 of file xcksreader.cpp.

◆ parse() [4/4]

bool libxcks::ZXCKSReader::parse ( std::istream &  is,
const std::filesystem::path &  basePath 
)
overridevirtual

Parses an ZXCKS file from an input stream.

Note
Errors must be handled in XCKSReaderHandler::onFatalError (the provided XCKS file reader's handler).
Parameters
[in,out]isThe input stream.
[in]basePathThe base path of the read ZXCKS file. This path must be an absolute path of a directory and must ends with a path separator.
Returns
true if the ZXCKS file has been successfully read from the given stream, false otherwise.
Todo:
Understand why no exception is caught.

Reimplemented from libxcks::XCKSReader.

Definition at line 204 of file xcksreader.cpp.

◆ parseZXCKS() [1/3]

bool libxcks::ZXCKSReader::parseZXCKS ( XCKSReaderHandler xcksReaderHandler,
const std::filesystem::path &  fileFullPath 
)
static

Convenience method for parsing an ZXCKS file from a file.

Note
Errors must be handled in XCKSReaderHandler::onFatalError (the provided XCKS file reader's handler).
Parameters
[in]xcksReaderHandlerThe XCKS file reader handler.
[in]fileFullPathThe path of the file to parse. This path must be an absolute path.
Returns
true if the ZXCKS file has been successfully read from the given file, false otherwise.

Definition at line 250 of file xcksreader.cpp.

◆ parseZXCKS() [2/3]

bool libxcks::ZXCKSReader::parseZXCKS ( XCKSReaderHandler xcksReaderHandler,
const std::filesystem::path &  filePath,
const std::filesystem::path &  basePath 
)
static

Convenience method for parsing an ZXCKS file from a file and a base path.

Note
Errors must be handled in XCKSReaderHandler::onFatalError (the provided XCKS file reader's handler).
Parameters
[in]xcksReaderHandlerThe XCKS file reader handler.
[in]filePathThe path of the file to parse. This path can be an absolute path or relative path.
[in]basePathThe base path of the read ZXCKS file. It is independent from filePath. This path must be an absolute path of a directory and must ends with a path separator.
Returns
true if the ZXCKS file has been successfully read from the given file and base path, false otherwise.

Definition at line 262 of file xcksreader.cpp.

◆ parseZXCKS() [3/3]

bool libxcks::ZXCKSReader::parseZXCKS ( XCKSReaderHandler xcksReaderHandler,
std::istream &  is,
const std::filesystem::path &  basePath 
)
static

Convenience method for parsing an ZXCKS file from an input stream.

Note
Errors must be handled in XCKSReaderHandler::onFatalError (the provided XCKS file reader's handler).
Parameters
[in]xcksReaderHandlerThe XCKS file reader handler.
[in,out]isThe input stream.
[in]basePathThe base path of the read ZXCKS file. This path must be an absolute path of a directory and must ends with a path separator.
Returns
true if the ZXCKS file has been successfully read from the given stream, false otherwise.

Definition at line 238 of file xcksreader.cpp.


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