dxd - dynax driver framework 2.6.0d196
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::test::parser Class Reference

cmd line parser More...

#include <dx_test_parser.h>

+ Inheritance diagram for dx::test::parser:
+ Collaboration diagram for dx::test::parser:

Classes

struct  dispatch
 

Public Types

typedef std::deque< std::string > args
 

Public Member Functions

 catch (...)
 
 catch (...)
 
 catch (...)
 
 catch (...)
 
 catch (...)
 
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN catch (const dx::exception &__dx_exception)
 
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN catch (const dx::exception &__dx_exception)
 
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN catch (const dx::exception &__dx_exception)
 
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN catch (const dx::exception &__dx_exception)
 
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN catch (const dx::exception &__dx_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
virtual bool head () const noexcept
 
virtual void help (args &args) try
 
virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END void help_head ()
 
virtual void help_listparameter (const decltype(dictionary)&dictionary) const try
 
virtual void help_scope ()
 
virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END void help_subparameter (const decltype(dictionary)&dictionary) const try
 
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END void operator<< (args &args) try
 
virtual void operator<< (const args &args)
 
virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END void parse (args &args)
 
virtual void parse_subparameter (const decltype(dictionary)&dictionary, args &args) const
 
DX_PRAGMA_IGNORE_RETURN_VALUE_END parser (const decltype(dictionary)&dictionary={})
 
virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END void quiet (const args &={}) noexcept
 
const auto select (const std::string &id) const try
 
virtual void version (const args &={}) noexcept
 
virtual ~parser ()=default
 

Public Attributes

std::map< std::deque< std::string >, dispatchdictionary
 

Protected Attributes

struct { 
 
   bool   quiet = false 
 
parameter 
 

Detailed Description

cmd line parser

Member Typedef Documentation

◆ args

typedef std::deque<std::string> dx::test::parser::args

Constructor & Destructor Documentation

◆ parser()

DX_PRAGMA_IGNORE_RETURN_VALUE_END dx::test::parser::parser ( const decltype(dictionary)& dictionary = {})
inline

◆ ~parser()

virtual dx::test::parser::~parser ( )
virtualdefault

Member Function Documentation

◆ catch() [1/15]

dx::test::parser::catch ( ...)
inline

◆ catch() [2/15]

dx::test::parser::catch ( ...)
inline

◆ catch() [3/15]

dx::test::parser::catch ( ...)
inline

◆ catch() [4/15]

dx::test::parser::catch ( ...)
inline

◆ catch() [5/15]

dx::test::parser::catch ( ...)
inline

◆ catch() [6/15]

DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN dx::test::parser::catch ( const dx::exception & __dx_exception)
inline

◆ catch() [7/15]

DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN dx::test::parser::catch ( const dx::exception & __dx_exception)
inline

◆ catch() [8/15]

DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN dx::test::parser::catch ( const dx::exception & __dx_exception)
inline

◆ catch() [9/15]

DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN dx::test::parser::catch ( const dx::exception & __dx_exception)
inline

◆ catch() [10/15]

DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN dx::test::parser::catch ( const dx::exception & __dx_exception)
inline

◆ catch() [11/15]

dx::test::parser::catch ( const std::exception & __std_exception)
inline

◆ catch() [12/15]

dx::test::parser::catch ( const std::exception & __std_exception)
inline

◆ catch() [13/15]

dx::test::parser::catch ( const std::exception & __std_exception)
inline

◆ catch() [14/15]

dx::test::parser::catch ( const std::exception & __std_exception)
inline

◆ catch() [15/15]

dx::test::parser::catch ( const std::exception & __std_exception)
inline

◆ head()

◆ help()

virtual void dx::test::parser::help ( args & args)
inlinevirtual

◆ help_head()

virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END void dx::test::parser::help_head ( )
inlinevirtual

◆ help_listparameter()

virtual void dx::test::parser::help_listparameter ( const decltype(dictionary)& dictionary) const
inlinevirtual

◆ help_scope()

◆ help_subparameter()

virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END void dx::test::parser::help_subparameter ( const decltype(dictionary)& dictionary) const
inlinevirtual

◆ operator<<() [1/2]

DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END void dx::test::parser::operator<< ( args & args)
inlinevirtual

Reimplemented in dx::test::select< drivers_t >.

◆ operator<<() [2/2]

virtual void dx::test::parser::operator<< ( const args & args)
inlinevirtual
+ Here is the caller graph for this function:

◆ parse()

◆ parse_subparameter()

virtual void dx::test::parser::parse_subparameter ( const decltype(dictionary)& dictionary,
args & args ) const
inlinevirtual

◆ quiet()

virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END void dx::test::parser::quiet ( const args & = {})
inlinevirtualnoexcept

◆ select()

const auto dx::test::parser::select ( const std::string & id) const
inline
+ Here is the caller graph for this function:

◆ version()

virtual void dx::test::parser::version ( const args & = {})
inlinevirtualnoexcept

Member Data Documentation

◆ dictionary

std::map<std::deque<std::string>, dispatch> dx::test::parser::dictionary
Initial value:
{
{{"--help", "-h", "-?"},{std::bind(&parser::help, this, std::placeholders::_1), "help or detailed help on specific arguments", [this](){for(const auto& verb: dictionary) std::cout<< "["<< verb.first.front()<< "] ";}, true}},
{{"--quiet", "-q"}, {std::bind(&parser::quiet, this, std::placeholders::_1), "quiet!"}},
{{"--version", "-v"}, {std::bind(&parser::version, this, std::placeholders::_1), "display the cmd line test application version"}},
}
virtual void help(args &args) try
Definition dx_test_parser.h:166
virtual void version(const args &={}) noexcept
Definition dx_test_parser.h:201
std::map< std::deque< std::string >, dispatch > dictionary
Definition dx_test_parser.h:72
bool quiet
Definition dx_test_parser.h:59

◆ [struct]

struct { ... } dx::test::parser::parameter

◆ quiet

bool dx::test::parser::quiet = false

The documentation for this class was generated from the following file:

(c) copyright 2009 dynamic acoustics e.U. generated on Mon Jan 26 2026

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.