LibPkg
|
Class to check environment and convert a string environment specification into a pkg_env There is only a single instance of this. More...
#include <env_checker.h>
Classes | |
class | watcher |
A mixin class to allow an object to watch the environment checker. More... | |
Public Types | |
typedef std::map< std::string, env_check * > | check_map |
Public Member Functions | |
void | add_ref () |
void | remove_ref () |
pkg_env * | package_env (const std::string &env_list, const std::string &os_depends) |
Get a package environment for list of checks. More... | |
const check_map & | checks () const |
const check_map & | module_checks () const |
std::string | get_module_id (const std::string &title) |
Get module id. More... | |
bool | clear_environment_overrides () |
Clear any enviroment overrides. More... | |
bool | override_environment (const std::set< std::string > &new_env, const std::set< std::string > &new_mods) |
Set the enviroment. More... | |
Static Public Member Functions | |
static env_checker * | instance () |
Friends | |
class | watcher |
class | env_checker_ptr |
Class to check environment and convert a string environment specification into a pkg_env There is only a single instance of this.
Create one or more env_checker_ptr to manager this.
typedef std::map<std::string, env_check *> pkg::env_checker::check_map |
|
inlinestatic |
Referenced by pkg::env_packages_table::env_packages_table(), and pkg::binary_control::package_env().
|
inline |
Referenced by pkg::env_checker_ptr::env_checker_ptr().
void pkg::env_checker::remove_ref | ( | ) |
Referenced by pkg::env_checker_ptr::~env_checker_ptr().
pkg_env * pkg::env_checker::package_env | ( | const std::string & | env_list, |
const std::string & | os_depends | ||
) |
Get a package environment for list of checks.
References pkg::ENV_MODULE_SEP, pkg::env_check::name(), and pkg::Unknown.
Referenced by pkg::binary_control::package_env().
|
inline |
|
inline |
std::string pkg::env_checker::get_module_id | ( | const std::string & | title | ) |
Get module id.
ID is made unique for this machine by using a file as a database of modules found.
bool pkg::env_checker::clear_environment_overrides | ( | ) |
Clear any enviroment overrides.
References pkg::env_check::available(), and pkg::env_check::detected().
bool pkg::env_checker::override_environment | ( | const std::set< std::string > & | new_env, |
const std::set< std::string > & | new_mods | ||
) |
Set the enviroment.
new_env | set containing name environments that should be marked available |
new_mods | set containing name of modules that should be marked available |
References pkg::env_check::available(), pkg::env_check::id(), pkg::env_check::install_priority(), pkg::env_check::name(), pkg::System, and pkg::env_check::type().
|
friend |
|
friend |
Reference Manual | LibPkg | Version 0.9.0 (4 Sep 2020) |