From d82968da2cf7fb524a6ceee28236fcef96686fab Mon Sep 17 00:00:00 2001 From: Stanislav Visnovsky Date: Mon, 30 Jan 2006 17:24:10 +0000 Subject: [PATCH] - public access to resolver - ZYpp now creates a resolver for its pool (Michael, please, review) --- zypp/Resolver.h | 1 - zypp/ZYpp.cc | 3 +++ zypp/ZYpp.h | 6 ++++++ zypp/zypp_detail/ZYppImpl.cc | 1 + zypp/zypp_detail/ZYppImpl.h | 6 ++++++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/zypp/Resolver.h b/zypp/Resolver.h index f9b716e..221299b 100644 --- a/zypp/Resolver.h +++ b/zypp/Resolver.h @@ -39,7 +39,6 @@ namespace zypp { public: - protected: /** Ctor */ Resolver( const ResPool & pool ); /** Dtor */ diff --git a/zypp/ZYpp.cc b/zypp/ZYpp.cc index 3bb6861..91c0d85 100644 --- a/zypp/ZYpp.cc +++ b/zypp/ZYpp.cc @@ -60,6 +60,9 @@ namespace zypp ResPool ZYpp::pool() const { return _pimpl->pool(); } + Resolver_Ptr ZYpp::resolver() const + { return _pimpl->resolver(); } + /////////////////////////////////////////////////////////////////// // // Forward to Impl: diff --git a/zypp/ZYpp.h b/zypp/ZYpp.h index 9629cf7..db8df49 100644 --- a/zypp/ZYpp.h +++ b/zypp/ZYpp.h @@ -18,6 +18,7 @@ #include "zypp/base/NonCopyable.h" #include "zypp/base/PtrTypes.h" #include "zypp/Target.h" +#include "zypp/Resolver.h" /////////////////////////////////////////////////////////////////// namespace zypp @@ -71,6 +72,11 @@ namespace zypp * \throws Exception */ void finishTarget(); + + /** + * + */ + Resolver_Ptr resolver() const; protected: /** Dtor */ diff --git a/zypp/zypp_detail/ZYppImpl.cc b/zypp/zypp_detail/ZYppImpl.cc index 29dc5e9..cea8315 100644 --- a/zypp/zypp_detail/ZYppImpl.cc +++ b/zypp/zypp_detail/ZYppImpl.cc @@ -31,6 +31,7 @@ namespace zypp ZYppImpl::ZYppImpl() : _pool() , _sourceFeed( _pool ) + , _resolver( new Resolver(_pool.accessor()) ) { } diff --git a/zypp/zypp_detail/ZYppImpl.h b/zypp/zypp_detail/ZYppImpl.h index c874071..95e1448 100644 --- a/zypp/zypp_detail/ZYppImpl.h +++ b/zypp/zypp_detail/ZYppImpl.h @@ -17,6 +17,7 @@ #include "zypp/ResPoolManager.h" #include "zypp/SourceFeed.h" #include "zypp/Target.h" +#include "zypp/Resolver.h" /////////////////////////////////////////////////////////////////// namespace zypp @@ -49,6 +50,9 @@ namespace zypp SourceFeed_Ref sourceFeed() const { return _sourceFeed; } + Resolver_Ptr resolver() const + { return _resolver; } + void addResolvables (const ResStore& store, bool installed = false); void removeResolvables (const ResStore& store); @@ -75,6 +79,8 @@ namespace zypp SourceFeed_Ref _sourceFeed; /** */ Target_Ptr _target; + /** */ + Resolver_Ptr _resolver; }; /////////////////////////////////////////////////////////////////// -- 2.7.4