Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

PMManager Class Reference

#include <PMManager.h>

Inheritance diagram for PMManager:

PMPackageManager PMSelectionManager PMYouPatchManager List of all members.

Public Types

typedef std::set< PMSelectablePtr > PMSelectableVec

Public Member Functions

virtual void SaveState ()
virtual bool RestoreState ()
virtual bool DiffState () const
virtual void ClearSaveState ()
 PMManager ()
virtual ~PMManager ()
void poolSetInstalled (PMObjectContainerIter iter_r)
void poolAddCandidates (PMObjectContainerIter iter_r)
void poolRemoveCandidates (PMObjectContainerIter iter_r)
void poolSortCandidates ()
unsigned size () const
bool empty () const
PMSelectableVec::const_iterator begin () const
PMSelectableVec::const_iterator end () const
PMSelectableVec::const_reverse_iterator rbegin () const
PMSelectableVec::const_reverse_iterator rend () const
PMSelectablePtr getItem (const std::string &name_t) const
PMSelectablePtr operator[] (const std::string &name_r) const
void setNothingSelected ()
bool anyMatch (PMSelectable::Test_method fnc_r) const
bool anyMatch (PMSelectable::Test_fnc fnc_r) const
bool anythingByUser () const
bool anythingToDelete () const
bool anythingToInstall () const
bool solveInstall (PkgDep::ResultList &good, PkgDep::ErrorResultList &bad, bool filter_conflicts_with_installed=false)
bool solveConsistent (PkgDep::ErrorResultList &bad)
virtual void writeSettings ()
virtual void readSettings ()

Protected Member Functions

virtual Pathname settingsFile () const

Private Types

typedef std::map< std::string,
PMSelectablePtr > 
PMSelectablePool
typedef std::list< PMSelectable::SavedStateSavedList

Private Member Functions

PMManageroperator= (const PMManager &)
 PMManager (const PMManager &)
void invalidateSolverSets ()
virtual PMObjectPtr assertObjectType (const PMObjectPtr &object_r) const=0
virtual PMSelectablePtr newSelectable (const PkgName &name_r) const
virtual void prePSI ()
virtual void postPSI ()
virtual void prePAC ()
virtual void postPAC ()
virtual void prePRC ()
virtual void postPRC ()
PMSelectablePtr poolLookup (const std::string &name_r) const
PMSelectablePtr poolProvide (const std::string &name_r)
void poolAdjust ()
void clearAll ()
void checkPool () const
void buildSets (PkgSet &installed, PkgSet &available, PkgSet &to_install)

Private Attributes

PMSelectablePool _itemPool
PMSelectableVec _items
PkgSetinstalled
PkgSetavailable
PkgSettoinstall
PkgSetnowinstalled
SavedList _savedList

Friends

std::ostream & operator<< (std::ostream &str, const PMManager &obj)

Member Typedef Documentation

typedef std::map<std::string,PMSelectablePtr> PMManager::PMSelectablePool [private]
 

typedef std::set<PMSelectablePtr> PMManager::PMSelectableVec
 

typedef std::list<PMSelectable::SavedState> PMManager::SavedList [private]
 


Constructor & Destructor Documentation

PMManager::PMManager const PMManager  )  [private]
 

PMManager::PMManager  ) 
 

PMManager::~PMManager  )  [virtual]
 


Member Function Documentation

bool PMManager::anyMatch PMSelectable::Test_fnc  fnc_r  )  const
 

General test whether fnc_r returns true for at least one Selectable.

Parameters:
fnc_r pointer to boolean test function taking a constPMSelectablePtr as argument.

bool PMManager::anyMatch PMSelectable::Test_method  fnc_r  )  const
 

General test whether fnc_r returns true for at least one Selectable.

Parameters:
fnc_r pointer to a boolean PMSelectable const method (e.g. PMSelectable::by_user).

bool PMManager::anythingByUser  )  const [inline]
 

are there currently any "by_user" selectables ?

bool PMManager::anythingToDelete  )  const [inline]
 

are there currently any selectables for deletion ?

bool PMManager::anythingToInstall  )  const [inline]
 

are there currently any selectables for installation ?

virtual PMObjectPtr PMManager::assertObjectType const PMObjectPtr &  object_r  )  const [private, pure virtual]
 

Concrete Manager has to assert that the passed ObjectPtr actually references the correct type of Object (PackageManager e.g. will handle nothing else but Packages).

Implemented in PMPackageManager, PMSelectionManager, and PMYouPatchManager.

PMSelectableVec::const_iterator PMManager::begin  )  const [inline]
 

Iterator for Selectables within this Manager.

void PMManager::buildSets PkgSet installed,
PkgSet available,
PkgSet to_install
[private]
 

set maximum number of packages that will be automatically selected for removal on upgrade

void PMManager::checkPool  )  const [private]
 

void PMManager::clearAll  )  [private]
 

void PMManager::ClearSaveState  )  [virtual]
 

Forgett a previously saved selection.

Reimplemented in PMSelectionManager.

bool PMManager::DiffState  )  const [virtual]
 

