RepositoryImpl.h

Go to the documentation of this file.
00001 
00002 
00003 #ifndef ZYPP_REPOSITORY_IMPL_h
00004 #define ZYPP_REPOSITORY_IMPL_h
00005 
00006 #include <iosfwd>
00007 #include <string>
00008 
00009 #include "zypp/base/ReferenceCounted.h"
00010 #include "zypp/base/NonCopyable.h"
00011 #include "zypp/base/PtrTypes.h"
00012 #include "zypp/base/ProvideNumericId.h"
00013 #include "zypp/ResStore.h"
00014 #include "zypp/Repository.h"
00015 #include "zypp/RepoInfo.h"
00016 
00018 namespace zypp
00019 { 
00020 
00021   namespace repo
00022   { 
00023 
00024     DEFINE_PTR_TYPE(RepositoryImpl);
00025 
00026     class RepositoryImpl : public base::ReferenceCounted,
00027                            public base::ProvideNumericId<RepositoryImpl,Repository::NumericId>,
00028                            private base::NonCopyable
00029     {
00030       friend std::ostream & operator<<( std::ostream & str, const RepositoryImpl & obj );
00031     public:
00032 
00038       RepositoryImpl( const RepoInfo &info = RepoInfo() );
00039 
00043       virtual ~RepositoryImpl();
00044 
00050       const RepoInfo & info() const;
00051 
00052       const ResStore & resolvables() const;
00053 
00054       const std::list<packagedelta::PatchRpm> & patchRpms() const;
00055       const std::list<packagedelta::DeltaRpm> & deltaRpms() const;
00056 
00057       virtual void createResolvables();
00058       virtual void createPatchAndDeltas();
00059     public:
00060       struct null {};
00061 
00063       static RepositoryImpl_Ptr nullimpl()
00064       {
00065         static RepositoryImpl_Ptr _nullimpl( new RepositoryImpl( null() ) );
00066         return _nullimpl;
00067       }
00068 
00069       RepositoryImpl( const null & );
00070 
00071       Repository selfRepository()
00072       { return Repository( this ); }
00073 
00074     protected:
00075       ResStore _store;
00076       std::list<packagedelta::PatchRpm> _patchRpms;
00077       std::list<packagedelta::DeltaRpm> _deltaRpms;
00078     private:
00079       bool _restore_lazy_initialized;
00080       bool _deltas_lazy_initialized;
00081      
00082       RepoInfo _info;
00083     };
00084   }
00085 }
00086 
00087 #endif

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