Ben Tyner | 7212d21 | 2020-03-31 09:44:41 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Ben Tyner | 72feadc | 2020-04-06 12:57:31 -0500 | [diff] [blame] | 3 | #include <attn/attn_config.hpp> |
| 4 | |
Ben Tyner | 7212d21 | 2020-03-31 09:44:41 -0500 | [diff] [blame] | 5 | #include <string> |
| 6 | |
| 7 | /* |
| 8 | * @brief Search the command line arguments for an option |
| 9 | * |
| 10 | * @param i_begin command line args vector begin |
| 11 | * @param i_end command line args vector end |
| 12 | * @param i_option configuration option to look for |
| 13 | * |
| 14 | * @return true = option found on command line |
| 15 | */ |
| 16 | bool getCliOption(char** i_begin, char** i_end, const std::string& i_option); |
| 17 | |
| 18 | /* |
| 19 | * @brief Search the command line arguments for a setting value |
| 20 | * |
| 21 | * @param i_begin command line args vector begin |
| 22 | * @param i_end command line args vectory end |
| 23 | * @param i_setting configuration setting to look for |
| 24 | * |
| 25 | * @return value of the setting or 0 if setting not found or value not given |
| 26 | */ |
| 27 | char* getCliSetting(char** i_begin, char** i_end, const std::string& i_setting); |
| 28 | |
| 29 | /* |
| 30 | * |
| 31 | * @brief Get configuration flags from command line |
| 32 | * |
Ben Tyner | 72feadc | 2020-04-06 12:57:31 -0500 | [diff] [blame] | 33 | * Parse the command line for configuration options and update the |
| 34 | * attention handler configuration object as needed. |
| 35 | * |
Ben Tyner | 7212d21 | 2020-03-31 09:44:41 -0500 | [diff] [blame] | 36 | * @param i_begin command line args vector begin |
| 37 | * @param i_end command line args vector end |
Ben Tyner | 72feadc | 2020-04-06 12:57:31 -0500 | [diff] [blame] | 38 | * @param o_config pointer to attention handler configuration object |
Ben Tyner | 7212d21 | 2020-03-31 09:44:41 -0500 | [diff] [blame] | 39 | */ |
Ben Tyner | 72feadc | 2020-04-06 12:57:31 -0500 | [diff] [blame] | 40 | void parseConfig(char** i_begin, char** i_end, attn::Config* o_config); |