RepositoryImpl.cc

Go to the documentation of this file.
00001 
00002 #include "zypp/base/Logger.h"
00003 #include "zypp/repo/RepositoryImpl.h"
00004 
00005 using namespace zypp;
00006 using namespace std;
00007 
00008 namespace zypp { namespace repo {
00009 
00010 IMPL_PTR_TYPE(RepositoryImpl)
00011 
00012 RepositoryImpl::RepositoryImpl( const RepoInfo &info )
00013   : _restore_lazy_initialized(false),
00014     _deltas_lazy_initialized(false),
00015     _info(info)
00016 {
00017 
00018 }
00019 
00020 const RepoInfo & RepositoryImpl::info() const
00021 {
00022   return _info;
00023 }
00024 
00025 RepositoryImpl::~RepositoryImpl()
00026 {
00027 
00028 }
00029 
00030 RepositoryImpl::RepositoryImpl( const null & )
00031   : base::ProvideNumericId<RepositoryImpl,Repository::NumericId>( NULL )
00032 {}
00033 
00034 
00035 const ResStore & RepositoryImpl::resolvables() const
00036 {
00037   if ( ! _restore_lazy_initialized )
00038   {
00039     const_cast<RepositoryImpl*>(this)->createResolvables();
00040     const_cast<RepositoryImpl*>(this)->_restore_lazy_initialized = true;
00041   }
00042   return _store;
00043 }
00044 
00045 void RepositoryImpl::createResolvables()
00046 {
00047   WAR << "createResolvables() not implemented" << endl;
00048 }
00049 
00050 void RepositoryImpl::createPatchAndDeltas()
00051 {
00052   WAR << "createPatchAndDeltas() not implemented" << endl;
00053 }
00054 
00055 const std::list<packagedelta::PatchRpm> &
00056 RepositoryImpl::patchRpms() const
00057 {
00058   if ( ! _deltas_lazy_initialized )
00059   {
00060     const_cast<RepositoryImpl*>(this)->createPatchAndDeltas();
00061     const_cast<RepositoryImpl*>(this)->_deltas_lazy_initialized = true;
00062   }
00063   return _patchRpms;
00064 }
00065 
00066 const std::list<packagedelta::DeltaRpm> &
00067 RepositoryImpl::deltaRpms() const
00068 {
00069   if ( ! _deltas_lazy_initialized )
00070   {
00071     const_cast<RepositoryImpl*>(this)->createPatchAndDeltas();
00072     const_cast<RepositoryImpl*>(this)->_deltas_lazy_initialized = true;
00073   }
00074   return _deltaRpms;
00075 }
00076 
00077 } } // ns
00078 

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