#include <Args.h>
|
| | Args (int argc, char **argv) |
| | Construct a new Args:: Args object from the argument values passed into main. More...
|
| |
| | ~Args () |
| |
| void | add_string_value (std::string idxName, std::string altName, std::string def="") |
| | Add a flag that will have a value attached when it is tested and retrieved. IF no value is supplied o the command line the default value supplied when the key is created will be retrieved. More...
|
| |
| void | add_int_value (std::string idxName, std::string altName, int def) |
| | Add a value that is expected to be a numeric integer value. It will be converted to an int when it is retrieved. The method can pass in a default value that will be used if the value is absent. More...
|
| |
| void | add_key (std::string key, std::string alt) |
| | Add a key to the data store that will not expect a value to be attached. A key is made up of a shore key i.e. -a and an alternative key i.e. –alt. Searching for the key must be done with the short key. More...
|
| |
| int | get_int_value (std::string key) |
| | Get the integer value at for this key. More...
|
| |
| std::string | get_string_value (std::string key) |
| | Get the string value for this key. More...
|
| |
| bool | is_key_present (std::string key) |
| | Test if a key is present. this function can be used to test the presence of a key for a flag, string value, or an int value. More...
|
| |
Definition at line 18 of file Args.h.
◆ Args()
| Args |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Construct a new Args:: Args object from the argument values passed into main.
- Parameters
-
Definition at line 26 of file Args.cpp.
◆ ~Args()
◆ add_int_value()
| void add_int_value |
( |
std::string |
key, |
|
|
std::string |
alt, |
|
|
int |
def |
|
) |
| |
Add a value that is expected to be a numeric integer value. It will be converted to an int when it is retrieved. The method can pass in a default value that will be used if the value is absent.
- Parameters
-
Definition at line 114 of file Args.cpp.
◆ add_key()
| void add_key |
( |
std::string |
k, |
|
|
std::string |
a |
|
) |
| |
Add a key to the data store that will not expect a value to be attached. A key is made up of a shore key i.e. -a and an alternative key i.e. –alt. Searching for the key must be done with the short key.
- Parameters
-
Definition at line 58 of file Args.cpp.
◆ add_string_value()
| void add_string_value |
( |
std::string |
key, |
|
|
std::string |
alt, |
|
|
std::string |
def = "" |
|
) |
| |
Add a flag that will have a value attached when it is tested and retrieved. IF no value is supplied o the command line the default value supplied when the key is created will be retrieved.
- Parameters
-
Definition at line 80 of file Args.cpp.
◆ get_int_value()
| int get_int_value |
( |
std::string |
key | ) |
|
Get the integer value at for this key.
- Parameters
-
- Returns
- int
Definition at line 148 of file Args.cpp.
◆ get_string_value()
| std::string get_string_value |
( |
std::string |
key | ) |
|
Get the string value for this key.
- Parameters
-
- Returns
- std::string
Definition at line 164 of file Args.cpp.
◆ is_key_present()
| bool is_key_present |
( |
std::string |
key | ) |
|
Test if a key is present. this function can be used to test the presence of a key for a flag, string value, or an int value.
- Parameters
-
- Returns
- true
-
false
Definition at line 182 of file Args.cpp.
The documentation for this class was generated from the following files: