dxd - dynax driver framework 3.0.1d223
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::select< parsers_t > Class Template Reference

select from aggregated drivers More...

#include <dx_parser.h>

Inheritance diagram for dx::select< parsers_t >:
Collaboration diagram for dx::select< parsers_t >:

Public Types

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

Public Member Functions

virtual void operator<< (const args &args)
void operator<< (args &args) override
 argv split at the bus selectors: everything up to the next --<bus> goes to the bus named by the current one, so one command line drives several drivers in turn
template<typename... parser_t>
 select (const char *name, parser_t &&... parser)

Protected Member Functions

virtual bool head () const noexcept
virtual void help (args &args)
void help_head () const noexcept override
virtual void indent (args &args)
virtual void no_args (const args &args)
auto select (const std::string &id)
virtual void version (const args &args={})

Protected Attributes

std::map< std::deque< std::string >, dispatch > dictionary
const char * name {}
struct { 
   struct { 
      bool   ignore 
   }   error
   struct { 
      union { 
         struct { 
            bool   err:1 
            bool   log:1 
            bool   out:1 
         } 
         uint32_t   mask 
      } 
   }   log
   bool   quiet 
} parameter

Detailed Description

template<typename... parsers_t>
class dx::select< parsers_t >

select from aggregated drivers

Member Typedef Documentation

◆ args

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

Constructor & Destructor Documentation

◆ select()

template<typename... parsers_t>
template<typename... parser_t>
dx::select< parsers_t >::select ( const char * name,
parser_t &&... parser )
inline
Here is the call graph for this function:

Member Function Documentation

◆ head()

virtual bool dx::parser::head ( ) const
inlineprotectedvirtualnoexceptinherited

Reimplemented in dx::service::parser, and dx::test::driver< super_device_t, device_t, driver_t >.

Here is the caller graph for this function:

◆ help()

virtual void dx::parser::help ( args & args)
inlineprotectedvirtualinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ help_head()

template<typename... parsers_t>
void dx::select< parsers_t >::help_head ( ) const
inlineoverrideprotectedvirtualnoexcept

Reimplemented from dx::parser.

Here is the call graph for this function:

◆ indent()

virtual void dx::parser::indent ( args & args)
inlineprotectedvirtualinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ no_args()

virtual void dx::parser::no_args ( const args & args)
inlineprotectedvirtualinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator<<() [1/2]

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

◆ operator<<() [2/2]

template<typename... parsers_t>
void dx::select< parsers_t >::operator<< ( args & args)
inlineoverridevirtual

argv split at the bus selectors: everything up to the next --<bus> goes to the bus named by the current one, so one command line drives several drivers in turn

Reimplemented from dx::parser.

◆ select()

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

◆ version()

virtual void dx::parser::version ( const args & args = {})
inlineprotectedvirtualinherited
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ dictionary

std::map<std::deque<std::string>, dispatch> dx::parser::dictionary
protectedinherited
Initial value:
{
{{"--continue", "--no-error", "--ignore", "--ignore-error"},
{[this](args& args){parameter.error.ignore= true; no_args(args);}, "ignore errors and continue"}},
{{"--indent", "--tab"}, {std::bind(&parser::indent, this, std::placeholders::_1), "set/get indention width and pattern", "[width [pattern]]", {},{
{{"err", "stderr"}, {[this](args&){this->parameter.log.err= true;}, "select std error"}},
{{"log", "stdlog"}, {[this](args&){this->parameter.log.log= true;}, "select std log"}},
{{"out", "stdout"}, {[this](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 void no_args(const args &args)
Definition dx_parser.h:228
const char * name
Definition dx_parser.h:64
std::deque< std::string > args
Definition dx_parser.h:60
struct dx::parser::@046247176025362246310022157273031025265032273157 parameter
select from aggregated drivers
Definition dx_parser.h:351

◆ err

bool dx::parser::err
inherited

◆ [struct]

struct { ... } dx::parser::error

◆ ignore

bool dx::parser::ignore
inherited

◆ [struct] [1/2]

struct { ... } dx::parser::log

◆ log [2/2]

bool dx::parser::log
inherited

◆ mask

uint32_t dx::parser::mask
inherited

◆ name

const char* dx::parser::name {}
protectedinherited

◆ out

bool dx::parser::out
inherited

◆ [struct]

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

◆ quiet

bool dx::parser::quiet
inherited

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

(c) copyright 2009 dynamic acoustics e.U. generated on

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.