Target.cc

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #include <cassert>
00013 
00014 #include <iostream>
00015 
00016 #include "zypp/Target.h"
00017 #include "zypp/target/TargetImpl.h"
00018 
00019 using namespace std;
00020 
00022 namespace zypp
00023 { 
00024 
00025   IMPL_PTR_TYPE(Target);
00026 
00028   //
00029   //    METHOD NAME : Target::Target
00030   //    METHOD TYPE : Ctor
00031   //
00032   Target::Target( const Pathname & root )
00033   : _pimpl( new Impl(root) )
00034   {
00035   }
00036 
00038   //
00039   //    METHOD NAME : Target::Target
00040   //    METHOD TYPE : Ctor
00041   //
00042   Target::Target( const Impl_Ptr & impl_r )
00043   : _pimpl( impl_r )
00044   {
00045     assert( impl_r );
00046   }
00047 
00048   Target_Ptr Target::_nullimpl;
00049 
00051   Target_Ptr Target::nullimpl()
00052   {
00053     if (! _nullimpl)
00054     {
00055       _nullimpl = new Target(target::TargetImpl::nullimpl());
00056     }
00057     return _nullimpl;
00058   }
00059 
00060 
00062   //
00063   //    Forward to TargetImpl:
00064   //
00066 
00067   const ResStore & Target::resolvables()
00068   { return _pimpl->resolvables(); }
00069 
00070   target::rpm::RpmDb & Target::rpmDb()
00071   { return _pimpl->rpm(); }
00072 
00073 #ifndef STORAGE_DISABLED
00074 
00075   bool Target::isStorageEnabled() const
00076   { return _pimpl->isStorageEnabled(); }
00077 
00078   void Target::enableStorage(const Pathname &root_r)
00079   { _pimpl->enableStorage(root_r); }
00080 #endif
00081 
00082   Pathname Target::root() const
00083   { return _pimpl->root(); }
00084 
00085   bool Target::providesFile (const std::string & name_str, const std::string & path_str) const
00086   { return _pimpl->providesFile (name_str, path_str); }
00087 
00088   ResObject::constPtr Target::whoOwnsFile (const std::string & path_str) const
00089   { return _pimpl->whoOwnsFile (path_str); }
00090 
00091   std::ostream & Target::dumpOn( std::ostream & str ) const
00092   { return _pimpl->dumpOn( str ); }
00093 
00094   void Target::getResolvablesToInsDel ( const ResPool pool_r,
00095                                     PoolItemList & dellist_r,
00096                                     PoolItemList & instlist_r,
00097                                     PoolItemList & srclist_r ) const
00098   { _pimpl->getResolvablesToInsDel( pool_r, dellist_r, instlist_r, srclist_r ); }
00099 
00100   bool Target::setInstallationLogfile(const Pathname & path_r)
00101   { return _pimpl->setInstallationLogfile(path_r); }
00102 
00104 } // namespace zypp

Generated on Thu Jul 6 00:07:26 2006 for zypp by  doxygen 1.4.6