libxcks  0.1.0.1
libxcks::XCKSWriterOptions Class Reference

Provides options for the XCKS writer. More...

#include <handlers.hpp>

Inheritance diagram for libxcks::XCKSWriterOptions:

Public Member Functions

 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 Protected Attributes

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 817 of file handlers.hpp.

Constructor & Destructor Documentation

◆ XCKSWriterOptions()

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.

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.

Definition at line 43 of file handlers.cpp.

◆ ~XCKSWriterOptions()

virtual libxcks::XCKSWriterOptions::~XCKSWriterOptions ( )
virtualdefault

Destructor.

Member Function Documentation

◆ checkReturnedChecksums()

virtual bool libxcks::XCKSWriterOptions::checkReturnedChecksums ( ) const
inlinefinalvirtual

Indicates whether all checksums values returned by an XCKSWriterChecksumProvider instance must be verified.

Returns
true to check the validity of all checksums values returned by an XCKSWriterChecksumProvider instance, false otherwise.

Definition at line 988 of file handlers.hpp.

◆ getApplicationWriter()

virtual std::string libxcks::XCKSWriterOptions::getApplicationWriter ( ) const
inlinefinalvirtual

Gets the name of the application using libxcks to write the XCKS file.

Returns
The name of the application using libxcks to write the XCKS file or an empty string to not write the name and version the application.

Definition at line 1007 of file handlers.hpp.

◆ getApplicationWriterVersion()

virtual std::string libxcks::XCKSWriterOptions::getApplicationWriterVersion ( ) const
inlinefinalvirtual

Gets the version of the application using libxcks to write the XCKS file.

Returns
The version of the application using libxcks to write the XCKS file or an empty string to not write the name and version the application.

Definition at line 1026 of file handlers.hpp.

◆ getIndentSpaces()

virtual unsigned int libxcks::XCKSWriterOptions::getIndentSpaces ( ) const
inlinefinalvirtual

Returns the number of spaces to use for indention (meaningful only if useTabsforIndentation() returns false).

Returns
The number of spaces to use for indention.

Definition at line 970 of file handlers.hpp.

◆ setApplicationWriter()

virtual void libxcks::XCKSWriterOptions::setApplicationWriter ( const std::string &  applicationWriter)
inlinefinalvirtual

Sets the name of the application using libxcks to write the XCKS file.

