blob: 6ae4e63eccf6384217eb35b24eccffa3d2b35202 [file] [log] [blame]
Ben Tyner7212d212020-03-31 09:44:41 -05001#pragma once
2
Ben Tyner72feadc2020-04-06 12:57:31 -05003#include <attn/attn_config.hpp>
4
Ben Tyner7212d212020-03-31 09:44:41 -05005#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 */
16bool 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 */
27char* 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 Tyner72feadc2020-04-06 12:57:31 -050033 * Parse the command line for configuration options and update the
34 * attention handler configuration object as needed.
35 *
Ben Tyner7212d212020-03-31 09:44:41 -050036 * @param i_begin command line args vector begin
37 * @param i_end command line args vector end
Ben Tyner72feadc2020-04-06 12:57:31 -050038 * @param o_config pointer to attention handler configuration object
Ben Tyner7212d212020-03-31 09:44:41 -050039 */
Ben Tyner72feadc2020-04-06 12:57:31 -050040void parseConfig(char** i_begin, char** i_end, attn::Config* o_config);