libxcks  0.1.0.1
libxcks::ZXCKSWriterOptions Class Reference

Provides options for the XCKS writer. More...

#include <handlers.hpp>

Inheritance diagram for libxcks::ZXCKSWriterOptions:
Collaboration diagram for libxcks::ZXCKSWriterOptions:

Public Member Functions

 ZXCKSWriterOptions (const bool writeGeneratedElement=true, const bool writeFileSize=true, const bool writeFileDateTime=true, const bool useCompactXML=true, const bool useTabsforIndentation=false, const unsigned int nbIndentSpaces=default_indent_spaces, const bool checkReturnedChecksums=true, const std::string applicationWriter=std::string(), const std::string applicationVersion=std::string(), const bool writeLibXCKSVersion=false, const int compressionLevel=default_compression_level)
 Constructor. More...
 
virtual ~ZXCKSWriterOptions ()=default
 Destructor. More...
 
virtual int getCompressionLevel () const final
 Returns the compression level to use. More...
 
virtual void setCompressionLevel (const int level) final
 Sets the compression level. More...
 
- Public Member Functions inherited from libxcks::XCKSWriterOptions
 XCKSWriterOptions (const bool writeGeneratedElement=true, const bool writeFileSize=true, const bool writeFileDateTime=true, const bool useCompactXML=false, const bool useTabsforIndentation=false, const unsigned int nbIndentSpaces=default_indent_spaces, const bool checkReturnedChecksums=true, const std::string applicationWriter=std::string(), const std::string applicationVersion=std::string(), const bool writeLibXCKSVersion=false)
 Constructor. More...
 
virtual ~XCKSWriterOptions ()=default
 Destructor. More...
 
virtual bool writeGeneratedElement () const final
 Indicates whether the generated element must be written in the XCKS file. More...
 
virtual void setWriteGeneratedElement (const bool writeGeneratedElement) final
 Sets if the generated element must be written in the XCKS file. More...
 
virtual bool writeFileSize () const final
 Indicates whether the files' size must be written in the XCKS file. More...
 
virtual void setWriteFileSize (const bool writeFileSize) final
 Sets if the files' size must be written in the XCKS file. More...
 
virtual bool writeFileDateTime () const final
 Indicates whether the files' date/time must be written in the XCKS file. More...
 
virtual void setWriteFileDateTime (const bool writeFileDateTime) final
 Sets if the files' date/time must be written in the XCKS file. More...
 
virtual bool useCompactXML () const final
 Indicates whether the XCKS file must be written in its compact form or not. More...
 
virtual void setUseCompactXML (const bool useCompactXML) final
 Sets if the XCKS file must be written in its compact form or not. More...
 
virtual bool useTabsforIndentation () const final
 Indicates which type of indentation should be used when writing the XCKS file. More...
 
virtual void setUseTabsforIndentation (const bool useTabsforIndentation) final
 Sets which type of indentation should be used when writing the XCKS file. More...
 
virtual unsigned int getIndentSpaces () const final
 Returns the number of spaces to use for indention (meaningful only if useTabsforIndentation() returns false). More...
 
virtual void setIndentSpaces (const unsigned int nbIndentSpaces) final
 Sets the number of spaces to use for indention (meaningful only if useTabsforIndentation() returns false). More...
 
virtual bool checkReturnedChecksums () const final
 Indicates whether all checksums values returned by an XCKSWriterChecksumProvider instance must be verified. More...
 
virtual void setCheckReturnedChecksums (const bool checkReturnedChecksums) final
 Sets if all checksums values returned by an XCKSWriterChecksumProvider instance must be verified. More...
 
virtual std::string getApplicationWriter () const final
 Gets the name of the application using libxcks to write the XCKS file. More...
 
virtual void setApplicationWriter (const std::string &applicationWriter) final
 Sets the name of the application using libxcks to write the XCKS file. More...
 
virtual std::string getApplicationWriterVersion () const final
 Gets the version of the application using libxcks to write the XCKS file. More...
 
virtual void setApplicationWriterVersion (const std::string &applicationVersion) final
 Sets the version of the application using libxcks to write the XCKS file. More...
 
