libzypp  17.31.31
ProblemSolution.h
Go to the documentation of this file.
1 
9 #ifndef ZYPP_PROBLEMSOLUTION_H
10 #define ZYPP_PROBLEMSOLUTION_H
11 
12 #include <list>
13 #include <string>
14 
15 #include <zypp/ProblemTypes.h>
16 #include <zypp/ResolverProblem.h>
17 
19 namespace zypp
20 {
38  {
39  public:
40  typedef solver::detail::SolutionAction_Ptr SolutionAction_Ptr;
42 
45 
47  ProblemSolution( std::string description );
48 
50  ProblemSolution( std::string description, std::string details );
51 
53  virtual ~ProblemSolution();
54 
55 
59  const std::string & description() const;
60 
65  const std::string & details() const;
66 
70  const SolutionActionList & actions() const;
71 
75  void setDescription( std::string description );
76 
80  void setDetails( std::string details );
81 
85  void pushDescriptionDetail( std::string description, bool front = false );
86 
87 
91  void addAction( SolutionAction_Ptr action );
92 
93  public:
95  bool skipsPatchesOnly() const;
96 
97  private:
98  struct Impl;
100  };
101 
103  std::ostream& operator<<(std::ostream&, const ProblemSolution & obj );
104 
106  std::ostream& operator<<(std::ostream&, const ProblemSolutionList & obj );
107 
108 } // namespace zypp
110 #endif // ZYPP_PROBLEMSOLUTION_H
111 
std::list< ProblemSolution_Ptr > ProblemSolutionList
Definition: ProblemTypes.h:43
const SolutionActionList & actions() const
Return the list of actions forming this solution.
RWCOW_pointer< Impl > _pimpl
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
Definition: SerialNumber.cc:52
ProblemSolution()
Constructor.
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 ...
void addAction(SolutionAction_Ptr action)
Add an action to the actions list.
Base class for reference counted objects.
solver::detail::SolutionAction_Ptr SolutionAction_Ptr
solver::detail::SolutionActionList SolutionActionList
void setDescription(std::string description)
Set description of the solution.
bool skipsPatchesOnly() const
The solution contains only &#39;do not install patch:&#39; actions.
ProblemSolution implementation.
const std::string & description() const
Return a one-line text description of this solution.
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
void pushDescriptionDetail(std::string description, bool front=false)
Collect multiple action descriptions in details (NL separated)
Class representing one possible solution to a problem found during resolving.
virtual ~ProblemSolution()
Destructor.
std::list< SolutionAction_Ptr > SolutionActionList
Definition: Types.h:48