7 #ifndef LIBPKG_ENV_PACKAGES_TABLE 8 #define LIBPKG_ENV_PACKAGES_TABLE 41 best(
const version& _pkgvrsn,
const string &_pkgenv) : pkgvrsn(_pkgvrsn), pkgenv(_pkgenv) {}
51 std::map<key_type,mapped_type> _data;
61 {
return _data.begin(); }
66 const_iterator
end()
const 67 {
return _data.end(); }
73 const_iterator
find(
const std::string &pkgname)
const 74 {
return _data.find(pkgname);}
87 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:25
Class to check environment and convert a string environment specification into a pkg_env There is onl...
Definition: env_checker.h:144
env_packages_table(binary_control_table *control)
Definition: env_packages_table.cc:12
best()
Definition: env_packages_table.h:36
const_iterator begin() const
Get const iterator for start of table.
Definition: env_packages_table.h:60
The namespace used to hold the package management library.
Definition: auto_dir.cc:12
A class that filters the binary control table to create a list of the packages available in the curre...
Definition: env_packages_table.h:23
A mixin class to allow an object to watch one or more tables.
Definition: table.h:51
best mapped_type
Definition: env_packages_table.h:44
version pkgvrsn
The package version.
Definition: env_packages_table.h:32
string pkgenv
The package environment id.
Definition: env_packages_table.h:34
virtual ~env_packages_table()
Definition: env_packages_table.cc:20
A mixin class to allow an object to watch the environment checker.
Definition: env_checker.h:207
best(const version &_pkgvrsn, const string &_pkgenv)
Contruct best type from package name and version.
Definition: env_packages_table.h:41
std::string key_type
Definition: env_packages_table.h:43
Definition: env_packages_table.h:29
A class to represent the content of a RiscPkg control file.
Definition: control.h:24
A class for mapping package name and version to binary control record.
Definition: binary_control_table.h:21
A class to represent a package version.
Definition: version.h:21
std::map< key_type, mapped_type >::const_iterator const_iterator
Definition: env_packages_table.h:45
A class to represent the content of a RiscPkg binary control file.
Definition: binary_control.h:24
const_iterator find(const std::string &pkgname) const
Find a package in the list.
Definition: env_packages_table.h:73
const best & operator[](const std::string &pkgname) const
Get information on the "best" package for the environment.
Definition: env_packages_table.cc:37
const_iterator end() const
Get const iterator for end of table.
Definition: env_packages_table.h:66
A base class to represent a data table.
Definition: table.h:18