virtual bool writeLibXCKSVersion () const final
 Indicates whether the name and version of the libxcks must be written with the application name and version. More...
 
virtual void setWriteLibXCKSVersion (const bool writeLibXCKSVersion) final
 Sets if the name and version of the libxcks must be written with the application name and version. More...
 

Static Public Attributes

static constexpr int min_compression_level = 1
 Minimum compression level. More...
 
static constexpr int max_compression_level = 9
 Maximum compression level. More...
 
static constexpr int default_compression_level = max_compression_level
 Default compression level. More...
 

Additional Inherited Members

- Static Protected Attributes inherited from libxcks::XCKSWriterOptions
static constexpr unsigned int default_indent_spaces = 2u
 Default number of spaces to use for indentation. More...
 

Detailed Description

Provides options for the XCKS writer.

Definition at line 1070 of file handlers.hpp.

Constructor & Destructor Documentation

◆ ZXCKSWriterOptions()

libxcks::ZXCKSWriterOptions::ZXCKSWriterOptions ( const bool  writeGeneratedElement = true,
const bool  writeFileSize = true,
const bool  writeFileDateTime = true,
const bool  useCompactXML = true,
const bool  useTabsforIndentation = false,
const unsigned int  nbIndentSpaces = default_indent_spaces,
const bool  checkReturnedChecksums = true,
const std::string  applicationWriter = std::string(),
const std::string  applicationVersion = std::string(),
const bool  writeLibXCKSVersion = false,
const int  compressionLevel = default_compression_level 
)

Constructor.

Parameters
[in]writeGeneratedElementtrue if the generated element must be written, false otherwise.
[in]writeFileSizetrue if the files' size must be written in the XCKS file, false otherwise.
[in]writeFileDateTimetrue if the files' date/time must be written in the XCKS file, false otherwise.
[in]useCompactXMLtrue if the XCKS file must be written in its compact form, false otherwise.
[in]useTabsforIndentationtrue for writing tabs, false for writing spaces.
[in]nbIndentSpacesThe number of spaces to use for indention. Must be between 1 and max_indent_spaces.
[in]checkReturnedChecksumstrue to check the validity of all checksums values returned by an XCKSWriterChecksumProvider instance, false otherwise.
[in]applicationWriterThe name of the application using libxcks to write the XCKS file or an empty string to not write the name and version the application.
[in]applicationVersionThe version of the application using libcks to write the XCKS file or an empty string to not write the name and version the application.
[in]writeLibXCKSVersiontrue to write the name and version of the libxcks with the application name and version, false otherwise. If appWriter or appWriterVersion are empty, the name and version of the libxcks is always written.
[in]compressionLevelThe compression level between 1 (faster) and 9 (better compression).

Definition at line 90 of file handlers.cpp.

◆ ~ZXCKSWriterOptions()

virtual libxcks::ZXCKSWriterOptions::~ZXCKSWriterOptions ( )
virtualdefault

Destructor.

Member Function Documentation

◆ getCompressionLevel()

virtual int libxcks::ZXCKSWriterOptions::getCompressionLevel ( ) const
inlinefinalvirtual

Returns the compression level to use.

Returns
The compression level to use.

Definition at line 1134 of file handlers.hpp.

◆ setCompressionLevel()

void libxcks::ZXCKSWriterOptions::setCompressionLevel ( const int  level)
finalvirtual

Sets the compression level.

Parameters
[in]levelThe compression level between 1 (faster) and 9 (better compression).

Definition at line 114 of file handlers.cpp.

Member Data Documentation

◆ default_compression_level

constexpr int libxcks::ZXCKSWriterOptions::default_compression_level = max_compression_level
staticconstexpr

Default compression level.

Definition at line 1078 of file handlers.hpp.

◆ max_compression_level

constexpr int libxcks::ZXCKSWriterOptions::max_compression_level = 9
staticconstexpr

Maximum compression level.

Definition at line 1077 of file handlers.hpp.

◆ min_compression_level

constexpr int libxcks::ZXCKSWriterOptions::min_compression_level = 1
staticconstexpr

Minimum compression level.

Definition at line 1076 of file handlers.hpp.


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