dxd - dynax driver framework 3.0.1d223
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::service::parser Class Reference

the service control command line: install, start, stop, remove and run in the console, on a dx::service::manager of its own. Its settings live under HKLM\SOFTWARE\<id>, writable where the process is elevated More...

#include <dx_service.h>

Inheritance diagram for dx::service::parser:
Collaboration diagram for dx::service::parser:

Public Types

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

Public Member Functions

void close () noexcept
void initialize (const std::string &id="", const ::DWORD(&access)[2]={SC_MANAGER_ALL_ACCESS, SERVICE_ALL_ACCESS}, const std::string desc="", const std::string &path="")
void install (const std::string &name)
void open ()
 operator std::unique_ptr<::QUERY_SERVICE_CONFIGA > ()
 operator std::unique_ptr<::SERVICE_DESCRIPTION > ()
 operator::SERVICE_STATUS_PROCESS ()
virtual void operator<< (argsargs &argsargs)
virtual void operator<< (const argsargs &argsargs)
 parser (const std::string &id, const char *name, const decltype(dictionary)&dictionary, const std::string &path={})
 parser (const std::string &id, const char *name, const std::string &desc, const std::string &path)
 parser (const std::string &id, const char *name, const std::string &desc={}, const decltype(dictionary)&dictionary={}, const std::string &path={})
virtual void quiet (const args &={}) noexcept
void remove ()
void stop ()
dx::service::manager::enumerate promoted this (::DWORD value)
dx::service::manager::status promoted this (promoted::lock_t &&lock, const ::DWORD &value, const ::DWORD &)

Public Attributes

dx::service::manager::enumerate * this
dx::service::manager::status * this

Protected Member Functions

virtual void arg (argsargs &argsargs)
bool head () const noexcept override
virtual void help (argsargs &argsargs)
virtual void help_head () const noexcept
virtual void indent (argsargs &argsargs)
virtual void info (args &)
virtual void install (argsargs &argsargs)
virtual void kill (args &)
virtual void load (argsargs &argsargs)
virtual void no_args (const argsargs &argsargs)
virtual void remove (args &)
virtual void run (args &)
auto select (const std::string &id)
virtual void start (argsargs &argsargs)
virtual void stop (args &)
virtual void version (const argsargs &argsargs={})

Protected Attributes

::DWORD access {}
std::string desc
std::map< std::deque< std::string >, dispatch > dictionary
::SC_HANDLE handle {}
std::string id
const char * name {}
struct dx::parser:: { ... }  parameter
std::string path
preference preference {std::string{"SOFTWARE\\"}+ id, HKEY_LOCAL_MACHINE, static_cast<::REGSAM>(process::admin()? KEY_ALL_ACCESS: KEY_READ)}
::SC_HANDLE service {}

Detailed Description

the service control command line: install, start, stop, remove and run in the console, on a dx::service::manager of its own. Its settings live under HKLM\SOFTWARE\<id>, writable where the process is elevated

Member Typedef Documentation

◆ args

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

Constructor & Destructor Documentation

◆ parser() [1/3]

dx::service::parser::parser ( const std::string & id,
const char * name,
const std::string & desc = {},
const decltype(dictionary)& dictionary = {},
const std::string & path = {} )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parser() [2/3]

dx::service::parser::parser ( const std::string & id,
const char * name,
const decltype(dictionary)& dictionary,
const std::string & path = {} )
inline

◆ parser() [3/3]

dx::service::parser::parser ( const std::string & id,
const char * name,
const std::string & desc,
const std::string & path )
inline
Here is the call graph for this function:

Member Function Documentation

◆ arg()

virtual void dx::service::parser::arg ( args & args)
inlineprotectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ close()

void dx::service::manager::close ( )
inlinenoexceptinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ head()

bool dx::service::parser::head ( ) const
inlineoverrideprotectedvirtualnoexcept

Reimplemented from dx::parser.

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

◆ info()

virtual void dx::service::parser::info ( args & )
inlineprotectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize()

void dx::service::manager::initialize ( const std::string & id = "",
const ::DWORD(&) access[2] = {SC_MANAGER_ALL_ACCESS, SERVICE_ALL_ACCESS},
const std::string desc = "",
const std::string & path = "" )
inlineinherited

◆ install() [1/2]

void dx::service::manager::install ( const std::string & name)
inlineinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ install() [2/2]

virtual void dx::service::parser::install ( args & args)
inlineprotectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kill()

virtual void dx::service::parser::kill ( args & )
inlineprotectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load()

virtual void dx::service::parser::load ( args & args)
inlineprotectedvirtual
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:

◆ open()

void dx::service::manager::open ( )
inlineinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator std::unique_ptr<::QUERY_SERVICE_CONFIGA >()

dx::service::manager::operator std::unique_ptr<::QUERY_SERVICE_CONFIGA > ( )
inlineinherited
Here is the call graph for this function:

◆ operator std::unique_ptr<::SERVICE_DESCRIPTION >()

dx::service::manager::operator std::unique_ptr<::SERVICE_DESCRIPTION > ( )
inlineinherited
Here is the call graph for this function:

◆ operator::SERVICE_STATUS_PROCESS()

dx::service::manager::operator::SERVICE_STATUS_PROCESS ( )
inlineinherited
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
Here is the caller graph for this function:

◆ remove() [1/2]

void dx::service::manager::remove ( )
inlineinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove() [2/2]

virtual void dx::service::parser::remove ( args & )
inlineprotectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

virtual void dx::service::parser::run ( args & )
inlineprotectedvirtual
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:

◆ start()

virtual void dx::service::parser::start ( args & args)
inlineprotectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop() [1/2]

void dx::service::manager::stop ( )
inlineinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop() [2/2]

virtual void dx::service::parser::stop ( args & )
inlineprotectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ this() [1/2]

dx::service::manager::enumerate promoted dx::service::manager::this ( ::DWORD value)
inlineinherited

◆ this() [2/2]

dx::service::manager::status promoted dx::service::manager::this ( promoted::lock_t && lock,
const ::DWORD & value,
const ::DWORD &  )
inlineinherited

◆ 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

◆ access

::DWORD dx::service::manager::access {}
protectedinherited

◆ desc

std::string dx::service::manager::desc
protectedinherited

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

◆ handle

::SC_HANDLE dx::service::manager::handle {}
protectedinherited

◆ id

std::string dx::service::manager::id
protectedinherited

◆ name

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

◆ parameter

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

◆ path

std::string dx::service::manager::path
protectedinherited

◆ preference

preference dx::service::parser::preference {std::string{"SOFTWARE\\"}+ id, HKEY_LOCAL_MACHINE, static_cast<::REGSAM>(process::admin()? KEY_ALL_ACCESS: KEY_READ)}
protected

◆ service

::SC_HANDLE dx::service::manager::service {}
protectedinherited

◆ this [1/2]

dx::service::manager::enumerate* dx::service::manager::this
inherited
Initial value:
{[this](::DWORD value){
switch(value){
case SERVICE_NOTIFY_DELETE_PENDING:
close();
break;
}}}}
void close() noexcept
Definition dx_service.h:380

◆ this [2/2]

dx::service::manager::status* dx::service::manager::this
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.