One option or positional argument; build one with fe::cli::opt, fe::cli::arg, or fe::cli::help.
More...
#include <fe/cli.h>
|
| Opt & | operator[] (std::string name) |
| | Adds name - "-o" for a short, "--output" for a long one.
|
| Opt & | operator() (std::string descr) |
| | Sets the description shown in the help.
|
| Opt & | cardinality (size_t min, size_t max) |
| | This Opt must occur at least min and at most max times.
|
|
| class | Cli |
| template<class T> |
| Opt | opt (T &target) |
| | A flag: sets target to true - or invokes it with true - each time it occurs.
|
| template<class T> |
| Opt | opt (T &target, std::string hint) |
| | An option that takes a value; hint names it in the help as <hint>.
|
| template<class T> |
| Opt | arg (T &target, std::string hint) |
| | A positional argument; hint names it in the help as <hint>.
|
One option or positional argument; build one with fe::cli::opt, fe::cli::arg, or fe::cli::help.
Definition at line 121 of file cli.h.
◆ cardinality()
| Opt & fe::cli::Opt::cardinality |
( |
size_t | min, |
|
|
size_t | max ) |
|
inline |
This Opt must occur at least min and at most max times.
Definition at line 130 of file cli.h.
◆ operator()()
| Opt & fe::cli::Opt::operator() |
( |
std::string | descr | ) |
|
|
inline |
Sets the description shown in the help.
Definition at line 127 of file cli.h.
◆ operator[]()
| Opt & fe::cli::Opt::operator[] |
( |
std::string | name | ) |
|
|
inline |
Adds name - "-o" for a short, "--output" for a long one.
Definition at line 124 of file cli.h.
◆ arg
template<class T>
| Opt arg |
( |
T & | target, |
|
|
std::string | hint ) |
|
friend |
A positional argument; hint names it in the help as <hint>.
Bind a std::vector to soak up all remaining ones.
Definition at line 186 of file cli.h.
References arg, and opt.
Referenced by arg, and Cli.
◆ Cli
◆ opt [1/2]
A flag: sets target to true - or invokes it with true - each time it occurs.
Definition at line 159 of file cli.h.
References opt.
Referenced by arg, Cli, opt, and opt.
◆ opt [2/2]
template<class T>
| Opt opt |
( |
T & | target, |
|
|
std::string | hint ) |
|
friend |
An option that takes a value; hint names it in the help as <hint>.
Definition at line 173 of file cli.h.
References opt.
The documentation for this class was generated from the following file: