25#define ZYPP_USE_RESOLVER_INTERNALS
28#include <zypp/base/Gettext.h>
31#include <zypp/base/Logger.h>
32#include <zypp/solver/detail/Resolver.h>
65 std::set<PoolItem>
ret;
71 template <
typename Predicate>
86 {
return new Impl( *
this ); }
99 : _pimpl(
new Impl(
std::move(description),
std::move(details) ) )
107 {
return _pimpl->_description; }
110 {
return _pimpl->_details; }
113 {
return _pimpl->_actions; }
124 if (
_pimpl->_details.empty() )
126 if (
_pimpl->_description.empty() )
134 _pimpl->_description =
_(
"Following actions will be done:");
144 {
_pimpl->_actions.push_back( action ); }
149 return aptr->skipsPatchesOnly();
157 return _pimpl->collectActionItems();
163 os <<
"Solution:" << endl;
164 os <<
obj.description() << endl;
165 if ( !
obj.details().empty() )
166 os <<
obj.details() << endl;
173 for (
const auto &
ptr:
obj )
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Class representing one possible solution to a problem found during resolving.
void setDescription(std::string description)
Set description of the solution.
RWCOW_pointer< Impl > _pimpl
bool skipsPatchesOnly() const
The solution contains only 'do not install patch:' actions.
std::optional< std::set< PoolItem > > getIfSkipsPatchesOnly() const
The patches if skipsPatchesOnly is true.
solver::detail::SolutionAction_Ptr SolutionAction_Ptr
void addAction(SolutionAction_Ptr action)
Add an action to the actions list.
solver::detail::SolutionActionList SolutionActionList
const std::string & description() const
Return a one-line text description of this solution.
ProblemSolution()
Constructor.
virtual ~ProblemSolution()
Destructor.
const SolutionActionList & actions() const
Return the list of actions forming this solution.
void pushDescriptionDetail(std::string description, bool front=false)
Collect multiple action descriptions in details (NL separated)
void setDetails(std::string details)
Set detail description of the solution.
const std::string & details() const
Return a (possibly multi-line) detailed description of this solution or an empty string if there are ...
Easy-to use interface to the ZYPP dependency resolver.
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
std::list< ProblemSolution_Ptr > ProblemSolutionList
ProblemSolution implementation.
Impl * clone() const
clone for RWCOW_pointer
std::set< PoolItem > collectActionItems() const
bool allActionsMatch(Predicate &&predicate) const
Impl(std::string &&description, std::string &&details)
Impl(std::string &&description)
SolutionActionList _actions
#define IMPL_PTR_TYPE(NAME)