|
dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
|
cmd line parser More...
#include <dx_parser.h>
Classes | |
| struct | dispatch |
| one command: what it runs, how it reads in the help, and the commands nested under it. A word of parameter consumes the arguments that follow it before this one's own function runs, which is what makes the CLI hierarchical More... | |
Public Types | |
| typedef std::deque<std::string> | args |
Public Member Functions | |
| virtual void | operator <<(argsargs& argsargs) |
| virtual void | operator <<(const argsargs& argsargs) |
| parser(const char* name, const decltype(dictionary)& dictionary= {}) | |
| virtual void | quiet(const args &= {}) noexcept |
| virtual | ~parser()= default |
Protected Member Functions | |
| virtual bool | head() const noexcept |
| virtual void | help(argsargs& argsargs) |
| virtual void | help_head() const noexcept |
| virtual void | indent(argsargs& argsargs) |
| virtual void | no_args(const argsargs& argsargs) |
| auto | select(const std::string& id) |
| virtual void | version(const argsargs& argsargs= {}) |
Static Protected Member Functions | |
| template<typename value_t= int32_t> | |
| static std::optional<value_t> | value(argsargs& argsargs) |
| template<typename value_t= int32_t> | |
| static value_t | value(argsargs& argsargs, const char* name) |
| the next argument as a number of value_t, which the parameter named requires | |
| template<typename value_t> | |
| static value_t | value(argsargs& argsargs, value_t dflt) |
| the next argument as a number of value_t, the default where it is none | |
Protected Attributes | |
| std::map<std::deque<std::string>, dispatch> | dictionary |
| const char* | name{} |
| struct dx::parser:: { ... } | parameter |
cmd line parser
| typedef std::deque<std::string> dx::parser::args |
|
inline |
|
virtualdefault |
|
inlineprotectedvirtualnoexcept |
Reimplemented in dx::service::parser, dx::test::driver< super_device_t, device_t, driver_t >, dx::test::stream::device< super_device_t, _engine_t >, dx::test::stream::device< super_device_t, engine_t >, dx::test::stream::device< super_device_t, typename super_device_t::group_t >, and dx::test::stream::driver< super_device_t, device_t, driver_t >.
|
inlineprotectedvirtual |
|
inlineprotectedvirtualnoexcept |
Reimplemented in dx::select< parsers_t >, dx::test::driver< super_device_t, device_t, driver_t >, and dx::test::stream::driver< super_device_t, device_t, driver_t >.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlinevirtual |
Reimplemented in dx::install::parser, dx::select< parsers_t >, and dx::test::driver< super_device_t, device_t, driver_t >.
|
inlinevirtual |
|
inlinevirtualnoexcept |
|
inlineprotected |
|
inlinestaticprotected |
the next argument where it is a number of value_t, consumed: $ and 0x hexadecimal, decimal otherwise - none where it is no number or outside value_t
|
inlinestaticprotected |
the next argument as a number of value_t, which the parameter named requires
|
inlinestaticprotected |
the next argument as a number of value_t, the default where it is none
|
inlineprotectedvirtual |
|
protected |
|
protected |
| struct { ... } dx::parser::parameter |