|
| | 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.
|
|
| 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.
|
|
|
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.
|
◆ InputFlags()
| InputFlags::InputFlags |
( |
const std::string & | _input_filename, |
|
|
bool | fail_on_not_found = false ) |
|
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.
- Parameters
-
| _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. |
◆ fetch_flag_value()
| bool InputFlags::fetch_flag_value |
( |
const std::string | flag_name, |
|
|
bool | fail_on_not_found = false ) const |
|
private |
Fetch the value of the flag variable from the input file.
- Parameters
-
| 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. |
- Returns
- true This flag was present and set to true
-
false This flag was present and set to false, OR was not present
◆ position_from_name()
| const int InputFlags::position_from_name |
( |
const std::string & | flag_name | ) |
const |
|
inlineprivate |
Returns the internal index in flag_values of the flag with the name provided.
- Parameters
-
| flag_name | Name of the flag |
- Returns
- const int Index of this flag's value in flag_values
The documentation for this class was generated from the following files: