|
static void | parse (int argc, const char *const *argv) |
| Parses out the arguments passed into the program.
|
|
static void | register_arg (std::string const &key) |
| Adds an argument flag that can be accepted.
|
|
static void | register_arg (std::string const &key, ArgType type) |
| Adds an argument flag that can be accepted, and sets its type.
|
|
static void | register_arg (std::string const &key, std::string const &defaultValue, ArgType type) |
| Adds an argument flag that can be accepted, sets its type and provides a default value.
|
|
static auto | has (std::string_view key) -> bool |
| Returns true if the argument is present.
|
|
template<typename val_t = std::string> |
static auto | get (std::string_view key) -> val_t |
| Returns the argument with the given key.
|
|
static auto | count () -> size_t |
| Returns the number of arguments.
|
|
static void | reset () |
| Clears the registered arguments.
|
|
◆ count()
static auto VIPRA::Args::count |
( |
| ) |
-> size_t |
|
inlinestatic |
Returns the number of arguments.
- Returns
- size_t : argument count
◆ get()
template<typename val_t = std::string>
static auto VIPRA::Args::get |
( |
std::string_view | key | ) |
-> val_t
|
|
inlinestaticnodiscard |
Returns the argument with the given key.
- Parameters
-
- Returns
- std::string const& : argument value
◆ has()
static auto VIPRA::Args::has |
( |
std::string_view | key | ) |
-> bool
|
|
inlinestatic |
Returns true if the argument is present.
- Parameters
-
- Returns
- true
-
false
◆ parse()
static void VIPRA::Args::parse |
( |
int | argc, |
|
|
const char *const * | argv ) |
|
inlinestatic |
Parses out the arguments passed into the program.
- Parameters
-
◆ register_arg() [1/3]
static void VIPRA::Args::register_arg |
( |
std::string const & | key | ) |
|
|
inlinestatic |
Adds an argument flag that can be accepted.
- Parameters
-
◆ register_arg() [2/3]
static void VIPRA::Args::register_arg |
( |
std::string const & | key, |
|
|
ArgType | type ) |
|
inlinestatic |
Adds an argument flag that can be accepted, and sets its type.
- Parameters
-
key | : argument key to add |
type | : argument type |
◆ register_arg() [3/3]
static void VIPRA::Args::register_arg |
( |
std::string const & | key, |
|
|
std::string const & | defaultValue, |
|
|
ArgType | type ) |
|
inlinestatic |
Adds an argument flag that can be accepted, sets its type and provides a default value.
- Parameters
-
key | : argument key to add |
type | : argument type |
The documentation for this class was generated from the following file: