Resolver_problems.cc

Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
00002 /* Resolver_problems.cc
00003  *
00004  * Copyright (C) 2000-2002 Ximian, Inc.
00005  * Copyright (C) 2005 SUSE Linux Products GmbH
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License,
00009  * version 2, as published by the Free Software Foundation.
00010  *
00011  * This program is distributed in the hope that it will be useful, but
00012  * WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00019  * 02111-1307, USA.
00020  */
00021 
00022 #include <map>
00023 #include <sstream>
00024 
00025 #include "zypp/solver/detail/Resolver.h"
00026 #include "zypp/solver/detail/SATResolver.h"
00027 #include "zypp/Resolver.h"
00028 #include "zypp/ResolverProblem.h"
00029 
00030 #include "zypp/base/String.h"
00031 #include "zypp/base/Logger.h"
00032 #include "zypp/base/Gettext.h"
00033 
00034 #include "zypp/base/Algorithm.h"
00035 #include "zypp/ResPool.h"
00036 #include "zypp/ResFilters.h"
00037 
00038 
00040 namespace zypp
00041 { 
00042 
00043   namespace solver
00044   { 
00045 
00046     namespace detail
00047     { 
00048 
00049 using namespace std;
00050         
00051 ResolverProblemList
00052 Resolver::problems () const
00053 {
00054     MIL << "Resolver::problems()" << endl;    
00055     return _satResolver->problems();
00056 }
00057 
00058 void
00059 Resolver::applySolutions (const ProblemSolutionList & solutions)
00060 {
00061     for (ProblemSolutionList::const_iterator iter = solutions.begin();
00062          iter != solutions.end(); ++iter) {
00063         ProblemSolution_Ptr solution = *iter;
00064         if (!solution->apply (*this))
00065             break;
00066     }    
00067 }
00068 
00070     };// namespace detail
00073   };// namespace solver
00076 };// namespace zypp
00078 

doxygen