Contains named command arguments.
More...
#include <tools/nfdc/command-arguments.hpp>
|
template<typename T > |
T | get (std::string_view key, const T &defaultValue=T()) const |
|
template<typename T > |
std::optional< T > | getOptional (std::string_view key) const |
|
boost::logic::tribool | getTribool (std::string_view key) const |
| Get an optional boolean argument as tribool. More...
|
|
Contains named command arguments.
Definition at line 46 of file command-arguments.hpp.
◆ get()
template<typename T >
T nfd::tools::nfdc::CommandArguments::get |
( |
std::string_view |
key, |
|
|
const T & |
defaultValue = T() |
|
) |
| const |
|
inline |
- Returns
- the argument value, or a default value if the argument is omitted on command line
Definition at line 63 of file command-arguments.hpp.
◆ getOptional()
template<typename T >
std::optional<T> nfd::tools::nfdc::CommandArguments::getOptional |
( |
std::string_view |
key | ) |
const |
|
inline |
- Returns
- the argument value, or nullopt if the argument is omitted on command line
Definition at line 53 of file command-arguments.hpp.
◆ getTribool()
boost::logic::tribool nfd::tools::nfdc::CommandArguments::getTribool |
( |
std::string_view |
key | ) |
const |
|
inline |
Get an optional boolean argument as tribool.
- Returns
- the argument value, or boost::logic::indeterminate if the argument is omitted on command line
Definition at line 72 of file command-arguments.hpp.
◆ elements
T std::map< K, T >::elements |
|
inherited |
◆ keys