|
TDMS
Time Domain Maxwell Solver
|
Public Member Functions | |
| InputFlags (const std::string &_input_filename, bool fail_on_not_found=false) | |
| Construct a new InputFlags object by reading flags from the input file provided. | |
| bool | operator[] (const std::string &flag_name) const |
| Return the value of the flag corresponding to the name provided. | |
| void | report_flag_state () |
| Prompts spdlog to report the value of every expected flag in the input file. | |
Private Member Functions | |
| const int | position_from_name (const std::string &flag_name) const |
| Returns the internal index in flag_values of the flag with the name provided. | |
| bool | fetch_flag_value (const std::string flag_name, bool fail_on_not_found=false) const |
| Fetch the value of the flag variable from the input file. | |
Private Attributes | |
| std::string | input_filename = "input_file.mat" |
| Name of the input file to read flags from. | |
| bool | flag_values [NFLAGS] = {false} |
| Flag values present in the input file. | |
|
inline |
Construct a new InputFlags object by reading flags from the input file provided.
The user may optionally specify that an error should be thrown if flags cannot be found through the fail_on_not_found argument.
| _input_filename | The input file to read from |
| fail_on_not_found | If true, any flags that cannot be located in the input file will cause an error to be thrown. |
|
private |
Fetch the value of the flag variable from the input file.
| flag_name | The name of the flag to fetch |
| fail_on_not_found | If true, throw an error if the flag cannot be located. Otherwise, return the default flag value. |
|
inlineprivate |
Returns the internal index in flag_values of the flag with the name provided.
| flag_name | Name of the flag |