dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::install::parser Class Reference

the driver package installer: a product's <Product>Install.exe, the installer's custom action (dxd_installer.wxs) and a command line alike More...

#include <dx_install.h>

Inheritance diagram for dx::install::parser:
Collaboration diagram for dx::install::parser:

Public Types

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

Public Member Functions

virtual void operator<< (args &args)
virtual void operator<< (const args &args)
 parser (const char *name, const ::GUID &guid={}, const decltype(hwids)&hwids={})
virtual void quiet (const args &={}) noexcept

Protected Member Functions

virtual bool head () const noexcept
virtual void help (args &args)
virtual void help_head () const noexcept
virtual void indent (args &args)
virtual void install (args &args)
virtual void no_args (const args &args)
void resolve (const std::string &inf)
 the class and the hardware ids for a run: what the arguments left unknown comes off the inf
auto select (const std::string &id)
virtual void uninstall (args &args)
virtual void version (const args &args={})

Static Protected Member Functions

static std::string enumerator (const std::string &hwid)

Protected Attributes

std::map< std::deque< std::string >, dispatchdictionary
bool given {}
 a hwid sub parameter replaced the product's list
::GUID guid
 the devices' class, GUID_NULL unknown
std::deque< std::string > hwids
 the devices, as an inf's models name them (USB\VID_xxxx&PID_xxxx)
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
decltype(dispatch::parameter) sub
 the sub parameters –install and –uninstall share

Detailed Description

the driver package installer: a product's <Product>Install.exe, the installer's custom action (dxd_installer.wxs) and a command line alike

--install [class <guid>] [hwid <id> [hwid ..]] <inf>: purges every package with a model of the hardware ids (a competitor for the same devices - the alternative package of the product, an older release - would otherwise be ranked against the new one) and installs the package through setup::install(); --uninstall [class <guid>] [hwid <id> ..] [inf]: removes the devices' nodes and every package of theirs, then rescans the bus. The devices' class and hardware ids are the product's (the constructor), a sub parameter overrides them - the first hwid replaces the list, further ones add - and what is still unknown comes off the inf given (its ClassGUID, its models); the enumerator is the hardware id's own prefix.

Member Typedef Documentation

◆ args

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

Constructor & Destructor Documentation

◆ parser()

dx::install::parser::parser ( const char * name,
const ::GUID & guid = {},
const decltype(hwids)& hwids = {} )
inline

Member Function Documentation

◆ enumerator()

std::string dx::install::parser::enumerator ( const std::string & hwid)
inlinestaticprotected
Here is the caller graph for this function:

◆ 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()

virtual void dx::parser::help_head ( ) const
inlineprotectedvirtualnoexceptinherited

Reimplemented in dx::select< parsers_t >, and dx::test::driver< super_device_t, device_t, driver_t >.

Here is the call graph for this function:
Here is the caller 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:

◆ install()

virtual void dx::install::parser::install ( args & args)
inlineprotectedvirtual
Here is the call 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<< ( args & args)
inlinevirtualinherited

Reimplemented in dx::select< parsers_t >, and dx::test::driver< super_device_t, device_t, driver_t >.

Here is the call graph for this function:

◆ operator<<() [2/2]

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

◆ quiet()

virtual void dx::parser::quiet ( const args & = {})
inlinevirtualnoexceptinherited

◆ resolve()

void dx::install::parser::resolve ( const std::string & inf)
inlineprotected

the class and the hardware ids for a run: what the arguments left unknown comes off the inf

Here is the caller graph for this function:

◆ 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:

◆ uninstall()

virtual void dx::install::parser::uninstall ( args & args)
inlineprotectedvirtual
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 indent(args &args)
Definition dx_parser.h:235
virtual void no_args(const args &args)
Definition dx_parser.h:228
const char * name
Definition dx_parser.h:64
bool quiet
Definition dx_parser.h:66
std::deque< std::string > args
Definition dx_parser.h:60
struct dx::parser::@046247176025362246310022157273031025265032273157 parameter
virtual void version(const args &args={})
Definition dx_parser.h:261

◆ err

bool dx::parser::err
inherited

◆ [struct]

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

◆ given

bool dx::install::parser::given {}
protected

a hwid sub parameter replaced the product's list

◆ guid

::GUID dx::install::parser::guid
protected

the devices' class, GUID_NULL unknown

◆ hwids

std::deque<std::string> dx::install::parser::hwids
protected

the devices, as an inf's models name them (USB\VID_xxxx&PID_xxxx)

◆ 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

◆ sub

decltype(dispatch::parameter) dx::install::parser::sub
protected
Initial value:
{
{{"class"}, {[this](args& args){guid= dx::guid{args.front()}; args.pop_front();}, "the devices' class", "guid", {.required= 1}}},
{{"hwid"}, {[this](args& args){
if(!given)
hwids.clear();
given= true;
hwids.push_back(args.front());
args.pop_front();}, "a device's hardware id: the first replaces the product's, further ones add", "id", {.required= 1}}},
}
a GUID with the arithmetic Windows leaves out: constructed from its parts or its string,...
Definition dx_proxy.h:35
std::deque< std::string > hwids
the devices, as an inf's models name them (USB\VID_xxxx&PID_xxxx)
Definition dx_install.h:51
bool given
a hwid sub parameter replaced the product's list
Definition dx_install.h:52
::GUID guid
the devices' class, GUID_NULL unknown
Definition dx_install.h:50

the sub parameters –install and –uninstall share


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.