1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/Target.cc
16 #include "zypp/Target.h"
17 #include "zypp/target/TargetImpl.h"
21 ///////////////////////////////////////////////////////////////////
23 { /////////////////////////////////////////////////////////////////
25 IMPL_PTR_TYPE(Target);
27 ///////////////////////////////////////////////////////////////////
29 // METHOD NAME : Target::Target
32 Target::Target( const Pathname & root )
33 : _pimpl( new Impl(root) )
37 ///////////////////////////////////////////////////////////////////
39 // METHOD NAME : Target::Target
42 Target::Target( const Impl_Ptr & impl_r )
48 Target_Ptr Target::_nullimpl;
50 /** Null implementation */
51 Target_Ptr Target::nullimpl()
55 _nullimpl = new Target(target::TargetImpl::nullimpl());
61 ///////////////////////////////////////////////////////////////////
63 // Forward to TargetImpl:
65 ///////////////////////////////////////////////////////////////////
70 const ResStore & Target::resolvables()
71 { return _pimpl->resolvables(); }
73 ResStore::resfilter_const_iterator Target::byKindBegin( const ResObject::Kind & kind_r ) const
74 { return _pimpl->byKindBegin( kind_r ); }
76 ResStore::resfilter_const_iterator Target::byKindEnd( const ResObject::Kind & kind_r ) const
77 { return _pimpl->byKindEnd( kind_r ); }
79 target::rpm::RpmDb & Target::rpmDb()
80 { return _pimpl->rpm(); }
82 #ifndef STORAGE_DISABLED
83 /** enables the storage target */
84 bool Target::isStorageEnabled() const
85 { return _pimpl->isStorageEnabled(); }
87 void Target::enableStorage(const Pathname &root_r)
88 { _pimpl->enableStorage(root_r); }
91 Pathname Target::root() const
92 { return _pimpl->root(); }
94 bool Target::providesFile (const std::string & name_str, const std::string & path_str) const
95 { return _pimpl->providesFile (name_str, path_str); }
97 ResObject::constPtr Target::whoOwnsFile (const std::string & path_str) const
98 { return _pimpl->whoOwnsFile (path_str); }
100 std::ostream & Target::dumpOn( std::ostream & str ) const
101 { return _pimpl->dumpOn( str ); }
103 bool Target::setInstallationLogfile(const Pathname & path_r)
104 { return _pimpl->setInstallationLogfile(path_r); }
106 Date Target::timestamp() const
107 { return _pimpl->timestamp(); }
110 { return _pimpl->reset(); }
112 /////////////////////////////////////////////////////////////////
114 ///////////////////////////////////////////////////////////////////