34 using namespace std::filesystem;
43 XCKSWriterOptions::XCKSWriterOptions(
const bool writeGeneratedElement,
44 const bool writeFileSize,
45 const bool writeFileDateTime,
46 const bool useCompactXML,
47 const bool useTabsforIndentation,
48 const unsigned int nbIndentSpaces,
49 const bool checkReturnedChecksums,
50 const std::string applicationWriter,
51 const std::string applicationVersion,
52 const bool writeLibXCKSVersion)
54 setWriteGeneratedElement(writeGeneratedElement);
55 setWriteFileSize(writeFileSize);
56 setWriteFileDateTime(writeFileDateTime);
57 setUseCompactXML(useCompactXML);
58 setUseTabsforIndentation(useTabsforIndentation);
59 setIndentSpaces(nbIndentSpaces);
60 setCheckReturnedChecksums(checkReturnedChecksums);
61 setApplicationWriter(applicationWriter);
62 setApplicationWriterVersion(applicationVersion);
63 setWriteLibXCKSVersion(writeLibXCKSVersion);
72 void XCKSWriterOptions::setIndentSpaces(
const unsigned int nbIndentSpaces)
74 indentSpaces = (nbIndentSpaces >= 1u && nbIndentSpaces <= max_indent_spaces) ?
75 nbIndentSpaces : default_indent_spaces;
80 #if defined(__GNUC__) && defined(LIBXCKS_SHARED) && defined(BUILDING_LIBXCKS) && (__GNUC__ <= 11)
81 constexpr
int ZXCKSWriterOptions::min_compression_level;
82 constexpr
int ZXCKSWriterOptions::max_compression_level;
83 constexpr
int ZXCKSWriterOptions::default_compression_level;
90 ZXCKSWriterOptions::ZXCKSWriterOptions(
const bool writeGeneratedElement,
91 const bool writeFileSize,
92 const bool writeFileDateTime,
93 const bool useCompactXML,
94 const bool useTabsforIndentation,
95 const unsigned int nbIndentSpaces,
96 const bool checkReturnedChecksums,
97 const std::string applicationWriter,
98 const std::string applicationVersion,
99 const bool writeLibXCKSVersion,
100 const int compressionLevel) :
102 useCompactXML, useTabsforIndentation, nbIndentSpaces,
103 checkReturnedChecksums, applicationWriter,
104 applicationVersion, writeLibXCKSVersion)
Provides options for the XCKS writer.
static constexpr int max_compression_level
Maximum compression level.
static constexpr int default_compression_level
Default compression level.
virtual void setCompressionLevel(const int level) final
Sets the compression level.
static constexpr int min_compression_level
Minimum compression level.
Handlers for reading and writing XCKS files.