Parameters
[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.

Definition at line 1017 of file handlers.hpp.

◆ setApplicationWriterVersion()

virtual void libxcks::XCKSWriterOptions::setApplicationWriterVersion ( const std::string &  applicationVersion)
inlinefinalvirtual

Sets the version of the application using libxcks to write the XCKS file.

Parameters
[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.

Definition at line 1035 of file handlers.hpp.

◆ setCheckReturnedChecksums()

virtual void libxcks::XCKSWriterOptions::setCheckReturnedChecksums ( const bool  checkReturnedChecksums)
inlinefinalvirtual

Sets if all checksums values returned by an XCKSWriterChecksumProvider instance must be verified.

Parameters
[in]checkReturnedChecksumstrue to check the validity of all checksums values returned by an XCKSWriterChecksumProvider instance, false otherwise.

Definition at line 999 of file handlers.hpp.

◆ setIndentSpaces()

void libxcks::XCKSWriterOptions::setIndentSpaces ( const unsigned int  nbIndentSpaces)
finalvirtual

Sets the number of spaces to use for indention (meaningful only if useTabsforIndentation() returns false).

Parameters
[in]nbIndentSpacesThe number of spaces to use for indention. Must be between 1 and max_indent_spaces.

Definition at line 72 of file handlers.cpp.

◆ setUseCompactXML()

virtual void libxcks::XCKSWriterOptions::setUseCompactXML ( const bool  useCompactXML)
inlinefinalvirtual

Sets if the XCKS file must be written in its compact form or not.

Parameters
[in]useCompactXMLtrue if the XCKS file must be written in its compact form, false otherwise.

Definition at line 946 of file handlers.hpp.

◆ setUseTabsforIndentation()

virtual void libxcks::XCKSWriterOptions::setUseTabsforIndentation ( const bool  useTabsforIndentation)
inlinefinalvirtual

Sets which type of indentation should be used when writing the XCKS file.

Parameters
[in]useTabsforIndentationtrue for writing tabs, false for writing spaces.

Definition at line 962 of file handlers.hpp.

◆ setWriteFileDateTime()

virtual void libxcks::XCKSWriterOptions::setWriteFileDateTime ( const bool  writeFileDateTime)
inlinefinalvirtual

Sets if the files' date/time must be written in the XCKS file.

Parameters
[in]writeFileDateTimetrue if the files' date/time must be written in the XCKS file, false otherwise.

Definition at line 930 of file handlers.hpp.

◆ setWriteFileSize()

virtual void libxcks::XCKSWriterOptions::setWriteFileSize ( const bool  writeFileSize)
inlinefinalvirtual

Sets if the files' size must be written in the XCKS file.

Parameters
[in]writeFileSizetrue if the files' size must be written in the XCKS file, false otherwise.

Definition at line 914 of file handlers.hpp.

◆ setWriteGeneratedElement()

virtual void libxcks::XCKSWriterOptions::setWriteGeneratedElement ( const bool  writeGeneratedElement)
inlinefinalvirtual

Sets if the generated element must be written in the XCKS file.

Parameters
[in]writeGeneratedElementtrue if the generated element must be written, false otherwise.

Definition at line 898 of file handlers.hpp.

◆ setWriteLibXCKSVersion()

virtual void libxcks::XCKSWriterOptions::setWriteLibXCKSVersion ( const bool  writeLibXCKSVersion)
inlinefinalvirtual

Sets if the name and version of the libxcks must be written with the application name and version.

Note
If appWriter or appWriterVersion are empty, the name and version of the libxcks is always written.
Parameters
[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.

Definition at line 1062 of file handlers.hpp.

◆ useCompactXML()

virtual bool libxcks::XCKSWriterOptions::useCompactXML ( ) const
inlinefinalvirtual

Indicates whether the XCKS file must be written in its compact form or not.

Returns
true if the XCKS file must be written in its compact form, false otherwise.

Definition at line 938 of file handlers.hpp.

◆ useTabsforIndentation()

virtual bool libxcks::XCKSWriterOptions::useTabsforIndentation ( ) const
inlinefinalvirtual

Indicates which type of indentation should be used when writing the XCKS file.

Returns
true for writing tabs, false for writing spaces.

Definition at line 954 of file handlers.hpp.

◆ writeFileDateTime()

virtual bool libxcks::XCKSWriterOptions::writeFileDateTime ( ) const
inlinefinalvirtual

Indicates whether the files' date/time must be written in the XCKS file.

Returns
true if the files' date/time must be written in the XCKS file, false otherwise.

Definition at line 922 of file handlers.hpp.

◆ writeFileSize()

virtual bool libxcks::XCKSWriterOptions::writeFileSize ( ) const
inlinefinalvirtual

Indicates whether the files' size must be written in the XCKS file.

Returns
true if the files' size must be written in the XCKS file, false otherwise.

Definition at line 906 of file handlers.hpp.

◆ writeGeneratedElement()

virtual bool libxcks::XCKSWriterOptions::writeGeneratedElement ( ) const
inlinefinalvirtual

Indicates whether the generated element must be written in the XCKS file.

Returns
true if the generated element must be written, false otherwise.

Definition at line 890 of file handlers.hpp.

◆ writeLibXCKSVersion()

virtual bool libxcks::XCKSWriterOptions::writeLibXCKSVersion ( ) const
inlinefinalvirtual

Indicates whether the name and version of the libxcks must be written with the application name and version.

Note
If appWriter or appWriterVersion are empty, the name and version of the libxcks is always written.
Returns
true to write the name and version of the libxcks with the application name and version, false otherwise.

Definition at line 1047 of file handlers.hpp.

Member Data Documentation

◆ default_indent_spaces

constexpr unsigned int libxcks::XCKSWriterOptions::default_indent_spaces = 2u
staticconstexprprotected

Default number of spaces to use for indentation.

Definition at line 835 of file handlers.hpp.


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