Return true if current selection differs from previously saved selection.

bool PMManager::empty  )  const [inline]
 

True if Manager does not contain any Selectable

PMSelectableVec::const_iterator PMManager::end  )  const [inline]
 

Iterator for Selectables within this Manager.

PMSelectablePtr PMManager::getItem const std::string &  name_t  )  const [inline]
 

PMSelectablePtr to the Selectable with the given name, or NULL if there is none.

void PMManager::invalidateSolverSets  )  [private]
 

PMSelectablePtr PMManager::newSelectable const PkgName name_r  )  const [private, virtual]
 

Currently we don't need concrete Selectables (e.g. PackageSelectable), thus new Selectables are created here. Otherwise make it pure virtual, and let the concrete Manager create the appropriate type of Selectable.

PMManager& PMManager::operator= const PMManager  )  [private]
 

PMSelectablePtr PMManager::operator[] const std::string &  name_r  )  const [inline]
 

PMSelectablePtr to the Selectable with the given name, or NULL if there is none.

void PMManager::poolAddCandidates PMObjectContainerIter  iter_r  ) 
 

Called from InstSrc to add provided Objects

void PMManager::poolAdjust  )  [private]
 

Remove superfluous empty Selecatables. To be called after Objects were removed from Selectables.

This clears any saved state!

PMSelectablePtr PMManager::poolLookup const std::string &  name_r  )  const [private]
 

Lookup Selectable by name.

PMSelectablePtr PMManager::poolProvide const std::string &  name_r  )  [private]
 

Make shure the pool contains a Selectable named name_r, and return it.

void PMManager::poolRemoveCandidates PMObjectContainerIter  iter_r  ) 
 

Called from InstSrc to remove the formerly added objects.

void PMManager::poolSetInstalled PMObjectContainerIter  iter_r  ) 
 

Called from TargetSystem providing all(!) installed objects

void PMManager::poolSortCandidates  ) 
 

Sort all Selectables candiadte lists. This has to be done whenever the sort criteria were changed (e.g. after reordeing the InstSrces).

virtual void PMManager::postPAC  )  [inline, private, virtual]
 

Post poolAddCandidates hook

virtual void PMManager::postPRC  )  [inline, private, virtual]
 

Post poolRemoveCandidates hook

virtual void PMManager::postPSI  )  [inline, private, virtual]
 

Post poolSetInstalled hook

Reimplemented in PMPackageManager.

virtual void PMManager::prePAC  )  [inline, private, virtual]
 

Pre poolAddCandidates hook

virtual void PMManager::prePRC  )  [inline, private, virtual]
 

Pre poolRemoveCandidates hook

virtual void PMManager::prePSI  )  [inline, private, virtual]
 

Pre poolSetInstalled hook

Reimplemented in PMPackageManager.

PMSelectableVec::const_reverse_iterator PMManager::rbegin  )  const [inline]
 

Iterator for Selectables within this Manager.

void PMManager::readSettings  )  [virtual]
 

Read setting slike Taboo states from disk.

PMSelectableVec::const_reverse_iterator PMManager::rend  )  const [inline]
 

Iterator for Selectables within this Manager.

bool PMManager::RestoreState  )  [virtual]
 

Restore previously saved selection.

Reimplemented in PMSelectionManager.

void PMManager::SaveState  )  [virtual]
 

Save current selection.

Reimplemented in PMSelectionManager.

void PMManager::setNothingSelected  ) 
 

Set all Selectables to NothingSelected ( neither install nor delete )

virtual Pathname PMManager::settingsFile  )  const [inline, protected, virtual]
 

Return file name used to read and write settings. Subclasses should override this function and provide an appropriate filename, if they need their settings to be stored.

Reimplemented in PMYouPatchManager.

unsigned PMManager::size  )  const [inline]
 

The number of Selectables within this Manager.

bool PMManager::solveConsistent PkgDep::ErrorResultList bad  ) 
 

determine whether installed system is consistent

Parameters:
bad broken packages

bool PMManager::solveInstall PkgDep::ResultList good,
PkgDep::ErrorResultList bad,
bool  filter_conflicts_with_installed = false
 

resolve dependencies for packages marked for installation

Parameters:
good (output) list of PkgDep::Result that have been marked for installation/upgrade
bad (output) list of PkgDep::ErrorResult that have trouble
filter_conflicts_with_installed filter packages which are selected for insallation by appl and conflict with an already installed one
Returns:
true if no conflicts where found (i.e no bad)

void PMManager::writeSettings  )  [virtual]
 

Write settings like Taboo states to disk.


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  str,
const PMManager obj
[friend]
 


Member Data Documentation

PMSelectablePool PMManager::_itemPool [private]
 

PMSelectableVec PMManager::_items [private]
 

SavedList PMManager::_savedList [private]
 

PkgSet* PMManager::available [private]
 

PkgSet* PMManager::installed [private]
 

PkgSet* PMManager::nowinstalled [private]
 

PkgSet* PMManager::toinstall [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Nov 9 14:30:32 2007 for yast2-packagemanager by doxygen 1.3.6