Commit 1f1ebcaf authored by Samuel Debionne's avatar Samuel Debionne
Browse files

[SET] Fix saving settings default values

parent e3824e5d
Pipeline #25261 failed with stages
in 14 minutes and 3 seconds
......@@ -48,6 +48,8 @@ struct base_path_setting :
inline static const char* short_name = "base_path";
inline static const char* long_name = "base path";
inline static const char* doc = "The base path where the files will be saved";
base_path_setting() : strong_typedef(default_value) {}
[[nodiscard]] bool validate() const { return true; };
};
......@@ -62,6 +64,8 @@ struct filename_prefix_setting :
inline static const char* short_name = "filename_prefix";
inline static const char* long_name = "filename prefix";
inline static const char* doc = "The prefix of the filename, where filename = <prefix><number><suffix>";
filename_prefix_setting() : strong_typedef(default_value) {}
[[nodiscard]] bool validate() const { return true; };
};
......@@ -76,6 +80,8 @@ struct filename_suffix_setting :
inline static const char* short_name = "filename_suffix";
inline static const char* long_name = "filename suffix";
inline static const char* doc = "The suffix of the filename, where filename = <prefix><number><suffix>";
filename_suffix_setting() : strong_typedef(default_value) {}
[[nodiscard]] bool validate() const { return true; };
};
......@@ -90,6 +96,8 @@ struct file_exists_policy_setting :
inline static const char* short_name = "file_exists_policy";
inline static const char* long_name = "file exists policy";
inline static const char* doc = "Policy if target filename exists [abort, overwrite, append, multiset]";
file_exists_policy_setting() : strong_typedef(default_value) {}
[[nodiscard]] bool validate() const { return true; };
};
......@@ -105,6 +113,8 @@ struct start_number_setting :
inline static const char* short_name = "start_number";
inline static const char* long_name = "start number";
inline static const char* doc = "Start number in the file sequence";
start_number_setting() : strong_typedef(default_value) {}
[[nodiscard]] bool validate() const { return true; };
};
......@@ -116,10 +126,29 @@ struct nb_frames_setting :
// Inheriting constructors
using strong_typedef::strong_typedef;
inline static const value_type default_value = 0;
inline static const value_type default_value = 1;
inline static const char* short_name = "nb_frames";
inline static const char* long_name = "nb frames";
inline static const char* doc = "Number of frames";
nb_frames_setting() : strong_typedef(default_value) {}
[[nodiscard]] bool validate() const { return true; };
};
struct nb_frames_per_chunk_setting :
strong_typedef<nb_frames_per_chunk_setting, int>,
basic_operations<nb_frames_per_chunk_setting, int>,
integer_arithmetic<nb_frames_per_chunk_setting, int>
{
// Inheriting constructors
using strong_typedef::strong_typedef;
inline static const value_type default_value = 1;
inline static const char* short_name = "nb_frames_per_chunk";
inline static const char* long_name = "nb frames per chunk";
inline static const char* doc = "Number of frames per chunk";
nb_frames_per_chunk_setting() : strong_typedef(default_value) {}
[[nodiscard]] bool validate() const { return true; };
};
......@@ -131,10 +160,12 @@ struct nb_frames_per_file_setting :
// Inheriting constructors
using strong_typedef::strong_typedef;
inline static const value_type default_value = 0;
inline static const value_type default_value = 1;
inline static const char* short_name = "nb_frames_per_file";
inline static const char* long_name = "nb frames per file";
inline static const char* doc = "Number of frames per file";
nb_frames_per_file_setting() : strong_typedef(default_value) {}
[[nodiscard]] bool validate() const { return true; };
};
......@@ -147,6 +178,7 @@ struct saving
(start_number_setting, start_number),
(file_exists_policy_setting, file_exists_policy),
(nb_frames_setting, nb_frames),
(nb_frames_per_chunk_setting, nb_frames_per_chunk),
(nb_frames_per_file_setting, nb_frames_per_file)
);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment