zypp::ProblemSolution Class Reference

Class representing one possible solution to one problem found during resolving. More...

#include <ProblemSolution.h>

Inheritance diagram for zypp::ProblemSolution:

zypp::base::ReferenceCounted zypp::solver::detail::ProblemSolutionIgnoreArchitecture zypp::solver::detail::ProblemSolutionIgnoreConflicts zypp::solver::detail::ProblemSolutionIgnoreInstalled zypp::solver::detail::ProblemSolutionIgnoreObsoletes zypp::solver::detail::ProblemSolutionIgnoreRequires zypp::solver::detail::ProblemSolutionInstall zypp::solver::detail::ProblemSolutionKeep zypp::solver::detail::ProblemSolutionUninstall zypp::solver::detail::ProblemSolutionUnlock List of all members.

Public Member Functions

 ProblemSolution (ResolverProblem_Ptr parent, const std::string &description, const std::string &details)
 Constructor.
 ~ProblemSolution ()
 Destructor.
std::string description () const
 Return a one-line text description of this solution.
std::string details () const
 Return a (possibly multi-line) detailed description of this solution or an empty string if there are no useful details.
ResolverProblem_Ptr problem () const
 Return the parent dependency problem.
bool apply (solver::detail::Resolver &resolver)
 Apply this solution, i.e.
void addAction (solver::detail::SolutionAction_constPtr action)
 Add an action to the actions list.

Protected Member Functions

void clear ()
 Clear all data.

Protected Attributes

ResolverProblem_Ptr _problem
solver::detail::CSolutionActionList _actions
std::string _description
std::string _details

Friends

std::ostream & operator<< (std::ostream &, const ProblemSolution &solution)
std::ostream & operator<< (std::ostream &, const ProblemSolutionList &solutionlist)
std::ostream & operator<< (std::ostream &, const CProblemSolutionList &solutionlist)

Detailed Description

Class representing one possible solution to one problem found during resolving.

All problems should have at least 2-3 (mutually exclusive) solutions:

Definition at line 43 of file ProblemSolution.h.


Constructor & Destructor Documentation

zypp::ProblemSolution::ProblemSolution ResolverProblem_Ptr  parent,
const std::string &  description,
const std::string &  details
 

Constructor.

zypp::ProblemSolution::~ProblemSolution  ) 
 

Destructor.

Definition at line 78 of file ProblemSolution.cc.


Member Function Documentation

void zypp::ProblemSolution::clear  )  [protected]
 

Clear all data.

In particular, delete all members of _actions.

Definition at line 118 of file ProblemSolution.cc.

References _actions.

std::string zypp::ProblemSolution::description  )  const [inline]
 

Return a one-line text description of this solution.

Definition at line 83 of file ProblemSolution.h.

References _description.

std::string zypp::ProblemSolution::details  )  const [inline]
 

Return a (possibly multi-line) detailed description of this solution or an empty string if there are no useful details.

Definition at line 89 of file ProblemSolution.h.

References _details.

ResolverProblem_Ptr zypp::ProblemSolution::problem  )  const [inline]
 

Return the parent dependency problem.

Definition at line 94 of file ProblemSolution.h.

References _problem.

bool zypp::ProblemSolution::apply solver::detail::Resolver resolver  ) 
 

Apply this solution, i.e.

execute all of its actions.

Returns 'true' on success, 'false' if actions could not be performed.

Definition at line 90 of file ProblemSolution.cc.

References _actions, and DBG.

void zypp::ProblemSolution::addAction solver::detail::SolutionAction_constPtr  action  ) 
 

Add an action to the actions list.

Definition at line 111 of file ProblemSolution.cc.

References _actions.

Referenced by zypp::solver::detail::ProblemSolutionIgnoreArchitecture::ProblemSolutionIgnoreArchitecture(), zypp::solver::detail::ProblemSolutionIgnoreConflicts::ProblemSolutionIgnoreConflicts(), zypp::solver::detail::ProblemSolutionIgnoreInstalled::ProblemSolutionIgnoreInstalled(), zypp::solver::detail::ProblemSolutionIgnoreObsoletes::ProblemSolutionIgnoreObsoletes(), zypp::solver::detail::ProblemSolutionIgnoreRequires::ProblemSolutionIgnoreRequires(), zypp::solver::detail::ProblemSolutionInstall::ProblemSolutionInstall(), zypp::solver::detail::ProblemSolutionKeep::ProblemSolutionKeep(), zypp::solver::detail::ProblemSolutionUninstall::ProblemSolutionUninstall(), and zypp::solver::detail::ProblemSolutionUnlock::ProblemSolutionUnlock().


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  ,
const ProblemSolution solution
[friend]
 

std::ostream& operator<< std::ostream &  ,
const ProblemSolutionList solutionlist
[friend]
 

std::ostream& operator<< std::ostream &  ,
const CProblemSolutionList solutionlist
[friend]
 


Member Data Documentation

ResolverProblem_Ptr zypp::ProblemSolution::_problem [protected]
 

Definition at line 56 of file ProblemSolution.h.

Referenced by problem().

solver::detail::CSolutionActionList zypp::ProblemSolution::_actions [protected]
 

Definition at line 57 of file ProblemSolution.h.

Referenced by addAction(), apply(), clear(), and zypp::operator<<().

std::string zypp::ProblemSolution::_description [protected]
 

Definition at line 58 of file ProblemSolution.h.

Referenced by description(), zypp::operator<<(), zypp::solver::detail::ProblemSolutionIgnoreArchitecture::ProblemSolutionIgnoreArchitecture(), zypp::solver::detail::ProblemSolutionIgnoreConflicts::ProblemSolutionIgnoreConflicts(), zypp::solver::detail::ProblemSolutionIgnoreInstalled::ProblemSolutionIgnoreInstalled(), zypp::solver::detail::ProblemSolutionIgnoreObsoletes::ProblemSolutionIgnoreObsoletes(), zypp::solver::detail::ProblemSolutionIgnoreRequires::ProblemSolutionIgnoreRequires(), zypp::solver::detail::ProblemSolutionInstall::ProblemSolutionInstall(), zypp::solver::detail::ProblemSolutionKeep::ProblemSolutionKeep(), zypp::solver::detail::ProblemSolutionUninstall::ProblemSolutionUninstall(), and zypp::solver::detail::ProblemSolutionUnlock::ProblemSolutionUnlock().

std::string zypp::ProblemSolution::_details [protected]
 

Definition at line 59 of file ProblemSolution.h.

Referenced by details(), zypp::operator<<(), zypp::solver::detail::ProblemSolutionIgnoreArchitecture::ProblemSolutionIgnoreArchitecture(), zypp::solver::detail::ProblemSolutionInstall::ProblemSolutionInstall(), zypp::solver::detail::ProblemSolutionKeep::ProblemSolutionKeep(), and zypp::solver::detail::ProblemSolutionUninstall::ProblemSolutionUninstall().


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