libzypp 17.31.32
ProblemSolution.h
Go to the documentation of this file.
1
9#ifndef ZYPP_PROBLEMSOLUTION_H
10#define ZYPP_PROBLEMSOLUTION_H
11
12#include <set>
13#include <list>
14#include <string>
15#include <optional>
16
17#include <zypp/PoolItem.h>
18#include <zypp/ProblemTypes.h>
20
22namespace zypp
23{
41 {
42 public:
43 typedef solver::detail::SolutionAction_Ptr SolutionAction_Ptr;
45
48
50 ProblemSolution( std::string description );
51
53 ProblemSolution( std::string description, std::string details );
54
56 virtual ~ProblemSolution();
57
58
62 const std::string & description() const;
63
68 const std::string & details() const;
69
73 const SolutionActionList & actions() const;
74
78 void setDescription( std::string description );
79
83 void setDetails( std::string details );
84
88 void pushDescriptionDetail( std::string description, bool front = false );
89
90
94 void addAction( SolutionAction_Ptr action );
95
96 public:
98 bool skipsPatchesOnly() const;
99
101 std::optional<std::set<PoolItem>> getIfSkipsPatchesOnly() const;
102
103 private:
104 struct Impl;
106 };
107
109 std::ostream& operator<<(std::ostream&, const ProblemSolution & obj );
110
112 std::ostream& operator<<(std::ostream&, const ProblemSolutionList & obj );
113
114} // namespace zypp
116#endif // ZYPP_PROBLEMSOLUTION_H
117
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Definition AutoDispose.h:94
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 ...
Base class for reference counted objects.
std::list< SolutionAction_Ptr > SolutionActionList
Definition Types.h:48
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.