libzypp  15.28.6
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 
94  private:
95  class Impl;
97  };
98 
100  std::ostream& operator<<(std::ostream&, const ProblemSolution & obj );
101 
103  std::ostream& operator<<(std::ostream&, const ProblemSolutionList & obj );
104 
105 } // namespace zypp
107 #endif // ZYPP_PROBLEMSOLUTION_H
108 
std::list< ProblemSolution_Ptr > ProblemSolutionList
Definition: ProblemTypes.h:43
const std::string & details() const
Return a (possibly multi-line) detailed description of this solution or an empty string if there are ...
RWCOW_pointer< Impl > _pimpl
ProblemSolution()
Constructor.
void setDetails(std::string details)
Set detail description of the solution.
const std::string & description() const
Return a one-line text description of this solution.
void addAction(SolutionAction_Ptr action)
Add an action to the actions list.
std::ostream & operator<<(std::ostream &str, const Exception &obj)
Definition: Exception.cc:120
Base class for reference counted objects.
const SolutionActionList & actions() const
Return the list of actions forming this solution.
solver::detail::SolutionAction_Ptr SolutionAction_Ptr
solver::detail::SolutionActionList SolutionActionList
void setDescription(std::string description)
Set description of the solution.
ProblemSolution implementation.
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