cmd line parser
More...
#include <dx_parser.h>
|
| typedef std::deque< std::string > | args |
◆ args
◆ parser()
| dx::parser::parser |
( |
const char * | name, |
|
|
const decltype(dictionary)& | dictionary = {} ) |
|
inline |
◆ ~parser()
| virtual dx::parser::~parser |
( |
| ) |
|
|
virtualdefault |
◆ catch() [1/18]
◆ catch() [2/18]
◆ catch() [3/18]
◆ catch() [4/18]
◆ catch() [5/18]
◆ catch() [6/18]
◆ catch() [7/18]
| DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN dx::parser::catch |
( |
const dx::exception & | __dx_exception | ) |
|
|
inline |
◆ catch() [8/18]
| DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN dx::parser::catch |
( |
const dx::exception & | __dx_exception | ) |
|
|
inlineprotected |
◆ catch() [9/18]
| DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN dx::parser::catch |
( |
const dx::exception & | __dx_exception | ) |
|
|
inlineprotected |
◆ catch() [10/18]
| DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN dx::parser::catch |
( |
const dx::exception & | __dx_exception | ) |
|
|
inlineprotected |
◆ catch() [11/18]
| DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN dx::parser::catch |
( |
const dx::exception & | __dx_exception | ) |
|
|
inlineprotected |
◆ catch() [12/18]
| DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN dx::parser::catch |
( |
const dx::exception & | __dx_exception | ) |
|
|
inlineprotected |
◆ catch() [13/18]
| dx::parser::catch |
( |
const std::exception & | __std_exception | ) |
|
|
inline |
◆ catch() [14/18]
| dx::parser::catch |
( |
const std::exception & | __std_exception | ) |
|
|
inlineprotected |
◆ catch() [15/18]
| dx::parser::catch |
( |
const std::exception & | __std_exception | ) |
|
|
inlineprotected |
◆ catch() [16/18]
| dx::parser::catch |
( |
const std::exception & | __std_exception | ) |
|
|
inlineprotected |
◆ catch() [17/18]
| dx::parser::catch |
( |
const std::exception & | __std_exception | ) |
|
|
inlineprotected |
◆ catch() [18/18]
| dx::parser::catch |
( |
const std::exception & | __std_exception | ) |
|
|
inlineprotected |
◆ head()
| virtual bool dx::parser::head |
( |
| ) |
const |
|
inlineprotectedvirtualnoexcept |
Reimplemented in dx::service::parser, dx::test::driver< super_device_t, audio_pin_t, io_t, device_t, driver_t, engine_t >, and dx::test::driver< super_device_t, audio_pin_t, io_t, device_t, driver_t, engine_t >.
◆ help()
| virtual void dx::parser::help |
( |
args & | args | ) |
|
|
inlineprotectedvirtual |
◆ help_head()
| virtual void dx::parser::help_head |
( |
| ) |
const |
|
inlineprotectedvirtualnoexcept |
Reimplemented in dx::test::driver< super_device_t, audio_pin_t, io_t, device_t, driver_t, engine_t >, and dx::test::driver< super_device_t, audio_pin_t, io_t, device_t, driver_t, engine_t >.
◆ help_scope()
| virtual void dx::parser::help_scope |
( |
| ) |
const |
|
inlineprotectedvirtualnoexcept |
Reimplemented in dx::select< parsers_t >, dx::test::driver< super_device_t, audio_pin_t, io_t, device_t, driver_t, engine_t >, and dx::test::driver< super_device_t, audio_pin_t, io_t, device_t, driver_t, engine_t >.
◆ indent()
| virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END void dx::parser::indent |
( |
args & | args | ) |
|
|
inlineprotectedvirtual |
◆ no_args()
| virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END void dx::parser::no_args |
( |
const args & | args | ) |
|
|
inlineprotectedvirtual |
◆ operator<<() [1/2]
| DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END void dx::parser::operator<< |
( |
args & | args | ) |
|
|
inlinevirtual |
◆ operator<<() [2/2]
| virtual void dx::parser::operator<< |
( |
const args & | args | ) |
|
|
inlinevirtual |
◆ parse()
| virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END void dx::parser::parse |
( |
args & | args | ) |
|
|
inlinevirtual |
Reimplemented in dx::test::driver< super_device_t, audio_pin_t, io_t, device_t, driver_t, engine_t >, and dx::test::driver< super_device_t, audio_pin_t, io_t, device_t, driver_t, engine_t >.
◆ quiet()
| virtual void dx::parser::quiet |
( |
const args & | = {} | ) |
|
|
inlinevirtualnoexcept |
◆ select()
| DX_PRAGMA_IGNORE_RETURN_VALUE_END auto dx::parser::select |
( |
const std::string & | id | ) |
|
|
inlineprotected |
◆ version()
| virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END void dx::parser::version |
( |
const args & | args = {} | ) |
|
|
inlineprotectedvirtual |
◆ cerr
◆ cout
◆ dictionary
| std::map<std::deque<std::string>, dispatch> dx::parser::dictionary |
|
protected |
Initial value:{
{{"--continue", "--no-error", "--ignore", "--ignore-error"},
{{
"--indent",
"--tab"}, {std::bind(&
parser::indent,
this, std::placeholders::_1),
"set/get indention width and pattern",
"[width [pattern]]", {},{
{{
"err",
"stderr"}, {[
this](
args&
args){this->
parameter.log.err=
true;},
"select std error"}},
{{
"log",
"stdlog"}, {[
this](
args&
args){this->
parameter.log.log=
true;},
"select std log"}},
{{
"out",
"stdout"}, {[
this](
args&
args){this->
parameter.log.out=
true;},
"select std out"}},
}}},
{{
"--quiet",
"-q"}, {std::bind(&
parser::quiet,
this, std::placeholders::_1),
"quiet!"}},
{{
"--version",
"-v"}, {std::bind(&
parser::version,
this, std::placeholders::_1), std::string{
"display "}+
name+
" version"}},
}
virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END void version(const args &args={}) try
Definition dx_parser.h:264
const char * name
Definition dx_parser.h:65
virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END void indent(args &args) try
Definition dx_parser.h:227
bool quiet
Definition dx_parser.h:67
virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END void no_args(const args &args) try
Definition dx_parser.h:220
std::deque< std::string > args
Definition dx_parser.h:61
struct dx::parser::@046247176025362246310022157273031025265032273157 parameter
◆ err
◆ [struct]
| struct { ... } dx::parser::error |
◆ ignore
◆ [struct] [1/2]
| struct { ... } dx::parser::log |
◆ log [2/2]
◆ mask
◆ name
| const char* dx::parser::name {} |
|
protected |
◆ out
◆ [struct]
| struct { ... } dx::parser::parameter |
◆ quiet
The documentation for this class was generated from the following file: