libzypp  15.28.6
zypp::ProblemSolution Class Reference

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

#include <ProblemSolution.h>

Inheritance diagram for zypp::ProblemSolution:

Classes

class  Impl
 ProblemSolution implementation. More...
 

Public Types

typedef
solver::detail::SolutionAction_Ptr 
SolutionAction_Ptr
 
typedef
solver::detail::SolutionActionList 
SolutionActionList
 

Public Member Functions

 ProblemSolution ()
 Constructor. More...
 
 ProblemSolution (std::string description)
 Constructor. More...
 
 ProblemSolution (std::string description, std::string details)
 Constructor. More...
 
virtual ~ProblemSolution ()
 Destructor. More...
 
const std::string & description () const
 Return a one-line text description of this solution. More...
 
const std::string & details () const
 Return a (possibly multi-line) detailed description of this solution or an empty string if there are no useful details. More...
 
const SolutionActionListactions () const
 Return the list of actions forming this solution. More...
 
void setDescription (std::string description)
 Set description of the solution. More...
 
void setDetails (std::string details)
 Set detail description of the solution. More...
 
void pushDescriptionDetail (std::string description, bool front=false)
 Collect multiple action descriptions in details (NL separated) More...
 
void addAction (SolutionAction_Ptr action)
 Add an action to the actions list. More...
 
- Public Member Functions inherited from zypp::base::ReferenceCounted
 ReferenceCounted ()
 Default ctor. More...
 
 ReferenceCounted (const ReferenceCounted &rhs)
 Copy ctor. More...
 
virtual ~ReferenceCounted ()
 Dtor. More...
 
ReferenceCountedoperator= (const ReferenceCounted &)
 Assignment. More...
 
unsigned refCount () const
 Return reference counter value. More...
 
void ref () const
 Add a reference. More...
 
void unref () const
 Release a reference. More...
 

Private Attributes

RWCOW_pointer< Impl_pimpl
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &, const ProblemSolution &obj)
 
std::ostream & operator<< (std::ostream &, const ProblemSolutionList &obj)
 

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

Detailed Description

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

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 37 of file ProblemSolution.h.

Member Typedef Documentation

typedef solver::detail::SolutionAction_Ptr zypp::ProblemSolution::SolutionAction_Ptr

Definition at line 40 of file ProblemSolution.h.

Constructor & Destructor Documentation

zypp::ProblemSolution::ProblemSolution ( )

Constructor.

Definition at line 70 of file ProblemSolution.cc.

zypp::ProblemSolution::ProblemSolution ( std::string  description)

Constructor.

Definition at line 74 of file ProblemSolution.cc.

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

Constructor.

Definition at line 78 of file ProblemSolution.cc.

zypp::ProblemSolution::~ProblemSolution ( )
virtual

Destructor.

Definition at line 82 of file ProblemSolution.cc.

Member Function Documentation

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

Return a one-line text description of this solution.

Definition at line 86 of file ProblemSolution.cc.

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

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.cc.

const ProblemSolution::SolutionActionList & zypp::ProblemSolution::actions ( ) const

Return the list of actions forming this solution.

Definition at line 92 of file ProblemSolution.cc.

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

Set description of the solution.

Definition at line 96 of file ProblemSolution.cc.

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

Set detail description of the solution.

Definition at line 99 of file ProblemSolution.cc.

void zypp::ProblemSolution::pushDescriptionDetail ( std::string  description,
bool  front = false 
)

Collect multiple action descriptions in details (NL separated)

Definition at line 102 of file ProblemSolution.cc.

void zypp::ProblemSolution::addAction ( SolutionAction_Ptr  action)

Add an action to the actions list.

Definition at line 123 of file ProblemSolution.cc.

Friends And Related Function Documentation

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

Stream output

Definition at line 128 of file ProblemSolution.cc.

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

Stream output

Definition at line 138 of file ProblemSolution.cc.

Member Data Documentation

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

Definition at line 95 of file ProblemSolution.h.


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