Deepsolver
Classes | Public Types | Public Member Functions | Public Attributes
PackageScopeContent Class Reference

The information about all known packages. More...

List of all members.

Classes

struct  PkgInfo
struct  RelInfo

Public Types

typedef std::list< PkgInfoPkgInfoList
typedef std::vector< PkgInfoPkgInfoVector
typedef std::list< RelInfoRelInfoList
typedef std::vector< RelInfoRelInfoVector

Public Member Functions

void addStringToAutoRelease (char *str)
bool checkName (const std::string &name) const
void enhance (const PkgVector &pkgs, int flags)
void locateRange (PackageId packageId, VarId &fromPos, VarId &toPos) const
std::string packageIdToStr (PackageId packageId) const
 PackageScopeContent ()
 The default constructor.
void rearrangeNames ()
PackageId strToPackageId (const std::string &name) const
virtual ~PackageScopeContent ()
 The destructor.

Public Attributes

StringVector names
PkgInfoVector pkgInfoVector
RelInfoVector relInfoVector

Detailed Description

This class is the central place for storing all required information used in transaction processing. It contains list of all packages available in remote repositories as well as installed packages and packages listed as local files.

Data includes package name, epoch, version, release and lists of requires, obsoletes, provides and conflicts. Complete list of packages is saved in pkgInfoVector. The index of corresponding entry in pkgInfoVector is called VarId of the package. Name of package is replaced by unsigned integer number called package ID (PackageId typedef).

The data structure in this class is organized to be optimized for search. Names vector and pkgInfoVector (by pkgId field) are sorted to allow search with logarithmic time. One more field contains provide -> providers mapping with names replaced by their package IDs. It is also sorted by provide entry field.

See also:
PackageScopeContentBuilder PackageScopeContentLoade PackageScope OperationCorer