25#define ZYPP_USE_RESOLVER_INTERNALS
65 std::set<PoolItem> ret;
67 ret.insert( aptr->item() );
71 template <
typename Predicate>
77 if ( not
std::invoke( std::forward<Predicate>(predicate), aptr ) )
86 {
return new Impl( *
this ); }
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();
153 std::optional<std::set<PoolItem>> ProblemSolution::getIfSkipsPatchesOnly()
const
163 os <<
"Solution:" << endl;
173 for (
const auto & ptr: obj )
Class representing one possible solution to a problem found during resolving.
void setDescription(std::string description)
Set description of the solution.
void setDetails(const std::string &details)
Set detail description of the solution.
RWCOW_pointer< Impl > _pimpl
bool skipsPatchesOnly() const
The solution contains only 'do not install patch:' actions.
const std::string & description() const
Return a one-line text description of this solution.
solver::detail::SolutionAction_Ptr SolutionAction_Ptr
ProblemSolution()
Constructor.
const SolutionActionList & actions() const
Return the list of actions forming this solution.
solver::detail::SolutionActionList SolutionActionList
void pushDescriptionDetail(std::string description, bool front=false)
Collect multiple action descriptions in details (NL separated)
const std::string & details() const
Return a (possibly multi-line) detailed description of this solution or an empty string if there are ...
void addAction(const SolutionAction_Ptr &action)
Add an action to the actions list.
~ProblemSolution() override
Destructor.
std::enable_if< std::is_member_pointer< typenamestd::decay< Functor >::type >::value, typenamestd::result_of< Functor &&(Args &&...)>::type >::type invoke(Functor &&f, Args &&... args)
Easy-to use interface to the ZYPP dependency resolver.
std::list< ProblemSolution_Ptr > ProblemSolutionList
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
ProblemSolution implementation.
Impl * clone() const
clone for RWCOW_pointer
std::set< PoolItem > collectActionItems() const
friend Impl * rwcowClone(const Impl *rhs)
bool allActionsMatch(Predicate &&predicate) const
Impl(std::string &&description, std::string &&details)
Impl(std::string &&description)
SolutionActionList _actions
#define IMPL_PTR_TYPE(NAME)