libzypp
10.5.0
|
00001 00009 #ifndef ZYPP_PROBLEMSOLUTION_H 00010 #define ZYPP_PROBLEMSOLUTION_H 00011 00012 #include <list> 00013 #include <string> 00014 00015 #include "zypp/base/ReferenceCounted.h" 00016 #include "zypp/base/PtrTypes.h" 00017 #include "zypp/solver/detail/Resolver.h" 00018 #include "zypp/ResolverProblem.h" 00019 #include "zypp/solver/detail/SolutionAction.h" 00020 #include "zypp/solver/detail/Types.h" 00021 00023 namespace zypp 00024 { 00025 00026 00042 class ProblemSolution : public base::ReferenceCounted 00043 { 00044 protected: 00045 00050 void clear(); 00051 00052 // 00053 // Data members 00054 // 00055 ResolverProblem_Ptr _problem; 00056 solver::detail::CSolutionActionList _actions; 00057 std::string _description; 00058 std::string _details; 00059 00060 public: 00061 00065 ProblemSolution( ResolverProblem_Ptr parent, const std::string & description, const std::string & details ); 00066 00070 ~ProblemSolution(); 00071 00072 // ---------------------------------- I/O 00073 00074 friend std::ostream& operator<<(std::ostream&, const ProblemSolution & solution); 00075 friend std::ostream& operator<<(std::ostream&, const ProblemSolutionList & solutionlist); 00076 friend std::ostream& operator<<(std::ostream&, const CProblemSolutionList & solutionlist); 00077 00078 // ---------------------------------- accessors 00082 std::string description() const { return _description; } 00083 00088 std::string details() const { return _details; } 00089 00093 ResolverProblem_Ptr problem() const { return _problem; } 00094 00095 // ---------------------------------- methods 00096 00102 bool apply (solver::detail::Resolver & resolver); 00103 00107 void addAction( solver::detail::SolutionAction_constPtr action ); 00108 00109 solver::detail::CSolutionActionList actions() {return _actions;} 00110 00111 }; 00112 00113 00115 };// namespace zypp 00117 00118 #endif // ZYPP_PROBLEMSOLUTION_H 00119