dxd - dynax driver framework 3.0.1f223
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<< (argsargs &argsargs)
virtual void operator<< (const argsargs &argsargs)
 parser (const char *name, const ::GUID &guid={}, const decltype(hwids)&hwids={}, const std::string &bus={})
virtual void quiet (const args &={}) noexcept

Protected Member Functions

template<typename step_t>
void devices (argsargs &argsargs, const char *done, step_t &&step)
 a step on the devices of every hardware id, the inf optional - a hardware id failing is reported, the next one taken, and the verb fails at the end: the installer's exit code, a custom action's failure
std::string enumerator (const std::string &hwid) const
virtual bool head () const noexcept
virtual void help (argsargs &argsargs)
virtual void help_head () const noexcept
virtual void indent (argsargs &argsargs)
virtual void install (argsargs &argsargs)
virtual void no_args (const argsargs &argsargs)
void resolve (const std::string &inf)
 the class and the hardware ids for a run: what the arguments left unknown comes off the inf
virtual void restart (argsargs &argsargs)
 the devices brought back where they stand, on the package that ranks best now
virtual void scan (argsargs &argsargs)
 the devices reenumerated where they stand, an installation that failed or found no package retried
auto select (const std::string &id)
virtual void uninstall (argsargs &argsargs)
virtual void version (const argsargs &argsargs={})

Protected Attributes

std::string bus
 the devices' enumerator where the product names one, empty: each hardware id's own prefix
std::map< std::deque< std::string >, dispatch > dictionary
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 dx::parser:: { ... }  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; --restart [..] [inf] installs on every device where it stands the package that ranks best (setup::reinstall(), a software device's node kept); --scan [..] [inf] reenumerates the devices, retrying an installation that failed. 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 product's where it names one - a software device's hardware id carries no prefix, SWD enumerates it - and each hardware id's own prefix otherwise.

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 = {},
const std::string & bus = {} )
inline

Member Function Documentation

◆ devices()

template<typename step_t>
void dx::install::parser::devices ( args & args,
const char * done,
step_t && step )
inlineprotected

a step on the devices of every hardware id, the inf optional - a hardware id failing is reported, the next one taken, and the verb fails at the end: the installer's exit code, a custom action's failure

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enumerator()

std::string dx::install::parser::enumerator ( const std::string & hwid) const
inlineprotected
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

◆ quiet()

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

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

◆ restart()

virtual void dx::install::parser::restart ( args & args)
inlineprotectedvirtual

the devices brought back where they stand, on the package that ranks best now

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scan()

virtual void dx::install::parser::scan ( args & args)
inlineprotectedvirtual

the devices reenumerated where they stand, an installation that failed or found no package retried

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

◆ 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

◆ bus

std::string dx::install::parser::bus
protected

the devices' enumerator where the product names one, empty: each hardware id's own prefix

◆ 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
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
virtual void quiet(const args &={}) noexcept
Definition dx_parser.h:297

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

◆ name

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

◆ parameter

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

◆ 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:81
bool given
a hwid sub parameter replaced the product's list
Definition dx_install.h:82
::GUID guid
the devices' class, GUID_NULL unknown
Definition dx_install.h:80

the sub parameters –install and –uninstall share


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