libzypp  17.23.5
ResolverProblem.h
Go to the documentation of this file.
1 /*
2  *
3  * Easy-to use interface to the ZYPP dependency resolver
4  *
5  * Author: Stefan Hundhammer <sh@suse.de>
6  *
7  **/
8 
9 #ifndef ZYPP_RESOLVERPROBLEM_H
10 #define ZYPP_RESOLVERPROBLEM_H
11 
12 #include <list>
13 #include <string>
14 #include <vector>
15 
16 #include <zypp/ProblemTypes.h>
17 #include <zypp/ProblemSolution.h>
18 
20 namespace zypp
21 {
27  {
28  public:
32  ResolverProblem( std::string description );
34  ResolverProblem( std::string description, std::string details );
36  ResolverProblem( std::string description, std::string details, std::vector<std::string> &&completeProblemInfo );
37 
40 
41 
45  const std::string & description() const;
46 
51  const std::string & details() const;
52 
56  const std::vector<std::string> & completeProblemInfo() const;
57 
72  const ProblemSolutionList & solutions() const;
73 
74 
78  void setDescription( std::string description );
79 
83  void setDetails( std::string details );
84 
89  void addSolution( ProblemSolution_Ptr solution, bool inFront = false );
90 
91  private:
92  struct Impl;
94  };
95 
97  std::ostream & operator<<( std::ostream &, const ResolverProblem & obj );
98 
100  std::ostream & operator<<( std::ostream &, const ResolverProblemList & obj );
101 
102 
103 } // namespace zypp
105 #endif // ZYPP_RESOLVERPROBLEM_H
106 
zypp::ResolverProblem::ResolverProblem
ResolverProblem()
Constructor.
Definition: ResolverProblem.cc:92
zypp::ResolverProblem::completeProblemInfo
const std::vector< std::string > & completeProblemInfo() const
Return a one-line description for each problematic rule in the problem tree.
Definition: ResolverProblem.cc:121
zypp::ResolverProblem::setDescription
void setDescription(std::string description)
Set description of the problem.
Definition: ResolverProblem.cc:124
ProblemSolution.h
zypp::ResolverProblem::addSolution
void addSolution(ProblemSolution_Ptr solution, bool inFront=false)
Add a solution to this problem.
Definition: ResolverProblem.cc:130
zypp::ResolverProblem::solutions
const ProblemSolutionList & solutions() const
Return the possible solutions to this problem.
Definition: ResolverProblem.cc:118
zypp::base::ReferenceCounted
Base class for reference counted objects.
Definition: ReferenceCounted.h:33
zypp::ProblemSolutionList
std::list< ProblemSolution_Ptr > ProblemSolutionList
Definition: ProblemTypes.h:43
zypp::ResolverProblem::details
const std::string & details() const
Return a (possibly muti-line) detailed description of the problem or an empty string if there are no ...
Definition: ResolverProblem.cc:115
zypp::ResolverProblem::setDetails
void setDetails(std::string details)
Set detail description of the problem.
Definition: ResolverProblem.cc:127
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
zypp::ResolverProblemList
std::list< ResolverProblem_Ptr > ResolverProblemList
Definition: ProblemTypes.h:46
zypp::operator<<
std::ostream & operator<<(std::ostream &str, const Exception &obj)
Definition: Exception.cc:147
zypp::ResolverProblem::Impl
ResolverProblem implementation.
Definition: ResolverProblem.cc:59
zypp::ResolverProblem
Describe a solver problem and offer solutions.
Definition: ResolverProblem.h:26
zypp::ResolverProblem::_pimpl
RWCOW_pointer< Impl > _pimpl
Definition: ResolverProblem.h:92
zypp::RWCOW_pointer< Impl >
ProblemTypes.h
zypp::ResolverProblem::~ResolverProblem
~ResolverProblem()
Destructor.
Definition: ResolverProblem.cc:108
zypp::ResolverProblem::description
const std::string & description() const
Return a one-line description of the problem.
Definition: ResolverProblem.cc:112