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   ResStore::resfilter_const_iterator Target::byKindBegin( const ResObject::Kind & kind_r  ) const
00071   { return _pimpl->byKindBegin( kind_r ); }
00072   
00073   ResStore::resfilter_const_iterator Target::byKindEnd( const ResObject::Kind & kind_r  ) const
00074   { return _pimpl->byKindEnd( kind_r ); }
00075   
00076   target::rpm::RpmDb & Target::rpmDb()
00077   { return _pimpl->rpm(); }
00078 
00079 #ifndef STORAGE_DISABLED
00080 
00081   bool Target::isStorageEnabled() const
00082   { return _pimpl->isStorageEnabled(); }
00083 
00084   void Target::enableStorage(const Pathname &root_r)
00085   { _pimpl->enableStorage(root_r); }
00086 #endif
00087 
00088   Pathname Target::root() const
00089   { return _pimpl->root(); }
00090 
00091   bool Target::providesFile (const std::string & name_str, const std::string & path_str) const
00092   { return _pimpl->providesFile (name_str, path_str); }
00093 
00094   ResObject::constPtr Target::whoOwnsFile (const std::string & path_str) const
00095   { return _pimpl->whoOwnsFile (path_str); }
00096 
00097   std::ostream & Target::dumpOn( std::ostream & str ) const
00098   { return _pimpl->dumpOn( str ); }
00099 
00100   bool Target::setInstallationLogfile(const Pathname & path_r)
00101   { return _pimpl->setInstallationLogfile(path_r); }
00102 
00103   Date Target::timestamp() const
00104   { return _pimpl->timestamp(); }
00105   
00106   void Target::reset()
00107   { return _pimpl->reset(); }
00108   
00110 } // namespace zypp

Generated on Tue Sep 25 19:23:08 2007 for libzypp by  doxygen 1.5.3