Resolver.cc

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #include <iostream>
00013 
00014 #include "zypp/Resolver.h"
00015 #include "zypp/UpgradeStatistics.h"
00016 #include "zypp/solver/detail/Resolver.h"
00017 #include "zypp/solver/detail/Testcase.h"
00018 
00019 using namespace std;
00020 
00022 namespace zypp
00023 { 
00024 
00025   IMPL_PTR_TYPE(Resolver);
00026 #if 0
00027   Resolver_Ptr Resolver::_resolver = NULL;
00028   Resolver_Ptr Resolver::resolver()
00029   {
00030     if (_resolver == NULL) {
00031         _resolver = new Resolver();
00032     }
00033     return _resolver;
00034   }
00035 #endif
00037   //
00038   //    METHOD NAME : Resolver::Resolver
00039   //    METHOD TYPE : Ctor
00040   //
00041   Resolver::Resolver( const ResPool & pool )
00042   {
00043     _pimpl = new solver::detail::Resolver(pool);
00044   }
00045 
00047   //
00048   //    METHOD NAME : Resolver::~Resolver
00049   //    METHOD TYPE : Dtor
00050   //
00051   Resolver::~Resolver()
00052   {}
00053 
00055   //
00056   //    Resolver interface forwarded to implementation
00057   //
00059 
00060   bool Resolver::verifySystem ()
00061   { return _pimpl->verifySystem(); }
00062   bool Resolver::establishPool ()
00063   { return _pimpl->establishPool(); }
00064   bool Resolver::freshenPool ()
00065   { return _pimpl->freshenPool(); }
00066   bool Resolver::resolvePool ()
00067   { return _pimpl->resolvePool (); }
00068   void Resolver::undo()
00069   { _pimpl->undo(); }
00070   solver::detail::ResolverContext_Ptr Resolver::context (void) const
00071   { return _pimpl->context(); }
00072   ResolverProblemList Resolver::problems ()
00073   { return _pimpl->problems (); }
00074   std::list<std::string> Resolver::problemDescription( void ) const
00075   { return _pimpl->problemDescription (); }    
00076   void Resolver::applySolutions( const ProblemSolutionList & solutions )
00077   { _pimpl->applySolutions (solutions); }      
00078   void Resolver::doUpgrade( UpgradeStatistics & opt_stats_r )
00079   { _pimpl->doUpgrade(opt_stats_r); }
00080   Arch Resolver::architecture() const
00081   { return _pimpl->architecture(); }
00082   void Resolver::setArchitecture( const Arch & arch )
00083   { _pimpl->setArchitecture( arch ); }
00084   void Resolver::setForceResolve( const bool force )
00085   { _pimpl->setForceResolve( force ); }
00086   const bool Resolver::forceResolve()
00087   { return _pimpl->forceResolve(); }
00088   bool Resolver::transactResObject( ResObject::constPtr robj, bool install)
00089   { return _pimpl->transactResObject( robj, install ); }
00090   bool Resolver::transactResKind( Resolvable::Kind kind )
00091   { return _pimpl->transactResKind( kind ); }
00092   void Resolver::transactReset( ResStatus::TransactByValue causer )
00093   { _pimpl->transactReset( causer ); }
00094   std::list<PoolItem_Ref> Resolver::problematicUpdateItems( void ) const
00095   { return _pimpl->problematicUpdateItems(); }
00096   void Resolver::setTimeout( int seconds )
00097   { _pimpl->setTimeout( seconds ); }
00098   void Resolver::setMaxSolverPasses (int count)
00099   { _pimpl->setMaxSolverPasses( count ); }
00100   int Resolver::timeout()
00101   { return _pimpl->timeout(); }
00102   int Resolver::maxSolverPasses()
00103   { return _pimpl->maxSolverPasses(); }
00104   bool Resolver::createSolverTestcase (const std::string & dumpPath)
00105   { solver::detail::Testcase testcase (dumpPath);
00106     return testcase.createTestcase(*_pimpl);}          
00107 
00109 } // namespace zypp

Generated on Tue Nov 28 16:49:30 2006 for zypp by  doxygen 1.5.0