#include <icy/application.h>Command-line option parser.
std::string exepathOptionMap args| Return | Name | Description |
|---|---|---|
OptionParser | Parses command-line arguments from argc/argv. | |
bool | has inline | Returns true if the given option key was present on the command line. |
std::string | get inline | Returns the string value associated with the given option key. Returns an empty string if the key was not found. |
NumericType | get inline | Returns the value associated with the given option key, converted to a numeric type. |
OptionParser(int argc, char * argv, const char * delim)Parses command-line arguments from argc/argv.
argc Argument count from main().
argv Argument vector from main().
delim Prefix string that identifies an option key (e.g. "--").
inline
inline bool has(const char * key)Returns true if the given option key was present on the command line.
key Option key to look up (without delimiter prefix).True if the key exists in the parsed argument map.
inline
inline std::string get(const char * key)Returns the string value associated with the given option key. Returns an empty string if the key was not found.
key Option key to look up.Value string, or empty string if not present.
inline
template<typename NumericType> inline NumericType get(const char * key)Returns the value associated with the given option key, converted to a numeric type.
NumericType Integral or floating-point type to convert the value to.key Option key to look up.Converted numeric value.