libzypp 17.31.23
zypp::ResolverProblem Class Reference

Describe a solver problem and offer solutions. More...

#include <ResolverProblem.h>

Inheritance diagram for zypp::ResolverProblem:

Classes

class  Impl
 ResolverProblem implementation. More...
 

Public Member Functions

 ResolverProblem ()
 Constructor.
 
 ResolverProblem (std::string description)
 Constructor.
 
 ResolverProblem (std::string description, std::string details)
 Constructor.
 
 ResolverProblem (std::string description, std::string details, std::vector< std::string > &&completeProblemInfo)
 Constructor.
 
 ~ResolverProblem ()
 Destructor.
 
const std::string & description () const
 Return a one-line description of the problem.
 
const std::string & details () const
 Return a (possibly muti-line) detailed description of the problem or an empty string if there are no useful details.
 
const std::vector< std::string > & completeProblemInfo () const
 Return a one-line description for each problematic rule in the problem tree.
 
const ProblemSolutionListsolutions () const
 Return the possible solutions to this problem.
 
void setDescription (std::string description)
 Set description of the problem.
 
void setDetails (std::string details)
 Set detail description of the problem.
 
void addSolution (ProblemSolution_Ptr solution, bool inFront=false)
 Add a solution to this problem.
 
- Public Member Functions inherited from zypp::base::ReferenceCounted
 ReferenceCounted ()
 Default ctor.
 
 ReferenceCounted (const ReferenceCounted &rhs)
 Copy ctor.
 
virtual ~ReferenceCounted ()
 Dtor.
 
ReferenceCountedoperator= (const ReferenceCounted &)
 Assignment.
 
unsigned refCount () const
 Return reference counter value.
 
void ref () const
 Add a reference.
 
void unref () const
 Release a reference.
 

Private Attributes

RWCOW_pointer< Impl_pimpl
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &, const ResolverProblem &obj)
 Stream output.
 
std::ostream & operator<< (std::ostream &, const ResolverProblemList &obj)
 Stream output.
 

Additional Inherited Members

- Static Public Member Functions inherited from zypp::base::ReferenceCounted
static void add_ref (const ReferenceCounted *ptr_r)
 Called by zypp::intrusive_ptr to add a reference.
 
static void release (const ReferenceCounted *ptr_r)
 Called by zypp::intrusive_ptr to add a reference.
 
- Protected Member Functions inherited from zypp::base::ReferenceCounted
virtual std::ostream & dumpOn (std::ostream &str) const
 Overload to realize std::ostream & operator<<.
 
virtual void ref_to (unsigned) const
 Trigger derived classes after refCount was increased.
 
virtual void unref_to (unsigned) const
 Trigger derived classes after refCount was decreased.
 

Detailed Description

Describe a solver problem and offer solutions.

Definition at line 26 of file ResolverProblem.h.

Constructor & Destructor Documentation

◆ ResolverProblem() [1/4]

zypp::ResolverProblem::ResolverProblem ( )

Constructor.

Definition at line 92 of file ResolverProblem.cc.

◆ ResolverProblem() [2/4]

zypp::ResolverProblem::ResolverProblem ( std::string  description)

Constructor.

Definition at line 96 of file ResolverProblem.cc.

◆ ResolverProblem() [3/4]

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

Constructor.

Definition at line 100 of file ResolverProblem.cc.

◆ ResolverProblem() [4/4]

zypp::ResolverProblem::ResolverProblem ( std::string  description,
std::string  details,
std::vector< std::string > &&  completeProblemInfo 
)

Constructor.

Definition at line 104 of file ResolverProblem.cc.

◆ ~ResolverProblem()

zypp::ResolverProblem::~ResolverProblem ( )

Destructor.

Definition at line 108 of file ResolverProblem.cc.

Member Function Documentation

◆ description()

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

Return a one-line description of the problem.

Definition at line 112 of file ResolverProblem.cc.

◆ details()

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

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

Definition at line 115 of file ResolverProblem.cc.

◆ completeProblemInfo()

const std::vector< std::string > & zypp::ResolverProblem::completeProblemInfo ( ) const

Return a one-line description for each problematic rule in the problem tree.

Definition at line 121 of file ResolverProblem.cc.

◆ solutions()

const 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 118 of file ResolverProblem.cc.

◆ setDescription()

void zypp::ResolverProblem::setDescription ( std::string  description)

Set description of the problem.

Definition at line 124 of file ResolverProblem.cc.

◆ setDetails()

void zypp::ResolverProblem::setDetails ( std::string  details)

Set detail description of the problem.

Definition at line 127 of file ResolverProblem.cc.

◆ addSolution()

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 130 of file ResolverProblem.cc.

Friends And Related Function Documentation

◆ operator<<() [1/2]

std::ostream & operator<< ( std::ostream &  ,
const ResolverProblem obj 
)
related

Stream output.

Definition at line 142 of file ResolverProblem.cc.

◆ operator<<() [2/2]

std::ostream & operator<< ( std::ostream &  ,
const ResolverProblemList obj 
)
related

Stream output.

Definition at line 154 of file ResolverProblem.cc.

Member Data Documentation

◆ _pimpl

RWCOW_pointer<Impl> zypp::ResolverProblem::_pimpl
private

Definition at line 93 of file ResolverProblem.h.


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