optris::sdk::ConfigLoadReport
What an import did.
Returned by Imager::LoadConfig() when anything was applied, and carried by ConfigLoadException when the load was refused or stopped part-way -- so the same account is available whichever way the call came back.
Public attributes
outcome
ConfigLoadOutcome outcome = ConfigLoadOutcome::kRefused
How it ended. Read this first.
present
ConfigSection present = ConfigSection::kNone
The sections the file carried, whether or not they took effect. A file that has never been edited by hand carries all of them.
applied
ConfigSection applied = ConfigSection::kNone
The sections now in effect on the camera.
omitted
ConfigSection omitted = ConfigSection::kNone
The sections the file carried that are not in effect. Always present minus applied, given here so the common check is a read rather than a calculation.
file_serial
std::string file_serial
The serial recorded in the file, or empty if it had none.
serial_matched
bool serial_matched = true
True if file_serial is this camera's, or if the file named no serial. False is not in itself a failure -- see ConfigLoadOptions::require_matching_serial -- but it is worth showing a user before they commit to an import.
diagnosis
std::string diagnosis
What happened, in one or more sentences, naming the sections and the reasons. Empty only when outcome is kApplied.
For a person: log it, or put it in the dialog. Do not parse it -- the enums above are what a program branches on, and this text is free to improve.