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 00018 using namespace std; 00019 00021 namespace zypp 00022 { 00023 00024 IMPL_PTR_TYPE(Resolver); 00025 #if 0 00026 Resolver_Ptr Resolver::_resolver = NULL; 00027 Resolver_Ptr Resolver::resolver() 00028 { 00029 if (_resolver == NULL) { 00030 _resolver = new Resolver(); 00031 } 00032 return _resolver; 00033 } 00034 #endif 00035 00036 // 00037 // METHOD NAME : Resolver::Resolver 00038 // METHOD TYPE : Ctor 00039 // 00040 Resolver::Resolver( const ResPool & pool ) 00041 { 00042 _pimpl = new solver::detail::Resolver(pool); 00043 } 00044 00046 // 00047 // METHOD NAME : Resolver::~Resolver 00048 // METHOD TYPE : Dtor 00049 // 00050 Resolver::~Resolver() 00051 {} 00052 00054 // 00055 // Resolver interface forwarded to implementation 00056 // 00058 00059 bool Resolver::verifySystem () 00060 { return _pimpl->verifySystem(); } 00061 bool Resolver::establishPool () 00062 { return _pimpl->establishPool(); } 00063 bool Resolver::freshenPool () 00064 { return _pimpl->freshenPool(); } 00065 bool Resolver::resolvePool () 00066 { return _pimpl->resolvePool (); } 00067 void Resolver::undo() 00068 { _pimpl->undo(); } 00069 solver::detail::ResolverContext_Ptr Resolver::context (void) const 00070 { return _pimpl->context(); } 00071 ResolverProblemList Resolver::problems () 00072 { return _pimpl->problems (); } 00073 void Resolver::applySolutions( const ProblemSolutionList & solutions ) 00074 { _pimpl->applySolutions (solutions); } 00075 void Resolver::doUpgrade( UpgradeStatistics & opt_stats_r ) 00076 { _pimpl->doUpgrade(opt_stats_r); } 00077 Arch Resolver::architecture() const 00078 { return _pimpl->architecture(); } 00079 void Resolver::setArchitecture( const Arch & arch ) 00080 { _pimpl->setArchitecture( arch ); } 00081 void Resolver::setForceResolve( const bool force ) 00082 { _pimpl->setForceResolve( force ); } 00083 const bool Resolver::forceResolve() 00084 { return _pimpl->forceResolve(); } 00085 bool Resolver::transactResObject( ResObject::constPtr robj, bool install) 00086 { return _pimpl->transactResObject( robj, install ); } 00087 bool Resolver::transactResKind( Resolvable::Kind kind ) 00088 { return _pimpl->transactResKind( kind ); } 00089 void Resolver::transactReset( ResStatus::TransactByValue causer ) 00090 { _pimpl->transactReset( causer ); } 00091 std::list<PoolItem_Ref> Resolver::problematicUpdateItems( void ) const 00092 { return _pimpl->problematicUpdateItems(); } 00093 00095 } // namespace zypp