#include <Support.hpp>
|
| Cmdline ()=delete |
|
| Cmdline (int argc, const char *const *argv) |
|
std::string | get (unsigned int index) const |
|
std::string | get_or (unsigned int index, const std::string &) const |
|
Definition at line 25 of file Support.hpp.
◆ Cmdline() [1/2]
◆ Cmdline() [2/2]
Cmdline::Cmdline |
( |
int |
argc, |
|
|
const char *const * |
argv |
|
) |
| |
|
inline |
Definition at line 29 of file Support.hpp.
29 : _argc(
static_cast<unsigned int>(argc)), _argv{
argv}
30 {
31
32 }
◆ get()
std::string Cmdline::get |
( |
unsigned int |
index | ) |
const |
Definition at line 45 of file Support.cpp.
46{
47 if (index >= _argc)
48 throw std::runtime_error("Argument index out of bound");
49
50 return std::string(_argv[index]);
51}
◆ get_or()
std::string Cmdline::get_or |
( |
unsigned int |
index, |
|
|
const std::string & |
s |
|
) |
| const |
Definition at line 53 of file Support.cpp.
54{
55 if (index >= _argc)
57
58 return std::string(_argv[index]);
59}
Referenced by make_ui().
The documentation for this class was generated from the following files: