Delete CBFWriter and the TIFF write path from jfjoch_writer so the writer only produces the NXmx HDF5 formats. Drop CBF/TIFF from the internal FileWriterFormat enum and reject them in FileWriterSettings. The CBF/TIFF values are kept (marked deprecated) in the file_writer_format OpenAPI enum for back compatibility: incoming requests using them are now rejected in OpenAPIConvert with a clear "no longer supported" error, and a stale CBF/TIFF value on the CBOR wire decodes to unset rather than a removed enumerator. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
34 lines
1.1 KiB
C++
34 lines
1.1 KiB
C++
// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#include "FileWriterSettings.h"
|
|
#include "JFJochException.h"
|
|
|
|
FileWriterSettings &FileWriterSettings::OverwriteExistingFiles(bool input) {
|
|
overwrite_files = input;
|
|
return *this;
|
|
}
|
|
|
|
FileWriterSettings &FileWriterSettings::FileFormat(FileWriterFormat input) {
|
|
switch (input) {
|
|
case FileWriterFormat::DataOnly:
|
|
case FileWriterFormat::NXmxLegacy:
|
|
case FileWriterFormat::NXmxVDS:
|
|
case FileWriterFormat::NXmxIntegrated:
|
|
case FileWriterFormat::NoFile:
|
|
hdf5_master_format_version = input;
|
|
return *this;
|
|
default:
|
|
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
|
|
"File format not supported");
|
|
}
|
|
}
|
|
|
|
FileWriterFormat FileWriterSettings::GetFileFormat() const {
|
|
return hdf5_master_format_version;
|
|
}
|
|
|
|
bool FileWriterSettings::IsOverwriteExistingFiles() const {
|
|
return overwrite_files;
|
|
}
|