18 #ifndef LIBPKG_ENV_PACKAGES_TABLE 19 #define LIBPKG_ENV_PACKAGES_TABLE 52 best(
const version& _pkgvrsn,
const string &_pkgenv) : pkgvrsn(_pkgvrsn), pkgenv(_pkgenv) {}
62 std::map<key_type,mapped_type> _data;
72 {
return _data.begin(); }
77 const_iterator
end()
const 78 {
return _data.end(); }
84 const_iterator
find(
const std::string &pkgname)
const 85 {
return _data.find(pkgname);}
98 virtual void handle_change(
table& t);
const binary_control & control(const std::string &pkgname) const
Get the control record for the "best" package for the environment.
Definition: env_packages_table.cc:36
Class to check environment and convert a string environment specification into a pkg_env There is onl...
Definition: env_checker.h:156
env_packages_table(binary_control_table *control)
Definition: env_packages_table.cc:23
best()
Definition: env_packages_table.h:47
const_iterator begin() const
Get const iterator for start of table.
Definition: env_packages_table.h:71
The namespace used to hold the package management library.
Definition: auto_dir.cc:23
A class that filters the binary control table to create a list of the packages available in the curre...
Definition: env_packages_table.h:34
A mixin class to allow an object to watch one or more tables.
Definition: table.h:62
best mapped_type
Definition: env_packages_table.h:55
version pkgvrsn
The package version.
Definition: env_packages_table.h:43
string pkgenv
The package environment id.
Definition: env_packages_table.h:45
virtual ~env_packages_table()
Definition: env_packages_table.cc:31
A mixin class to allow an object to watch the environment checker.
Definition: env_checker.h:219
best(const version &_pkgvrsn, const string &_pkgenv)
Contruct best type from package name and version.
Definition: env_packages_table.h:52
std::string key_type
Definition: env_packages_table.h:54
Definition: env_packages_table.h:40
A class to represent the content of a RiscPkg control file.
Definition: control.h:35
A class for mapping package name and version to binary control record.
Definition: binary_control_table.h:32
A class to represent a package version.
Definition: version.h:32
std::map< key_type, mapped_type >::const_iterator const_iterator
Definition: env_packages_table.h:56
A class to represent the content of a RiscPkg binary control file.
Definition: binary_control.h:35
const_iterator find(const std::string &pkgname) const
Find a package in the list.
Definition: env_packages_table.h:84
const best & operator[](const std::string &pkgname) const
Get information on the "best" package for the environment.
Definition: env_packages_table.cc:48
const_iterator end() const
Get const iterator for end of table.
Definition: env_packages_table.h:77
A base class to represent a data table.
Definition: table.h:29