LibPkg
Classes | Public Types | Public Member Functions | List of all members
pkg::env_packages_table Class Reference

A class that filters the binary control table to create a list of the packages available in the current environment. More...

#include <env_packages_table.h>

Inheritance diagram for pkg::env_packages_table:
pkg::table pkg::table::watcher pkg::env_checker::watcher

Classes

struct  best
 

Public Types

typedef std::string key_type
 
typedef best mapped_type
 
typedef std::map< key_type, mapped_type >::const_iterator const_iterator
 

Public Member Functions

 env_packages_table (binary_control_table *control)
 
virtual ~env_packages_table ()
 
const_iterator begin () const
 Get const iterator for start of table. More...
 
const_iterator end () const
 Get const iterator for end of table. More...
 
const_iterator find (const std::string &pkgname) const
 Find a package in the list. More...
 
const binary_controlcontrol (const std::string &pkgname) const
 Get the control record for the "best" package for the environment. More...
 
const bestoperator[] (const std::string &pkgname) const
 Get information on the "best" package for the environment. More...
 
- Public Member Functions inherited from pkg::table
 table ()
 Construct table. More...
 
virtual ~table ()
 Destroy table. More...
 

Additional Inherited Members

- Protected Member Functions inherited from pkg::table
void notify ()
 Notify watchers that a change has occurred. More...
 

Detailed Description

A class that filters the binary control table to create a list of the packages available in the current environment.

It also records the latest version with the highest install priority to give the "best" version to install.

Member Typedef Documentation

◆ key_type

typedef std::string pkg::env_packages_table::key_type

◆ mapped_type

◆ const_iterator

Constructor & Destructor Documentation

◆ env_packages_table()

pkg::env_packages_table::env_packages_table ( binary_control_table control)

◆ ~env_packages_table()

pkg::env_packages_table::~env_packages_table ( )
virtual

Member Function Documentation

◆ begin()

const_iterator pkg::env_packages_table::begin ( ) const
inline

Get const iterator for start of table.

Returns
the const iterator

◆ end()

const_iterator pkg::env_packages_table::end ( ) const
inline

Get const iterator for end of table.

Returns
the const iterator

Referenced by control(), and operator[]().

◆ find()

const_iterator pkg::env_packages_table::find ( const std::string &  pkgname) const
inline

Find a package in the list.

Returns
iterator to best package or end() if not found

References control(), and operator[]().

Referenced by control(), pkg::pkgbase::fix_dependencies(), operator[](), and pkg::pkgbase::remove_auto().

◆ control()

const binary_control & pkg::env_packages_table::control ( const std::string &  pkgname) const

Get the control record for the "best" package for the environment.

References end(), and find().

Referenced by find().

◆ operator[]()

const env_packages_table::best & pkg::env_packages_table::operator[] ( const std::string &  pkgname) const

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

Reference Manual LibPkg Version 0.6.1 (28 Jan 2015)