zypp::solver::detail::InstallOrder Class Reference

compute Installation order. More...

#include <InstallOrder.h>

List of all members.

Public Member Functions

 InstallOrder (const ResPool &pool, const PoolItemSet &toinstall, const PoolItemSet &installed)
 Constructor.
PoolItemList computeNextSet ()
 Compute a list of ResItems which have no requirements and can be installed in parallel without conflicts.
void setInstalled (PoolItem_Ref item)
 set a Solvable as installed, computeNextSet is able to compute a new set then
void setInstalled (const PoolItemList &list)
 like above, for convenience
void startrdfs ()
 recoursive depth first search, build internal trees
void init ()
 Initialize data structures.
const PoolItemList getTopSorted () const
 compute topological sorted list
const void printAdj (std::ostream &os, bool reversed=false) const

Private Types

typedef std::map< PoolItem_Ref,
PoolItemList
Graph
 adjacency list type
typedef std::map< PoolItem_Ref,
NodeInfo
Nodes

Private Member Functions

void rdfsvisit (PoolItem_Ref item)
PoolItem_Ref findProviderInSet (const Capability requirement, const PoolItemSet &candidates) const
bool doesProvide (const Capability requirement, PoolItem_Ref item) const

Private Attributes

const ResPool_pool
PoolItemSet _toinstall
PoolItemSet _installed
Graph _graph
 adjacency list, package -> requirements
Graph _rgraph
 reversed graph, package -> referers
Nodes _nodes
unsigned _rdfstime
PoolItemList _topsorted
bool _dirty
unsigned _numrun

Classes

struct  NodeInfo


Detailed Description

compute Installation order.


There are two Interfaces:

Definition at line 60 of file InstallOrder.h.


Member Typedef Documentation

typedef std::map<PoolItem_Ref, PoolItemList> zypp::solver::detail::InstallOrder::Graph [private]
 

adjacency list type

Definition at line 68 of file InstallOrder.h.

typedef std::map<PoolItem_Ref, NodeInfo> zypp::solver::detail::InstallOrder::Nodes [private]
 

Definition at line 89 of file InstallOrder.h.


Constructor & Destructor Documentation

zypp::solver::detail::InstallOrder::InstallOrder const ResPool pool,
const PoolItemSet toinstall,
const PoolItemSet installed
 

Constructor.

Parameters:
toinstall Set of ResItems that have to be installed
installed Set of ResItems that are already installed

Definition at line 55 of file InstallOrder.cc.

References _DEBUG, _installed, and _toinstall.


Member Function Documentation

void zypp::solver::detail::InstallOrder::rdfsvisit PoolItem_Ref  item  )  [private]
 

Definition at line 215 of file InstallOrder.cc.

References _nodes, _rdfstime, zypp::solver::detail::InstallOrder::NodeInfo::begintime, ITEMNAME, zypp::Dep::PREREQUIRES, zypp::solver::detail::InstallOrder::NodeInfo::visited, and XXX.

PoolItem_Ref zypp::solver::detail::InstallOrder::findProviderInSet const Capability  requirement,
const PoolItemSet candidates
const [private]
 

Definition at line 169 of file InstallOrder.cc.

References doesProvide().

bool zypp::solver::detail::InstallOrder::doesProvide const Capability  requirement,
PoolItem_Ref  item
const [private]
 

Definition at line 156 of file InstallOrder.cc.

References zypp::Dep::PROVIDES, and zypp::CapMatch::yes.

Referenced by findProviderInSet().

PoolItemList zypp::solver::detail::InstallOrder::computeNextSet  ) 
 

Compute a list of ResItems which have no requirements and can be installed in parallel without conflicts.

Use setInstalled to make computation of a different set possible

Definition at line 93 of file InstallOrder.cc.

References _dirty, _nodes, ITEMNAME, startrdfs(), and XXX.

void zypp::solver::detail::InstallOrder::setInstalled PoolItem_Ref  item  ) 
 

set a Solvable as installed, computeNextSet is able to compute a new set then

Definition at line 119 of file InstallOrder.cc.

References _dirty, _installed, _nodes, _rgraph, _toinstall, ITEMNAME, WAR, and XXX.

Referenced by setInstalled().

void zypp::solver::detail::InstallOrder::setInstalled const PoolItemList list  ) 
 

like above, for convenience

Definition at line 145 of file InstallOrder.cc.

References setInstalled().

void zypp::solver::detail::InstallOrder::startrdfs  ) 
 

recoursive depth first search, build internal trees

Definition at line 317 of file InstallOrder.cc.

References _graph, _nodes, _numrun, _rdfstime, _rgraph, _toinstall, _topsorted, and XXX.

Referenced by computeNextSet(), and init().

void zypp::solver::detail::InstallOrder::init  )  [inline]
 

Initialize data structures.

Must be called before any other function.

Definition at line 143 of file InstallOrder.h.

References startrdfs().

const PoolItemList zypp::solver::detail::InstallOrder::getTopSorted  )  const
 

compute topological sorted list

Returns:
list of resolvables in an installable order

Definition at line 357 of file InstallOrder.cc.

References _topsorted.

const void zypp::solver::detail::InstallOrder::printAdj std::ostream &  os,
bool  reversed = false
const
 

Definition at line 69 of file InstallOrder.cc.

References _graph, _nodes, _rgraph, and name.


Member Data Documentation

const ResPool& zypp::solver::detail::InstallOrder::_pool [private]
 

Definition at line 63 of file InstallOrder.h.

PoolItemSet zypp::solver::detail::InstallOrder::_toinstall [private]
 

Definition at line 64 of file InstallOrder.h.

Referenced by InstallOrder(), setInstalled(), and startrdfs().

PoolItemSet zypp::solver::detail::InstallOrder::_installed [private]
 

Definition at line 65 of file InstallOrder.h.

Referenced by InstallOrder(), and setInstalled().

Graph zypp::solver::detail::InstallOrder::_graph [private]
 

adjacency list, package -> requirements

Definition at line 71 of file InstallOrder.h.

Referenced by printAdj(), and startrdfs().

Graph zypp::solver::detail::InstallOrder::_rgraph [private]
 

reversed graph, package -> referers

Definition at line 74 of file InstallOrder.h.

Referenced by printAdj(), setInstalled(), and startrdfs().

Nodes zypp::solver::detail::InstallOrder::_nodes [private]
 

Definition at line 91 of file InstallOrder.h.

Referenced by computeNextSet(), printAdj(), rdfsvisit(), setInstalled(), and startrdfs().

unsigned zypp::solver::detail::InstallOrder::_rdfstime [private]
 

Definition at line 93 of file InstallOrder.h.

Referenced by rdfsvisit(), and startrdfs().

PoolItemList zypp::solver::detail::InstallOrder::_topsorted [private]
 

Definition at line 95 of file InstallOrder.h.

Referenced by getTopSorted(), and startrdfs().

bool zypp::solver::detail::InstallOrder::_dirty [private]
 

Definition at line 97 of file InstallOrder.h.

Referenced by computeNextSet(), and setInstalled().

unsigned zypp::solver::detail::InstallOrder::_numrun [private]
 

Definition at line 99 of file InstallOrder.h.

Referenced by startrdfs().


The documentation for this class was generated from the following files:
Generated on Thu Jul 6 00:07:33 2006 for zypp by  doxygen 1.4.6