|
TECA
The Toolkit for Extreme Climate Analysis
|
Codes for dealing with low level system API's. More...
Functions | |
| template<typename T > | |
| int | get_environment_variable (const char *var, T &val) |
| int | get_command_line_option (int argc, char **argv, const char *arg_name, int require, std::string &arg_val) |
| int | command_line_option_check (int argc, char **argv, const char *arg_name) |
Codes for dealing with low level system API's.
| int teca_system_util::command_line_option_check | ( | int | argc, |
| char ** | argv, | ||
| const char * | arg_name | ||
| ) |
check for the presence of the name command line option. return non-zero if it is found.
| int teca_system_util::get_command_line_option | ( | int | argc, |
| char ** | argv, | ||
| const char * | arg_name, | ||
| int | require, | ||
| std::string & | arg_val | ||
| ) |
extract the value of the named command line argument. return 0 if successful. If require is not zero then an error will be reported if the argument is not present.
| int teca_system_util::get_environment_variable | ( | const char * | var, |
| T & | val | ||
| ) |
initialize val with the environment variable named by var converted to a numeric type. Only floating point and signed integers are implemented. For unsigned types, check that the return is greater or equal to zero.
returns: 0 if the variable was found and val was initialized from it 1 if the varibale was not found -1 if the variable was found but conversion from string failed