libzypp: zypp::ProblemSolution Class Reference

libzypp 17.38.6

zypp::ProblemSolution Class Reference

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

`#include <zypp/ProblemSolution.h>`

Inheritance diagram for zypp::ProblemSolution:

## Classes
class | Impl
| ProblemSolution implementation. More...

## Public Types
using | SolutionAction_Ptr = solver::detail::SolutionAction_Ptr
using | SolutionActionList = solver::detail::SolutionActionList

## Public Member Functions
| ProblemSolution ()
| Constructor.
| ProblemSolution (std::string description)
| Constructor.
| ProblemSolution (std::string description, std::string details)
| Constructor.
| ~ProblemSolution () override
| Destructor.
const std::string & | description () const
| Return a one-line text description of this solution.
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.
const SolutionActionList & | actions () const
| Return the list of actions forming this solution.
void | setDescription (std::string description)
| Set description of the solution.
void | setDetails (const std::string &details)
| Set detail description of the solution.
void | pushDescriptionDetail (std::string description, bool front=false)
| Collect multiple action descriptions in details (NL separated).
void | addAction (const SolutionAction_Ptr &action)
| Add an action to the actions list.
bool | skipsPatchesOnly () const
| The solution contains only 'do not install patch:' actions.
Public Member Functions inherited from zypp::base::ReferenceCounted
| ReferenceCounted ()
| Default ctor.
| ReferenceCounted (const ReferenceCounted &rhs)
| Copy ctor.
virtual | ~ReferenceCounted ()
| Dtor.
ReferenceCounted & | operator= (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

## 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

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

## Member Typedef Documentation

## ◆ SolutionAction_Ptr

using zypp::ProblemSolution::SolutionAction_Ptr = solver::detail::SolutionAction_Ptr

Definition at line 43 of file ProblemSolution.h.

## ◆ SolutionActionList

using zypp::ProblemSolution::SolutionActionList = solver::detail::SolutionActionList

Definition at line 44 of file ProblemSolution.h.

## Constructor & Destructor Documentation

## ◆ ProblemSolution() [1/3]

zypp::ProblemSolution::ProblemSolution | ( |  | ) |

Constructor.

Definition at line 90 of file ProblemSolution.cc.

## ◆ ProblemSolution() [2/3]

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

Constructor.

Definition at line 94 of file ProblemSolution.cc.

## ◆ ProblemSolution() [3/3]

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

Constructor.

Definition at line 98 of file ProblemSolution.cc.

## ◆ ~ProblemSolution()

zypp::ProblemSolution::~ProblemSolution | ( |  | ) |
| override

Destructor.

Definition at line 102 of file ProblemSolution.cc.

## Member Function Documentation

## ◆ description()

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

Return a one-line text description of this solution.

Definition at line 106 of file ProblemSolution.cc.

## ◆ details()

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 109 of file ProblemSolution.cc.

## ◆ actions()

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

Return the list of actions forming this solution.

Definition at line 112 of file ProblemSolution.cc.

## ◆ setDescription()

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

Set description of the solution.

Definition at line 116 of file ProblemSolution.cc.

## ◆ setDetails()

void zypp::ProblemSolution::setDetails | ( | const std::string & | details | ) |

Set detail description of the solution.

Definition at line 119 of file ProblemSolution.cc.

## ◆ pushDescriptionDetail()

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

Collect multiple action descriptions in details (NL separated).

Definition at line 122 of file ProblemSolution.cc.

## ◆ addAction()

void zypp::ProblemSolution::addAction | ( | const SolutionAction_Ptr & | action | ) |

Add an action to the actions list.

Definition at line 143 of file ProblemSolution.cc.

## ◆ skipsPatchesOnly()

bool zypp::ProblemSolution::skipsPatchesOnly | ( |  | ) | const

The solution contains only 'do not install patch:' actions.

Definition at line 146 of file ProblemSolution.cc.

## Member Data Documentation

## ◆ _pimpl

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

Definition at line 107 of file ProblemSolution.h.

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

- zypp/ProblemSolution.h
- zypp/ProblemSolution.cc