libzypp 17.31.1
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>
17
19namespace 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 struct 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
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
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.
Definition: CodePitfalls.doc:2
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
Definition: SerialNumber.cc:52
std::list< ProblemSolution_Ptr > ProblemSolutionList
Definition: ProblemTypes.h:43
ProblemSolution implementation.
RW_pointer supporting 'copy on write' functionality.
Definition: PtrTypes.h:459