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::HDF5MasterFormatVersion(FileWriterFormat input) {
|
|
switch (input) {
|
|
case FileWriterFormat::DataOnly:
|
|
case FileWriterFormat::NXmxLegacy:
|
|
case FileWriterFormat::NXmxVDS:
|
|
case FileWriterFormat::TIFF:
|
|
case FileWriterFormat::CBF:
|
|
hdf5_master_format_version = input;
|
|
return *this;
|
|
default:
|
|
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
|
|
"File format not supported");
|
|
}
|
|
}
|
|
|
|
FileWriterFormat FileWriterSettings::GetHDF5MasterFormatVersion() const {
|
|
return hdf5_master_format_version;
|
|
}
|
|
|
|
bool FileWriterSettings::IsOverwriteExistingFiles() const {
|
|
return overwrite_files;
|
|
}
|