libzypp  10.5.0
zypp::ResolverProblem Class Reference

#include <ResolverProblem.h>

Inheritance diagram for zypp::ResolverProblem:

List of all members.

Public Member Functions

 ResolverProblem (const std::string &description, const std::string &details)
 Constructor.
 ~ResolverProblem ()
 Destructor.
std::string description () const
 Return a one-line description of the problem.
std::string details () const
 Return a (possibly muti-line) detailed description of the problem or an empty string if there are no useful details.
void setDescription (const std::string &description)
 Set description of the problem.
void setDetails (const std::string &detail)
 Set detail description of the problem.
ProblemSolutionList solutions () const
 Return the possible solutions to this problem.
Resolver_constPtr resolver () const
 Return the parent dependency resolver.
void addSolution (ProblemSolution_Ptr solution, bool inFront=false)
 Add a solution to this problem.

Private Member Functions

void clear ()
 Clear all data.

Private Attributes

Resolver_constPtr _resolver
std::string _description
std::string _details
ProblemSolutionList _solutions

Friends

std::ostream & operator<< (std::ostream &, const ResolverProblem &problem)

Detailed Description

Definition at line 24 of file ResolverProblem.h.


Constructor & Destructor Documentation

zypp::ResolverProblem::ResolverProblem ( const std::string &  description,
const std::string &  details 
)

Constructor.

Definition at line 64 of file ResolverProblem.cc.

zypp::ResolverProblem::~ResolverProblem ( )

Destructor.

Definition at line 73 of file ResolverProblem.cc.


Member Function Documentation

void zypp::ResolverProblem::clear ( ) [private]

Clear all data.

In particular, delete all members of _solutions.

Definition at line 115 of file ResolverProblem.cc.

std::string zypp::ResolverProblem::description ( ) const [inline]

Return a one-line description of the problem.

Definition at line 65 of file ResolverProblem.h.

std::string zypp::ResolverProblem::details ( ) const [inline]

Return a (possibly muti-line) detailed description of the problem or an empty string if there are no useful details.

Definition at line 71 of file ResolverProblem.h.

void zypp::ResolverProblem::setDescription ( const std::string &  description) [inline]

Set description of the problem.

Definition at line 76 of file ResolverProblem.h.

void zypp::ResolverProblem::setDetails ( const std::string &  detail) [inline]

Set detail description of the problem.

Definition at line 82 of file ResolverProblem.h.

ProblemSolutionList zypp::ResolverProblem::solutions ( ) const

Return the possible solutions to this problem.

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

  • Undo: Do not perform the offending transaction (do not install the package that had unsatisfied requirements, do not remove the package that would break other packages' requirements)
  • Remove referrers: Remove all packages that would break because they depend on the package that is requested to be removed
  • Ignore: Inject artificial "provides" for a missing requirement (pretend that requirement is satisfied)

Definition at line 93 of file ResolverProblem.cc.

Resolver_constPtr zypp::ResolverProblem::resolver ( ) const [inline]

Return the parent dependency resolver.

Definition at line 104 of file ResolverProblem.h.

void zypp::ResolverProblem::addSolution ( ProblemSolution_Ptr  solution,
bool  inFront = false 
)

Add a solution to this problem.

This class takes over ownership of the problem and will delete it when neccessary.

Definition at line 104 of file ResolverProblem.cc.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ,
const ResolverProblem problem 
) [friend]

Member Data Documentation

Resolver_constPtr zypp::ResolverProblem::_resolver [private]

Definition at line 39 of file ResolverProblem.h.

std::string zypp::ResolverProblem::_description [private]

Definition at line 40 of file ResolverProblem.h.

std::string zypp::ResolverProblem::_details [private]

Definition at line 41 of file ResolverProblem.h.


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