libzypp  10.5.0
ResolverProblem.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Easy-to use interface to the ZYPP dependency resolver
00004  *
00005  * Author: Stefan Hundhammer <sh@suse.de>
00006  *
00007  **/
00008 
00009 #ifndef ZYPP_RESOLVERPROBLEM_H
00010 #define ZYPP_RESOLVERPROBLEM_H
00011 
00012 #include <list>
00013 #include <string>
00014 
00015 #include "zypp/base/ReferenceCounted.h"
00016 #include "zypp/base/PtrTypes.h"
00017 #include "zypp/ProblemSolution.h"
00018 
00020 namespace zypp
00021 { 
00022 
00023 
00024     class ResolverProblem : public base::ReferenceCounted
00025     {
00026     private:
00027 
00032         void clear();
00033 
00034 
00035         //
00036         // Data members
00037         //
00038 
00039         Resolver_constPtr       _resolver;
00040         std::string             _description;
00041         std::string             _details;
00042         ProblemSolutionList     _solutions;
00043 
00044     public:
00045 
00049         ResolverProblem( const std::string & description, const std::string & details );
00050 
00054         ~ResolverProblem();
00055 
00056         // ---------------------------------- I/O
00057 
00058         friend std::ostream& operator<<(std::ostream&, const ResolverProblem & problem);
00059 
00060         // ---------------------------------- accessors
00061 
00065         std::string description() const { return _description; }
00066 
00071         std::string details() const { return _details; }
00072 
00076         void setDescription(const std::string & description)
00077             { _description=description; }
00078 
00082         void setDetails(const std::string & detail)
00083             { _details=detail; }
00084 
00099         ProblemSolutionList solutions() const;
00100 
00104         Resolver_constPtr resolver() const { return _resolver; }
00105 
00106         // ---------------------------------- methods
00107 
00112         void addSolution( ProblemSolution_Ptr solution, bool inFront = false );
00113 
00114     };
00116 };// namespace zypp
00118 
00119 #endif // ZYPP_RESOLVERPROBLEM_H
00120